Thursday, July 5, 2007

exposing slim Liquid Rebol

The dataflow framework for Rebol is called Liquid and is available from rebol.org as a SLiM library.

If you are new to this as I am, it is not obvious how to proceed.

First you need both slim.r and liquid.r

Slim can be found at rebol.org in the scripts.
You can download liquid or retrieve it from the Rebol console by visiting Liquid
to either get the file or run the one-line script at the Rebol console.

Start by loading SLiM with
do %slim.r
and then try
do %liquid.r

The important liquid function is liquify. An attempt at
source liquify
or
help liquify
will show that nothing is yet available.

Start by checking the SLiM paths with
slim/paths
which should be an empty block.

I am using local code (liquid.r and slim.r are in my Rebol directory) so I just do this:
slim/paths: [%.]

Now I check my SLiM path to liquid this way:
slim/find-path %liquid.r
which gives me my Rebol path.
Now I can do the two key bits:
lq: slim/open 'liquid none ; gets any version
and then expose that lq library with
slim/expose lq none ; replace none later with a blk of funcs
Now you can test with a simple test for the liquify true? function with
source true?
You are now ready to use the liquid documentation at Steel quickstart or the Steel Liquid page.

1 comment:

Anonymous said...

Now I can do the two key bits:
lq: slim/open 'liquid none ; gets any version

That first task is to make an assignment of a value to the identifier (word) 'lq

That is,
lq: slim/open 'liquid none

The space after the colon may not have been evident ...