AltME: REBOL3

Messages

Endo
It works as above for R2 and R3.
Ah, sorry, he already says "and the value isn't used as an argument to a function accepting error values", I missed that part, sorry.
Maarten
Has anybody ever done a Redis client for Rebol3?
Pekr
IIRC, Rebolek did Redis protocol for R3 .....
Rebolek
There is probably one bug that I fixed locally, but I'm not sure if I uploaded the fix to GitHub. I will check it.
Rebolek
(fix uploaded)
Ashley
"using path! is much faster than working with string!. make path! [user 1 name] runs about 8-9 faster than rejoin" ... AJOIN addresses this.

Rebolek
Yes, that's true, AJOIN is faster. There's definitely room for optimalization.

Maarten
@Rebolek - thanks!

Maarten
I am in need of some docs for R3 - how dows the module system work, mostly... I need exhustive documentation in terms of options, i.e. can I upgrade modules, sign them, etc.? What's possible?
Pekr
Module system was imo never properly finished and/or documented. Dunno if first implementation was done by Carl or BrianH, but Carl asked BrianH to rewrite it. He did so. But I also remember, that he still wanted some PROTECT function changes, etc., which were imo not done. IIRC, Rebolek tried to use the module system, not sure about his experience, but some ppl found the module system quite complicated ....
Pekr
Atronix used R3/View to create this really cool looking UI for their product. Does not use R3/GUI, but is built upon the gobs -https://www.youtube.com/watch?v=xj1CEU2RlBg&feature=youtu.be
Pekr
Maxim
neet
Bo
David den Haring said that they are integrating OpenGL into Rebol3 natively. That sounds exciting!
I can imagine an amazing OpenGL dialect.

Maarten
Quick question: what are the possblie actor types for a networking scheme? Can you define an actor subtype yourself. As an example, we seem to have lost the list function on network ports.
Pekr

Andreas
Maarten, here are my notes regarding port/scheme actors:
(Warning, slightly long.)
"Port actions":
    create [port]
    delete [port]
    open [port /new /read /write /seek /allow]
    close [port]
    read [port /part length /seek index /string /lines]
    write [port data /part length /seek index /append /allow access /lines]
    open? [port]
    query [port /mode field]
    modify [target field value]
    update [port]
    rename [port to]
Port actions can be used not only with port!s, but also with port
specs (everything make port! accepts: url! block! object! word!) In
this case, `make port!` will be called with the spec first, and then
the corresponding actor is called with the freshly created port!.
"Series actions":
    append
    at
    back
    change
    clear
    copy
    find
    empty?
    head
    head?
    index?
    insert
    length?
    next
    past?
    pick
    poke
    remove
    select
    skip
    tail
    tail?
    take
I think I also put that, or a slight variation of it, on the rebol.net Wiki once. Unfortunately that's still offline.
Bo
Does this help?
http://web.archive.org/web/20150423153208/http://www.rebol.net/
Bo
I'm looking forward to playing with OpenGL in R3 from Atronix. Will it be available soon? Will there be some rudimentary documentation?

Maarten
Andreas, thanks. That does help

Maarten
Anyone know how to use UDP on Rebol 3 (atronix version)?
Maarten
Or if it exists at all?
Pekr
I think it is non existent, but I could be wrong ....

Maarten
Does anyone have a working R3 RSA example? Between 'rsa and rsa-generate-key I seem to miss the functions that create the public/priv keys....

PeterWood
How do you run a Rebol 3 script from the DOS command line?
I tried with this simple script:
    Rebol []
    print 1
The Rebol console flashes in the background and the DOS console shows only a blank line.
C:\Users\peter\Desktop>AtronixR3 test.r
C:\Users\peter\Desktop>
sqlab
Works under Linux
anton@sixpack ~/own/R3 $ ./r3 ../test/test.r
1
PeterWood
I think it's more general Windows/Rebol problem -- it' seems the same for Rebol 2.
Sunanda
The script is running: it prints 1 in the Rebol console, and then closes the Rebol console.
You need to put a HALT at the end of your script if you want the Rebol console to stay open at end of execution.....As far as I know, there is no other easy way of guaranteeing that.
PeterWood
Thanks Sunanda

Pekr
There is special release to have a true console. What R3 provided by default just looks like a DOS console, maybe even is, but that's not what you usually want. It was IIRC Earl, who provided true DOS console for R3. Obviously, no GUI available ....

Ladislav
Hi all! I wrote a https://github.com/rebol/rebol-issues/issues/2259 ticket explaining why EQUAL? should be transitive. I always thought that EQUAL? should be transitive, but these arguments may convince people who did not know them until now. Anybody wanting to discuss it?
The essence is as follows: ordering has to be transitive, otherwise you cannot obtain reasonable sorting results. Moreover, EQUAL? has to be a conjunction of two orderings: LESSER-OR-EQUAL? and GREATER-OR-EQUAL?, which, since both must be transitive, yields that EQUAL? must be transitive too.
Gregg
Your examples are clear and compelling Ladislav. Not sure how I'd argue with them, so I won't. :-)

Ladislav
So, do you think that the reasons to make EQUAL? transitive are compelling?
Gregg
Yes.
Robert
+1

Endo
+1
PeterWood
The arguments for making Equal? transitive are compelling Ladislav. Would there be any noticeable change from the current Equal? behaviour if it was implemented?
Perhaps it would be better to ask, what (if any) change would there be in the behaviour in Equal? if a transitive version was implemented?
Ladislav
Yes, that is a perfect question.
DideC
I see the point is about decimals, but other bugs relate to word! comparison.
Does this 2 points must be threaded separatly or not ?
Ladislav
To answer Peter's question: Currently, EQUAL? is not only nontransitive for decimals, it is also "approximate" in that different numbers (differing by 10 ULP or less) are considered equal. For example, 0.1 + 0.1 + 0.1 (to binary! 0.1 + 0.1 + 0.1; == #{3FD3333333333334}) differs from 0.3 (to binary! 0.3 ; == #{3FD3333333333333}) by exactly 1 ULP (unit in in the last place), as can be seen from the binary representation.
EQUAL? 0.1 + 0.1 + 0.1 0.3 yields TRUE
Ladislav
..., while the number representing 0.1 + 0.1 + 0.1 is exactly by 1 ULP greater than the number representing 0.3, and greater-or-equal? 0.1 + 0.1 + 0.1 yields TRUE, while lesser-or-equal? 0.1 + 0.1 + 0.1 0.3 yields FALSE
If we defined EQUAL? to be equivalent to the conjunction of LESSER-OR-EQUAL? and GREATER-OR-EQUAL? (which we should to be consistent), while retatining both the definition of LESSER-OR-EQUAL? and GREATER-OR-EQUAL? we would obtain that 0.1 + 0.1 + 0.1 has to be unequal to 0.3 (actually greater than 0.3).
DideC - no, I used word comparison only as an illustration why nontransitive relations cannot be used as orders for sorting. Otherwise, word! is a separate datatype, and the issue with word ordering should be resolved separately.
Ladislav
Using present definitions of LESSER-OR-EQUAL? and GREATER-OR-EQUAL? for decimals, and defining EQUAL? as their conjuction, we would obtain a transitive equality, but it would not be approximate.
It turns out that we *can* define a transitive approximate equality, but we cannot do it so that it will be always "tolerant".
The way how to do it is to define some subset of decimals and some rounding, and say that two decimals are approximately equal if they round to the same value. This is guaranteed to be both approximate as well as transitive.
Ladislav
The only problem is that it is not always "tolerant" in the sense that can be illustrated by an example: let's use rounding to the nearest integer, then the numbers greater than 0.0 and smaller than 0.5 round to 0.0, while numbers greater or equal to 0.5 and smaller than 1.5 round to 1.0. This is a transitive relation that is quite tolerant, but it is not always tolerant, since the numbers 0.49999999999999994 and 0.5 round to 0.0 and 1.0 respectively, and are not nearly equal, although they differ only by one ULP.
Ladislav
Our consolation is that this happens only exceptionally, on the "boundary" between successive rounding areas.
I know that this is not trivial stuff, so please ask if anything is unclear to you.
Ladislav
To compare it to other languages, to not run into difficulties, they use only zero-tolerance (strict) comparison, which is guaranteed to be transitive, and inform the user to use a more tolerant comparison where appropriate, leaving her on her own to do it.
PeterWood
Thanks Ladislav. I found the explanation very clear. Given that one of the premises of Rebol, if I remember correctly, is pragmatism, I can understand why Carl would adopt the current behavior. It gives the "expected" answer in most people's eyes (but not those of an expert).
Is there not an argument to retain the current behaviour for equal? but change strict-equal? to be transitive?

Ladislav
Hi, I added an experimental example of a transitive approximate equality. Testing and playing with it welcome.
Ladislav
"Is there not an argument to retain the current behaviour for equal? but change strict-equal? to be transitive?" - hmm, I guess that I know what you wanted to ask. Given a transitive approximate-equal? (AE?) function, we can easily define a transitive approximate-lesser-or-equal? (ALE?) function. The definition would be as follows: ALE?: func [x [decimal!] y [decimal!]] [((lesser? x y) or (ae? x y))]. We could also define approximate-lesser? (AL?) function: AL?: func [x [decimal!] y [decimal!]] [(lesser? x y) and not (ae? x y)], etc.
Does that answer your question, Peter?

PeterWood
Perhaps Ladislav. What I am asking is whether it would be good to retain the current behaviour for equal?. I'm sure that Carl implemented it that way with good reason. I realise that this may still be the result with the transitive approximate-equal? (but Im not sure).
I feel that these two examples of the current equal? behaviour should be retained (if possible):
>> equal? 0.49999999999999994 0.5
== true
>> equal? 0.1 + 0.1 + 0.1 0.3
== true
but that this behaviour should be changed:
>> strict-equal? 0.49999999999999994 0.5
== true -->> false
>> strict-equal? 0.1 + 0.1 + 0.1 0.3
== true -->> false
>> strict-equal? 0.1 + 0.1 + 0.1 0.3
== true
DideC
It's what I though too.
Same behaviour for '= and '== of course.
But it does not answer to the 'lesser-or-equal? and 'greater-or-equal? transitivity question.
PeterWood
I left an extra line in my posting :-(
What I am suggesting that it would be good for equal? to use Ladislav's transitive approximate-equal? but strict-equal? should check that the values are actually equal. So that the future behaviour would be
>> equal? 0.1 + 0.1 + 0.1 0.3
== true
>> strict-equal? 0.1 + 0.1 + 0.1 0.3
== false
I suppose same? could provide the actual check that the values are actually equal but it doesn't seem to in Rebol2
>> same? 0.1 + 0.1 + 0.1 3
== false
>> same? 0.49999999999999994 0.5
== true
Typo:
>>  same? 0.1 + 0.1 + 0.1 0.3
== true
Ladislav
Hi, I corrected the AE? function at https://github.com/rebol/rebol-issues/issues/2259 (there were some bugs) and improved comments.
PeterWood
I see that same? works as I expected in Rebol 3:
>> same? 0.49999999999999994 0.5
== false
>> same? 0.1 + 0.1 + 0.1 0.3
== false
Ladislav
Yes, Peter
PeterWood
So my thought that strict-equal? should check for the values being the same is probably not necessary.
Ladislav
examples:
>> ae? 0.49999999999999994 0.5
== true
>> ae? 0.1 + 0.1 + 0.1 0.3
== true
However, AE? is transitive, and (while only exceptionally), sometimes you get FALSE from AE? A B even when A and B differ only by one ULP. This is inevitable for a transitive relation.
(I should have said: this is inevitable for a nontrivial transitive relation)
PeterWood
That seems very reasonable.
Ladislav
At present, there is only one difference between SAME? and STRICT-EQUAL? for decimals in Rebol3. It is this one:
>> strict-equal? 0.0 -0.0
== true
>> same? 0.0 -0.0
== false
The difference is caused by the fact that 0.0 and -0.0 have different binary representations.
>> to binary! 0.0
== #{0000000000000000}
>> to binary! -0.0
== #{8000000000000000}
PeterWood
So strict-equal? is more strict in R3 than R2.
Ladislav
Yes
PeterWood
That's good.

Ladislav
Hi all, as far as I know, Rebol is considered a high-level cross-platform language. For example, in Windows and in all GCC-compiled platforms it uses two's complement signed integers. I think that to be truly cross-platform, it should use two's complement signed integers on every platform. What do others think on this?
Ladislav
Note: currently, the two's complement signed integer representation is already tested by the core-tests, otherwise it is not enforced.

Ladislav
Please check the ~Humour (my apologies for misusing the group) and #Topaz for the discussion/poll related to undefined variables, #[datatype! unset!], etc.

Arnold
@Reichart Will R4 be open sourced? I have PM ed with Bo about what I thought has to be done about R3.
As well Carl and Earl do not attend to the R3 repo so something has to be done.
In my plan at least 3 sourcekeepers must be assigned.
I think there should be at least three and 2 of three should support an update to have it accepted and if the other one disagrees this must be regarded as you win some you lose some. Good valid arguments will persuade for the better. Besides the 3 keepers, they need to know each others real name and physical address and emailaddress as well as a contactperson to call upon when there has been no contact for a longer period without given reason (holiday).
Any keeper must be replaced when no contact is made over a certain period of time.
Rebolek
That's sure better than your plan to abandon R3 repo totally.
Arnold
I do not know who the lucky ones should be. But if other communities can get the ball rolling so should ours.
Thanks Rebolek!
Bo has agreed to talk to Carl about this.
Rebolek
Anyway, I'm afraid it's hard to find one person to do it, it would be much harder with three.
Arnold
There is so much modesty around...
Well I no one else I will do it, but I need good advice.
Well I => Well if
Geomol
My view on things.
With R2, there were certain shortcommings or errors, that meant, we couldn't finish projects the way, we wanted. I saw R2 as a way to develop cross-platform for the major platforms, Windows, Linux, and OS X. And in a way with very fast development, a short way from idea to product.
For some server-side tasks, R2 was good enough in many ways (approaching perfect), but wanting to do graphics and sound and responsive events, there were obstacles.
The desire for an open-source R2 was there. Then we could fix things ourselves. Not develop new, but fix things to get R2 to work as intended across all platforms.
R3 meant new development, not just a fix of things in R2. But if almost starting over, then it could be from any ground, not only R3. And the world around us changed fast with new mobile platforms. We saw new approaches to solve the problem of 'programming' in efficient and rebolish kind of ways, World, Topaz, Red. I started development of World before Rebol was open source. I don't know if this is the case for Topaz and Red too.
On open source, I see benefit in open source, if things needs to be fixed. I don't always see benefit in open source, when new stuff is being developed. You run into the too many cooks problem. I see huge bloat open source projects all over the place. I am being presented them at university, and I run away in horror. They sucks!
New development should be done by one or very few people, if you want somethings really good out of it. That is my view, and I think, it is true in general. But you can probably find projects, where this is not the case.
I hope, Red succeed. I hope, Topaz succeed (it maybe already did, I haven't followed it). I hope, R3 succeed. I hope, Carl succeed with R4. I will do, what I can to get a success out of the World Programming Language.
There are many old-kind-of-languages out there, and we need new modern next-step future-proof rebolish kind of languages!
Not one such language, but several.
Rebolek
So Carl asks "why are people moving forward with Red as oposed to building on Rebol 3?" and then he mentions that he is working on Rebol 4. In private, not using the public open repo. I guess he answered his own question.
Arnold
Red also started before R3 was open sourced.
I agree with you John that it would have been easier to fix things in R2 then create them in R3. Facts are R2 is closed source and investors interests prohibit open sourcing that. R3 development had already started also as closed source from RT. Carl has managed to free this source from investors interest and could give this source out. But then asking why there is no development is asking for the sake of asking. Nobody was maintaining its source!
Geomol
About succeeding, we already have had success in many situations with these languages (and some crash and burns). I am using the World language every day to do things, I couldn't do with any other language, i know of, in such a short time.
And I use Rebol often, e.g. to produce LaTeX documents using NicomDoc 2, I developed in R2:
http://www.fys.ku.dk/~niclasen/nicomdoc/
Other students at university can't understand, how I can produce LaTeX documents so fast. They have never seen anything like it.
And I have great success these days and weeks developing software in World to produce HW accelerated graphics and 24-bit/96kHz audio. I have waited almost 30 years, since I got my Amiga500, to be able to do the things, I do now. I can thank Carl for showing the way to efficient languages. I use AGG graphics from DRAW in R2 to create the GUI, and it looks very nice. A bit annoying, that I have to go to my Windows PC to have R2 produce the text, as DRAW doesn't work well with fonts under OS X, but it is doable.
We should remember all the good things, and then keep on going to make things even better.
Geomol
(I should say, that the gfx and audio, I'm doing, is in a combination of World and C code, but World working as the scripting part makes the whole thing so much easier. My experiences with this can lead to further development of World.)
Arnold
@Rebolek This 'plan' is still very dependend on getting the access to the repo.
I expected the volunteers to apply in big numbers now I threatened to be willing to help with that. ;-)
Maxim
Arnold, I think you don't understand how Git works.  if you fork the R3 repo you have all of the repo.  there is no need to have access to the repo, you can build your own "official" repo, just like HF did with ren/C.  
the work is about attracting people to your project, if Carl isn't maintaining *his* copy of R3, then that copy is dead... you can work on yours (or another's) and hope it will be good enough to build a community around it.
Arnold
No Maxim, I don't think you understand how this works. There can be a 100 forks, but there is only 1 that is regarded as leading. In our case that one is not maintained and therefor R3 is not maintained, there is no consensus between forks. Outsiders look at the repo and see it is dead as a dodo and so regard R3 not as a viable alternative.
Kaj
R3 is dead, long live R4!
With the emphasis on long
Maxim
yes, Rebol/R3 is dead in terms of development that is true.  Ren-C IS the currently active Rebol3 project.  that's just how it is.
DocKimbel
It is doubtful that Carl would drop the R3 codebase to start from scratch again. I bet that R4 would be more like a re-branding of [R3 + something else].
Another option could also be a "specialized" R3 version for a given domain, like embedded devices.

Arnold
We need a !REBOL4 Group!
And "we" need to take over control over the repo immediately.
Pekr
If there is going to be any repo, maybe it is going to be closed source again :-)
Arnold
If it is closed, in my opinion he better save the effort of creating it.
Rebolek
Why? I believe Carls has fun creating it. Isn't it good enough reason? :)

Marco
I'd like to show a window with a progress bar that show the progress of a download taking place and with a "Cancel" button to stop it  same as request-download. How can I do it in R3? I am able to create the window with widgets but don't know the net part, any hint?
Maarten
>> yes, Rebol/R3 is dead in terms of development that is true.  Ren-C IS the currently active Rebol3 project.  that's just how it is
I disagree - we have the Atronix fork and that works pretty well. Good enough to bridge the gap until REDhas TCP and more UI backends
I'm actually using the Atronix version to build a distributed computing system, that runs across ARMv7, Win64, Lin64 (32 bit too, but whta's the case). Pet project, but fast enough dev time wise to be usable, and seems to "just work"
Ren-c.... I don't think that has a UI. So it's really R3/Core witout FFI

amacleod
Does r3 on android allow to read write local files? I tried but I get an error.

CelesteM
What's the error?

amacleod
access error: cannot open: %test.txt
reason -3

GiuseppeC
Hi, is there a way to intecept new data on the windows clipboard and read it ?
Gregg
I don't recall of any old notification hooks for it. You might have to poll.
Bo
I'm sure there is a .dll to do that, but it would involve a callback, I'm sure.

GiuseppeC
I have resolved the situation in a different way, without rebol.
Gregg
How did you do it Giuseppe?
GiuseppeC
Hi Greg, I had to download the elements of a web table and put it inside a database.
Excel did the job for me. I have learnt it could query a multipage table and write the columns on the current sheed.
I was able to finish a multy day job in just 5 minutes.
GiuseppeC
In the past years, someone gave me a ULTRAEDIT wordfile for REBOL.I don't' remember if version 2 or 3.
I have lost the file but I don't remember the person.
Could someone help ?

Gregg
Might have been me. I'm signing off right now, but ping me and I'll send you my UE REBOL stuff.

Maxim
might be me too...  but mine is highly customized... not very usefull anymore.
(for someone other than me)

DocKimbel
Is there a good reason for ROUND to return a decimal! instead of an integer! like it does in Rebol2?
Rebol3:
>> round 2.3
== 2.0
Rebol2
>> round 2.3
== 2
Endo
Help text says "ROUND returns the nearest integer" but it doesn't always return an integer: May be he thought that its better to keep the datatype of the return value same:
>> round/to 1.987 0.37
== 1.85
DocKimbel
There's no mention of the return type in the R3 version of ROUND docstrings.
Endo
It is on R2.
Gregg
Using /TO changes the result type, but with out it ROUND always returns an integer, correct? If so, the help string for /TO implicitly covers it I think.
But, for Doc, I don't know a good reason to change it. Do you have one?
Endo
Correct, returns integer for all other refinements.
Gregg
As you know, one of the reasons to return an integer was for use with loops.
Thanks Endo.
DocKimbel
@Gregg I don't understand the rationale of Rebol3 returning a decimal! instead of integer!. Qingtian implemented it in Red copying R3 semantics, but I am about to change it to have R2's semantics, but I want first, to understand the reason for R3's behavior.
Gregg
Ah, I see. I don't know why the change was made either, except that they made it a native from a mezz. Maybe it was just an implementation detail?
DocKimbel
It looks too obvious to be a bug, so I guess it was planned. I still don't get why as it makes it impractical for the common use-case.
Gregg
R3 changed to support non-integer values for loops, so the result is usable, but I don't remember why that change was made.
Pekr
IIRC, Ladislav implemented it for Carl, so if he is around, most probably he's the one who knows the answer?
Gregg
I think you're right Petr. He and I did the mezz version, so that makes sense.

Bo
How does one write data into a port in Rebol3? 'insert, 'append, etc. do not work.
Bo
I found this example, but it makes r3-view from Atronix crash:
client: open tcp://localhost:8080
client/awake: func [event /local port] [
    port: event/port
    switch event/type [
        lookup  [open port]
        connect [write port to-binary request]
        read [
           result: to-string port/data
           close port
           return true
        ]
        wrote [read event/port]
    ]
    false
]
wait [client 30] ;the number is a timeout in seconds
close client
(at least when using "client: open clipboard://" instead of a TCP port.

Endo
This works for me:
write clipboard:// "test"
Version:   3.0.91.3.3
Rebolek
Bo, take a look at https://github.com/rebolek/prot-redis/blob/master/prot-redis.reb#L335 . I don't know what version of R3 I am using, because there's no official version, I have something different installed on different machines, but I use it everyday and it works. With limitations, thanks to many R3 bugs.
Rest of the text, obfuscated by long time AltME bug: "I don't know what version of R3 I am using, because there's no official version, I have something different installed on different machines, but I use it everyday and it works. With limitations, thanks to many R3 bugs."
Bo
To get around that bug, I just copy the entire message and paste it in the message field of AltME. ;-)
Rebolek
Thanks, I just haven't posted a link on AltME for some time, so I forgot about it's limitations ;)
Anyway, there's write and read support and it also properly handles writes longer than 32000 bytes.
Gregg
You can patch R2 to handle longer writes as well, thanks to Max. I doubt this affects too much at this point though.
Maxim
yes the simple R2 fix allows to POST any size.

Ashley
Anyone else notice this strange behaviour (Atronix R3 on Windows):
>> b: read %test.csv ; 50MB ASCII file
>> b: none
>> recycle
>> stats ; ~ 2MB
>> s: to string! read %test.csv
>> s: none
>> recycle
>> stats ; ~ 130MB
Looks like a memory leak with converting from binary to string. Same thing happens with read/string as well.
Oddly enough, the following is OK:
>> b: parse read %test.csv rule ; parse entire file into strings
>> b: none
>> recycle
>> stats ; ~ 2MB

Bo
Is there a way to change this:
>> to-money 3
== $3
to this:
>> to-money 3
== $3.00
The bottom is the way Rebol2 behaved, and the top is the way that Rebol3 seems to behave.

Chris
One possibility:
>> round/to to money! 3 $.01
== $3.00

Bo
Chris: Nice!
>> round/to $3 $.01
== $3.00

GiuseppeC
Hi, I have 2 servers, one with SQL Server installed and another where users work.
I need to have a rebol app on the first server which receives  some commands and return one or more result sets of a query to its rebol caller app part on the other server.
No need for async operation a sync one is sufficient.
Have you some code example
Gregg
I don't have example code, and don't use R3 in production at this point, but have you considered just using req/rep files on the FS? Just have your app look for %*.req files, run the query in them, and write out a %.rep file of the same name for the client to watch for. You can do it with net protocols, 0MQ, etc. but then you may need to be concerned about data size and such.

GiuseppeC
I'd rather prefeer direct server to serve communication, but if it is the only option I will use a file syste watcher.
Also, how do I read command line arguments in REBOL 3 ?
Gregg
I'm sure it's not the only option, just an easy suggestion since I don't have code at the ready for another one. :-)
So system/options/args or system/script/args not work correctly in R3?

DideC
@GiuseppeC:
- If this server app need only to serve SQL commands and send response, and if ODBC 32bits is an option, consider using odbcsocketserver with the Rebol client script, but it's for R2, not R3. It's a pretty simple protocol so maybe it could be adapted to R3 easily.
http://odbcsock.sourceforge.net/
The Rebol client protocol seems to not be available online anymore but ask me in private if you are interested.
GiuseppeC
DideC, it is not suitable for me.
I need only 2 scripts which communicate each other.

GiuseppeC
Hi, is it possible to create a Rebol3 Executable ?
Also, is it possible to associate the R3 console to .r (r3 ?) files ?
Gregg
There was an experimental ENCAP in the Atronix version. I don't know how far Shixin took it though.
File association should be normal.

Sunanda
Rebol to executable: Someone posted this link a while back. No idea if it works:
http://nsis.sourceforge.net/How_to_turn_a_REBOL_script_into_EXE
GiuseppeC
It seem write/append/lines %filename.txt reduce [a b c d] is not working correctly. I have not newlines.
I have also tried write/append/lines %filename.txt append {sometext} lf
but as soon as the loop run reiterating the same line, I accumulate tons of LF

GiuseppeC
Too many answer for all my question in this world, please, stop, it's a flooding !!! :)

Bo
Hmmm. I know I've done this before, but I can't find any reference to it. In Rebol3, how does one access the serial port? It doesn't work the same way as in Rebol2, as there is no system/ports/serial object.
Version:   3.0.99.4.20
This version has GUI and Serial built into it. Here are some things I tried:
>> ser: open serial://  
** Access error: invalid port argument: make error! [
    code: 346
    type: 'Script
    id: 'bad-make-arg
    arg1: integer!
    arg2: none
    arg3: none
    near: [to integer! speed]
    where: [to try if init if -apply- open]
]
** Where: open
** Near: open serial://
>> ser: open serial://ttyUSB0/9600/8/none/1
** Access error: invalid port argument: make error! [
    code: 346
    type: 'Script
    id: 'bad-make-arg
    arg1: integer!
    arg2: 9600/8/none/1
    arg3: none
    near: [to integer! speed]
    where: [to try if init if -apply- open]
]
** Where: open
** Near: open serial://ttyUSB0/9600/8/none/1
>> ser: open serial://ttyUSB0              
** Script error: cannot MAKE/TO file! from: none
** Where: to if init if -apply- open
** Near: to file! path
Bo
OK. Note to self: I was close. This is the correct way to open a serial port:
ser: open serial://ttyUSB0/9600
And here's how to write/read data to/from the serial port:
ser/awake: func [event /local p][
    p: event/port
    switch event/type [
        lookup  [open p]
        connect [write p to-binary request]
        read [
           result: to-string p/data
           close p
           return true
        ]
        wrote [read event/port]
    ]
    false
]
write ser "ping^/"
s: wait [ser 5]
print to-string s/data
Bo
The problem I have now is that I cannot figure out how to read data from the serial port. I always only get back the last command I wrote to the serial port in s/data.

Bo
Hmm, I guess nobody has any ideas here nor on Stack Overflow. :-(

Pekr
Isn't serial port occupied by other app? I very vaguely remember, I once met such situation too. Or it might be related to USB to serial converted, not sure ....
Gregg
I've only ever used R2 for serial port work.

Arnold
Bo, what is wrote [read event/port] ? Is it a typo you only made here?
Arnold
(I saw on SO you also had WROTE not WRITE)

Marco
@Bo . Try also to search for "gs: open" in this group (6-dec-2015 by Josh)
Bo
Arnold: "wrote [read event/port]" is part of the awake handler.
Bo
@Marco: Thanks! That's what I was looking for!

amacleod
does r3 not have a set-net function?
"** Script error: set-net has no value"

Gregg
Protocols were never completed for R3.

Bo
A long time ago (Sep 2014 I believe), I wrote a question here but never got an answer. I did eventually figure it out, but I recently had to figure it out again, so I'm posting it here for posterity:
Here's the solution when encountering the following:
$ sudo ./r3
sudo: unable to execute ./r3: No such file or directory
ARM devices running 64-bit operating systems don't generally have the 32-bit libraries installed. This can be fixed with the following commands:
sudo dpkg --add-architecture armhf
sudo apt install libc6:armhf libncurses5:armhf libstdc++6:armhf
After installing those libraries, the executable should now run!
A similar procedure can be performed for Intel machines as well by replacing the "armhf" with "i386".

Endo
Thank you for posting this Bo, I had this issue several times and it was diffcult for me to find.

Bo
:-)

GiuseppeC
How could I find the corresponding date for:
"The monday of 2 weeks ago"
"The next sunday"
"The last day of the current/next/prev month ?"
Ashley
The monday of 2 weeks ago ... either now/weekday = 1 [now - 14][now - (6 + now/weekday)]
The next sunday ... either now/weekday = 7 [now + 7][now + (7 - now/weekday)]
The last day of the current/next/prev month ... http://www.rebol.org/view-script.r?script=date-time.r

Gregg
Giuseppe, individual date calcs are relatively easy. Designing a dialect to interpret human expressions of them is more work, though still doable. I have a number of things that do part of it, but no complete, open system I can post.
Watch for boundary issues. Here are a couple helpers that show what I mean.
set 'last-day-of-month func [date /local d] [
    d: date
    d/day: 1
    d/month: d/month + 1
    d: d - 1
    d
]
set 'same-day-next-month func [date /local d] [
    d: date
    d/month: d/month + 1
    if d/day < date/day [d: d - d/day]
    d
]
GiuseppeC
Ashley, how if I need to calculate a generic monday of N weeks AGO
or
sunday of N weeks in the future ?
Gregg
What have you tried so far Giuseppe?
GiuseppeC
I am currently working on it on the consolle
GiuseppeC
dayofweek: 1
date:  either now/weekday = dayofweek [now - (7 * (weeks - 1))] [now - (((7 * (weeks - 1)) - either now/weekday = 1 [now - (7 * (weeks - 1))] [now - (((7 * (weeks - 1)) -  dayofweek) + now/weekday)]
GiuseppeC
Ooops... to many copies
The following code returns the dayofweek of /weeks/ ago
        dayofweek: 1
        weeks: 2
        date: either now/weekday = dayofweek
            [now - (7 * (weeks - 1))]
            [now - (((7 * (weeks - 1)) -  dayofweek) + now/weekday)]
GiuseppeC
Note that this formula is dangerous when you want to filter something from a start to and date because it includes TIME!
now should be changed to now/date
DideC
I have a generic calculation for dates:   date-of-monday: a-date + 1 - a-date/weekday
If you need a sunday, it become:   date-of-sunday: a-date + 7 - a-date/weekday
Then just add or remove (weeks  * 7)

GiuseppeC
Interesting
Arnold
What should same-day-next-month be today?

Gregg
That would be open to interpretation on a day like today. My call, when I wrote that func, was to use the last day of the month, if the next month has less days than the target month.
Alternately, you could throw an error or return none.
Arnold
Yes depends on what you want it to be.

Ashley
>> col: 1
>> do z: compose/deep [foreach row [[A]] [(to-path join "row/" col)]]
** Script error: cannot access end! in path row/1
** Where: foreach do
** Near: foreach row [[A]] [row/1]
>> z
== [foreach row [[A]] [row/1]]
>> type? first p: [row/1]                                
== path!
>> do z: compose/deep [foreach row [[A]] [(pick p col)]]
== A
>> z
== [foreach row [[A]] [row/1]]
How to get first example working? ... and then for set-path! (i.e. row/1:)
DocKimbel
TO-PATH on a string! value is not doing what you expect:
>> length? to-path "a/b"
== 1
Just replace it with LOAD and it will work fine.
And alternative way to achieve it without using strings: (append to-path 'row col)
Ashley
Wow, the append approach is pretty neat (works with to-set-path as well). Thanks.

GrahamC
For those who don't follow the progress of Ren-c, there have been some changes.  We are currently working on reaching r2 parity.  See https://trello.com/c/5K0ZKkrg/92-bringing-ren-c-to-parity-with-rebol2
I knocked off prot-smtp, prot-send and prot-pop3 recently based on the work I did many years ago.  But also did a prot-synctcp https://github.com/gchiu/Rebol3/blob/master/protocols/prot-synctcp.reb
this sort of allows you to do synchronous tcp like rebol2
And Brian is close to porting Christian Ensel's ODBC extension to ren-c
which should also work with UnixODBC
GrahamC
And current downloads are here http://metaeducation.s3.amazonaws.com/index.html ( windows, linux, OSX, and Android )
the files are much larger than the r3a builds because they include debugging, the FFI etc.
GrahamC
You can also store multiple identities in the system/user object
set-net select system/user/identities 'gmail
switches to my gmail settings.

GrahamC
We are now testing an ODBC extension which was based on Christian Ensel's code, and need to sort out whether we should stick to RT's sql dialect which is a dialect ontop of another dialect
Gregg
What's the alternative?
GrahamC
Chris uses an abstraction Active Record in Quarter Master which is based on a ruby thing
Of course we want to avoid any possibility of sql injection which RT's dialect prevents
Gregg
I think that's the important bit.

GrahamC
so this was implemented by ruby on rails
I've carried out ODBC testing now on Firebird 3.0, Interbase 2017 and DB2 Express edition.  They all have their quirks :(

GrahamC
@Ladislav are you doing any Rebol work at present?  We need an elliptic curve diffie-hellman key exchange implementation for r3 tls !
Using Curve25519 instead of the compromised NIST curves

Chris
Max (from !munge group re. Ren-C), aside from Atronix? For me: not quite--am still missing some key libraries that I'm working to replace (similar situation with Red). I would prefer that there's a stable branch with paced releases, but it is a better version of Rebol 3 than R3 Alpha. Working cross-codes (Red/Ren-C) on the HTML parser is fun (if you like that type of thing).
Chris
Say what you will about the character/conduct of the project lead (I know everyone has their opinion) there's a good infrastructure around the process--changes are reasoned/documented, edge builds are available to download automatically, any impulse on experimention is tempered by the conservative needs of Atronix, more of the core extensions (modules, help, interface) are being pushed to third parties.

eFishAnt
I used Atronix R3 to parse 7 gig fs binaries for FAT table coherence on some returns for product returs since I needed more than 4 gig of 32-bit, and no problems. with it.

Bo
I wrote an answer here on how to get R3 to run on arm64-capable hardware running an arm64 OS (like the Rock64 or ODROID-C2 running Ubuntu for arm64) back on 21-Dec-2016. But I left out an important step. After adding the armhf architecture, make sure to run 'apt update'! Or it won't find the packages...
sudo dpkg --add-architecture armhf
sudo apt update
sudo apt install libc6:armhf libncurses5:armhf libstdc++6:armhf
This should take care of the message "unable to execute ./r3: No such file or directory".
BTW, I have an armhf version of ./r3 that you can download on your device by the following:
wget http://respectech.com/odroid/r3
Have fun!
GrahamC
Why would you want to run r3alpha when you can run ren-c?
Bo
Not sure what the limitations of ren-c are. Do you have to call it from a C program?
GrahamC
It's a superset of r3alpha but with the bugs removed!
And there's an armhf build available
There has been a version that can be linked into a C++ program but that's not currently available.
GiuseppeC
Graham, where could I find all the changes/fixing of REN-C ?
Pekr
You would have to properly follow HostileFork. He changes concepts here or there, some changes seem to be fundamental, mostly low level, difficult to say. You can reach him at the Stack Overflow chat.
Bo
When Red reaches 0.7, I'm probably going to switch most of my development to that anyway.
GrahamC
@Guiseppe, there's a change log but I'm not sure if it's being maintained.

GrahamC
well, Cyphre was asking for $1500-$2000 to update Rebol3 TLS - I'm asking for at least TLS 1.2 and server side SSL.  And we now have half of that pledged.
If you wish to pledge, add your selves here https://forum.rebol.info/t/updating-tls-bounty/478/10
GrahamC
Oh, and if anyone else wants to take on this job for a cheaper price, please speak up!  :)

Gregg
I have always admired your optimisim Graham. :^)
GiuseppeC
1500 USD = 1 month of work for europe, 5-6 months in CZEC republic. I think Cyphre is the perfect candidate as this bounty  let him be dedicated only to this task for a vast amount of time nad he has the needed knowledge. If he will not work full job he could work on this project even for a full year. Hope our group of people will grew and we will able to raise more money for development tasks.
Arnold
Or ask the new millionairs at Fullstack to fund this project....
Pekr
1500 is slightly above the average salary in CZ, programmers here have more. So, 5-6 months is really unrealistic here :-)
GiuseppeC

GrahamC
I read that differently.  30,000 czk top average salary which is USD1500 so only a month's wages.
GiuseppeC
This is for the very high skilled people working on money rich areas and money rich areas.
We are a small group of people and despite cyphre is very high skilled we are neither a big company nor a rich economic niche. You should aspect a much lower income for jobs in our area until we become a microsoft adversary ;-) When big companies will be again on REBOL (RED?) you can rise how much you could get from the market as wage rate/time equivalence for your skill over a bounty.
GiuseppeC
* This is for the very high skilled people working for big companies and in money rich areas.

GrahamC
Our alpha emscripten build is online http://giuliolunati.altervista.org/try-renc.html
if it's a bit slow, it might be running off a phone

eFishAnt
I love that Graham!  very cool
Gregg
Congratulations guys!

eFishAnt

GrahamC
Giulio does all his programming on his phone.  And maybe runs a web server on this phone :(
Arnold
And his phone is as big as a refridgerator? Big enough to even run Java? Still impressive work!
GrahamC
No, one of his criteria for a computing device is that it fits in his pocket.

GrahamC
A little script that controls a Tello drone.  The problem we had with this is that the drone replies to the first UDP port it gets commands from. So, we need to fix the port we open rather than leaving it to the OS to allocate the port.  We have local-id now for that.
Before that Rebol had no way of specifying which port to open, except when opening a server port.

Gregg
Cool Graham.
GrahamC
It's like controlling a logo turtle in the sky :)
Gregg
In that case, VERY cool. :^)

GrahamC
We now have the empscripten builds available for download http://metaeducation.s3.amazonaws.com/index.html
Of course there's no documentation, and it's pretty fragile. But it's a starting point.
I wanted to use the emscripten builds to have a web page to control my Tello drone but alas Javascript doesn't have UDP support built in.

Bo
What are some examples of what can be done with a Rebol3 emscripten build?

GrahamC
It's there as a R3 interpreter for people to easily try out.
I imagine in time we will have complete control of the DOM so that you'll be able control the browser and JS. But initially it's JS calling Rebol.

Bo
I'd be excited to be able to control the DOM from R3...
Pekr
There's no spoon (R3)
Bo
Spoon?

Pekr
"There is no spoon" is famous saying from The Matrix movie. What I mean is - there is (mostly) no R3. There is Ren-C though. The question is, if we should regard it being a direct continuation of an R3 effort, as there does not seem to be any other active effort ...

GrahamC
Current focus is now on getting Dom manipulation using the Emscripten build.  And this apparently involves running a JS emulator in JS!  How twisted is that?

GrahamC
So, this is a Rebol console in Javascript with widgets now.
The feat was just accomplished last night so lots of things to fix.
The columns on the right will be a debug inspector.
eFishAnt
very cool, white paper and looks like typing in the web browser directly
Arnold
You cannot eat soup unless it is almost frozen, or cooked dry.... there is no spoon..
almost invented / discovered though :-)

GrahamC
You can now use shift-enter to enter multiline editing mode, and control-enter to evaluate switching back to single line mode.
Bo
Pretty cool!

Endo
That is cool Graham!

Oldes
I have added RSA cryptography to my R3 fork... here is a test file, where one can see usage example:
https://github.com/Oldes/Rebol3/blob/master/src/tests/units/rsa-test.r3
The code is based on files from Atronix's fork, but with rewritten and modified Rebol part (with a different function definitions).

Last message posted 2 weeks ago.