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

World: r3wp

[Rebol School] Rebol School

kib2
11-Feb-2009
[1996x2]
Ok, I just checked TRIM : that's useful.
I've somewhat modified the TextMate bundle for REBOL for e TextEditor, 
and made a new theme for it : http://tinyurl.com/dxt89p. I someone 
is interested, let me now.
Gregg
12-Feb-2009
[1998x2]
I played with the TextMate bundle at one point (when I had a mac 
running here), and I think Will Arp or Chris Ross-Gill have also 
done some work on it.
And, yes, REBOL is wonderfully addictive. :-)
Henrik
12-Feb-2009
[2000]
There is a bug in an older version of the textmate bundle, causing 
textmate to very quickly fill an error log with megabytes of errors.
kib2
13-Feb-2009
[2001x2]
Help! : how can I use parse to handle this case: a match will starts 
at  "//" only if the char before "//" is not ":" (like in "http:://www...") 
?
Henrik: how do you raise such errors ?
Henrik
13-Feb-2009
[2003]
kib2: I never entirely found out, but I think it could have been 
when it was trying to syntax highlight empty brackets: []
kib2
13-Feb-2009
[2004]
Henrik: no problem for me inside eTextEditor. I've also noticed that 
the textmate bundle missed several keywords (ie the ones from the 
parse dialect).
Tomc
13-Feb-2009
[2005]
valid-start-char: complement ":"
valid-start: [opt valid-start-char "//"]
Izkata
14-Feb-2009
[2006]
>> X: complement {:}
== "
>> length? X
== 1
>> X/1
== #"

This looks like a bug to me
Anton
14-Feb-2009
[2007x3]
What version of rebol, on what platform?
On linux, I get
>> x/1
== #"?"
Aha. In Rebol3 string! and char! were removed from COMPLEMENT allowed 
arg types.
http://curecode.org/rebol3/ticket.rsp?id=411&cursor=1
Izkata
14-Feb-2009
[2010]
Rebol/View 2.7.6.4.2, on Ubuntu linux
kib2
14-Feb-2009
[2011]
>> X: complement ":"
== "Å"
For me :
>> length? X
== 1
>> X/1
== #"Å"

On Windows Seven with RebolView 2.7.6.3.1
Oldes
14-Feb-2009
[2012]
do you mean:
 valid-start-char: complement charset ":"
kib2
14-Feb-2009
[2013]
Oldes: you're right !
Vladimir
14-Feb-2009
[2014x4]
I have a question for you rebol experts :)
How would you make simple app like this:
Open window with 100x100 pixels and lets say control individual pixels 
on that window.... something like direct screen buffer - one pixel 
= one byte in an array...
what would be the "Rebol way" ?
Anton
14-Feb-2009
[2018]
Do you really need low-level access ? I suppose you don't mean simply 
this?

view window: layout [my-image: image (make image! 100x100) button 
"set pixel" [my-image/image/(random 100x100): white show my-image]]
Vladimir
14-Feb-2009
[2019x3]
I ask this because I want to try effect for demo that uses some math 
functions to draw pixels on certain coordinates....
what you wrote is just the thing I need! :) didnt know Image had 
that effect...  :)
have to go to lunch.... :) Thanks Anton!
Anton
14-Feb-2009
[2022x3]
Try also:
img: make image! 300x200
window: layout [size (img/size)]
window/image: img
view window
(Less faces in the resulting face hierarchy, so should be more efficient 
to redraw.)
Vladimir
14-Feb-2009
[2025x3]
how would you combine those two examples?
I did it.... :)img: make image! 320x200
window: layout [size (img/size + 100)
				button "set-pixel" [window/image/(random 100x100): white
									show window]
			   ]
window/image: img
view window
thanks Anton... this is perfect for what I want to do..... :)
Janko
14-Feb-2009
[2028]
nice example
Tomc
14-Feb-2009
[2029]
oldes. yes, with practice, my typing has improved from dropping letters 
to dropping words.
Gregg
14-Feb-2009
[2030]
In addition to poking pixels, don't forget the DRAW effect.
Anton
15-Feb-2009
[2031x3]
.. and the DRAW function.
draw img [line 0x0 300x200]
(DRAW is not good at setting individual pixels, though.)
Gregg
15-Feb-2009
[2034]
Agreed. But it's great if you want to at higher levels.
Vladimir
15-Feb-2009
[2035]
Thing is yesterday evenning I started messing with wxwidgets on my 
newly installed ubuntu on laptop and after few hours of not being 
able to produce anything usefull I gave up..... And then I asked 
Anton how to set it up in Rebol  :)


And after few lines of code in rebol I had just the thing I needed 
- simple 2d display to test algorythm for my new game :)
Gregg
15-Feb-2009
[2036]
That's REBOL for you. Congratulations on making it work so fast!
Vladimir
15-Feb-2009
[2037]
I used wxwidgets before... and it works... but I hate bloated stuff 
every day more and more... 

And Rebol way with one file download and simple text file few lines 
long working on linux and win just as it is............

Man, I'll wait for rebol3 and its modules and other more usefull 
stuff and wont look back.... :)

Until then I'll keep using rebol for stuff like ftp, email and simple 
interface stuff.....
Reichart
15-Feb-2009
[2038]
Vlad, cool stuff, what type of game?
kib2
15-Feb-2009
[2039]
Hi.  Just to thank to all of you who helped me starting with REBOL. 
My markup engine is getting better now. I even build a little page 
with it : http://kib2.free.fr/REBOL/index.html
Reichart
15-Feb-2009
[2040x4]
No jsMath TeX fonts found -- using image fonts instead.
These may 
be slow and might not print well.
Use the jsMath control panel to 
get additional information.
(and your page needs a title)
ie
 should be "i.e."
langage  should be language
Cool stuff!
kib2
15-Feb-2009
[2044]
Reichard: thanks for the report! (langage is French, I often made 
this mistake)

There's actuially no title, it was my intent. There will be later.
But you're right with jsMaths : it's *very* slow.
Reichart
15-Feb-2009
[2045]
You spell better than me, I assure you.