• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r4wp

[!REBOL3] General discussion about REBOL 3

GiuseppeC
1-Jun-2013
[2550]
*But I am sure that if I write on the top of a web page a full line 
of code and then "If you can understand this, you can write code 
in WORLD" people will feel they can.
Geomol
1-Jun-2013
[2551]
I have implemented ;{ ... } comments in World. It will be in next 
alpha to test it.
GiuseppeC
1-Jun-2013
[2552]
A big reason to give World a try.
Marco
1-Jun-2013
[2553]
On the same subject, I wish I could write:

	foreach item in the serie [do something]

and I'd like to have single-word comments so it become:

	foreach item /in-the serie [do something]

(the slash is only a possible (?) solution)
Arnold
1-Jun-2013
[2554]
in-the: function [a [series!]][a]
foreach item in-the serie [do something]
???
Geomol
1-Jun-2013
[2555]
You could even redefine IN, and get exactly, what's asked for:

>> series: [1 2 3]
== [1 2 3]
>> in: the: func [v] [:v]
>> foreach item in the series [print item]
1
2
3
>>
Henrik
1-Jun-2013
[2556]
It might make it 10% more readable to beginners, but it will make 
it 90% less usable.
GiuseppeC
1-Jun-2013
[2557]
Henrik, while I respect your, we have a different opinion.
Gregg
1-Jun-2013
[2558]
The pass-thru func approach is an interesting thought. I wouldn't 
want to redfine things to do it though.
GiuseppeC
1-Jun-2013
[2559]
Sometime I think the current keyboards and characters are limiting 
from programming purpose. We need more characters.
Gregg
1-Jun-2013
[2560]
Poul Henning Kamp wrote an article about that some time back. The 
need to move away from the ASCII character set.
Cyphre
1-Jun-2013
[2561]
Everytime I see THE word in a ny language I'm finished with it  :-)
Ladislav
1-Jun-2013
[2562x3]
Ladislav, I disagree with your (not so) hidden opinion that the feature 
I proposed is not useful at all.

 - Hmm, that is not exactly what I wanted to write. I wanted to express 
 that it was an error to mistake the primitive verbosity property 
 you described as the necessary property for Rebol to be perceived 
 "natural (human) language resembling".
Whether the primitive verbosity property could be useful and for 
whom is a matter I did not want to discuss at all.
WOW, I can understand this so I can program using this language

. - that looks also very primitive. Such an illusion can be cured 
by reality too fast to take it seriously
GiuseppeC
1-Jun-2013
[2565]
Ladislav, I prefer to loose 9 out of  10 "wow"  and having 1 continuing 
his rebol education than having 0 programmers attracted.
Gregg
1-Jun-2013
[2566x3]
Giuseppe, I know you think it will help, but that doesn't mean it 
will. So, do an experiment to find out. Or look at other languages 
and see how many successful languages do it. VB was widely adopted 
by non-programmers and it had very few connecting words. FOR and 
FOR EACH being the main examples.
I still want to update FOR, or LOOP as was discussed here some time 
back. It would be easy to include support for optional connecting 
words in that small context to see how it is received.
Another question to ask is: would people use them, if the support 
was there? Experts likely won't, unless writing examples. Will new 
programmers? How often do new programmers comment their code well?
Henrik
2-Jun-2013
[2569]
it will make it 90% less usable.

 - what I mean is that the beginner will grow out of this in a matter 
 of, perhaps, days and then it will only be seen as a nuisance than 
 an advantage. REBOL is about words and symbols and now we're spending 
 words and symbols for no real purpose.


I'm afraid it will just confuse and complicate programming in REBOL, 
when you first learn it with fill in words and then without those 
words, and simply slow down the learning process.
Ladislav
2-Jun-2013
[2570]
Good news are that there already is a language following this design 
goal:
#[[Wikipedia

One of the design goals of it was that non-programmers—managers, 
supervisors, and users—could read and understand the code. This is 
why it has an English-like syntax and structural elements—including: 
nouns, verbs, clauses, sentences, sections, and divisions. Consequently, 
it is considered by at least one source to be "The most readable, 
understandable and self-documenting programming language in use today. 
[...] Not only does this readability generally assist the maintenance 
process but the older a program gets the more valuable this readability 
becomes." On the other hand, the mere ability to read and understand 
a few lines of its code does not grant to an executive or end user 
the experience and knowledge needed to design, build, and maintain 
large software systems."
#]]Wikipedia

Some other good news:

- the wheel has already been invented:
- the language is mature, having been designed in 1959


So, Giuseppe, aren't you eager to try it? It might be quite an enlightening 
experience for you, realize that you would immediately understand 
the expresions!
Andreas
2-Jun-2013
[2571x2]
And other good news: it shares 60% of REBOL's name!
The problem with naively catering languages to beginners is: beginners 
only stay beginners for so long.
GiuseppeC
2-Jun-2013
[2573]
None of our arguments is based on real world experiments. So my argument 
are still valid like yours. Ladislav, why don't you try to add this 
feature and lets see if the user will like it ?
Arnold
2-Jun-2013
[2574]
COBOL?
Ladislav
2-Jun-2013
[2575]
Ladislav, why don't you try to add this feature and lets see if the 
user will like it ?
 - I think I did explained it sufficiently:

- such a feature has been implemented in a language since 1959

- I do not feel responsible for implementing every feature you may 
find useful
GiuseppeC
2-Jun-2013
[2576]
- such a feature has been implemented in a language since 1959
I think it had a great moment.
Gregg
2-Jun-2013
[2577]
Moving to Languages...
Geomol
3-Jun-2013
[2578]
How far is tasks implemented in R3? It's possible to make them:

>> probe make task! []
make task! [
    title: none
    header: none
    parent: none
    path: none
    args: none
]


, but are there examples of use? Are they supposed to be kinda stackless 
tasklets or some threading thing?
Pekr
3-Jun-2013
[2579]
not finished imo. But I tried to put some code in a task - wait, 
print, and IIRC it did so ... console was freed, later it printed 
the message. But it was long time ago ...
Geomol
3-Jun-2013
[2580]
I'm about to look deeper into tasks and networking and was wondering, 
if Carl wrote something about this, and how much is already there?
Pekr
3-Jun-2013
[2581]
As for networking, R3 uses devices. Please consult the rebol.net/wiki 
docs, there's quite a bit info about it. As for tasking, during one 
session we asked Carl to clarify, so he did. BrianH or others would 
be most probably able to describe, how Carl envisioned it to work. 
The only thing I can remember is, that it was supposed to be called 
task! datatype, but internally using threads with some automatic 
syncing, or something like that ...
Steeve
3-Jun-2013
[2582]
Missing a yield return function to have rebol tasks really usefull
Geomol
3-Jun-2013
[2583]
Steeve, do you have experience wiht protothreads?
Steeve
3-Jun-2013
[2584]
protothreads?
Geomol
3-Jun-2013
[2585x2]
http://dunkels.com/adam/pt/
I was just thinking, because they're lightweight and also have the 
yield functionality, you just mentioned.
Steeve
3-Jun-2013
[2587]
ok
Ladislav
5-Jun-2013
[2588x6]
#[[AdrianS
...if you have the following in a script:

print sumn 1 2
print "hello"

The "hello" doesn't print.
]]AdrianS


Yes, that is not surprising. SUMN (referring to its last version) 
is taking unlimited number of arguments and stops taking them only 
if it obtains an argument that is not a number. In the above case 
SUMN consumes the ''print word, that is why nothing is printed. To 
stop SUMN before it consumes the 'print word, you can use either 
paren:

    (sumn 1 2)
    print "hello"


or just supply NONE (or some other non-numeric value)  to be consumed 
by SUMN as the last (stopping) argument

    sumn 1 2 #
    print "hello"
In your example the 'print word is not evaluated because the ARG-ADDER 
function uses the unevaluated argument passing style. It could be 
possible to use evaluated argument passing style for the ARG-ADDER 
function obtaining slightly different behaviour. You can experiment 
with that, the main problem being that in such case the expression 
(sumn 1 2) would not work, since SUMN would always require some stopping 
argument.
On the other hand, using evaluated argument passing style, the expression

    sumn 1 2 print "hello"


would work as you expect since the PRINT call would be evaluated 
and its result (the #[unset!] value) would be used as the SUMN stopping 
argument.
#[[Adrians

Among other things, how is it OK to invoke arg-adder without providing 
the one arg it expects when you have "return/redo :arg-adder?
]]AdrianS


RETURN/REDO is a construct returning (in this case) the ARG-ADDER 
function and setting up an indicator telling the interpreter that 
after obtaining the function as a result it should reevaluate it 
collecting the respective number of arguments for it (one in this 
case).
also, note that e.g.

    retutn :arg-adder

would just return the ARG-ADDER function without evaluating it.
err.

    return :arg-adder

is what I meant
AdrianS
5-Jun-2013
[2594]
Thanks, Ladislav. I was hoping that there would be a "magical" way 
of telling Rebol to somehow back up and re-evaluate the consumed 
stop argument. Maybe return could have a /back refinement which you 
could use when exiting a variadic function. What do you think?
Bo
5-Jun-2013
[2595x3]
Carl has been talking for some time about integrating streaming protocols 
into Rebol (probably like h264, mpeg4, mp3, wmv, etc.).  Is that 
something that could be plugged into the existing codebase rather 
directly, or will it take a lot of changes to make it work?
avconv (formerly ffmpeg) is open source, so I imagine some or all 
of that could be used as a starting point (if the licenses are compatible).
I think gstreamer is also open source, and might be less complex 
than avconv.
Geomol
5-Jun-2013
[2598]
Maybe if you could find libraries, that can do this, and call them. 
World can call routines in libs, and REBOL can too (afaik).
Bo
5-Jun-2013
[2599]
Yes, but I think Carl was talking about making it more of an integrated 
component so it can be easily accessed Rebol-style.  It's like the 
difference between loading a jpg in Rebol (it just works) or trying 
to link Imagemagick (or comparable) to load a jpg into a binary image 
format that can be modified by Rebol.