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

World: r3wp

[Rebol School] Rebol School

Maxim
22-Apr-2006
[296]
and using rebol.org you could even classify by advanced, and separate 
words being used more often in 'advanced or intermediate work.
Anton
22-Apr-2006
[297]
That would improve things I think.
[unknown: 9]
22-Apr-2006
[298]
Also it's clear to me that the importance of a function is not always 
related strongly to it's frequency of use.

This is why you need the Genus.


View would be a root, while many string commands would be all gathered 
at the end of some branch.  This becomes really easy to see when 
you present the data that way.
Anton
22-Apr-2006
[299]
It's not so simple, because there are many ways to hierarchically 
arrange the words, looking at them from different aspects.
Maxim
22-Apr-2006
[300x3]
then its a good test for the associative DB I am about to start working 
on.  :-)
I was looking for a good and simple data set to organise.
(I have been REBOLing full time for a while and yess many things 
are moving ahead :-)
Anton
22-Apr-2006
[303]
You could make trees where the grouping is by the words that follow 
or precede a word. Expressions, basically :-)
Maxim
22-Apr-2006
[304x3]
we can have each atom of information relate to any other atom based 
on rules we define... once the dataset is parsed, then you end up 
with a complex modeling of all related data which you can query and 
search trough quite quickly.
I am trying not to open too much on many of my current projects... 
but this is going to be co-developped while I'm doing liquid.
I'll give a shot at sorting out all of rebol.org once I get basic 
capabilities going and report back here, when its done.
Edgar
22-Apr-2006
[307x2]
I think just the list of natives would be a good start then use the 
source for the mezzanine functions as excersize of what can be done.
Classify the native words from easy to advance. I assume everything 
else can be generated using the native words.
Anton
22-Apr-2006
[309]
op! action! native!  then probably function!
denismx
23-Apr-2006
[310x4]
Although the "choose a task first then learn what needs to be used 
to code it" approach is fine in many circomstances, in a 45 hours 
course, the student ends up knowing how to code a few tasks (hopefully 
more than one, but not necessarily), but often has a very hard time 
transferring this knowledge to other tasks.


So I think a better "generalist" approach would be to categorize 
generic tasks, like "file manip"', "math", "iterations", "series", 
"network sharing of data", ... and identifying just a few native 
words category that are enough to solve all or most problems given 
in those categories.
Example problems I would give my students to solve would look like 
(to be adjusted according to the native word set retained):


Using iteration, draw a 19 line isoceles triangle (concepts of looping 
not obvious for beginners, but essential to grasp early)


Find all prime numbers lower than a given one, using previously found 
primes in the process to speed up the search.


Given a list of adresses, get the files and identify which ones have 
a given information on them (elementary parsing)


... Things like that. Diversified enough to give a good feel of what 
programming can solve while gaining basic skills (data stores, interation, 
maybe recursivity, various control structures - not necessarily all 
of them, operators, native functions and user defined functions, 
input and output, ...)
The pdf manual "Rebol Essentials" comes close to that. It seems to 
be a good starting point.
Another idea someone proposed in this thread which is very interesting 
if it is possible, is tracing a hierarchy of all the native Rebol 
word. If such a structure really undelies the whole or part of the 
400 word list, then this would be a powerful conceptual tool to aid 
in building learning "environments" for the language.
Jean-François
23-Apr-2006
[314]
I think it depends a lot on your audience. You said they had no previous 
experience in programming, but are they computer science students 
or humanities, or engineering?


Their are many things to teach at once; computer science concepts, 
Rebol concepts, how to program, etc. I guess you would also have 
to settle on a single programming paradigm to start with. If your 
audience are hunamities students then the not so simple concepts 
such a "programming language" and "program" (leading to "syntax", 
"semantic", "type") are very important to understand properly first. 
Then you have "expression", "evaluation", "subprogram"" etc. (leading 
to "values", "binding", "function"). I think all this can be done 
through meaningfull practical example built russian doll style.
Edgar
23-Apr-2006
[315x2]
When I said native, I did mean op!, action!, native! which source 
classifies as native.
There are about 270 in View but the op! are duplicates of some natives, 
and some natives are for efficiency and can be rewritten using the 
other native words. I guess I like looking at Rebol as a Forth language 
with very good and standard I/O support.
denismx
24-Apr-2006
[317x2]
Jean-François: one of the courses I teach is an introduction to programming 
to science students. Some of which will follow two more courses in 
programming, in the same language. Over the years, I've done this 
in Fortran, Pascal and now C++. At one time the first two courses 
were given in Python and the last (which I was giving), in C++. We 
decided that it was better to give all 3 in the same language. I 
didn't think Python was a good choice.

I'm now giving the first course (and maybe all 3). I'm exploring 
the possibility of opting at some time for Rebol, if I can break 
down the language into subsets that are "easily" learned and that 
offer useful tools for some large category of problems. I did'nt 
find any tutorial that seems to be quite there yet. 

Of course, the language is not the only thing taught. Basic programming 
and computer science concepts are also taught. But these can be taught 
independently from the choice of the language, for a large part. 

Rebol is my preoccupation. Some languages need a very lot of reading/learning 
before you can start to use it for solving problems with them. Maybe 
this is the case for Rebol. But I'm not sure yet. My hypothesis is 
that nearly everyone has learned Rebol by reading the Core manual 
and looking at examples in tutorials. It's ok to do it this way if 
one chooses so. But the teacher is expected to devise smoother paths 
for the learning process.
If I can engineer such a learning path, even if we never switch to 
Rebol for our classes, I'm sure that it would help enlarge the Rebol 
community. So I'm getting more interested in this project as I'm 
going along. It is not an obvious endeavor.
Anton
24-Apr-2006
[319]
I agree, starting with polygons and graphics is great for instant 
visual feedback at the beginning.
Gabriele
24-Apr-2006
[320]
i'd say the most important rebol native is INSERT. (even print is 
insert system/ports/output under the hood)
denismx
24-Apr-2006
[321]
ah! "insert". I would not have thought so. Will remember that while 
picking native words...
Jean-François
26-Apr-2006
[322]
Denis : You should maybe contact Gerard Cote on the mailing list. 
I believe he has been using Rebol in teaching introductory programming 
for a while now. He might have interesting pointers.


Also I would be curious to know if you have ever considered using 
Scheme for your courses. There are great ressources such as PLT Scheme 
and their book "How to design Programs" or "Simply Scheme" by Harvey 
and Wright. I think the content could be adapted to a curiculum based 
on Rebol
Graham
26-Apr-2006
[323]
A few ideas were collected here as well 3 years ago http://www.compkarori.com/vanilla/display/Rebol+School
denismx
5-May-2006
[324x9]
tks for the link Graham. And there is a mention of Gerard Cote in 
there too, Jean-François.
Actually, I'm not trying to figure out how to introduce programming 
concepts, or computer science in general. I already have a lot of 
stuff on that since I have been teaching this for 20 years now. And 
I'm not looking tor a "better" language to teach, even though I have 
given a look to Scheme.
What I want to develop is a "better" approach to learning Rebol, 
for non-programmers mostly. I'm really focusing on Rebol, and not 
what should be learned before, nor what could be a better option.
The "Rebol Essentials" is a good start. But I think I can break the 
approach down to still simpler steps. The difficulty I face is not 
having the broad, overall picture for Rebol. I am very conscious 
this limits my ability to make the best choices for the moment.
Here is what I figure would be a good starting point, at the present 
level of my knowledge:
First concepts: values, words (at a basic level), blocks (later on 
: functions)
First natives: print, arithmetic operations, the simplest control 
structures (conditional, for loop, while loop)
Then reading data somewhere and some simple parsing techniques: find 
a string, extract from one point to a second and saving the data.
I have the feeling that would be a very good starting point. I'm 
a little hazy on what is offered for parsing in Rebol at the moment. 
I'll look into that next. I think that once you have read a file 
into memory, it is in block form and you can use natives like "first", 
"next", "find" and so on on it. If so, then I would be going that 
way for sure.
Anton
5-May-2006
[333x3]
read file --> string
load file --> block
Strings and blocks are both series, so first, next find etc work 
on both, but when you load you get a block and the units are values. 
When you read, you have a string and the units are characters.
When you load, the file has to be LOADable by rebol, which means 
everything in it must be parseable into rebol values.

When you read, the file can be absolutely anything. I usually have 
to read web pages and parse a string, for instance.
Volker
5-May-2006
[336]
How about that old way of starting with a text-adventure? Write a 
framework and let the learner add some special item?
Maxim
5-May-2006
[337x6]
actually denis, for introducing looping I'd use foreach before while. 
 while is rather hard to grasp in the begining, cause its easy to 
bugger up the end conditions and end up in infinites loops.
for example, in parsing a sentence, foreach could make you very easily 
traverse the whole string like so:
foreach letter sentence [print letter]
also remember that find, does not copy the series, it returns the 
serie at a different index.
to extract substrings without use of 'PARSE you can do:
substring: copy/part find sentence "debut" find sentence "fin"
in the above, the string "fin" is not included, since find returns 
the start of the match by default... to include it, just add the 
/tail refinement.

substring: copy/part find sentence "debut" find/tail sentence "fin"
this can allow you to explain optional arguments later on in funcs. 
  also as an easy exercise, you can ask them to return the substring 
without "debut" or "fin"... (simply switch the /tail to the first 
find)
denismx
17-May-2006
[343x3]
Anton, Maxim: noted. Hum... will have to test what happens if I use 
"début" with the accent. In VC++ console mode, the output doesn't 
use the same character table as the editor. Didn't think of checking 
this yet, but the classe will be held in French so I should check, 
although this is not vital.
Volker: good idea. "old way"? I've never seen this approach used 
before (and I'm not young). But I think it would be very motivating 
project for these students. I'll use this suggestion.
I've talked to one of my colleagues about Rebol and he's checked 
into it. He's interested also. So it is becoming more probable we 
will switch to Rebol to introduce basic programming concepts as well 
as to empower them with a programming tool to build very small applications 
to complement the scientific software at their disposal.