opt/pilog.l?

2010-10-05 Thread Edwin Eyan Moragas
hi all, being a newbie and all, what is the significance of pilog.l in opt/ in the source distribution? best, /e -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Re: opt/pilog.l?

2010-10-05 Thread Alexander Burger
Hi Edwin, > being a newbie and all, what is the significance of pilog.l in opt/ in > the source distribution? There was a discussion here last year, where to put extensions of the basic system or libraries, so that the names do not conflict with the existing ones. The first case were some Pilog

Re: picolisp in java

2010-10-05 Thread Jon Kleiser
Hi Tomas, On 10/4/10 7:27 PM, Tomas Hlavaty wrote: .. For example, even simple 'if' is implemented as a picolisp fexpr: (de if (C . L) (loop (T C (up. '@ @) (eval (car L) 1)) (T T (run (cdr L) 1)) ) ) .. I'm just curious, what does that 'up.' do? I can't find it in

Re: opt/pilog.l?

2010-10-05 Thread Edwin Eyan Moragas
Hi Alex, On Tue, Oct 5, 2010 at 3:10 PM, Alexander Burger wrote: > > The first case were some Pilog extensions from cle, and as there is > already a "lib/pilog.l" and a "misc/pilog.l", we agreed to put such > things into a new directory "opt/". thank you. cheers, /e -- UNSUBSCRIBE: mailto:pic

Re: picolisp in java

2010-10-05 Thread Henrik Sarvell
http://www.software-lab.de/doc/refU.html#up On Tue, Oct 5, 2010 at 2:14 PM, Jon Kleiser wrote= : > Hi Tomas, > > On 10/4/10 7:27 PM, Tomas Hlavaty wrote: > .. >> >> For example, even simple 'if' is implemented as a picolisp fexpr: >> >> =A0 (de if (C . L) >> =A0 =A0 =A0(loop >> =A0 =A0 =A0 =A0 (T

Re: picolisp in java

2010-10-05 Thread Tomas Hlavaty
Hi Jon, > I'm just curious, what does that 'up.' do? I can't find it in the > PicoLisp ref. 'up.' is an internal function implemented in directly in Java. It was needed as a functional equivalent to 'up' because I needed something that would expect quoted agruments. 'up' is not programmable. /

Re: picolisp in java

2010-10-05 Thread Tomas Hlavaty
Hi Alex, > For example, even simple 'if' is implemented as a picolisp fexpr: > >(de if (C . L) > (loop > (T C (up. '@ @) (eval (car L) 1)) > (T T (run (cdr L) 1)) ) ) one of the significant factors that are slowing it down is all these environment lookups like the 'up.

Re: picolisp in java

2010-10-05 Thread Alexander Burger
Hi Tomas, btw, the strategy of deriving _all_ flow functions from 'loop' is very elegant! Cheers, - Alex -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

pi and e

2010-10-05 Thread Jon Kleiser
Hi, I may have asked this earlier .. If so, maybe it should be in the FAQ .. What's the standard way of obtaining math constants "pi" and "e"? Are they predefined somewhere? /Jon -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Re: pi and e

2010-10-05 Thread Alexander Burger
Hi Jon, > What's the standard way of obtaining math constants "pi" and "e"? > Are they predefined somewhere? Only 'pi' is explicitly defined, if you load "lib/math.l". 'e' is not there, but can be calculated dynamically: $ ./dbg lib/math.l : (format pi *Scl) -> "3.141593" : (format (

Re: picolisp in java

2010-10-05 Thread Tomas Hlavaty
Hi Alex, > btw, the strategy of deriving _all_ flow functions from 'loop' is very > elegant! thanks! It is indeed elegant and very inefficient;-) For production system, all these functions should be coded in Java instead of lisp, but it vas a great learning exercise this way, especially in the