rebol

Anyone used the Rebol programming language? What do you think of it?

If you are using it, what are you using it for? Do you use it purely as a personal toolset/language or are you using it in a broader sense (i.e. many others use it, or the result of it) http://rebol.com/ Just curious if anyone has used this language much? I find it very interesting and has some good potential. ...

What should I call a REBOL function that does list comprehensions?

REBOL has no built-in way to perform list comprehensions. However, REBOL has a powerful facility (known as parse) that can be used to create domain-specific languages (DSLs). I've used parse to create such a mini-DSL for list comprehensions. In order to interpret the expression, the block containing the comprehension is passed to a funct...

What's a good, non-recursive algorithm to calculate a Cartesian product?

Note This is not a REBOL-specific question. You can answer it in any language. Background The REBOL language supports the creation of domain-specific languages known as "dialects" in REBOL parlance. I've created such a dialect for list comprehensions, which aren't natively supported in REBOL. A good cartesian product algorithm is nee...

Dynamically adding words to a context in REBOL

Imagine the following REBOL code: foo: context [bar: 3] I now have a context foo in which 'bar is defined. How can I dynamically inject a new word into this context? Is it possible? I've tried: set/any in foo 'baz 3 But that doesn't work because the expression in foo 'baz fails because there is no word 'baz defined in the foo contex...

How do I access the REBOL header?

Let's say I have a REBOL script in another file (imported.r) that looks like this: REBOL [ author: {Greg} title: {Awesome REBOL Code} ] x: 3 How can I import this file into another script and gain access to the contents of the REBOL header? I'm aware of load/header but I can't seem to do anything with it. imported: context lo...

What is a good tutorial on the QuickTime API for MS Windows?

I'm working on a project that has to read and manipulate QuickTimes on Windows. Unfortunately, all the tutorials and sample code at the Apple site seem to be pretty much Mac specific. Is there a good resource on the web that deals specifically with programming QuickTime for Windows? Yes, I know that I can bludgeon my way (eventually) thr...

Rebol parse: dealing with whitespace and copy var

I read chapter 15: http://www.rebol.com/docs/core23/rebolcore-15.html#section-8" spacer: charset reduce [tab newline #" "] spaces: [some spacer] rule: ["a" spaces "b" spaces "c"] parse/all "a b c" rule is OK but if I change rule to just rule: ["a" spaces copy varb to spaces "c"] parse/all "a b c" rule Rebol Console outputs error: ...

Building Object in Rebol dynamically

This works: >> Oblock: [FirstName: "" [ LastName: "" [ BirthDate: ""] == [FirstName: "" LastName: "" BirthDate: "" ] >> Person: Make Object! OBlock >> Person >> probe Person make object! [ FirstName: "" LastName: "" BirthDate: "" ] >> Person/FirstName == "" >> Person/FirstName: "John" == "John" But this doesn...

Downloading mail from hotmail

I want to script the download of messages from hotmail. Both Gmail and Hotmail allow access by secure POP on port 995. My script works fine with Gmail ... but after I send the line to Hotmail USER [email protected] I don't get a response back. I installed Windows Live Mail and that is clearly able to download my hotmail mess...

Rebol: how to write source to the clipboard ?

f: func[][] write clipboard:// source f doesn't seem to please rebol :) ...

How to protect Object Fields in Rebol ?

O: [a: 1 b: 2] Protect 'O does only protect O symbol not O/a. How do I also protect O/a ? Thanks. ...

Problem when using overrided function in Rebol

I have created this cloneset: :set set: func[word [word!] value][ if/else (type? get word) = list! [ print "list is immutable" ][ cloneset word value protect word ] ] protect 'cloneset protect 'set I have this error when defining the val function with the new set function: val: func[word [word!] value][ set word valu...

Problem with Rebol Layout

Why are my buttons not positioned at 0x0 within the box panels ? main: layout [ size 680x400 origin 0x0 space 0x0 pad 0x0 at 0x0 across Menu1: box brick 200x200 return Menu2: box blue 200x300 ] Menu1-items: layout [ origin 0x0 space 0x0 at 0x0 button "1" button "2" ...

Is there a more elegant syntax to do this in Rebol ?

I'm writing a tutorial on Rebol's Object persistence but I'm not sure if my way is the best suppose %config.txt contains a: 1 b: 2 We can then load it with config: construct load %config.txt To save it back to file I use this save %config.txt (pick to-block mold config 3) But I'm not sure this is the most elegant syntax to do ...

How to draw and fill a rounded rectangle in Rebol

How would you draw a Rounded Rectangle in Rebol and fill it with a gradient color ? Can't find any example. Thanks. ...

Is it possible with Rebol AGG to do like Flash ?

Since Rebol has AGG antigrain.com Is it possible to create a glossy button like Flash does ? http://www.graphicmania.net/creating-glossy-vista-style-buttons-in-flash/ ...

How to cope with Rebol events when the layout is built programmatically ?

I know how to build a pictures gallery dynamically, how do I now allow to trigger an event when the user clicks on a picture ? I don't want to have the engage function inside the layout but outside: is it possible ? Not sure I am clear so tell me. ...

Rebol Draw: how to center text inside a box ?

I want to center "Your Banner Text" but don't know how to calculate the text width view layout [ box white 728x90 effect [ draw [ text 100x20 "Your Banner Text" ] ] ] ...

Rebol Draw: how to load image from the internet ?

This works view layout [ image load http://i2.ytimg.com/vi/e3wShd_bX8A/default.jpg ] But this doesn't view layout [box 100x100 effect [draw [ image load http://i2.ytimg.com/vi/e3wShd_bX8A/default.jpg ] ] ...

Rebol Smallest Http Server in the World: why first wait listen-port ?

In this code web-dir: %./www/ ; the path to rebol www subdirectory listen-port: open/lines tcp://:80 ; port used for web connections buffer: make string! 1024 ; will auto-expand if needed forever [ http-port: first wait listen-port while [not empty? client-request: first http-port][ repend buffer [client-request n...