Home   Archive   Permalink



Dialect Creation Tutorial?

Is there a simple tutorial for creating DSLs or dialects? I keep hearing how this is or of the selling points of Rebol, but don't see it anywhere (trying to avoid learning via reverse engineering). I probably just missed it, but if not, maybe someone could show me a trivial example such as a dialect for a bank account with options to deposit & withdraw? Any help is appreciated as I'm brand new to Rebol/Red

posted by:   Newbius     13-May-2017/14:12:52-7:00



only one thing to say. Even if it will be simpler to do it with a tool that is well equiped with the tools, it will not be a simple task to perform.
    
It is not a question of
if read MYWORD then do SUCHANDSO
and filling the blancs.
    
Do not be mislead in that way. Parse is an excellent tool, way better than using regex cryptocommands, but creating a dialect is not easy.
    
There is no easy recipe to make a dialect available. Just the talk about it " it is easy " by the creator himself.


posted by:   iArnold     13-May-2017/15:09:35-7:00



Ouch! Don't tell me the cake is a lie ;).
    
Is it really that difficult though? I'm guessing Rebol's homoiconic predecessor "Lisp" is where the dialecting came from. If that is the case, you should be able to write a few macros to extend the Rebol base language into a dialect of your choice correct? I've never mastered Lisp macros, but I've seen some of the simple ones like how "and" is just a macro in Clojure and maybe Common Lisp. Does anything make this harder to do in Rebol than lisp?

posted by:   Newbius     13-May-2017/16:48:34-7:00



This is a nice tutorial:
    
http://web.archive.org/web/20130121141033/http://www.rebolforces.com/articles/tui-dialect.html
    
Another:
    
http://web.archive.org/web/20120510120959/http://www.rebolforces.com/zine/rzine-1-02.html#sect7.
    


posted by:   Nick     13-May-2017/20:13:07-7:00



There were some nice examples here, but the links are no longer valid. I have archived copies, but not sure if the authors want them distributed:
    
http://www.codeconscious.com/rebol/dialects.html

posted by:   Nick     13-May-2017/20:16:32-7:00



Frank's scripts are available in his repo https://github.com/fx5/very-old-rebol-scripts

posted by:   Graham     14-May-2017/2:31:01-7:00



Awesome...exactly what I was looking for. Any reason why something like this doesn't show up on the Rebol tutorials page besides the first response on this thread? This would seem important enough to not only be accessible via archive link. Thanks for digging this up everyone! I'll ask more questions after I've digested the articles.

posted by:   Newbius     14-May-2017/7:50:12-7:00



There are some insights available here too:
    
http://www.rebol.org/st-topic-details.r?tag=type//dialect

posted by:   Nick     14-May-2017/14:56:08-7:00



If you want to Brett of codeconscious.com he's often in chat http://chat.stackoverflow.com/rooms/291/rebol

posted by:   Graham     14-May-2017/18:15:30-7:00



Some were forgotten that were on the "USEFUL REBOL DOCUMENTS AND RESOURCES" page of the forum here.
    
Introduction to the idea of creating Rebol dialects:
        
http://re-bol.com/starting_computer_programming_with_rebol.html#section-3
        
Another introductory explanation, with links to articles with code:
        
http://rebolforum.com/index.cgi?f=printtopic&permalink=Nick13-Dec-2013/16:40:11-8:00&archiveflag=new
        
One link included in the topic above is the article by Ingo Hohmann about the TUI dialect, still one of the best articles about creating dialects. Mirrored here:
        
http://rebol2.blogspot.com/2012/01/tui-dialect-dialect-to-print-ascii.html
        
Some others:
        
    
http://www.codeconscious.com/rebol/dialects.html
http://web.archive.org/web/20120510120959/
http://www.rebolforces.com/zine/rzine-1-02.html#sect7.
http://hostilefork.com/2010/01/08/modest-proposal-for-code-golf-in-rebol/
    
posted by: Nick     24-Jan-2014/2:52:17-8:00

posted by:   Sam the Truck     15-Jun-2017/19:54:43-7:00