r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Rebol School] Rebol School

Pekr
11-Apr-2006
[237x2]
I think that it would be good to have visual drawing - sentences 
as "symbol that is pointed to by  a word" is kind of abstract for 
newbies. And what bothers newbies? When the series is unique and 
not shared. I know cases where I better use 'copy, because I am not 
really sure, what rebol will do ...
I don't know single person, who would not run into troubles because 
of that ... I once even saw Carl's script, where changing border 
of one button changed them all ;-)
BrianH
11-Apr-2006
[239]
I agree about the pictures. Too bad AltME uses variable length fonts, 
or I could do ASCII art. It's a good thing that denismx already told 
us that he is familiar with C++, so I don't have to explain what 
I mean by a pointer or a string here.
Pekr
11-Apr-2006
[240]
I know, nothing against what you describe, I just wanted to point 
out to possible troubles and mistakes by newbies, and am trying to 
find out, how to avoid it ....
BrianH
11-Apr-2006
[241x2]
I just hope he can translate for his students.
Perhaps we need to make a REBOL-in-REBOL, if only for the sake of 
teaching.
denismx
19-Apr-2006
[243]
I'm starting to sort the concepts out, cross-referencing several 
explanations. I will have to tone down the explanations for my students, 
obviously. But to do so, the teacher needs to have a very good grasp 
of the language so as not to make faulty reprensentations that would 
work small scale, but not later on when some students progress further 
in the language.
Maxim
19-Apr-2006
[244x2]
I find its hard to get people to "grasp" REBOL.  in the sense that 
they we all just see a different syntax twist at first.
The single most helpfull sweeping statement for me was "code IS data"
denismx
19-Apr-2006
[246x5]
The document "Rebol Essentials" starts with an explanation of value, 
word and block. Seems to be a good starting point. Haven't looked 
at how it introduces the syntax of system words later on. That is 
a crucial part. I want to find a subset of the 400 Rebol words that 
sould and can be learned first, giving the beginner a useful and 
powerful subset of instructions to start programming significant 
small apps.
Yes Maxim. But that is to mystical for teaching purposes.
Actually, since Von Neuman, code is treated as data. You load it 
into memory and process is as a special kind of data.
... so it's a long time ago that this concept is around.
I remember writing a program in Pascal that modified itself either 
in memory or rewriting itself on disk with variations.
Maxim
19-Apr-2006
[251x2]
not exactly what I meant.
there is no "code" in rebol.
JaimeVargas
19-Apr-2006
[253x2]
Maxim thats not completely true. What you want to say is that you 
can manipulate code as it was data at  runtime, and the modifications 
will affect the program next time there is an eval.
eval are trigger by function evaluation, do, reduce, parens and few 
others.
Maxim
19-Apr-2006
[255]
damn... I'd like to continue here... but I must run off  :-(
denismx
19-Apr-2006
[256x2]
In fact, in any programming language, code is just data that is executable. 
Some languages allow that the code-data be processed as any other 
date. Rebol is not the only one. And I do not believe that this is 
it's main characteristic. The fundamental characteristic of Rebol 
is that it is a language for exchanging data over networks, be it 
information (data) or programs (code) so that is can be used and 
executed (if code is passed) on any computer connected to the network.
For this to be possible, the language needs to be able to interpret 
new code passed to it, naturally.
JaimeVargas
19-Apr-2006
[258]
Yes denismx, but that is not the only approach possible. Erlang passes 
byte code, and it is very good at distributed computing, same with 
Termite.
denismx
19-Apr-2006
[259x2]
What is amazing is that the interpreter is so small and yet permits 
so much.
Of course...
JaimeVargas
19-Apr-2006
[261]
It has to do with the careful mapping of datatypes to literals.
denismx
19-Apr-2006
[262]
The small footprint, u mean?
JaimeVargas
19-Apr-2006
[263]
That is a forte of Rebol, it avoids data prickling or serialization 
which it is require in other languages.
denismx
19-Apr-2006
[264]
ic
JaimeVargas
19-Apr-2006
[265x2]
Regarding small footprint I think this is just proper coding, and 
avoidance of bloat.
mzscheme interpreter is only 300K in my system. So it is not unheard 
off.
denismx
19-Apr-2006
[267x3]
I'm sure there is a lot of that. But then again, 256K for the core 
seems very small.
ic
and Basic was pretty small too. Guess I'm getting to used to bloated 
stuff with the years :-)
JaimeVargas
19-Apr-2006
[270x4]
Yes.
Most interpreter machines are small. What makes the big is all the 
libraries and IDEs that they add to them.
Going home now. Keep enjoing rebol.
Before I go this is the shortest intro to scheme and functional programming 
that I had found. It will get you up to speed in this model in one 
day http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme.html
denismx
19-Apr-2006
[274]
I will look into it Jaime. Tks. Although I am doubtfull my solution 
to devising a "better" way to teach Rebol is in getting a better 
mastery of functional programming, I may be wrong. So I'll follow 
your lead.
JaimeVargas
20-Apr-2006
[275]
Functional programming demystifies a lot imho.
denismx
21-Apr-2006
[276x3]
I'm sure it does, but my impression is that I don't have any problem 
with that concept. I programmed in Logo and Prolog (for teaching 
purposes, not commercialy). The idea that I can build Rebol statements 
in blocks and evaluate them, all at runtime, does not phase me. But 
I'm always willing to learn more of anything. It never hurts (much).
The question I am asking myself now, in my exploration of Rebol, 
is: What is the smallest subset of predefined Rebol words that will 
empower a student to build significant small applications.
If this set is small enough (400 words is way to large), say 15 to 
30 words, then this would be a good starting point for teaching purposes 
(18-20 year olds with no previous experience in programming).
Anton
21-Apr-2006
[279]
That leads me to wonder if I could produce a histogram of all the 
rebol words in my codebase. But "rebol words" is kind of hard to 
define, so it would not give a precise result. I think individual 
frequency analysis of some actual rebol apps would lead to a nice 
collection of functions.
[unknown: 9]
21-Apr-2006
[280]
Then a genus tree, since many words are just subtle variations.
Maxim
21-Apr-2006
[281]
ball part figure, I'd say basic I/O and core series handling.
Allen
22-Apr-2006
[282]
Rather than choosing a subset of words to learn first, choose the 
task instead, the required subset will then be fairly obvious.
Anton
22-Apr-2006
[283x4]
That's definitely true, but I see value in trying to determine which 
functions are used the most often, to teach those first.
Well, I've just manually extracted the rebol functions from my latest 
script demo-virtual-face.r (as posted in the View group), so I'm 
looking at those. I've excluded layout and draw dialect keywords. 
The order in which the functions appear is interesting. I have some 
duplicates. So now I'm analysing..
Also it's clear to me that the importance of a function is not always 
related strongly to it's frequency of use. Take VIEW for example, 
not used that much, compared to other functions, but without it you 
cannot open a window ! (You can, actually, in other ways, but VIEW 
does a lot of work. Mmm... another way to assess importance of a 
function, the length of its source ?)
Ok, so here's my frequency table:
    6 compose 
    5 as-pair 
    5 func 
    4 do 
    3 show 
    2 all 
    2 copy 
    2 find 
    2 form 
    2 get 
    2 in 
    2 pick 
    2 print 
    2 to-image 
    2 use 
    1 * 
    1 + 
    1 - 
    1 <> 
    1 = 
    1 append 
    1 bind 
    1 center-face 
    1 change 
    1 clear 
    1 context 
    1 do-events 
    1 either 
    1 first 
    1 foreach 
    1 if 
    1 join 
    1 layout 
    1 load-thru 
    1 make 
    1 mold 
    1 object? 
    1 reduce 
    1 remold 
    1 remove-each 
    1 repeat 
    1 second 
    1 select 
    1 to-pair 
    1 to-path 
    1 view