Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 02:10
    greggirwin commented #93
  • 02:09
    greggirwin commented #93
  • Jan 20 22:58
    Oldes commented #93
  • Jan 20 22:56
    Oldes commented #93
  • Jan 20 22:03
    dockimbel commented #4782
  • Jan 20 19:14
    greggirwin review_requested #4805
  • Jan 20 19:14
    greggirwin review_requested #4805
  • Jan 20 18:50
    greggirwin commented #93
  • Jan 20 15:56
    toomasv edited #4806
  • Jan 20 15:51
    toomasv opened #4806
  • Jan 20 11:39

    dockimbel on interp-events

    FEAT: preliminary work on instr… (compare)

  • Jan 20 11:34
    hiiamboris review_requested #4805
  • Jan 20 11:33
    Travis red/red#4805 canceled (5518)
  • Jan 20 11:33
    hiiamboris synchronize #4805
  • Jan 20 11:33
    hiiamboris opened #4805
  • Jan 20 09:29
    rebolek opened #93
  • Jan 19 19:59

    greggirwin on master

    FIX: removed dead code FIX: \\\uXXXX sequences are now… FEAT: 4x speedup by using parse… and 4 more (compare)

  • Jan 19 19:59
    greggirwin closed #4804
  • Jan 19 19:03
    giesse commented #4804
  • Jan 19 18:01
    greggirwin updated the wiki
Qingtian
@qtxie
@faustinoaq It's official. It's for users cannot visit red-lang.org (host on blogger which is blocked in some countries).
Nenad Rakocevic
@dockimbel
@kpeters58 You can store keys in the /data facet along with the labels to display:
list: ["a" 123 "b" 456 "c" 789]
view [
    drop-list data list on-change [
        probe pick face/data 2 * face/selected
    ]
]
Nenad Rakocevic
@dockimbel
@faustinoaq Link to ArchLinux's Red package added to Download page now.
mahengyang
@mahengyang
test1: function [x] [
    m: 1
    print ["m is" m]
    m: m + 1
    if x < 3 [test1 x + 1]
    return m
]


test2: function [x] [
    m: "1"
    print ["m is" m]
    m: append m "2"
    if x < 3 [test2 x + 1]
    return m
]

test1 1

test2 1
result
m is 1
m is 1
m is 1
m is 1
m is 12
m is 122
in test2 function, I have set m: 1,why the print is 122 after second recursion
PeterWAWood
@PeterWAWood

@mahengyang m: "1" binds the word in the local context of the function to a string value whose initial content is "1". Assume that the "address" of the string is str-1234. 'm: 1' binds 'm' to str-1234.

m: append m "2" binds m to the value returned by append which is the value 'm' is bound to (i.e. str-1234) with "2" appended to it.

Next time, the function is called; 'm: "1"' still binds 'm' to str-1234 which now contains "12".

mahengyang
@mahengyang
so a string is very different to interge, string is reference type
PeterWAWood
@PeterWAWood
Yes, in the sense that 'string!' values store a reference to their content whereas 'integer!' values store the content . A word! never stores a value, only a reference to one.
Muhammad N ElNokrashy
@narfanar
Are macros coming to Red/System?
Maxim V
@maximvl
they already exist there
Faustino Aguilar
@faustinoaq
@dockimbel Thank you!
geekyi
@geekyi
@Enamex macros are actually designed for Red/System. It's not needed in normal Red
geekyi
@geekyi
@faustinoaq I'm curious, does the aur package build red source from a 64bit rebol2? It looks like from the PKGBUILD it runs on both i686 and x64
No reason for that not to work now that I think of it, just interesting how that is done
R cqls
@rcqls
@geekyi It almost surely depends on i386 rebol2 and maybe needs to install lib32-libcurl-compat (not tested, but it seems that lib32-glibc, lib32-openssl are installed as dependencies).
R cqls
@rcqls
My bad, I miss that lib32-curl is already a dependency of the red package.
Faustino Aguilar
@faustinoaq
@geekyi I'm working in Crystal bindings for libRed and 32 bits libraries are needed, also Crystal 32 bit compiler itself.
Muhammad N ElNokrashy
@narfanar
@geekyi It's saying something to the effect of "unrecognized issue" when I use #macro :hmm:
@geekyi Compilation Error: unknown directive macro
Henrik Mikael Kristensen
@henrikmk
Well, guys, I'm terrible at catching up, but, I'd just like to say that being able to download an executable and start building a GUI with it is exactly what I hoped for! I hope this keeps going. It's starting to feel like a true successor to R2. :-)
Gregg Irwin
@greggirwin
There is a lot to catch up on Henrik.
Holler for what examples will help you most.
Henrik Mikael Kristensen
@henrikmk
@greggirwin I guess I'm really just getting the feel for what's working or not at the moment. Some things don't work quite as expected.
Boleslav Březovský
@rebolek
@henrikmk Hi Henrik! Just post what you think does not work.
Henrik Mikael Kristensen
@henrikmk
@rebolek ok, I tried the TEXT-LIST widget under macOS, but FACE/SELECTED seems to be one step behind in what it returns
Boleslav Březovský
@rebolek
@henrikmk I am not on macOS now, so can't confirm it, but you should add things like this to issue tracker at Github: https://github.com/red/red/issues
Henrik Mikael Kristensen
@henrikmk
thanks
Gregg Irwin
@greggirwin
@henrikmk https://doc.red-lang.org/en/view.html#_text_list notes the behavior clearly.
That tripped me up at first too.
Henrik Mikael Kristensen
@henrikmk
is that borrowed from JS or something? because that doesn't make sense to me, not even that you would need to use two different events to get the old and new selection.
Gregg Irwin
@greggirwin
I can't answer that design question. It may be due to native constraints.
Henrik Mikael Kristensen
@henrikmk
there's no way to pass both the old and new selections to a sub-function.
Gregg Irwin
@greggirwin
If you only get one event, though, how would you support the feature of accessing the prior selection?
Henrik Mikael Kristensen
@henrikmk
simply store OLD-SELECTION as well
Gregg Irwin
@greggirwin
Which is what you would do here, correct? Store old sel on select.
Henrik Mikael Kristensen
@henrikmk
I should not need to do that manually.
Gregg Irwin
@greggirwin
Pose it, and offer a suggested improvement in https://gitter.im/red/red/gui-branch.
PeterWAWood
@PeterWAWood
@Enamex Macros in Red/System are like C macros, they are not executed by the compiler but simply "in-line" the code.
geekyi
@geekyi
@PeterWAWood Are Macros supposed to execute in Red/System? Any special commandline arguments?
geekyi
@geekyi
So the #macro directive is only supported in the Red preprocessor, not in the Red/System preprocessor, both of which happens at compile time (but in the Red case, is also there in the interpreter for compatibility?)
PeterWAWood
@PeterWAWood
The Red/System compiler uses #define for macros. Here is an example:
#define I64-copy(a b) [
    b/least-sig: a/least-sig
    b/most-sig: a/most-sig
]
PeterWAWood
@PeterWAWood
Nenad Rakocevic
@dockimbel

@henrikmk

there's no way to pass both the old and new selections to a sub-function.

In select event:

  • Old: face/selected
  • New: event/picked
event/picked is described in event! section. Though, in a User Manual, we should put all those information together for easier reading.
Gregg Irwin
@greggirwin
In my rush earlier, I forgot it was in event. Tried face/picked. Sorry Henrik!
Henrik Mikael Kristensen
@henrikmk

@dockimbel That still doesn't provide the necessary information where it's needed, in the ON-CHANGE actor. So either ON-CHANGE is worthless or it can only be used in specific circumstances, which the application author must be aware of.

If I were you, I'd get rid of the ON-CHANGE actor, because it doesn't easily describe what change has happened to the widget and who did it. Go with ON-SELECT which is specific enough, along with providing OLD-SELECTION and SELECTION words for the application author to work with.

The GUI needs to be luxurious about what it provides to application authors, because this is where the nitty gritty of debugging happens, and it might as well be provided and debugged by the GUI once, so each application author doesn't have to write and debug their own code for it.

Petr Krenzelok
@pekr
@henrikmk as for the eventual set-faceand get-face- did they allow (in R3-GUI) both setting/getting the default facet, and also the refinement, where you could select the parameter you want to set/get?
Nenad Rakocevic
@dockimbel
@henrikmk select event happens just before a change is applied to the list, change event happens just after. Both are desirable.
Henrik Mikael Kristensen
@henrikmk
@dockimbel but it requires the user to write more code for the same event which is selection. I think you're calling it desirable, because it comes from somewhere else. :-) It's not good code.
Nenad Rakocevic
@dockimbel

@henrikmk

Go with ON-SELECT which is specific enough, along with providing OLD-SELECTION and SELECTION words for the application author to work with.

I don't see the point, we already expose those information to the user.