[racket] pretty-big->#lang (was: External connection to Finndesign Liitin)
Hi,
coming back to pretty-big->#lang issue. I just noticed a weird thing. Once I
changed the external connection source files to '#lang racket' format
(updates attached), this is what happens:
1) Just evaluate the environment i.e. just [Run] the liitin.rkt without
any example procedures (or [Check Syntax])
>> Everything OK
2) Run any single example
>> Everything OK
3) Run two or more examples in row
>> error: "compile: unbound identifier (and no #%app syntax
transformer is bound) in: quote"
First question: I wonder what causes Pretty big and #lang racket behave
differently?
The error seems to point to my strange 'quotify' helper (can't blame, really
:)
(define (quotify var) (eval-string (string-append "''" (symbol->string
var))))
The purpose of this helper, is to take a variable and 'double quote' it so
that once the next procedure evaluates it, one quote layer still remains.
Also, the var content has to be changeable:
e.g.
(define (l-get liitin-object)
(eval-in-server server-name server-port (list
'fetch-public-object-contents (quotify liitin-object))))
(l-get 'namespace:object)
>> '(public-object-exists? 'namespace:object) instead of
'(public-object-exists? 'liitin-object) or having the liitin-object expanded
immediately.
Second question: Is there a better procedure doing quotify's job without
causing the error? I assume that this is yet again the top-level namespace
issue caused by the 'eval-string'?
Or - since the error only occurs in the 'demo mode' running multiple
examples instead of the normal case's single procedure - is this rather a
feature than an error? :) Anyway, two procedures cannot see each other,
unless they either come from a module or the customized liitin lookup. If
I've understood correctly...?
br, jukka
...
>Now, I
quess it would be better to turn to #lang era.
...
...
>> Why are you using Pretty Big? It's usually not a good idea.
...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: liitin-lib.rkt
Type: application/octet-stream
Size: 4295 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20110810/ccea596d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: liitin.rkt
Type: application/octet-stream
Size: 1196 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20110810/ccea596d/attachment-0001.obj>