Me
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
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
Hi Rick,
thanks for the ideas :)
However, as Mike Pechkin wrote, I do also believe that such a construct
is rather useless.
The examples are too simple. They can be easily rewritten as:
> (if-let X 13 (- X 1) 0) #-> 12
(if 13 (dec @) 0)
> (if-let X 13 (- X 1)) #-> 12 # you can leave
hi all,
I totally dont like it. I vote.
All this useless.
Can you write here #Usage examples of (if-let) in current language feature
set?
Coder already have all needed, like in forth.
If coder want, it have all required to implement this by himself.
Like reduce and -> from clojure I've used to emu
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)
A subtle change in the definition. Added two quote marks.
(de if-let "Args"
## Better than anaphoric `if` because you can name the test result
## yourself.
(let ((@Pattern "Test" @Then @Else) "Args"
@Test-Result (eval "Test"))
(eval
(fill
'(if '@Test-Result
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)
I like the idea of `if-let` (which you can see in Clojure[1], and
probably other languages). It's like anaphoric `if`[2] but better
because you can name the result of the conditional test. (Intentional
variable capture is always best when you are controlling the variable
names; not having a name
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
17 matches
Mail list logo