Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 17:00
    hiiamboris labeled #5175
  • 16:59
    hiiamboris opened #5175
  • 11:34
    dockimbel closed #5174
  • 11:34
    dockimbel labeled #5174
  • 11:34
    dockimbel labeled #5174
  • 11:34
    dockimbel labeled #5174
  • 11:33

    dockimbel on master

    FIX: issue #5174 ([Compiler] In… (compare)

  • 11:33
    dockimbel assigned #5174
  • 10:48
    hiiamboris opened #5174
  • 07:23
    hiiamboris labeled #5160
  • 07:02
    qtxie labeled #5161
  • 07:01
    qtxie assigned #5161
  • 07:01
    qtxie labeled #5164
  • Aug 12 23:45
    qtxie closed #5160
  • Aug 12 19:25

    dockimbel on master

    FIX: regression in `replace/dee… (compare)

  • Aug 12 11:29

    dockimbel on no-end-check

    (compare)

  • Aug 12 11:28

    dockimbel on master

    FEAT: removes the end checking … FIX: regression in `split`. FIX: regression in `do-file`. and 4 more (compare)

  • Aug 12 10:58
    dockimbel closed #5101
  • Aug 12 10:58
    dockimbel labeled #5101
  • Aug 12 10:58
    dockimbel labeled #5101
Gregg Irwin
@greggirwin
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.
BTW: the code is about 10 faster under windows10 than under macOS. Any idea about this difference?
Oldes Huhuman
@Oldes
Debug cv build?
Or maybe better gpu on windows?
Edward de Jong
@CodingFiend_twitter
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
@CodingFiend_twitter
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.
Petr Krenzelok
@pekr
Is that M1 really so good in comparison to others? I mean - if Apple can develop such a cpu/gpu combination, could not just Samsung, nVidia or Qualcomm develop a similar one? All use the ARM designs, which they further develop / change, no?
Henrik Mikael Kristensen
@henrikmk

Everyone I hear using the M1 are a bit shocked at how fast it is, even on a Mac that only has 8 GB RAM. The key to the design is very wide memory buses and of course having all the memory right on the main chip. Also, each CPU core can saturate the memory controller that can handle around 60-70 GB/s. An intel/AMD CPU core can only do 15-25 GB/s. That's pretty astounding.

Then of course is the low TDP of less than 30 W can make it do long running tasks with little cooling needed. The GPU isn't very powerful though. The cost is also presently only a maximum of 16 GB RAM.

What is even more interesting is that Mx series CPUs will grow much faster in the near future, if Apple's CPU speed ramp will be maintained from the earlier Ax CPUs. There's lots of low-hanging fruit left for Apple to pick.

Petr Krenzelok
@pekr
So after all those years, they have finally implemented an Amiga :-)
Henrik Mikael Kristensen
@henrikmk
I always thought the iPhone was Amiga-like. It's a beautiful design in many ways.