Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
draegtun
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
91.
▲
by
draegtun
10y ago
>Languages that allow creating your own DSLs offer this for other realms... Rebol & Red are examples of this, there's a GUI dialect called VID [1][2] and in companion with this is a Draw dialect [3][4]. 1. http://re
92.
▲
by
draegtun
10y ago
Thats why i much prefer to use something like the Parse dialect that comes with Rebol / Red - http://www.rebol.com/docs/core23/rebolcore-15.html Here's ebiester Icon example in the parse dialect:
93.
▲
by
draegtun
10y ago
I myself use Rebol/Red which I find much easier to use. Here's a translation of the first example: test-domain-object: make object! [ created: 2012-02-14/16:40:15+01:00 modified: 2012-02-14/16:40:1
94.
▲
by
draegtun
10y ago
I've also done this for years using similar tools in Perl - https://metacpan.org/pod/HTML::AsSubs | https://metacpan.org/pod/Markapl | https://metacpan.org/pod/Builder H
95.
▲
by
draegtun
10y ago
Here is a under 700k alpha preview GUI binary for the Mac (circa July 2016) - http://static.red-lang.org/dl/mac/red-console
96.
▲
by
draegtun
10y ago
>> There's just no way to develop a GUI application (especially a cross-platform one) without shipping something large. It can be done, for eg. Rebol/View, a cross-platform GUI circa 1mb in size. NB. Rebol/View used t
97.
▲
by
draegtun
10y ago
Rebol/View (& SDK) was a great alternative. An extremely light weight language, library & cross-platform GUI (exe was under 1mb). Ideal for very rapid GUI prototyping... * http://www.rebol.com/rebol-view.htm
98.
▲
by
draegtun
10y ago
You can write grammars in pure Perl5 regex but it can get a bit fugly :) Here's a (very) simple example I did in Perl5 - https://news.ycombinator.com/item?id=6895126 And here's a (nicer!) port to Rebol I also di
99.
▲
by
draegtun
10y ago
No external library is used in these modules just Perl5 native regex engine. NB. I think thats also same for Parsec (built out of Haskell's parser combinators) BTW - Damian created both of them, Regexp::Grammars was his replacement fo
100.
▲
by
draegtun
10y ago
And Perl5. Here are two examples of grammar engines built out of perl regex... * Regexp::Grammars - https://metacpan.org/pod/Regexp::Grammars * Parse::RecDescent - https://metacpan.org/pod/Parse::
101.
▲
by
draegtun
10y ago
In that case Rebol is already Greenspun-compliant ;-) (print (multiply (add 1 2) 3)) ... will print an answer of 9
102.
▲
by
draegtun
10y ago
I think the Perl 6 example should really use [0-9] instead of \d because it's unlikely that unicode numerals are allowed (in the Common Lisp spec). Anyway neither example fully covers the Common Lisp spec for a number atom (for eg. sci
103.
▲
by
draegtun
10y ago
Here's that fun example written in Rebol parse: digits: charset "1234567890" char: charset [#"a" - #"z" "+/-*"] ;; chars allowed in a symbol not-quot: complement c
104.
▲
by
draegtun
10y ago
>> Rebol and Red are both like Lisp in being homoiconic With regards to this I do like Hostilefork's companion blog post regarding macros - http://blog.hostilefork.com/rebol-vs-lisp-macros/ (HN comments -
105.
▲
by
draegtun
10y ago
ZOE is an interesting example of Rebol 3 usage in the wild - https://www.atronixengineering.com/zoe NB. Above isn't parse specific.
106.
▲
by
draegtun
10y ago
Red - Everything is open and on Github.
107.
▲
by
draegtun
10y ago
Another language not dependent on any of those is Red which is currently written in Rebol & Red/System. NB. At some point Rebol parts will be replaced by Red so making it self hosted.
108.
▲
by
draegtun
10y ago
>> ...Only Perl 6 comes close to the ease of writing parsers with Lua+LPeg. I would argue that it doesn't get any easier than using Rebol/Red parse dialect - http://blog.hostilefork.com/why-rebol-red-pars
109.
▲
by
draegtun
10y ago
Ditto for Perl - https://github.com/Perl/perl5
110.
▲
by
draegtun
10y ago
Wow, big trip down memory lane here because my first job was on a Prime mini-computer! Wrote a complete system using CPL scripts (with the occasional bit of Fortran thrown in) on Primos. Shame to hear that Prime / Primos is now defun
111.
▲
Entering the World of Macros
(red-lang.org)
22 points
by
draegtun
10y ago
|
0 comments
112.
▲
by
draegtun
10y ago
That's OK, clearly it also confused the producers of the Shrek soundtrack album too :) Here's a post from couple of days ago which documents the history of Hallelujah - http://www.usatoday.com/story/life/
113.
▲
by
draegtun
10y ago
Perhaps John Cale might still have them because Cohen faxed him 15 pages of lyrics - https://en.wikipedia.org/wiki/Hallelujah_(Leonard_Cohen_song... NB. It's the version by Cale which became the basis of the later
114.
▲
by
draegtun
10y ago
In Rebol / Red... >> "Hello" != "hello" == false >> "Hello" !== "hello" == true !== is a stricter equal [1] where both values must be of same type and is case sensiti
115.
▲
by
draegtun
10y ago
There are other Rebol inspired languages that may have the parse dialect but the only one that I know for certain is Red. http://www.red-lang.org/
116.
▲
by
draegtun
10y ago
Barely touch regexes these days because for last few years I've been using Rebol / Red parse more and more. Here's a translation of the first SRL example in the parse dialect: [ some [number | letter | symbol]
117.
▲
Parsing: an expanded timeline
(jeffreykegler.github.io)
2 points
by
draegtun
10y ago
|
0 comments
118.
▲
by
draegtun
10y ago
I've steered more to composing grammars by using tools like Regexp::Grammars - https://metacpan.org/pod/Regexp::Grammars The real sweet spot I've found is parse in Rebol / Red - http://blog.
119.
▲
by
draegtun
10y ago
NB. There's nothing stopping this Red code being just one line. All the newlines are for readability only :)
120.
▲
by
draegtun
10y ago
>> ...about polymorphism, and Rebol doesn't AFAIK have anything like it - Carl shunned OO when creating Rebol. Rebol does have objects, that's what the O in Rebol refers to. Their prototypal objects influenced by the Se
More ›