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

World: r3wp

[Tech News] Interesting technology

JaimeVargas
8-May-2007
[2156x11]
Gabriele, We have this debate before. You are quick to disregard 
macros as nothing. Data and Code are the same in Lisp and in Rebol. 
As matter of fact Rebol borrowed this feature from lisp, so did smalltalk. 
It is call homoiconicity. And it has nothing to do with compilation 
or interpretation.
Rebol is an interpreted language and with the current syntax it can 
not be made into a compilable language. At least with the current 
stage of CS development. That is drawback, because you pay for this. 
Either in performance or in memory footprint.
You certainly gain in expressivity, but the reason Scheme abandon 
dynamic binding for lexical scoping is due to the problems that can 
arise with the former in programming-at-large.
R3 requires modules to address this.
I like Rebol syntax. I even started to get into creating a clone. 
But I like Scheme semantics much more. So I side with clean semantics 
over pretty syntax.
An while Scheme has continuations and tail recursion optimization 
as only control structures. Rebol has more that 10 nitives just dedicate 
to control. So one feature plus macros gives you the 10+ features 
you need to implement outside of the language.
Scheme  JIT is cool, but it doesn't have to do anything with DATA 
as CODE. Even rebol code needs to eventually schedule  the bits and 
opcodes required by the hardware. So that imo has nothing to do with 
Programming Language Design (PLD). It has to do with how the Programming 
Language carries out a computation. So the debate of interpreter 
vs compiler is pretty arid for me. The important thing in a PL is 
how expressive it is?  How can you enhance it? The beauty of LIsp 
and SmallTalk is that the ng of Lisp and SmallTalk is writting in 
themselves and that for me is beauty.
For example. For years the Haskell community has disregard Scheme 
beacuse of it lacks static types, and it uses eager evaluation instead 
of lazy evaluation, strongholds of the strict PLs like ML, Ocaml, 
Haskell and others.  But one year ago the wizards at North Easter 
University, added lazy evaulation and types to scheme. So you can 
pick during different parts of your code the style of evaluation 
(lazy or eager) and the to type or not your values (static vs dynamic 
typing). This enhancements are thanks to the *hygenic referential 
transparent  macros*  feature of Scheme. Also not that Common Lisp 
macros are not as powerful as define-syntax, nor Common-Lisp can 
support continautions without making a quagmire.
So a language that was not intended to have certain features can 
added later on, without losing performance or expressivity and remaining 
backwards compatible. I think that is power. Some days ago Sunanda 
was appealing to an R2 compatibility mode in R3. I hope this example 
shows the power in Scheme.
The power in Rebol is different. I think Rebol is good for KISS, 
where simple things are simple, hard things are hard. Like adding 
co-routines. We added this feature to BEER. It works but they require 
careful programming of your routines. Otherwise you get blocking. 
The solutions is R3 tasks. Similarly situation has happend with other 
features, like the FastCGI request that I see sometimes, or callbacks 
for C routines which was dormant inside the interpreter for years 
until discover by cyphre and later released.
Now writting rebol code is a pleasure and I hope the language keeps 
growing, the balance that Carl is trying to strike is hard, but worthy. 
For those of us that are anal there is always alternatives ;-)
btiffin
9-May-2007
[2167]
Jaime; Did you ever try Icon?  http://www.cs.arizona.edu/icon/

Very high level.  It has that "get 'er done quick", to "holy crap, 
what the....".  Many

angles of Computer Science are covered, and well IMHO.  If you do 
check, make

sure to read The Icon Analyst.  Last issue was June 2001.  Every 
issue has the
holy crap, what the...
, but are very good reads.  The Icon books are all online.

I have a lot of respect for the late Dr. Ralph Griswold.  Unfortunately, 
Icon is far

too brainy for wide spread adoption, but your last thread leads me 
to believe you
may relish it.  (As would most rebols IMHO).
Anton
9-May-2007
[2168x2]
Jaime, I appreciate your posts on this subject. I still have Scheme 
high on my list of languages to check out. I also regard Gabriele's 
points highly.
Ladislav, remind me in some time to check out your include system.
Jerry
9-May-2007
[2170]
F3 is renamed as JavaFX. http://www.sun.com/aboutsun/pr/2007-05/sunflash.20070508.2.xml
 Now we have Silverlight/WPF, Apollo, and JavaFX .
Gabriele
9-May-2007
[2171x4]
Jaime, I only object to two things: 1) what makes rebol not compilable 
is not the syntax alone, but the fact that semantics and syntax are 
not tied; you can define your own semantics, and unless you provide 
syntax (or grammar) for a compiler to figure out your semantics, 
a compiler cannot exist. 2) sure, data and code are the same in lisp/scheme 
BUT there needs to be syntax/grammar for the compiler to distinguish 
them - (f a b) is always a function call with two arguments in lisp, 
while it could be whatever in rebol. of course if you have the compiler 
available at runtime you can compile some of your data, but again 
the data is compiled according to grammar/syntactic rules.
when you use parse in rebol to parse a block, you are creating a 
new grammar (not a new syntax). usually you tie the grammar to the 
semantics so you can easily compile or interpret it. but there is 
no requirement to be so.
also, about your control natives point, i think that rebol needs 
1 (or 2 at most) to be native. we have more because of performance 
only.
eg. you can do all control functions just using while.
Pekr
9-May-2007
[2175x3]
Sun releases sources to the community - http://www.eweek.com/article2/0,1895,2127458,00.asp
There is also talk about JavaFX and Java FX Script, which should 
be used for mobile devices market, content creation ...
hmm, that scripting language has VID like declarative aproach - https://openjfx.dev.java.net/Getting_Started_With_JavaFX.html
Brock
9-May-2007
[2178]
maybe we can steal their GridPanel widget  for View  ;-)
JaimeVargas
9-May-2007
[2179x3]
Gabriele, (f a b) in the macros context is not always a function 
application. Regarding PARSE, Scheme also has many parsers and lexesr 
on in the  yacc/lex style and parser combinators.  So you can assing 
any semantics or any syntax just like rebol. The fact is that any 
Turing complete PL can reproduce any other. I can easily see how 
to write a C compile in Rebol, and obviouly Rebol is written in C. 
The same holds for Scheme. Or any other language. So that is not 
a valid point of discussion imo.  The thing with interpreters is 
that the tower of languages grows with each level and performace 
takes a hit with each layer of interpretation. The beauty of compilers 
is that once bootstrapped they can eliminate on layer, therefore 
gaining speed as they go directly to the hardware.
Brian, I have not look into Icon, but I can put in my list of fringe 
languages to check ;-)
Anton, Thanks. I engaged on this debate because it helps me to understand 
better some concepts in PLD.
btiffin
9-May-2007
[2182]
Jaime;  I get the impression you may really really like the challenge. 
 It goes way deep.

And check out the books.  The Implementation of Icon book goes nitty 
gritty into PLD.
JaimeVargas
9-May-2007
[2183x5]
All, I suggest you read this article from DrDobbs. It does a good 
job explaning syntax-case macros of Scheme.
Building Little Languages with Macros

 or "Picking up where language designers leave off" http://www.ddj.com/dept/architect/184405618
Excerpts: A syntax-case macro can perform arbitrary computation (using 
Scheme) on the results of a pattern match. A syntax-case macro does 
not manipulate plain text, or even plain symbols and lists (as does 
a Lisp macro). Instead, the macro manipulates syntax objects, which 
encode the lexical context and source locations of program fragments. 
Consequently, just like a syntax-rules macro, a syntax-case macro 
respects the lexical structure of the source program (by default) 
and it plays well with source-correlating tools.
Syntax objects enable the implementation of most any little language 
or language extension. Using syntax-case, we have implemented a Java-like 
class system for Scheme, lex- and yacc-like forms for building parsers, 
and constructs for defining and linking program components. Programmers 
using these constructs do not reason about them in terms of their 
expansion. Instead, syntax objects allow the expansion to be hidden 
behind abstract definitions of the constructs, just as the inner 
workings of any compiler are hidden behind a language definition.
A language's concrete syntax need not be parenthesized to make use 
of syntax objects. In particular, we are currently developing implementations 
of Java and ML for our programming environment, DrScheme (see "Fostering 
Little Languages," DDJ, March 2004). Since our parsing tools produce 
syntax objects, we can treat Java and ML like macro extensions of 
Scheme. These macro implementations resemble typical Java-to-Scheme 
and ML-to-Scheme compilers, but little additional work is needed 
to adapt our entire programming environment to new languages.
btiffin
9-May-2007
[2188]
Jaime; I'm a little confused by your use of fringe.  I was not trying 
to say Icon was

fringe.  Far from it.  It is the most complete, complex programming 
language on the

planet IMHO.  I only mentioned that it was not popular, because it 
includes features

that are over the head of most programmers.  Unless you also include 
Scheme as

fringe, then I take back what I just said, and yes by number of adopters, 
Icon is
fringe as well.  :)
Louis
9-May-2007
[2189]
Icon is nice. I was using Icon before coming to REBOL. What it lacked 
for me was communication abilities.
btiffin
9-May-2007
[2190x2]
Yeah, Dr. Ralph was writing the language before "icons"  :)  The 
internet was still in
the gopher phase.
For a POSIX layer of Icon with easier TCP, check Unicon
http://www.drones.com/unicon/
JaimeVargas
10-May-2007
[2192]
Brian, Do not worry. I put Scheme, ML, Rebol, SmallTalk and Icon 
in the fringe category. Java, Python, Perl, C, etc are not fringe 
for me.
btiffin
10-May-2007
[2193]
Thought so.  :)  Just had to be sure.  For me fringe always means 
'requires an
uncommon form of thinking' leading to low adoption rates.
BrianH
10-May-2007
[2194]
I used to use Icon as well, mostly for the things I use the REBOL 
parse dialect for now.
btiffin
10-May-2007
[2195x3]
Where I see REBOL, scripting will always be the domain of the computer 
programmer,

but the data model is so close to being the domain of everybody, 
I think we are one
small (yet huge) step away.
Icon is an awesome learning step for anyone thinking of languare 
design.  But it does
require being 'smarter than the average bear'  :)
Brian;  Cool.  I'm still in BooBoo land when it comes to parse, but 
I can read and mod
dialects now.  Just not ready to write one.  :)
BrianH
10-May-2007
[2198]
It was harder to debug Icon than any other language I've used. Not 
because the language required you to be smarter, but because error 
handling was badly designed. It always seemed ironic to me: In a 
language where "failure" was the name of a common control flow, real 
failure wasn't handled very well.
btiffin
10-May-2007
[2199]
True...it could get pretty hairy, tracking the backtracking .
BrianH
10-May-2007
[2200]
I never had any problem with the backtracking - that's where much 
of my understanding of PARSE control flow came from. The problem 
came when there was a real error, not an expected "failure", and 
it just backtracked like normal or worse, ignored it.
btiffin
10-May-2007
[2201]
Brian;  That's because you seem to be accepting of 'uncommon forms 
of thinking'.  :)
BrianH
10-May-2007
[2202]
Ain't that the truth :)
btiffin
10-May-2007
[2203x2]
Like most rebols...
I'm still going to push for LOAD/RELAX.  It'll help make UIs that 
construction workers

can feel empowered working with.  I've seen it.  A boss typing his 
own data in 

notepad, they get a real sense of being in charge, and not lead by 
the nose...Boss

type personalities like to feel in charge of their surroundings. 
 No other language I've
seen even comes close.
BrianH
10-May-2007
[2205]
I still prefer the opposite. Did you see the discussions we had on 
the blog? If you modify my proposal for the additional parse operation 
in the way Volker suggested, by getting rid of the LOAD keyword, 
you can unify the block and string parse dialects. That way you can 
leverage the REBOL loader right in your parse rules but still fall 
back on string parsing if that doesn't work.