Rick Hanson writes:
Hi Rick,
> Here is a problem (again!) with using a pil backquote expression,
> where the user, like you or me, is stuck on "CL-unquote thinking".
>
> Let's call g again, but now we switch the places of the dates and
> times. In this case, we might expect the answer now to be
Hi Christopher,
On Mon, Aug 10, 2015 at 07:17:12AM +0200, Christopher Lozinski wrote:
> Please unsubscribe me.
Please send a message with the subject "Unsubscribe" to the list.
♪♫ Alex
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Please unsubscribe me.
I really just wanted to follow progress on the Picolisp cpu.
If you have a pciolisp cpu announce list, then please add me to it.
Chris
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Thorsten,
Here is a problem (again!) with using a pil backquote expression,
where the user, like you or me, is stuck on "CL-unquote thinking".
Let's call g again, but now we switch the places of the dates and
times. In this case, we might expect the answer now to be "No";
however, the answer wil
Here's a slightly re-factored version of g that will be easier to unit
test.
(def '*PunctChars* (chop ".,;:?!\"'_-{[]}"))
(de is-$variable$? (Arg)
(let (ChopArg (chop Arg)
ChopArgTail (tail 2 ChopArg))
(cond ((not (= "$" (car ChopArg)))
NIL)
(# Arg is (strictly)
Hi, Thorsten!
> I did not yet make it to write a function g [...]
What if you combined your f and g into a "new" g? Here's one and with
recur/recurse.
(de g Args
(glue " "
(recur Args
(mapcar
'((Arg)
(if (atom Arg)
(let (ChopArgs (chop Arg)
Thorsten Jolitz
writes:
Hi List,
> This comes pretty close to what I was looking for, thanks. The only
> drawback is that normal parens (and double quotes) are very common in
> text so a lot of escaping would be necessary. Something like this:
>
>(g Current "temperature" in Berlin is {Temp}
Alexander Burger writes:
Hi Alex,
sorry for being thick as a brick ...
> Well, 'bind' is the evaluating version of 'let'. It could be used to
> implement the outher functions.
I'll check that out.
> What you probably mean is something different. It is a different way of
> interpreting the arg
Hi Thorsten,
> I have to try fill, and think more about the whole issue, but the last
> version with @X looks pretty close to what I'm looking for.
Ah, yes, didn't think about that when I wrote the last mail. This is
also a possibility:
(de g Lst
(fill Lst) )
(setq @Temp 33)
(g
Hi Thorsten,
> Thinking about it it seems that Read Macros are equivalent, but the
> readers work differently:
>
> - PicoLisp :: read without eval, except when encountering a read
> macro
> - Emacs Lisp :: read without eval, except in special situations (local
> assignments, read m
Alexander Burger writes:
Hi Alex,
uhh ... bad timing from my side, writing more confused question while
you are actually answering them at the same time...
> Either
>: (let X (+ 2 3) (list 3 4 X)) # I would prefer a simple 'list'
>-> (3 4 5)
>
> or
>: (let X (+ 2 3) (fill (3 4 X) '
Thorsten Jolitz
writes:
Hi Alex,
> When I quote the reference:
>
> ,
> | A single backquote character "`" will cause the reader to evaluate
> | the following expression, and return the result.
> |
> | : '(a `(+ 1 2 3) z)
> | -> (a 6 z)
> `
>
> it looks to me as if the difference between
Hi Rick + Thorsten,
On Sat, Aug 08, 2015 at 11:43:03PM +0200, Thorsten Jolitz wrote:
> Rick Hanson writes:
>
> > Yeah, sorry. I had this on the mind -- a different animal altogether.
> >
> > $ sbcl
> > * (let ((X (+ 3 4))) `(hello ,X ,(- X 9)))
> > (HELLO 7 -2)
>
> Maybe I was confused b
Rick Hanson writes:
Hi Rick,
>> Reading your other post I was wondering how it worked for you and
>> thought "it must be because of debug mode", and well ... correctly
>> guessed ;-)
>
> Hi Thorsten! Yes. :) And btw thanks for picolisp-mode. Please count
> me as a happy user.
Oh, you have to
Rick Hanson writes:
> Yeah, sorry. I had this on the mind -- a different animal altogether.
>
> $ sbcl
> * (let ((X (+ 3 4))) `(hello ,X ,(- X 9)))
> (HELLO 7 -2)
Maybe I was confused by Emacs Lisp a bit too:
,
| (let ((x (+ 3 4))
| (y (+ 5 6)))
| `(+ 5 x ,y))
|
| -> (+ 5 x
> Reading your other post I was wondering how it worked for you and
> thought "it must be because of debug mode", and well ... correctly
> guessed ;-)
Hi Thorsten! Yes. :) And btw thanks for picolisp-mode. Please count
me as a happy user.
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=
Yeah, sorry. I had this on the mind -- a different animal altogether.
$ sbcl
* (let ((X (+ 3 4))) `(hello ,X ,(- X 9)))
(HELLO 7 -2)
Thanks, Alex, for taking the time and writing a very nice explanation.
I believe I understand it, but I will re-read and ponder it more.
--
UNSUBSCRIBE: mai
Hi Rick,
you clarified your (incorrectly correct) results in your next mail, so
let me explain more about read- and runtime.
> Maybe I too have been misunderstanding all along. Alex, you seem to
> be inferring here a strict separation between readtime and runtime;
Yes, indeed.
> It seems to m
Rick Hanson writes:
Hi Rick,
> Oops. I got that all wrong. Look.
>
> $ pil
> : X
> -> NIL
> : (let X (+ 3 4) (glue " " '("Number" `X `(- X 9
> -> "Number "
> : X
> -> NIL
>
> When I copied and pasted results in my last message, I was in a pil
> session where I was messing aro
Alexander Burger writes:
Hi Alex,
>> I wonder how I can use local variable X inside of the 'glue'
>> argument list:
>>
>> ,
>> | : (let X (+ 3 4) X)
>> | -> 7
>> |
>> | : (let X (+ 3 4) (glue " " '("Number" X `(- 4 9
>> | -> "Number X -5"
>> |
>> | : (let X (+ 3 4) (glue " " '("Numbe
Oops. I got that all wrong. Look.
$ pil
: X
-> NIL
: (let X (+ 3 4) (glue " " '("Number" `X `(- X 9
-> "Number "
: X
-> NIL
When I copied and pasted results in my last message, I was in a pil
session where I was messing around with `fill` and `run` and it
"polluted" what I tho
> Hmm, read-macros seem indeed a lot misunderstood. NEVER use a
> read-macro to insert values which are defined at *run*time! As the
> name says, they are evaulated at *read* time!
Maybe I too have been misunderstanding all along. Alex, you seem to
be inferring here a strict separation between re
Hi Thorsten,
> I wonder how I can use local variable X inside of the 'glue' argument list:
>
> ,
> | : (let X (+ 3 4) X)
> | -> 7
> |
> | : (let X (+ 3 4) (glue " " '("Number" X `(- 4 9
> | -> "Number X -5"
> |
> | : (let X (+ 3 4) (glue " " '("Number" `X `(- 4 9
> | -> "Number -
Hi List,
I wonder how I can use local variable X inside of the 'glue' argument list:
,
| : (let X (+ 3 4) X)
| -> 7
|
| : (let X (+ 3 4) (glue " " '("Number" X `(- 4 9
| -> "Number X -5"
|
| : (let X (+ 3 4) (glue " " '("Number" `X `(- 4 9
| -> "Number -5"
`
X does not seem
24 matches
Mail list logo