Rave post: WORLD programming language

The WORLD programming language. Heavily based on REBOL, this could be good. …

Well met,

Based on REBOL http://rebol.com, a new derivative has been released for alpha testing.


Words
Objectivity
Relations
Language
Datatypes

John Niclasen, an awe inspiring developer and frequent contributor within the REBOL community, has posted code for testing the World programming language. See http://world-lang.org/ and https://github.com/Geomol/World for details (and a promise to abide by John's request to not redistribute what you find in the alpha test repositories). This is only a testing release.

World is pretty cool already. I'm a huge fan of REBOL, huge. Playing around in world is fun.


Finally, the smallest "Hello, World!" program in the known Universe:

.

Yes, it's a dot! Let's see it in action at the World prompt:

w> .
Hello, World!

My run went as follows:


[btiffin@home world]$ ./world
Loading Cortex... Done
World/Cortex 0 Copyright (c) 2009-2011 John Niclasen, NicomSoft
build: Dec 7 2011 20:42:44
w> .
Hello, World!
w>

Dot (no doubt the Forth influence), is the hello to world word. Nice.

I've always had one gripe with REBOL and it's very powerful data typed LOAD operation mixed with a human friendly PARSE dialect. Even though REBOL lexically understands over 50 datatypes, it can't represent all and any text. This means loading a book with it's potentially complex markup and things like ISBN numbers is limited to the less powerful (human expression wise) string parser.

World gets around that limitation by supporting a KWATZ! datatype. I might have called it text! and may pester John for a name change before World hits a 1.0 reference implementation (or until I find out what KWATZ means), but KWATZ allows operations like


The KWATZ! datatype is used for values, which are not
recognized as being of any known datatype.

This can be utilized for example in dealing with UTM Coordinates.
LOAD can load anything:

w> block: load "17T 630084 4833438"
== [#{313754} 630084 4833438]
w> type? block/1
== KWATZ!
w> to string! block/1
== "17T"
w> type? block/2
== integer!

So it's easier to make dialects, that for example can deal with
numbers with units, like:

w> Earth: load "radius: 6,371.0km mass: 5.9736e24kg"
== [radius: #{362C3337312E306B6D} mass: #{352E393733366532346B67}]
w> type? earth/1
== set-word!
w> type? earth/2
== KWATZ!
w> parse Earth [some [set w set-word! set k kwatz! (print [w form k])]]
radius 6,371.0km
mass 5.9736e24kg
== true

The KWATZ! datatype works much like the binary! datatype and can be
converted to e.g. binary! or string! for further parsing.

So now we live with the potential of VERY powerful analytic expressions in a very high level, human friendly interpreter. I'm excited, hopeful and plan on pushing World with as much rah-rah-bisboom-bah as I can muster.

Think of KWATZ as junk data, that is datatyped. Not junk really, stuff, human text and all that implies.

I'm impressed and plan on following the development of World with a close and interested eye.

For those that have read other posts, World may not really be for banking or any app that can't risk junk, when COBOL is right here and accessible now. World may shine in linguistic research, stats, and the wide range of the humanities.

Cheers,
Brian

Leave a Reply

Your email address will not be published. Required fields are marked *