Subscribe

2008-07-22 Thread Doug Snead
Hello Doug Snead <[EMAIL PROTECTED]> :-) You are now subscribed Subscribe -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: Subscribe

2008-07-23 Thread Doug Snead
Thanks, Alex! It has been a year or so since I have downloaded the latest picolisp. I've been using a July 2007 version every day for a picolisp media contact database web application, no problems. I would like to roll out a personal or portable version, so people can install this database o

Re: Concurrency

2009-10-09 Thread Doug Snead
--- On Fri, 10/9/09, Tomas Hlavaty wrote:=0A> How many pro= cesses do you need?=A0 I can fork about 500=0A> from one parent=0A> (limite= d by my OS set up).=A0 And because picolisp is,=0A> well, "pico", it=0A> do= esn't take much memory (picolisp uses less that 2MB).=0A=0AAnd if picolisp = is buil

Re: script for generating tags for picolisp

2010-08-17 Thread Doug Snead
Here's one shell script I used to use for that (I called it lisptags) ... hopefully it still works :-) #!/bin/sh # make a tags file for pico lisp source files. # use: # lisptags foo.l bar.l baz.l ... bof.l # generate the file 'tags' # [based on lisptags csh script by John Foderaro, c.1982]

golog in minipicolisp ?

2011-06-16 Thread Doug Snead
Alexander (or anyone!), I'm looking at something called golog http://www.cs.toronto.edu/cogrobo/main/systems/index.html it is a "A high-level agent programming language... based on Prolog (usually Eclipse, SWI, LPA, and Quintus.)" "An interpreter in SWI Prolog can be found here. http://www.c

Re: golog in minipicolisp ?

2011-06-17 Thread Doug Snead
Yiorgos, Alexander: Thanks for the info. Unfortunately, not so straightforward as I had hoped. Doug --- On Fri, 6/17/11, Yiorgos Adamopoulos wrote: > From: Yiorgos Adamopoulos > Subject: Re: golog in minipicolisp ? > To: picolisp@software-lab.de > Date: Friday, June 17, 2011, 3:07 AM > O

embedding minipicolisp

2011-06-18 Thread Doug Snead
Another question have I :-) I'd like to embed minipicolisp in C applications. I'd like to be able to create a minipicolisp environment, and then pass strings to it (commands) for execution. It would also be great to be able get back the results in a string. In lua, you'd do something like,

Re: embedding minipicolisp

2011-06-18 Thread Doug Snead
ed minipicolisp). Cheers, Doug --- On Sat, 6/18/11, Doug Snead wrote: > From: Doug Snead > Subject: embedding minipicolisp > To: picolisp@software-lab.de > Date: Saturday, June 18, 2011, 8:20 PM > Another question have I :-)  > > I'd like to embed minipicolisp in C appli

Re: embedding minipicolisp

2011-06-20 Thread Doug Snead
Ok, here's my first attempt at using minipicolisp as a library. (Leaving aside the issue of get/put for now. Basically replacing main() with: #if !LIBRARY /*** Main ***/ int main(int ac, char *av[]) { char *p; . . . #else // we're building as a library void miniPicoLisp_init( const ch

Re: embedding minipicolisp

2011-06-21 Thread Doug Snead
--- On Tue, 6/21/11, Alexander Burger wrote: > Yes, the Apply* lines are needed (or what does the "??" > imply?). I wasn't sure if I needed that for my initialisation - you answered my question there. > I see one remaining problem: The 'ErrRst' global, the error > restart jump > buffer, is not

Re: embedding minipicolisp

2011-06-21 Thread Doug Snead
", (long)ev); Env.get = getSave; 1 get: '(' 2 get: '+' 3 get: ' ' 4 get: '1' 5 get: ' ' 6 get: '2' 7 get: ')' 8 get: ' ' read ok doPrint(rv): 1 2 eval ok, = 6 ... Segmentation fault But clo

Re: embedding minipicolisp

2011-06-22 Thread Doug Snead
Hi Alexander, Ha! That last code snippet got me to where I needed to get :-) THANKS!! (Now when I close my eyes I see pilog - what does that mean?) Cheers, Doug --- On Wed, 6/22/11, Alexander Burger wrote: > From: Alexander Burger > Subject: Re: embedding minipicolisp > To: picol

fyi http://rosettacode.org/wiki/Amb#PicoLisp

2011-06-22 Thread Doug Snead
"PicoLisp "For backtracking, Pilog (PicoLisp Prolog) is the natural choice." http://rosettacode.org/wiki/Amb#PicoLisp (I didn't see any other example that was obviously smaller than picolisp.) -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

tracing pilog

2011-06-25 Thread Doug Snead
What's the best way to trace pilog?I'd be interested in hearing how people go about debugging pilog programs. Doug -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: tracing pilog

2011-06-25 Thread Doug Snead
x27;get) or if nothing else works a traceAll can give you good hints in those situations. On Sun, Jun 26, 2011 at 6:27 AM, Doug Snead wrote: What's the best way to trace pilog?    I'd be interested in hearing how people go about debugging pilog programs. Doug -- UNSUBSCRI

golog in minipicolisp

2011-06-26 Thread Doug Snead
(or (equal @A (And @W1 @W2))) (or (equal @A (If @W1 @W2))) (or (equal @A (Is @W1 @W2))) (or (equal @A (Or @W1 @W2))) (or (equal @A (some @X @W))) (or (equal @A (all @X @W # %restoreSitArg(poss(A),S,poss(A,S)). (prove (goal '(restoreSitArg (poss @A) @S (pos

Re: golog in minipicolisp

2011-06-26 Thread Doug Snead
--- On Sun, 6/26/11, Doug Snead wrote: > (be isAtom (@A) (not (equal @A (Neg @W))) >     (or (equal @A (And @W1 @W2))) >         (or (equal @A (If @W1 @W2))) >      (or (equal @A > (Is @W1 @W2))) >     (or (equal @A (Or @W1 @W2))) >     (or (equal @A (some @X @W))) >

Re: tracing pilog

2011-06-26 Thread Doug Snead
Thanks Alex!The more I look at it, the more I like pilog for golog because golog uses prolog-ish backtracking so heavily. When I look at this attempt to make a lua golog for example http://drops.dagstuhl.de/opus/volltexte/2010/2631/pdf/10081.Ferrein.2631.pdf , I think a picolisp/pilog -ba

Re: golog in minipicolisp

2011-06-26 Thread Doug Snead
Burger wrote: > From: Alexander Burger > Subject: Re: golog in minipicolisp > To: picolisp@software-lab.de > Date: Sunday, June 26, 2011, 11:50 AM > On Sun, Jun 26, 2011 at 01:44:33AM > -0700, Doug Snead wrote: > > (It looks not so bad, once I studied golog_swi.pl a > bit

Re: tracing pilog

2011-06-26 Thread Doug Snead
This is exactly what I was looking for, thanks! --- On Sun, 6/26/11, Alexander Burger wrote: > It works by simply passing the names of the clauses you > want to trace right after the '?' (i.e the ['sym' ..] arguments). > ... With tracing >    : (? append (append (a b c) @X (a b c d e f))) -- U

pilog question

2011-06-29 Thread Doug Snead
I have a question about how or/2 works in pilog. Here's my test of or/2: ~/lisp/miniPicoLisp $ ./pil : (be a (3)) -> a : (be b (3)) -> b : (? (a 3)) -> T : (be foo (@N) (or (a @N) (b @N))) -> foo : (? foo a b or (foo 3)) 1 (foo 3) 1 (or (a 3) (b 3)) -> NIL : Shouldn't that be T ? It seems

solved - Re: pilog question

2011-06-29 Thread Doug Snead
Hmmm... the clauses seem paired in like so, in the or/2 reference, like (or ((equal 3 @X) (equal @X 4)) ((equal 7 @X) (equal @X 7)) ) When I similarly pair the clauses of or/2: (be foo (@N) (or ((a @N) (b @N It works. :-) --- On Wed, 6/29/11, Doug Snead wrote

and/2 another pilog question

2011-06-29 Thread Doug Snead
More pilog adventures! Alex, would it be possible to give pilog an and/2 rule similar to the or/2 rule that pilog has now? Sometimes refactoring pilog around the lack of an and/2 is a pain. Here's an example, where a rule has a kind of a logical expression (with prolog backup): holds(A,S

Re: and/2 another pilog question

2011-06-29 Thread Doug Snead
Ha! The "and" is implicit ... I should seen that - the or/2 example there was a clue. Thanks for the assistance!! I feel close to getting golog (and elevator example) working. Cheers, Doug --- On Wed, 6/29/11, Alexander Burger wrote: > From: Alexander Burger > Subject: Re: and/2 an

pilog: unification in variables that are clauses

2011-06-29 Thread Doug Snead
--- On Wed, 6/29/11, Alexander Burger 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 ; \+ restore

Re: pilog: unification in variables that are clauses

2011-06-30 Thread Doug Snead
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

Re: pilog: unification in variables that are clauses

2011-06-30 Thread Doug Snead
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) a(_G386

Re: Picked from HN: `First-class environments.'

2011-06-30 Thread Doug Snead
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 mos

Re: pilog: unification in variables that are clauses

2011-06-30 Thread Doug Snead
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

Re: pilog: unification in variables that are clauses

2011-07-01 Thread Doug Snead
Thanks Alex!!! We have golog in pilog. Er, I think :-) If not we're pretty dang close. Still trying to get the simple elevator example going from "Knowledge in Action" as a test. http://www.cs.toronto.edu/cogrobo/kia/simpleElevator http://books.google.com/books?q=%22proc%28goFloor%22 etc

pilog question

2011-07-04 Thread Doug Snead
Consider these five pilog assertions. (be do ((Question @P) @S @S) (holds @P @S)) (be holds (@A @S) (restoreSitArg @A @S @F) (2 cons (-> @F))) (be On (3 s0)) (be On (5 s0)) (be restoreSitArg ((On @N) @S (On @N @S))) I define some tests. (de t_1 () # ok (? holds On restoreSitArg (holds

Re: pilog question

2011-07-04 Thread Doug Snead
Thanks Alex! I ended up taking it up to (5 cons (-> @F)) to get the first simple elevator example working. Still a bit wonky in that respect. (Might have to adjust that magic unification level number per application!) But this definitely shows golog pilog is possible. Here's a page where g

Re: pilog question

2011-07-04 Thread Doug Snead
sertion > > > On Mon, Jul 04, 2011 at 12:26:46AM -0700, Doug Snead > wrote: > > Consider these five pilog assertions. > > > > (be do ((Question @P) @S @S) (holds @P @S)) > > > > (be holds (@A @S) > >    (restoreSitArg @A @S @F) > >    (2 cons (-

Re: pilog question

2011-07-05 Thread Doug Snead
Hi Alex, Ah, the situation is not so bad IMO. To begin with, this is an obscure thing to do, I think - maybe somewhat pedantic. It forces golog to be prolog, in a sense. And there are workarounds which you provided. And I think you're right: it should be possible to restructure the involved go

android picolisp using ndk/jni

2011-07-07 Thread Doug Snead
http://developer.android.com/sdk/ndk/overview.html : "Typical good candidates for the NDK are self-contained, CPU-intensive operations that don't allocate much memory, such as signal processing, physics simulation, and so on." Ok, here's a plan for :-) a real Android picolisp ... start by taking

Re: android picolisp using ndk/jni

2011-07-07 Thread Doug Snead
Might be nice to keep as much of that as possible with an android ndk/jni approach also. For example for C file io one could do something like: http://stackoverflow.com/questions/1992953/file-operations-in-android-ndk Android picolisp would definitely need to coexist with java classes, no way

heap miniPicoLisp question

2011-07-13 Thread Doug Snead
~/build/miniPicoLisp # ./pil : (heap) -> 1 : (heap T) -> 0 : Shouldn't I see something else - or is that correct for miniPicoLisp ? Cheers, Doug -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: heap miniPicoLisp question

2011-07-13 Thread Doug Snead
Thanks, Alex. I was looking at an older version for which heap returned the number of free cells currently available. I need to get up to date - looks like that changed since ... 2007! :-) Cheers, Doug --- On Wed, 7/13/11, Alexander Burger wrote: > From: Alexander Burger > Subject: Re:

pilog: Prolog Tutorial, 2.19 Actions and plans

2011-07-14 Thread Doug Snead
Here's another prolog-to-pilog translation, this time from John Fisher's excellent "Prolog Tutorial, 2.19 Actions and plans" http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/2_19.html prolog: http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/2_19pl.txt to pilog: http://victoriaf

Re: The PicoLisp Ticker

2011-07-15 Thread Doug Snead
I think you created a bot-trap :-) --- On Fri, 7/15/11, Alexander Burger wrote: > From: Alexander Burger > Subject: The PicoLisp Ticker > To: picolisp@software-lab.de > Date: Friday, July 15, 2011, 12:58 AM > Hi all, > > let me share my funny experiences about the PicoLisp > Ticker, and how i

re: Ninety-Nine Lisp Problems: pilog

2011-07-15 Thread Doug Snead
re: the 24jul10 comment: "The more of the higher-numbered problems... are really typical Prolog problems! All of them involve recursive searches in some solution space." http://picolisp.com/5000/-2-1K.html Then perhaps picolisp's Prolog (pilog) would be ideal? I'm always happy to see pilog ex

pilog and Definite Clause Grammar (DCG)

2011-07-19 Thread Doug Snead
Alex (or anyone), What's the best way to handle Definite Clause Grammar syntax in pilog? "Definite Clause Grammar (DCG) and Prolog supports a special rule syntax for writing DCGs. The syntax is simpler, much closer to the syntax one uses in writing context-free grammar rules. When using the DC

Re: pilog and Definite Clause Grammar (DCG)

2011-07-20 Thread Doug Snead
THANK YOU! I haven't tested that yet but I think that is exactly what I was looking for there. Might be something to consider adding to pilog.l Seems to be fairly standard in prologs - and useful for creating parsers :-) Beautiful code, thanks again so much! Cheers, Doug --- On Wed,

pilog dcg with args

2011-07-21 Thread Doug Snead
Hi Alex, Man, thanks for all the pilog help so far! I'm working my way down the dcg example here http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/7_3.html And I notice that some of the non-terminals there have arguments, for example: c(L) --> lead_in,arrange(L),end. Not sure how t

Re: pilog dcg with args

2011-07-23 Thread Doug Snead
Hi Alex, I keep going back and forth on that, trying to think of a terse syntax that will accommodate all the cases :-/ It may be that just handling the dcg cases which have no arguments well, would be a good compromise. I found out that you can read prolog dcg clauses into swi-prolog and then

Re: pilog dcg with args

2011-07-27 Thread Doug Snead
Hi Alex, Thank you so much - this seems to cover the wikipedia example I'll have to go back over the dcg in http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/7_3.html with this latest pilog dcg and see how it works now. The terminals and non-terminals sometimes get mixed in the same

Re: pilog dcg with args

2011-07-27 Thread Doug Snead
Hi Alex, Thanks for the picolisp pointers :-) The sub? shrinks down one of the awkward bits there. Unfortunately, I didn't see sub? in miniPicoLisp. The replace seems like a better idea than using the surgical patch there - probably not a good idea to modify a list passed in as an argument li

error message line numbers

2011-09-04 Thread Doug Snead
Hi Alex, Is there a way I can make (mini)PicoLisp give me line numbers from .l source files in error messages? There are lots of gnu and/or linux tools (like vim) and IDEs etc., that want error messages in a format similar to what gcc spits out, like: Baz.cpp:321: error: 'foobar' was not decl

Re: error message line numbers

2011-09-06 Thread Doug Snead
Thanks for the reply, Alex. I need to use Windows without cygwin dlls for an application I'm working on now. So, I had been using miniPicoLisp in my application, which compiles ok under mingw. That let me avoid even trying to compile regular PicoLisp using mingw, and the porting issues that

re: tags

2011-11-14 Thread Doug Snead
FWIW ... here's something I use instead of ctags for picolisp. $ cat /usr/local/bin/lisptags #!/bin/sh # make a tags file for pico lisp source files. # use: # lisptags foo.l bar.l baz.l ... bof.l # generate the file 'tags' # [based on lisptags csh script by John Foderaro, c.1982] awk ' /^

Re: PicoLisp is DEAD (Was: PicoLisp and its (lack of) libraries)

2012-01-23 Thread Doug Snead
--- On Mon, 1/23/12, Jakob Eriksson wrote: > The Java version opens up the path to Android jobs - and I > have an impression that those are still a kind of Wild West. I have a (slightly hacked) version of miniPicoLisp running as an android native library as a proof of concept. No no additional

Re: PicoLisp is DEAD (Was: PicoLisp and its (lack of) libraries)

2012-01-24 Thread Doug Snead
Date: Monday, January 23, 2012, 11:47 PM > > > On January 24, 2012 at 7:49 AM Doug Snead > wrote: > > > > > I have a (slightly hacked) version of miniPicoLisp > running as an android > > native library as a proof of concept.  No no > addi

miniPicoLisp Trasnients

2012-01-25 Thread Doug Snead
Alex, I have a porting-related question for you. After more android testing I'm finding a problem with (transient) variables ... (I think). When I try a definition like this, (de foo (x) x) no problem, (foo 123) returns 123 as expected. But when I try it this way: (de baz ("X") "X")

Re: miniPicoLisp Transients

2012-01-26 Thread Doug Snead
--- On Thu, 1/26/12, Alexander Burger wrote: > > (setq "V" 456) > > at the top level (not in a definition) that works as > expected > > Again strange. It shouldn't matter how the symbol is used > (globally or bound locally). Hi Alex, Thanks for the guidance! On second look, I was wrong about

android success with full picolisp

2012-02-20 Thread Doug Snead
More android + picolisp fun, this time with the full picolisp.  Using the android SDK and NDK, I hacked a picolisp/src/makefile to work for android's arm processor like this: --- makefile --- [snip] CFLAGS := -c -O2  -pipe \         -falign-functions=64 -fomit-frame-pointer -fn

Re: server - IP socket error: Address family not supported by protocol

2012-02-22 Thread Doug Snead
protocol ? --- On Wed, 2/22/12, Doug Snead wrote: > From: Doug Snead > Subject: server - IP socket error: Address family not supported by protocol > To: picolisp@software-lab.de > Date: Wednesday, February 22, 2012, 10:07 PM > Hi Alex, > > I'm tying to get the example

Re: server - IP socket error: Address family not supported by

2012-02-22 Thread Doug Snead
Hi Alex, Ah, ok ... hmmm, that's two different platforms I have seen that problem on, then. The Android NDK also compiles the latest picoLisp ok, but then, same as that other (more standard) linux, dies in that port function with the same error. I can drop back to a pre-IPv6 version of picol

Re: server - IP socket error: Address family not supported by

2012-02-23 Thread Doug Snead
Hi Alex, No IPv6 in my ifconfig on my linux box ... and no ipconfig on the android. When I drop back to picoLisp 2.3.7, I'm able to run the app example ok on my linux box, and connect to the pico server with a browser. The picolisp server then runs on the android, also. Next step: conne

Re: Android Web Server

2012-02-24 Thread Doug Snead
Hi Joe, Very nice!   I think it would be useful to be able to package complete picolisp applications as android apps. Or, at least that might be a possibility.  Something to explore. I'm still hung up on trying to get android browser to talk to the picolisp app server like that.  I'm reading t

Re: Android Demo

2012-02-25 Thread Doug Snead
Joe, Ha ... very interesting the way you download busybox to download picolisp! I'm still wondering why I cannot connect to my picolisp server on android ... but it looks like you have that issue licked. Ok, so now this means we can package some picolisp client/server applications as andro

Re: pilog in ersatz

2012-07-09 Thread Doug Snead
The pilog trace can be helpful in these situations. : (be bigger (me her)) : (be bigger (her son)) : (be bigger (son daughter)) : (be bigger (@x @y) (bigger @x @z) (bigger @z @y)) List the assertions you want to trace before the clause to be proved, in this case "bigger" : : (? bigger (bigger @

Re: pilog in ersatz

2012-07-09 Thread Doug Snead
--- On Sun, 7/8/12, Christophe Gragnic wrote: > : (be bigger (me her)) > -> bigger > : (be bigger (her son)) > -> bigger > : (be bigger (son daughter)) > -> bigger > : (be bigger (@x @y) (bigger @x @z) (bigger @z @y)) > -> bigger > : bigger > -> NIL > : (? (bigger @x meily)) > @x=alix > @x=sw H

Re: Android Demo

2012-10-10 Thread Doug Snead
Thorsten Jolitz > Subject: Re: Android Demo > To: picolisp@software-lab.de > Date: Tuesday, October 9, 2012, 10:06 AM > Doug Snead > writes: > > Hi Joe and Doug, > > I read up your conversations about PicoLisp on Android in > the mailing > list and your articles in th

Re: Announce: PicoLisp in Hardware (PilMCU)

2014-09-21 Thread Doug Snead
Oh boy! I've been thinking of something like this for a while. What is the low-hanging fruit here, in the sense of, what applications might we do faster/cheaper/better in hardware like this, than can be done otherwise? The idea of pilog in hardware excites me too ... maybe time to go back and