Hi Henrik,
The goal is also to have something that can be loaded after/instead of
http.l when you want a simple web server without the fancy stuff.
OK.
(redef httpHead (Typ Upd File Att)
(http1 Typ Upd File Att)
(and *Chunked (prinl Transfer-Encoding: chunked^M))
(prinl ^M) )
--- On Wed, 6/29/11, Alexander Burger a...@software-lab.de wrote:
So this should be written as
(be holds (@A @S)
(or
((restoreSitArg @A @S @F) (@ solve (list (- @F
((not (restoreSitArg @A @S @F)) (isAtom @A) (@ solve (list (- @A ) )
holds(A,S) :- restoreSitArg(A,S,F), F ;
Hi Doug,
So this should be written as
(be holds (@A @S)
(or
((restoreSitArg @A @S @F) (@ solve (list (- @F
((not (restoreSitArg @A @S @F)) (isAtom @A) (@ solve (list (- @A ) )
I didn't test it, but I think the construct using 'solve' is more
complicated than necessary.
At
On Thu, Jun 30, 2011 at 09:20:43AM +0200, Alexander Burger wrote:
At least, a simple (@ . @A) should work. Doesn't it?
Wait ... probably not a good idea.
But this should work: (@ - @A)
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Hi Alex,
Thanks for your help!
holds(A,S) :- restoreSitArg(A,S,F), F ;
\+ restoreSitArg(A,S,F), isAtom(A), A.
What I really want is this:
(be holds (@A @S)
(or
((restoreSitArg @A @S @F) @F)
((not (restoreSitArg @A @S @F)) (isAtom @A) @A) ) )
But the above (with a @F or
Hi Doug,
(be holds (@A @S)
(or
((restoreSitArg @A @S @F) (@ - @F))
((not (restoreSitArg @A @S @F)) (isAtom @A) (@ - @A)) ) )
gives me the same results as using the (@ solve (list (- @F)))
clause. Neither that nor (@ - @F) seem to unify variables in @F (which
is bound to a
http://itunes.apple.com/ca/podcast/the-stack-exchange-podcast/id279215411
Hi dexen + all,
I accepted the challenge, and posted a new task to RosettaCode:
http://rosettacode.org/wiki/First_class_environments
The PicoLisp solution is quite clean, IMHO.
Cheers,
- Alex
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Here's the issue boiled down to a simpler test case :-) First, swi-prolog:
# cat t.pl
a(3).
foo(N) :- N.
bar(a(X)) :- a(X).
# swipl -f t.pl
% /root/prolog/t.pl compiled 0.00 sec, 2,800 bytes ...
?- trace.
true.
[trace] ?- bar(a(Z)).
Call: (6) bar(a(_G386)) ? creep
Call: (7)
Nice! I like that site rosettacode.org lots. (I stopped counting how many
computer 'languages' I have assimilated over the years!)
This example again shows off picolisp/pilog nicely.
http://rosettacode.org/wiki/24_game/Solve#PicoLisp
I think the perl solution may be a tad smaller. But
The solve way seems to some closest to doing it.
~/lisp/miniPicoLisp
$ cat t.l
(be a (3))
(be foo (@C)
# (@C - @C)
# (call @C)
(@ print (solve (list (- @C
)
$ ./pil t.l
: (? a foo (foo (a @Z)))
1 (foo (a @Z))
(((@Z . 3)))- T
So I can see that it is correctly solving for @Z this
11 matches
Mail list logo