My statement comes from the following, and I apologize for using the perhaps loaded term "fake" -- what I meant was definitional scoping:
My understanding is that Red is based on Rebol (even bootstrapped in Rebol), so I thought that they both use definitional scoping, which is not lexical scoping.
Here it is in Smalltalk (Pharo):
DateAndTime now - 1 hour + 2 seconds.
However as with Kotlin I wouldn't call this a DSL or dialect. For eg. in Rebol you can do this...
now - 1:0 + 0:0:2
...because it has a Time datatype. But if i were to write a DSL/Dialect in Rebol then it could look similar to this...
date [now - 1 hour + 2 seconds]
Relavent Rebol documentation: http://www.rebol.com/docs/core23/rebolcore-5.html#section-2
A header object is space to provide metadata for scripts and data (though worth noting that scripts are essentially data in the Red/Rebol world).
In addition to documentation, it can be used to store requirements and settings that can, as you say, be accessed by system/script/header
. In Rebol, you also have the ability to LOAD/HEADER on Rebol script/data to access that header.
For an example of where this metadata is used, see the Rebol Desktop.
Note also that as at this time Red is still Alpha, not everything may work entirely as expected.
Background here: To Copy or Not To Copy, That Is the Question and here: Is Rebol a Pure Functional Language. Also here: To Copy or Not To Copy...
> Mathematical expression parsing
There is no such thing in the calculator app code. The math formula typed by the user is converted to Rebol values which are simply evaluated (using DO).
From the follow-up article:
Judging by the responses both here and on various comment sites, my last blog about application non-installation seems to have hit a nerve … As usual with a blog like this, the comments ranged from "you're absolutely right" to "you're an idiot." …
Many of the OS X guys in the crowd stood up and took a bow for believing that they have the right answer, and also took a few shots at me for not pointing it out. (Some even claimed that I had never tried it, oddly enough, not knowing that I once worked for Apple as an OS kernel designer, have owned and used dozens of Macs since 1985, and now own a few OS X boxes, …
"Many of the OS X guys in the crowd stood up and took a bow for believing that they have the right answer, and also took a few shots at me for not pointing it out." - yeah, I would have been one of those guys, had I not immediately read the follow-up article.
This was a big part of Rebol’s dream: http://www.rebol.com/rebolcause.html
A lot of the ideas around the language focus on this messaging concept. Rebol today is sadly just a part time passion project of the creator, but Red seems to be carrying the torch: https://www.red-lang.org/
>which language would win?
[Whitespace](https://en.wikipedia.org/wiki/Whitespace_(programming_language) would win because you can't have too much of it. Besides, it proves syntax highlighting isn't always useful.
The runner up will be Rebol, because it will bring its Patrick Swayze teenage angst Red Dawn guerrilla tactics in a small package of "what the fuck?!"ery.
I do like the Smalltalk version. Another language which pushes the succinct further is Rebol.
Using Rebol console...
>> 2014-07-01 - 2013/2/1 == 515
If I wanted to know the difference in hours then...
>> difference 2014-07-01 2013/2/1
== 12360:00
NB. This returned a Time! (hours:mins) datatype.
Both the above work because Rebol has built-in date/time datatypes: http://www.rebol.com/r3/docs/datatypes/date.html | http://www.rebol.com/r3/docs/datatypes/time.html
BASIC-G on the Sord M5.. (An old japanese micro computer with cartridges and rubber keyboard)
Later on the ZX Spectrum, Amiga (AMOS Pro and AmigaBASIC) and MS-DOS (GW-BASIC and QBASIC)..
Then later I played around with other languages such as Pascal/Delphi, REBOL, BASH, C, PHP, Python, Java now I'm finally (sorta) sticking with JavaScript/CoffeeScript..
> Once you have an ecosystem of libraries that tackle that goal, you are in a very similar situation as we have with an ecosystem of browsers that tackle similar goals. Except, of course, someone will want to standardize that stuff just as W3C has done...
Ah, I see where you were getting at. Yes, it would probably be standardized anyway, but with the low level VM you still have an escape hatch. If you don't like the high level standard, you can totally break it, and have your web site work out of the box.
With the current situation, deviating from the standard means you need to have people download a browser plugin, or even change the standard then wait for the changes to be widely deployed.
> It's not possible to provide abstraction, safe memory access, or sandboxing (or, as you mention, caching and HTTP-header-based cache control) to downloaded libraries of machine code without a significant piece of software on the client.
I believe such a piece of software is much less significant than one might think: The all-in-one squeak system is only 31Mb, and apparently, the VM alone takes about 1Mb. The latest Rebol binaries are half that (530Kb). And I believe they do (or easily could) provide all the goodies you mention.
> whatever the approach, an abstraction layer on the client will continue to be valuable.
Sure. But it doesn't have to get all the way up to displaying documents and other media. We can stop at the VM level. What really matters is portability and ease of deployment. A universally used browser (or browsing standard) gets you there, but so does a universally used VM.
> Mr. Nelson has not seen "...a Lisp that can drop nested parentheses when the meaning is clear from context" because he didn't look hard enough to find things like David Wheeler's "sweet expressions".
I had thought that perhaps Rebol would be kinda like that?
One of my favorite languages, Rebol, uses square brackets instead of curlies or parens:
http://www.rebol.com/nutshell.html
The creator didn’t want to have to use the “shift” key so much when programming (on a US keyboard)! I think about sometimes when I’m blasting out code with the shift key held down.
Rebol does use parens to group statements and curlies for - get this - strings. It’s fun.
There is also a modern version in development called Red:
Edit to add some Rebol code:
foreach file files [ text: read file if find text "REBOL" [send text] ]
Note: I make every effort to programatically figure out if links originally posted to Reddit are still good, but it's difficult.
If the original URL doesn't work, or has been replaced with something else, please help out by searching the Wayback Machine for the URL and posting a contemporary link if you find one. There's also a Chrome Extension which makes this process easy.
Correction: there is a (R2) Rebol/View for Linux: http://www.rebol.com/downloads.html I remember having to install 32 bit compatibility libraries and fonts for X, so it was a bit of a pain getting it to work, but it did work.
There certainly will be improved documentation for people with no prior knowledge of Rebol, in the meantime it makes sense to check Rebol documentation or take a look at other resources.
Alternative route would be something like the TDPL parse dialect that comes with Rebol / Red.
For eg.
digits: charset "0123456789" octet: [copy o some digits if ((to-integer o) <= 255)] ip-address: [3 [octet "."] octet]
parse "192.168.0.255" ip-address ;; TRUE
While the two projects are structurally different, Red's interpreter is designed to closely match that of Rebol almost to the point where you could say they are the same language. Rebol tutorials are more than sufficient to get a handle on how Red works, and given both Rebol 2 and Rebol 3 are single-binary, zero-dependency downloads, there's very little barrier to getting started.
Though it's not quite ready for prime time, Ren Garden promises a pretty decent developer environment for both Rebol and Red.
I recently wrote a gui tool in Rebol. It is still not open-source if you're trying to do something more serious you have to buy their damn SDK. That's why I'll wait 1-2 years until the Red Programming language allows building cross-platform GUIs that don't look as ugly as Rebol GUIs. Honesty though even when I really like the language and all in the post is true I am still expecting someone else to come out with something better (or halfassed) but sooner.
Just to say that Rebol hasn't been abandoned by its creator (Carl Sassenrath). I get the impression that Carl is still very enthused with Rebol and its ideas but is just too busy on other work/projects.
So he only dips in and out occasionally. However he dipped back in again recently and is even pushing some changes out for Rebol 2 - http://www.rebol.com/cgi-bin/blog.r?view=0545#comments
Prebol (Preprocessor that comes with Rebol SDK) can provide these compile time Macro-like features - http://www.rebol.com/docs/sdk/prebol.html
However it's not baked in like with most Lisp implementations and isn't opensourced (SDK is currently Rebol2 only).
There is also Logo, which was designed to be a starter language, and has been called "Lisp without parentheses". The turtle graphics feature, designed for the youngest students, hid the underlying power of Lisp and ultimately caused Logo to be written off by everyone as a simplistic language only for children. Logo still exists today as UCBLogo, NetLogo and MicroWorlds. https://simple.wikipedia.org/wiki/Logo_%28programming_language%29
Another interesting language which evolved out of Logo is REBOL, created by Carl Sassenrath, the author of the Commodore Amiga's operating system. http://www.rebol.com/