Where communities thrive


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

    qtxie on master

    FIX: wrong scrollbar position i… (compare)

  • 02:02
    qtxie closed #5222
  • 02:02
    qtxie labeled #5222
  • 02:02
    qtxie labeled #5222
  • 02:02

    qtxie on master

    FIX: issue #5222 (Regression: c… (compare)

  • 01:53
    qtxie commented #5221
  • Oct 04 22:06

    qtxie on CI-armbian

    (compare)

  • Oct 04 21:56

    qtxie on master

    CI: run RPi tests on Armbian. (compare)

  • Oct 04 17:21
    dockimbel assigned #5222
  • Oct 04 17:18
    dockimbel labeled #5221
  • Oct 04 16:33
    dockimbel assigned #5221
  • Oct 04 15:00

    qtxie on master

    CI: run RPi tests on Armbian. (compare)

  • Oct 04 14:35

    qtxie on CI-armbian

    CI: run RPi tests on Armbian. (compare)

  • Oct 04 13:54

    qtxie on CI-armbian

    CI: run RPi tests on Armbian. (compare)

  • Oct 04 13:46
    dockimbel unlabeled #5220
  • Oct 04 13:46
    dockimbel labeled #5220
  • Oct 04 13:46
    dockimbel labeled #5220
  • Oct 04 13:43
    dockimbel commented #5220
  • Oct 04 13:41
    dockimbel commented #5220
  • Oct 04 13:34
    bubnenkoff edited #5222
Gregg Irwin
@greggirwin
@pixel40 look at %image-wic.reds instead, if you can. GDI+ was used in the past, but Red uses D2D on Windows now.
Gregg Irwin
@greggirwin

Great work @zwortex. :+1: I haven't played much yet, but simple use is clean and solid. Paren buttons are nice. Explanatory comments in the code are great. My one piece of UI feedback is that the popups use X to close, and that button looks exactly like X for multiplying. Took me a minute to figure it out. Also, supporting escape to close those would be nice.

Feels like your background is in OOP from the style, with clean structure and grouping.

zwortex
@zwortex
@greggirwin, thanks for your feedback and kind comments. Definitely oop - I started programming with smalltalk. I register your remark on the button for closing the popups, and for adding the support for the escape key. Maybe also provide the ability to click outside of the window as this is the intention of this application to be used with a mouse or a finger. For the closing button, it is the standard character in windows, but I should use a different one. That would prevent any confusion, either mac or android. They are well-known conventions also. Cheers.
Compl Yue
@complyue
Hello! I'm excited to know about red, out of curious I wonder whether red features a stepping debugger? Didn't find one after skimmed the home readme.
hiiamboris
@hiiamboris
Not yet, although I know of a basic experiment in this area
Welcome, by the way ☻
Compl Yue
@complyue
Thanks @hiiamboris , I'll keep watching :)
hiiamboris
@hiiamboris
however interpreter tooling work is ongoing and sometime later we might have a proper tool built
Compl Yue
@complyue
500 lines is quite impressive for a working debugger!
hiiamboris
@hiiamboris
I myself am using this macro to locate the buggy part most often
GiuseppeChillemi
@GiuseppeChillemi

Working with paths I have ofter encountered the needing to continue to skip position and navigate a series horizzontally then continue the path.
Example:

a: [b c d f f f [g h i]]
probe x: a/d/+4/g
>> h

What about this?

If + and - are present before a number, it would be "skip"
hiiamboris
@hiiamboris
make your own dialect
GiuseppeChillemi
@GiuseppeChillemi
I have already some prototype dialects with many different features, but this seems to most simple one and useful to have, so I would like to have opinions and propose.
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