## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• 04:16

qtxie on master

FEAT: better way to do redraw i… (compare)

• Aug 15 23:11

dockimbel on master

FEAT: forces the inclusion of G… (compare)

• Aug 15 22:51
dockimbel commented on 19ebddd
• Aug 15 22:51

dockimbel on master

FIX: better fix for #5008. (compare)

• Aug 15 22:27
GiuseppeChillemi commented #120
• Aug 15 20:20
dockimbel commented on 19ebddd
• Aug 15 16:08
hiiamboris commented #4323
• Aug 15 14:10
dockimbel commented #4323
• Aug 15 13:43
dockimbel closed #117
• Aug 15 13:43
dockimbel commented #117
• Aug 15 13:42

dockimbel on master

FEAT: implements REP#117 (inser… (compare)

• Aug 15 13:41
dockimbel commented #117
• Aug 15 13:40
dockimbel labeled #117
• Aug 15 13:40
dockimbel assigned #117
• Aug 15 13:36
dockimbel closed #120
• Aug 15 13:35
dockimbel labeled #120
• Aug 15 13:35
dockimbel commented #120
• Aug 15 12:20
hiiamboris commented on 19ebddd
• Aug 15 12:18
dockimbel closed #5008
• Aug 15 12:15

dockimbel on master

FIX: additional fix for #5008 (… (compare)

hiiamboris
@hiiamboris
>> 'a/+4/g
== a/4/g
GiuseppeChillemi
@GiuseppeChillemi
I know about this problem but I don't know how to solve it. Or at least, I know how to solve in my proto dialect: having the previous path segment with a special symbol which means "the next one is a skip number"
Gregg Irwin
@greggirwin
I would probably use parens to denote escaping to logic 'a/d/(+4)/g, so you can distinguish literal indexes.
Or even better 'a/(d -4)/g
That way you don't have to use lookahead logic.
GiuseppeChillemi
@GiuseppeChillemi
It's a solution for custom dialects but I would like to find one compatible with parens. Those lit parenss are tempting me again: '(d - 4)
Gregg Irwin
@greggirwin
lit-paren is an oxymoron. :^) Just use a block in those cases.
GiuseppeChillemi
@GiuseppeChillemi
Is escaped parens better?
:-)
Gregg Irwin
@greggirwin
Parens in Red denote a "hot value" which is evaluated. lit-paren! is a fine name, as a parallel to lit-path!, but we have to draw a line somewhere. e.g. what would a get-paren! mean? But since we already have a value that represents what you want, why not use that? Of course, this is all part of exploring and balancing the core language and what it lets you create. Constraints can be very helpful. e.g., you're using path notation, but if you described your dialect, what are the key elements and actions?
GiuseppeChillemi
@GiuseppeChillemi

Constraints can be very helpful. e.g., you're using path notation, but if you described your dialect, what are the key elements and actions?

Are you telling me to take into considration the key elements of my ideas when I think about path dialects or are you asking me to write them down here?

Gregg Irwin
@greggirwin
I assume you've considered them already, but we don't know what they are in detail. So our recommendations may not match your needs and goals. From what I know, you want a mix of declarative, keyed access and offset navigation. But I don't know if keys can be dynamic, if you need more than +/- offsets, etc.
It's interesting, because we tend to normalize data structures for access either by key or fixed size, but when they are mixed we call it "semi structured" data, which has historically been a challenge to deal with because the "semi" part makes it a bit squishy and easier to get wrong...sometimes, or over time.
GiuseppeChillemi
@GiuseppeChillemi
I'll answer later, I am driving.
GiuseppeChillemi
@GiuseppeChillemi
What you mean for DYNAMIC KEYS in this context?
Gregg Irwin
@greggirwin
Are your keys always literal, or can they be indirect or computed, for example. a/b/c vs k: 'b a/:k/c or using a paren that computes a key.
GiuseppeChillemi
@GiuseppeChillemi

@greggirwin I have read again my last year's notes and your replies. You are right, many things have to be considered but I now think parens are not a good solution. The current working must be maintained, we should just change the path segment operation to skip using some symbol and maintain the current mechanism. Let's made the hypothesis we choose >> or > as skip

This skips 2 positions on the right

word/>>2/word2

This skips 4 positions on the left

word/>>-4/word2

as before but gets the gets the number from :value

word/>>:value/word

as before but gets the gets the number from the resulting of (code)

word/>>(code)/word

But we can just go further.
Paths navigate through series and we have another great Red tool to navigate through them: PARSE! Why don't we use it?
Please take a look at this path:

word/<:[skip 2 thru 'section-start <:]/word

If a path segment has <:[] then the current path series position is passed to PARSE and the block is its RULES argument. While parsing, each time you encounter <: the path current series position is changed to the parse one. If parse fails, the path fails and it returns none.
(Conceptually this last solution seems so easy and straightforward)

I like both ideas but second one is even more powerful and implementable reusing 99% of the code we have in Red.

Gregg Irwin
@greggirwin
Paths don't just navigate through series though, and this is a specialized case. You may have needed it often, but I have never seen this type of need mentioned before. And I still don't know what fundamental need your dialect addresses, just what syntaxes you're considering.
GiuseppeChillemi
@GiuseppeChillemi
About skipping, when you have 2 sequential data sections like [Id <object> "section2" id 33] parts and similar names, let you express the elements after object in one path selection, without using blocks and reusing the same words: word/>>3/id returns 33. Excessive nesting is sometime also a problem and not all structures are better when nested, sometime they are better when expressed linearly...
GiuseppeChillemi
@GiuseppeChillemi
Skipping is really useful to get elements which are not consecutive to the key and organized as rows: [key "column1" "column2" key2 "column1" column2"]. You can get column2 using word/:key/<<2.
GiuseppeChillemi
@GiuseppeChillemi
(pardon << is really >>) The last usage I forgot to write is the SKIP to value or datatype. Let's take the first example and extend it [Id word word <object> data data id 33] the first part, as before, ends in object. With TO shifting you can have variable data length on the first segment of data and in the second just with word/>>object!/>>id. With this syntax a full horizontal navigation is possible in just one line.
*to skipping (pardon, I am in mobile in my bed)
Gregg Irwin
@greggirwin
Do I understand that, ultimately, this is about fixed length, non-nested records with positional fields? And that those may be inside other structures that are based on keys, in any combination.
GiuseppeChillemi
@GiuseppeChillemi
Why non-nested records? If you do not use the SKIP characters you select the series on the right side of the series, as usual, so you navigate and get deeply nested structures.
GiuseppeChillemi
@GiuseppeChillemi
This enhancement would let you navigate any type of structure and this night, while writing, I have realized you could even use this approach to have a path which returns a series AT position instead of an element of it. Think about having multiple find expressed in one efficient and compact path.
GiuseppeChillemi
@GiuseppeChillemi
** you select the series on the right side of the series, as usual > you select the series on the right side of the KEY
Oldes Huhuman
@Oldes
@GiuseppeChillemi With all my honest, your proposal looks very ugly to me. And hard to read... not mentioning that its implementation would slow down all path access evaluations. Also having large records in pure block is not too good. Instead of your proposed perlism I would rather wanted to see struct! datatype, which would be more memory friendly than block! and would provide named accessors to all values.
Or a proper in memory database, where you would not require artificial value skipping.
GiuseppeChillemi
@GiuseppeChillemi
@Oldes Mine is not an "it's needed now" idea, I liked to discuss it with you. I love paths a lot and they are a linear way to navigate series.
Gregg Irwin
@greggirwin
@GiuseppeChillemi what I mean by non-nested is [1 2 3 4 5 6 7 8 9] vs [[1 2 3] [4 5 6] [7 8 9]]. Nesting, and keys vs positional values, add overhead, but also information. There is no single solution that it best in every case, so it will be interesting to see what comes of your work.
GiuseppeChillemi
@GiuseppeChillemi
@greggirwin let's see, implementing the path dialect is no more a distant dream, as I am mature enough for a good part of this task.
xqlab
@xqlab
Is that true that the IO branch can only be compiled to Windows as a target?
Boleslav Březovský
@rebolek
@xqlab no. I am using it on Linux (and on mac in Docker, so it’s also Linux) and it works fine.
xqlab
@xqlab
I got this
Target: Linux

Compiling to native code...
*** Compilation Error: undefined symbol: alloc-at-tail
*** in file: %/home/anton/red/red-IO/environment/console/CLI/input.red
*** in function: exec/terminal/init-globals
*** at line: 510
*** near: [alloc-at-tail root 1]
With target Windows I got an .exe
Boleslav Březovský
@rebolek
hm, that’s interesting
@xqlab I’ve just compiled Linux version on Linux (actually on macOS in Docker, but that’s just a Linux in disguise) and haven’t seen this problem.
François Jouen
@ldci
Oldes Huhuman
@Oldes
Debug cv build?
Or maybe better gpu on windows?
Edward de Jong
For those wondering why Windows is faster than Mac OS, i have noticed this performance difference many times, as i run Windows and Linux under OSX via VMware Fusion. One massive difference between Windows and OSX is that Windows has a much faster file system, with read ahead and caching, and OSX is rather dumb in this area. So anything that involves reading data is going to be noticeably faster in Windows, and since Windows will keep a file in RAM even after you have closed the file (on the off-chance that it might be used again), second and later runs of the same program on Windows tend to be rather quick. In general the I/O on OSX is slow. This may be unrelated to why redCV has a performance difference, but there is no cleaner comparison than the same exact hardware!
François Jouen
@ldci
@CodingFiend_twitter.Thanks for the the tips.For windows, I’m using virtualBox.
Edward de Jong
I have a Mac and Windows version of my Beads compiler (Beads is a completely different kind of language than Red, a State-Action-Model graphical language), and it is baffling how the Windows version is so much faster at compilation compared to the Mac version, running on the same hardware! I think it boils down to Windows being highly optimized for I/O after so many versions, while OSX has pursued Realtime Audio Processing integration, and fancy typography as priorities along the way.
Respectech
@Respectech
I have also noticed in my experience that Windows accessing files from a Windows fileserver is WAY slower than Windows accessing files from a Linux fileserver running CIFS, especially when the directory that is being accessed has thousands of files in it. And FreeBSD is even faster than Linux as a fileserver in this regard.
Oldes Huhuman
@Oldes
My experience is, that one can speed up Win10 i/o quite a lot by turning off Real-time protection.
Respectech
@Respectech
My experience is that the same Windows client has at least an order of magnitude speed improvement when accessing a large directory from a Linux fileserver when compared to the same directory on a Windows fileserver. Perhaps there's a way to speed up the Windows fileserver, but I would think the real-time protection would be running on the client machine.
Henrik Mikael Kristensen
@henrikmk
I suppose Windows is faster than MacOS in many areas because Windows does a lot of things inside the kernel, where MacOS spins everything out into services. But my knowledge on that might be quite outdated. It used to be like this back in the WinXP/OSX Tiger days.
Oldes Huhuman
@Oldes
I had a chance to try the new macOS on M1 chip and I was very surprised how faster it is when I compare in with MacBook Pro from year 2016 (even when running thru Rosetta emulation).
Henrik Mikael Kristensen
@henrikmk
The tragedy of the M1 is that we will not see this CPU family outside of Apple, so many people will not get to experience it.