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

World: r3wp

[Tech News] Interesting technology

Maxim
15-May-2007
[2254]
but wouldn't the bind command and any internal rebol binding, be 
in fact where the JIT calls are made?  aren't these explicit points 
in time where a JIT could be applied?
btiffin
15-May-2007
[2255]
It is Relative Expression Based... :)  Human hinting in source code 
may alleviate some

of the late binding issues, but I'd think a REBOL compiler would 
always need access

to the interpreter at runtime (or JIT compile component like you 
said), or restrict use

of external code loaders in compiled code and a myriad of other features.
Maxim
15-May-2007
[2256x2]
as brian said, the vast majority of rebol code can be compiled, but 
I also know that 100% of my gui using code cannot, cause of a patch 
in glayout  ;-)
things like 

insert second myfunc [print "hehe"] 

can't be compiled...
JaimeVargas
15-May-2007
[2258x5]
Gabriele, Just look at Sherman. A Rebol to Scheme compiler.
Written by Joe Marshall.
Maxim your code modifications to predifine mezzanies could be compiled.
Let me restate the problem with rebol and compilation is not that 
is impossible. It is just not practical without given some dynamism.
The dynamism that makes compilation hard is related to the order 
of execution of certain code.
btiffin
15-May-2007
[2263]
Jaime;  I think Maxim might be pointing out that the [print "hehe"] 
may not be know.

It could be external or generated etc...  But I don't want to speak 
for Maxim, it was a
feature I was thinking about.
JaimeVargas
15-May-2007
[2264]
The majority of the code in rebol follows a straight line. But you 
can make that straight line have a twist depending on the order of 
evaluation for some expressions. Which a compiler can predict. Because 
this predictions can be broken with any function call the compiler 
must  pick one branch of the call-tree. Which may not be what the 
programmer intended.
Maxim
15-May-2007
[2265]
Let me rephrase my sentence...  ;-)

can't be pre-compiled...

  only a JIT could detect that and then make a copy of the (new) compiled 
   function and start using its new pointer.
JaimeVargas
15-May-2007
[2266]
Yes. But those type of code modifications are easy to tackle by current 
compilations techniques.
Maxim
15-May-2007
[2267x3]
it obviously depends where that code insertion is done no?  think 
about a situation where the insert is done in a button action.... 
how could the compiler understand that?
binding is done when the dialect is parsed... so only a JIT could 
detect that no?
unless they invented a new compiler called HAL  ;-)
JaimeVargas
15-May-2007
[2270]
The exponential problem of compiling a call-tree becomes impractical 
as the number of functions increases. There are some techniques to 
mitigate this, but rebol is atypical in the sense that his CFG lacks 
any punctuation. Without punctuation there is no easy way to determine 
where the expression begin or end.
Maxim
15-May-2007
[2271x2]
true.
which is why we all like it   ;-)
JaimeVargas
15-May-2007
[2273x3]
A compiler works at the expression level. Thats the reason in Scheme 
anything between parens is considered a compilation unit. The same 
for C anything between  not white space and the semicolon.
I am not 100% sure that having no punctuation is great. There is 
some very cryptic one liners that it takes two or three times checking 
before figuring out what it is doing.
Not only because the expression maybe cryptic but also because you 
need to keep track of context and state in your head.
btiffin
15-May-2007
[2276]
I love the REBOL rarity lexical scanning.  Drove me nuts at first, 
it looked reverse

polish, as an ex-forther, that was a hard one to get round.  But 
now...no going back :)
JaimeVargas
15-May-2007
[2277]
Which can make debugging a bit difficult if one it is not disciplined 
enough.
Maxim
15-May-2007
[2278]
jaime: yes, when these occur in my head I sometimes add parens... 
just to make it easier to update later on.
JaimeVargas
15-May-2007
[2279]
Gabriele, "brainfuck is turing complete, but don't tell me it's the 
same as scheme".  Well it depends on what you mean by sameness. I 
am using Turing Complete as the base of the definition. Because if 
the language is Turing Complete you can construct an emulator of 
any other language. After all that is needed is bits, memory and 
register to carry out any computation. It maybe hard to make a Rebol 
interpreter in brainfuck but it is certainly possible.
Maxim
15-May-2007
[2280]
but you'd need about IQ 5000 to get it done...which probably means 
only an alien could get it done  ;-)
JaimeVargas
15-May-2007
[2281]
Nah. You make the compiler of C to brainfuck. Take Orca's C source 
compile to brainfuck and you are done.
Maxim
15-May-2007
[2282x2]
hehe
functional compilation ;-)
btiffin
15-May-2007
[2284]
Talk about a name that'd drive corporate away...bf has to up there.
Maxim
15-May-2007
[2285]
brian: do you know what brain fuck is?
btiffin
15-May-2007
[2286]
I've read up on it a little.  More just to see what the name was 
about.  :)
Maxim
15-May-2007
[2287]
hehe so you know its name is well deserved  ;-)
JaimeVargas
15-May-2007
[2288x2]
*The Next Big Language* http://steve-yegge.blogspot.com/2007/02/next-big-language.html
brainfuck is consider a pathological PL. There are a bunch of them. 
http://scienceblogs.com/goodmath/goodmath/programming/pathological_programming/
btiffin
15-May-2007
[2290]
Whitespace.
Gabriele
16-May-2007
[2291x4]
Jaime, again, that was a REBOL 1.0 to Scheme compiler, and it was 
not even complete!!! REBOL 1.0 was sooo limited compared to REBOL 
2.0 that it's even hard to call it REBOL. Just consider that BIND 
took one argument. (Which implies that it had the notion of scope!) 
It had no ports...
Carl told us some horror stories about the source code of REBOL 1.0... 
let's not get into that.
Again, if you think it's not impossible, just write a translator 
to any high-level language that is compiled. If the target language 
is high level enough, this should be a few lines of code, according 
to your theory.
brainfuck... so, if it's the same as Scheme, why are you using Scheme 
instead of brainfuck? See, there is some difference, as there is 
some difference between Scheme and C. I'm interested in precisely 
that difference, so if you rule it out in your definitions then we 
have nothing to discuss about.
Brock
16-May-2007
[2295x4]
Be one with the Borg!!!
http://www.iht.com/articles/2007/05/15/business/msft.php
Experts say Microsoft's patent quest won't go far
ZDNet - 4 hours ago

By Stephen Shankland, CNET News.com. Microsoft's accusation that 
the open-source software industry has infringed Microsoft says open-source 
software violates 235 patents
Let's try that again.. http://www.iht.com/articles/2007/05/15/business/msft.php
Oldes
16-May-2007
[2299]
...yes... for example "mouse click"... it's really crazy... should 
I pay if I use "button"?
Pekr
16-May-2007
[2300]
I wonder what would happen, if someone registered 1 and 0 :-)
Brock
16-May-2007
[2301]
I can see Microsoft attempting to tie the smaller companies up in 
court and then Microsoft bail them our of the their financial troubles 
by means of majority investment.
Oldes
16-May-2007
[2302]
....vice president of intellectual property.... AAAAAAAARGH
Rebolek
16-May-2007
[2303]
lunatics. somebody put them behind the bars.