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

World: r3wp

[Rebol School] Rebol School

Maxim
5-Jan-2009
[1362x2]
define compact.
cause syntactically, rebol has extremely few rules.
Graham
5-Jan-2009
[1364]
Compactness is a measure of how easily a design can fit inside one's 
head.
Graham
8-Jan-2009
[1365]
Well, I've got it working mostly.  sometimes it doesn't kick off 
an async function ... and seems to need a wait here and there :(
Maarten
8-Jan-2009
[1366]
REBOL is very compact. Everything is either a word or a value, and 
even words can be values.
BrianH
8-Jan-2009
[1367x2]
Graham, by your standards REBOL 3 is more compact than REBOL 2, but 
maybe that is just to me.
Once you start adding Draw into it though, I lose the whole. With 
R2 there is also the broken port model, design flaws and legacy stuff, 
so I lose the big picture a lot quicker. Python I don't know much 
about, and C is getting more complex all the time. I guess it depends 
on the head.
Maarten
8-Jan-2009
[1369]
LOL.... the toplogy of the head determines if you can wrap it around 
a language...
Graham
10-Jan-2009
[1370]
Yes I would put view as part of REBOL.
[unknown: 5]
11-Jan-2009
[1371]
Here is a post about the read-io function for newbies.  http://www.tretbase.com/forum/viewtopic.php?f=8&t=55&p=128#p128
Chris
12-Jan-2009
[1372]
Paul, what are the issues with 'read-io on network ports?
[unknown: 5]
12-Jan-2009
[1373]
The only think I recall is that Holger use to express (this was obviously 
years ago) that we shouldn't use read-io for network ports and instead 
use copy instead.
sqlab
13-Jan-2009
[1374]
I remember Carl writing, that here is no need anymore to use read-io 
and write-io after a certain version.

But I use it still sometimes to see when data could not be written, 
because there is no space anymore  left on disk
Maxim
13-Jan-2009
[1375]
IIRC, for a server I did, I had to use read-io, don't rememeber why 
but it made it simpler in a complex and timed server multi-port management 
loop (direct tcp socket handling).
Gabriele
14-Jan-2009
[1376]
the only case where you need read-io and write-io currently is if 
you are using async-modes. sqlab's may be a good case too. i don't 
know of others at this point.
[unknown: 5]
14-Jan-2009
[1377x2]
Why is that Gabriele?
I'll be implementing an async server soon so any info is good info 
in that regard.
Gabriele
15-Jan-2009
[1379]
because async-modes is a hack in rebol, and only works with read-io 
and write-io.
[unknown: 5]
15-Jan-2009
[1380x2]
Ahhh, good to know Gabriele.
I hope you can expound on that when you get a chance.
DanielP
16-Jan-2009
[1382x3]
Hi.
Let's see this code:

toto: [25 10 14]

renv: func [b [block!]]
[
 foreach Val b [ print Val + 1]
]
when I call this function, with "renv [ toto] ". I receive an error 
message because the elements in toto are viewed as word!, not as 
integer! by Rebol.
Graham
16-Jan-2009
[1385]
you've got a block inside a block
DanielP
16-Jan-2009
[1386]
?
Graham
16-Jan-2009
[1387x3]
you can't add 1 to a block
renv [ toto ]
and toto has no value
DanielP
16-Jan-2009
[1390]
ok, but when I use the same code without insert it in a function, 
it work perfectly
Graham
16-Jan-2009
[1391]
renv reduce [ toto ] => renv [ [ 1 2 3 ]]
DanielP
16-Jan-2009
[1392]
the code :

toto: [25 10 14]
foreach Val toto [ print Val + 1]

work because elements in toto  are considered as integers.
Graham
16-Jan-2009
[1393x2]
and so will

renv toto
but not 

renv [ toto ]
DanielP
16-Jan-2009
[1395]
oh ... I'm stupid ! ;)
Steeve
16-Jan-2009
[1396]
you are in Rebol School ;-)
Brock
30-Jan-2009
[1397x8]
I've got a graphic related project that I want to start working on. 
 It deals with enhancing Frank S's code that Graham enhanced further... 
http://www.rebol.org/view-script.r?script=paintplus.r
I'd like to be able to make the objects that get drawn on the page 
true objects that can later be dragged to a different location.
I was able to drag REBOL Styles from the area off the 'canvas' onto 
the canvas and around the pane in general using the movestyle 'feel 
found at http://rebol.com/how-to/feel.html
However, I can't get this same code to work on the Boxes, Circles, 
Arrow or Lines that I draw within the draw area.
I'd really appreciate it if one of our graphic gurus can jump in 
and let me know how I can either use the code above to do this, or 
suggest an alternative.
This is my first attempts at using feel and the Draw dialect.  Frank 
& Grahams code has got me started, but I've now looked at this for 
some time and can't get anywhere.
I've also looked at warp-image.r from the Rebol Desktop sample apps 
as I'd really like the behaviour to drag points to change the start 
and stop points of the Lines and Arrows etc... but can't seem to 
blend these behaviours into one tool.
The end result would be similar to Vector drawing program with the 
output being a DRAW dialect.  Any interest?
Graham
30-Jan-2009
[1405]
Have you tried Geomol's canvas thingy?
Reichart
30-Jan-2009
[1406x2]
The big question is, what format should the data be stored in, as 
well as exported/imported in...
I really wish SVG had won, or, well, ANYTHING had won.
Brock
30-Jan-2009
[1408x2]
I'd be happy with a draw block.  My plan is to store the draw block 
in a database record so the image can be built and the objects remain 
editable if fine-tuning is required.  I've been playing with sqlite.r 
for the storage side of things.
Graham, no I haven't.  I'll take a look at canvas, I don't recall 
any discussion about this in the past.  (I read, I just don't remember 
:-(  )
Reichart
30-Jan-2009
[1410]
I learned something a long time ago about formats.  Lock it down 
up front, and make sure you can convert on the fly.  If you don't, 
you waste a lot of time later.
Also, treat everything as a "event".   This way Undo works.
Graham
30-Jan-2009
[1411]
Geomol's paint program is a copy of the famous Amiga paint who's 
name now escapes me.