by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:53

    qtxie on master

    FIX: use prescan in the highlig… (compare)

  • 13:49
    hiiamboris commented #4467
  • 13:38
    hiiamboris commented #4467
  • 13:12
    qtxie commented #4467
  • 13:11
    qtxie commented #4467
  • 10:08
    hiiamboris commented #4467
  • 10:07
    hiiamboris commented #4467
  • 10:04
    hiiamboris commented #4469
  • 10:03
    hiiamboris commented #4469
  • 03:20
    Travis red/red (master) errored (4898)
  • 03:20
    Travis red/red (master) errored (4903)
  • 02:57
    Travis red/red (master) errored (4903)
  • 02:53
    qtxie commented #4467
  • 02:47
    qtxie commented #4467
  • 02:39

    qtxie on master

    FIX: some tests failed on Linux… (compare)

  • May 26 23:55
    greggirwin commented #4469
  • May 26 19:51
    greggirwin commented #4464
  • May 26 19:48
    greggirwin commented #4464
  • May 26 19:37
    9214 review_requested #4137
  • May 26 19:35
    9214 review_requested #4332
Dave Andersen
@dander
@greggirwin, here's a concrete example of using path construction (granted with all indexes in this case). It would probably be better to use word! instead of index in the cases where that is applicable, but then it would need to know if that word! was being reused in that branch of the tree...
Gabriele Santilli
@giesse
@loziniak sure, but, path! is already a block-like type, while pair! is not.
Gregg Irwin
@greggirwin
@dander path construction isn't an issue. That's an alternative, because you're making the path from other parts, not putting parens in a literal path for their evaluative property.
@GiuseppeChellemi examples?
Vladimir Vasilyev
@9214

For the reference, the main argument against paren! in paths is a stylistic one: you can abuse them with multi-line expressions or ungodly mess like inclusion of external files and deeply nested code logic.

head/(
...
<you can embed whole Red runtime here for all I care>
...
)/(
...
)/tail

One path (no pun intended) we can take is to prohibit newlines during path! lexing, thus allowing only simple, single-line expressions. Another is to get rid of them entirely.

Maciej Łoziński
@loziniak
And one more – leave it as it is now, letting a programmer choose her own style.
luce80
@luce80
@greggirwin example:
page: 1 per_page: 10

for page 1 41 1 [
    out: probe join out-head [per_page * page - per_page + 1 "-" per_page * page  ".json.txt" ]
    file: read to-rebol-file out
    probe length? file
    file: head remove/part file 3 ; remove initilal (UTF?) garbage
    json: json-to-block file
    ;probe copy/part mold json 100
    for n 2 11 1 [
        attempt[insert/only tail items json/("html")/("body")/("div")/4/("div")/("div")/("div")/2/("div")/1/("div")/("div")/1/("div")/:n/("div")/1/("div")/("span")]
    ]
    page: page + 1
    if (probe length? file) < 90 [break]; 75
]
probe count: length? items
{
probe items/2/1/("a")/1/("#text") ; creator
probe items/2/1/("a")/2/("@href") ; link
probe items/2/1/("a")/2/("strong")/("#text") ; filename
probe items/2/2/("#text") ; description
}
Gregg Irwin
@greggirwin
@luce80 thanks. String keys are probably the strongest use case for the feature.
But here is another case where doing k: "div" once, and using :k in the path would be a big win. Or :div. :^)
Gregg Irwin
@greggirwin
json/("html")/("body")/("div")/4/("div")/("div")/("div")/2/("div")/1/("div")/("div")/1/("div")/:n/("div")/1/("div")/("span")
json/("html")/("body")/:div/4/:div/:div/:div/2/:div/1/:div/:div/1/:div/:n/:div/1/:div/("span")
json/("html")/("body")/:d/4/:d/:d/:d/2/:d/1/:d/:d/1/:d/:n/:d/1/:d/("span")
Vladimir Vasilyev
@9214
Allowing strings in paths without requiring extra parenthesis would make more sense. But then we end up with the exact same stylistic argument against multi-line {...}.
Gregg Irwin
@greggirwin
Yup.
Respectech
@Respectech
I also vote to leave parens in paths. Power to the people!
Petr Krenzelok
@pekr
Ditto, found them useful sometimes ....
GiuseppeChillemi
@GiuseppeChillemi

@greggirwin use parenthesis in path to select from an another block the position of the column I am searching for in the current one:

>> columns: [cd_ar 1 description 2 orders 5]
== [cd_ar 1 description 2 orders 5]
>> values: ["C00022" "Master Market" none none "22"]
== ["C00022" "Master Market" none none "22"]
>> values/(columns/description)
== "Master Market"
>>

When column name sequence index name reflect data position I use the following form to pick the data form the right position.

>> columns: [cd_ar  description  something something-else orders]
== [cd_ar description something something-else orders]
>> values: ["C00022" "Master Market" none none "22"]
== ["C00022" "Master Market" none none "22"]
>> values/(index? find columns 'description)
== "Master Market"
>>
GiuseppeChillemi
@GiuseppeChillemi

Sometime I define an helper function to return me the right index

>>  columns: [cd_ar  description  something something-else orders]
== [cd_ar description something something-else orders]
>> values: ["C00022" "Master Market" none none "22"]
== ["C00022" "Master Market" none none "22"]
>> ps: function [column columns-pos] [index? find columns-pos column]
== func [column columns-pos][index? find columns-pos column]
>> values/(ps 'description columns)
== "Master Market"
>>

It is really useful when I navigate database data. Also I am planning more complex index retrieving experimenting with custom datatypes and their data position but I am currently in early stage as the data description language is currently building up in my mind.

GiuseppeChillemi
@GiuseppeChillemi
Also I am working on a way to access data in multiple separate blocks where each part of the path could jump to another pre-existant or computed block. This work is based on path access notation experiment created from ToomasV. All of those ways to dinamically access data blocks need parenthesis to be expressed in "serialized" form (hope the term "serialized" is used correctly here).
Beeno Tung
@beenotung
I tried to compile a hello world program w/wo -r flag,
why is the binary smaller in dev mode?
shouldn't release version be trimmed more aggressively?
Semseddin Moldibi
@endo64
@beenotung in release mode (-r) your compiled program and Red runtime are packed into one file, that's why it is bigger. In dev mode runtime is not included in your executable, that means you need to ship your program with the runtime (libRedRT.dll on Windows) otherwise it won't work.
Gregg Irwin
@greggirwin
Thanks for the examples @GiuseppeChillemi. Much appreciated.
GiuseppeChillemi
@GiuseppeChillemi
@greggirwin Your are welcome. Parenthesis impact a lot on my day to day programming style.
Palaing
@Palaing

I want to split a string (a 2-column table from a database query) with both "^-" and "^/" characters to get a flat block of items.
When the string is too long (13060 characters), the following:

split rawdata charset "^-^/"

fails with a "not enough memory" message. While this:

split replace/all rawdata  "^/" "^-" "^-"

works fine and fast.
I was just wondering why the first one would not...

hiiamboris
@hiiamboris
@Palaing what's the build you're using? I cannot reproduce the issue on Red 0.6.4 for Windows built 25-Sep-2019/22:36:30+03:00 commit #f753e25
GiuseppeChillemi
@GiuseppeChillemi
@greggirwin and I think I have just found a possible solution to access data with reusable paths. But I will need a little help from the RED team that should implement a feature to express this solution in a coincise manner.
Palaing
@Palaing
@hiiamboris I'm on Red 0.6.4 date: 3-Apr-2019/11:40:57+02:00 commit: #492254683df98fd779b4157466f54a625007d80e
(I don't change so often as I'm used to gui-console-not-starting problems)
hiiamboris
@hiiamboris
@Palaing maybe it's time to update it then ☻
Palaing
@Palaing
@hiiamboris you're right, I'm on the way. Now in step "get the antivirus to accept it's not malware"
Palaing
@Palaing
@hiiamboris thanks, the latest build fixed the issue :)
hiiamboris
@hiiamboris
:+1:
Gregg Irwin
@greggirwin
@Palaing if you update, you should now also have the CSV codec available. load/as expects commas, but the load-csv func can be used directly to specify that it's tab delimited. And has a /flat refinement.
GaryMiller
@GaryMiller
Just curious to see if anyone benchmarked the new Lex code yet. I know it's not released yet but was too excited to about it not to ask. Rough numbers are fine. Like does it seem twice as fast? Three times as fast? Be still my heart!
Gregg Irwin
@greggirwin
Have to wait for news from the inner circle. :^)
Nikita Korotkin
@TheHowdy_gitlab
(Not sure if this the right place to post this, my apologies if not)
That thing can probably be rather easily implemented in red and have about the tenth of the executable size of the original(the original is written in electron)
JacobGood1
@JacobGood1
been out of the loop, what is this lex code
GiuseppeChillemi
@GiuseppeChillemi
Would it be possible to change the block while a path is being decoded ? I mean technically and not as an actual feature. Would it be difficult for RED ?
Gregg Irwin
@greggirwin

@JacobGood1 Red lexer rewritten in R/S for improved performance and instrumentation.

@GiuseppeChillemi we'd need to add a callback feature so each segment would trigger that. Easy to mock up at the mezz level, which would be step one.

@TheHowdy_gitlab thanks for posting! That link ties into 2 topics. An old one is a unit! form and datatype. We can do it with blocks today, of course, but still want to consider a direct lexical form. It's tricky, because so much value of units (as Frink and Wolfram also show) comes from having their relative rules built in. That means units may be an optional module. The newer idea is that of Expect, which is an interrogative automation interface. We don't need automation here, but something like that, or Caligator, are based on the idea that you may only get a partial input, and need to "talk back" to the user to guide them in possible completion options.

GiuseppeChillemi
@GiuseppeChillemi
@greggirwin Gregg, I will write a proposal and some usage examples once the idea will be complete.
bferris413
@bferris413
Howdy, any updates or roadmap for when port! type will be generally implemented/usable? I check the website regularly and drop in here from time to time to see the latest, haven't seen much about it though
Nenad Rakocevic
@dockimbel
@bferris413 Hey, port! type is already present in the master branch, but low-level I/O networking is still a WIP. We have a working async TCP and TLS ports implementation (both client and server-side), but they still require more work to cover all the target platforms. Once we have UDP and DNS, we can push the code into a branch on the red/red repo, so that people can play with them. No ETA for that yet, as we have several related sub-tasks to complete first (like some memory management improvements for I/O).
bferris413
@bferris413
Sounds good @dockimbel , thanks for the update and work involved :+1:
Nenad Rakocevic
@dockimbel
@bferris413 You're welcome. We'll publish more info about it when it will be more usable.
Nikita Korotkin
@TheHowdy_gitlab
@bferris413 just to prevent confusion, I'm by no means
in the red-team, just a curious visitor of this gitter :). So I can't give u that kind of info.
bferris413
@bferris413
Ah, "howdy" is an american-english way of saying "hello" (which is how I meant it) =)
GiuseppeChillemi
@GiuseppeChillemi
@dockimbel How is the RED team composed ? I mean either how many are the members of the team and which is their respective role. I think you have never talked about this. It would be good to know about all of you.
Gregg Irwin
@greggirwin

@GiuseppeChillemi, there are now 6 of us dedicated full time to Red, and another 6 or so that contribute regularly but have other primary jobs. Then there is a wider circle in the community with some deep work done. e.g. @rcqls on GTK and @hiiamboris on tickets requiring deep analysis and R/S skills. Respective roles, in general:

  • Nenad is the leader, for language vision and design, overall direction, and deep core dev
  • Qingtian is his right hand in all that, and figuring out how to make it all work across platforms
  • I focus on management, business, logistics, community, high level design/dev, "and stuff"
  • Bitbegin is Core, fixes and features, Wallet, VSCode, and support for Nenad and Qingtian
  • ToomasV leads thinkering and has internal tasks related to tools, education, and examples
  • Lucinda heads PR, which includes many channels, blog, docs, and work on new web sites

Warp, Rebolek, Peter, Harald, Semseddin, GregT, Gabriele work on many things, because so much support is needed. Infrastructure, testing, research, codecs, blockchain R&D, docs, deep design. I wish I could name everyone and list their contributions, because they (you) all deserve it, but that's yet another task I'd have to put on my list. ;^)

Vladimir Vasilyev
@9214
@greggirwin I think @meijeru's work on Red specification deserves a dedicated mention as well.
Gregg Irwin
@greggirwin
Indeed! And Mike and Arie for red-by-example.