Re: Build transient value on the fly

2014-07-28 Thread Tomas Hlavaty
Hi Christophe, No problem for Display, but hello should spontaneously have its value changed to some XML containing the string hello. in other words, you want to use the transient symbol hello as a variable? What is preventing you? It's often done in PicoLisp. (let hello 123 (println

Re: Build transient value on the fly

2014-07-28 Thread Christophe Gragnic
On Mon, Jul 28, 2014 at 9:27 AM, Tomas Hlavaty t...@logand.com wrote: Hi Christophe, No problem for Display, but hello should spontaneously have its value changed to some XML containing the string hello. in other words, you want to use the transient symbol hello as a variable? What is

Subscribe

2014-07-28 Thread S R

Subscribe

2014-07-28 Thread S Pico

Differences in mapping functions

2014-07-28 Thread S Pico
I am often confused between the variants of the map functions: map, mapc, mapcar, mapcan, mapcon, maplist. The other related ones are easier because of the names: fish, filter, pick, extract ... Their descriptions are very much alike, differing in maybe one line. Also, when I want to

Understanding the later function

2014-07-28 Thread S Pico
I am trying to understand this example from the reference: (prog1 # Parallel background calculation of square numbers (mapcan '((N) (later (cons) (* N N))) (1 2 3 4)) (wait NIL (full @)) ) Could you please explain how it works, because it has many interrelated pieces: cons,mapcan, wait that

Re: Differences in mapping functions

2014-07-28 Thread Alexander Burger
Hi Srini, I am often confused between the variants of the map functions: map, mapc, mapcar, mapcan, mapcon, maplist. Yes, indeed. The names of these 6 functions are historic, they are in most Lisp variants since early on. Is there a short one-line synposis/organization of these functions

Re: Understanding the later function

2014-07-28 Thread Alexander Burger
Hi Srini, I am trying to understand this example from the reference: (prog1 # Parallel background calculation of square numbers (mapcan '((N) (later (cons) (* N N))) (1 2 3 4)) (wait NIL (full @)) ) Could you please explain how it works, because it has many interrelated pieces:

Re: Build transient value on the fly

2014-07-28 Thread Tomas Hlavaty
Hi Christophe, No problem for Display, but hello should spontaneously have its value changed to some XML containing the string hello. in other words, you want to use the transient symbol hello as a variable? What is preventing you? The problem is that I would like to avoid maintaining a

Re: Differences in mapping functions

2014-07-28 Thread S Pico
Hi Alex Thanks for your prompt reply...I am adding my replies inline..    Srini From: Alexander Burger a...@software-lab.de To: picolisp@software-lab.de Sent: Monday, July 28, 2014 1:50:28 PM Subject: Re: Differences in mapping functions ... I am

Re: Differences in mapping functions

2014-07-28 Thread Thorsten Jolitz
Alexander Burger a...@software-lab.de writes: Hi Alex, I am often confused between the variants of the map functions: map, mapc, mapcar, mapcan, mapcon, maplist. Yes, indeed. The names of these 6 functions are historic, they are in most Lisp variants since early on. [...] I hope this

Re: Differences in mapping functions

2014-07-28 Thread Amaury Hernández Águila
I agree. I'm constantly reading the reference of any lisp when dealing with maps, and their descriptions are usually vague. When prototyping I always ignore mapcon and mapcan because I always forget their difference (and because of their destructive nature, which isn't considered functional). El

Re: Differences in mapping functions

2014-07-28 Thread S Pico
Hi Alex The diagram you produced makes a very nice and succinct reference...                    Whole list     Only CAR       --+-+---       No result |     map     |    mapc                 |             |       append    |    maplist  |   mapcar                 | 

Re: Understanding the later function

2014-07-28 Thread S Pico
Hi Alex, Thanks for the detailed reply. Pl. see my reply inline.. Srini - Original Message - From: Alexander Burger a...@software-lab.de To: picolisp@software-lab.de Sent: Monday, July 28, 2014 2:21:53 PM I am trying to understand this example from the reference: (prog1 

Re: Build transient value on the fly

2014-07-28 Thread Christophe Gragnic
On Mon, Jul 28, 2014 at 9:11 PM, Tomas Hlavaty t...@logand.com wrote: I can't make sense of what you are trying to achieve. Why do you want to use transient symbols? Why not use normal interned symbols? How does your use case differ? Do you have a simple example? Suppose you embed a DSL

Re: Differences in mapping functions

2014-07-28 Thread Alexander Burger
Hi Srini, Another difference is that the mapcon and mapcan functions must supply a function that returns a list, while the others can supply a function that returns an atom? Not exactly. 'mapcon' and 'mapcan' can return any s-expression. These results are then concatenated just as 'conc'