World: r3wp
[Tech News] Interesting technology
older newer | first last |
Pekr 13-May-2006 [660x3] | Jaime - from my limited understanding - you would like to see rebol kind of grammar to be defined and used as a wrapper running upon another environment? |
If so - would it be easier with other functional languages, or even possible (if such grammar would exist), in languages like Java? | |
Henrik - imo with more media friendly features and rebol overal extensibility (as was promissed earlier for rebol), we could see Rebol being a tool for some nice demos .... | |
Terry 13-May-2006 [663x4] | You haven't seen Web 2.0 till you've seen the latest Framewerks. |
Semantics is key.. just ask Sir Tim Berners-Lee | |
How about this, a single piece of code to handle any web form.. just add a new field to the html and you're all set... don't need to alter the DB or the serverside processing. | |
Let's see rails do that. | |
ScottT 14-May-2006 [667x2] | hear hear for semantics! love how REBOL is already half there with the lit-word - word - value. it all ends up being triples anyway. |
and TBL, although I think he's lost himself somewhere about 60,000 feet | |
Terry 14-May-2006 [669] | MY EYES ARE BLEEDING |
Pekr 14-May-2006 [670] | 3Tera's AppLogic - http://www.3tera.com/applogic.html |
ScottT 14-May-2006 [671] | cool. mine are burnt from all the white. |
JaimeVargas 14-May-2006 [672x4] | Terry, Rails already do that. It is called Migrations, a kind of versioned schema, and yes you just add a field and everything works. |
Volker, compiling Rebol is not impossible, it is just very difficult exponentially difficult because " the order evaluation" for the a function call can change at any time. Depending on how the words in the body are defined. This is the CFG feature and problem. | |
>> test: func[][foo bar] >> f1: func[][probe "foo first"] >> f2: func[x][probe "foo first"] >> bar: func[][probe "bar second"] >> foo: :f1 >> test foo first bar second >> foo: :f2 >> test ;;; Surprise order of evaluation changed ! bar second foo first | |
This gets more complex as the body of the function grows, the problem of compilation becomes exponential | |
Volker 14-May-2006 [676] | That is currently true. But makes it sense? What if such things are simply forbidden for compilable code? |
JaimeVargas 14-May-2006 [677] | Now you could use fix the body of a function maybe not allowing for function! values to change dynamically, but this will limit the language. I think the best approach for getting closer to the metal is REBCode. But I am not sure you can hav a Metacircular Rebol. |
Volker 14-May-2006 [678x2] | I dont think it limitsthe language. I never used that as a feature. Well maybe setting 'print to none, but i can live with "print: func[value][]" |
For sourcecode that paren-saving is an advantage. But if i enforce that the number of arguments stays the same all thetime, i see no problems. | |
JaimeVargas 14-May-2006 [680x2] | How about generators or dialects, they depend of such feature. I mean dialect that don't use parse. |
The problem is that you can not assume that the environment hasn't change, because if you assumed the you have broken the semantics. | |
Volker 14-May-2006 [682] | Can you give an example? |
JaimeVargas 14-May-2006 [683] | Example for which part? |
Volker 14-May-2006 [684] | Where changing argument-lists make sense. |
JaimeVargas 14-May-2006 [685] | APPLY |
Volker 14-May-2006 [686x2] | I can only imagine cases where that is a bug. |
With a bit code around? | |
JaimeVargas 14-May-2006 [688x2] | I can simulate lisp APPLY with a dialect. APPLY require variable number of args> |
Same for lisp MAP. | |
Volker 14-May-2006 [690] | In rebol i put those args in a block. |
JaimeVargas 14-May-2006 [691] | So some of the higher-order techniques. |
Volker 14-May-2006 [692] | Lisp does that too in a way, because it puts things always in parens. |
JaimeVargas 14-May-2006 [693] | Ah. But the point is not that you code in Rebol, the point is that if you implement a DIALECT that has different semantics and shares the value types! of rebol then you can compile such dialect. |
Volker 14-May-2006 [694] | So it would be apply reduce[arg1 arg2] istead of (apply arg1 arg2) Or do i miss something? |
JaimeVargas 14-May-2006 [695x3] | Yes. Lisp parens are its compilation unit. |
And in lisp arg1 none of the args causes evauluation while in rebol the may. | |
I meant ".... value types! of rebol then you CAN'T compile such dialect." | |
Volker 14-May-2006 [698] | And in rebol we have none when looking at sourcecode. But actually, when a function runs, its "compilation-units" are always the same. Meanswhen a function is run, the lisp-parens can be inserted by reflection. (except of strange hacks) |
JaimeVargas 14-May-2006 [699] | Basically the eval form of lisp is fixed, it is part of syntax, and it is (func args ...) |
Volker 14-May-2006 [700x3] | And in rebol it is [func arg arg2 block-of-variable-args] |
At least that would work for 95% of rebol. | |
Not to expensive to get a lot more speed. (interpreter would be always available too.) | |
JaimeVargas 14-May-2006 [703] | In rebol the is not special *eval form*, evaluation depends on the specific expression. |
Volker 14-May-2006 [704] | But the expression does not change. its "parens" are always on the same places, in each evaluation. |
JaimeVargas 14-May-2006 [705] | do [val1 val2 val3 val4] ?? What this program produce? |
Volker 14-May-2006 [706x3] | So that part can be compiled. |
Run it once. | |
If the parens are different thenext time, there is usually a bug. | |
JaimeVargas 14-May-2006 [709] | Not enough. It depends on the environment. |
older newer | first last |