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
:
From: Thorsten Jolitz tjol...@googlemail.com
Subject: Re: Android Demo
To: picolisp@software-lab.de
Date: Tuesday, October 9, 2012, 10:06 AM
Doug Snead semaphore_2...@yahoo.com
writes:
Hi Joe and Doug,
I read up your conversations about PicoLisp on Android in
the mailing
list and your
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 @x
--- On Sun, 7/8/12, Christophe Gragnic christophegrag...@gmail.com 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
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
?
--- On Wed, 2/22/12, Doug Snead semaphore_2...@yahoo.com wrote:
From: Doug Snead semaphore_2...@yahoo.com
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
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
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
--- On Thu, 1/26/12, Alexander Burger a...@software-lab.de 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
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)
Date: Monday, January 23, 2012, 11:47 PM
On January 24, 2012 at 7:49 AM Doug Snead semaphore_2...@yahoo.com
wrote:
I have a (slightly hacked) version of miniPicoLisp
running as an android
native library as a proof of concept. No no
additional java interpretation
penalty
--- On Mon, 1/23/12, Jakob Eriksson ja...@aurorasystems.eu 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
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 '
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
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
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
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,
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
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:
I think you created a bot-trap :-)
--- On Fri, 7/15/11, Alexander Burger a...@software-lab.de wrote:
From: Alexander Burger a...@software-lab.de
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
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
~/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
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
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
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
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
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 (- @F)))
(be On (3 s0))
(be On (5 s0))
(be restoreSitArg ((On @N) @S (On @N @S
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.
--- 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 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
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
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 to
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):
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 a...@software-lab.de wrote:
From: Alexander Burger
--- On Sun, 6/26/11, Doug Snead semaphore_2...@yahoo.com 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
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
This is exactly what I was looking for, thanks!
--- On Sun, 6/26/11, Alexander Burger a...@software-lab.de 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
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 a...@software-lab.de wrote:
From: Alexander Burger a...@software-lab.de
Subject:
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
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.
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,
--- On Fri, 10/9/09, Tomas Hlavaty t...@logand.com 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
44 matches
Mail list logo