theruran has quit [Quit: Connection closed for inactivity]
theruran has joined #picolisp
xkapastel has quit [Quit: Connection closed for inactivity]
rob_w has joined #picolisp
pbaille has quit [Ping timeout: 252 seconds]
pbaille has joined #picolisp
mtsd has joined #picolisp
pbaille has quit [Quit: Leaving...]
Nistur has quit [Ping timeout: 268 seconds]
orivej has joined #picolisp
Nistur has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
mtsd has quit [Remote host closed the connection]
rob_w has quit [Quit: Leaving]
orivej has quit [Ping timeout: 260 seconds]
beneroth has joined #picolisp
<beneroth>
hi all
<beneroth>
DKordic, hahaha, /dev/null aaS xD
mtsd has joined #picolisp
<DKordic>
Good morning everyone.
<DKordic>
Regenaxer: You Argued that ""apply"" should not exist in Lisp, some years ago. Can You please elaborate?
<Regenaxer>
Hi DKordic
<Regenaxer>
Hmm, did I say that? I don't think so
<Regenaxer>
I said perhaps that in first versions of PicoLisp 'apply' did not exist
<Regenaxer>
it was missing
<Regenaxer>
'apply' is so important in theoretical Lisp, but not in practice
<Regenaxer>
apply versus eval
<Regenaxer>
How was that called? Metacircularity?
<beneroth>
isn't apply just syntax sugar for eval? in a way (not as literally as ';: are, more in the sense that most lisp can be constructed from a few core functionalities)
<Regenaxer>
not syntax sugar
<beneroth>
I mean, you can use apply or you can build a eval function call expression and eval it
<Regenaxer>
Even that is different
<beneroth>
e.g. (apply Lst Foo) vs. (run (list 'eval 'Foo 'Lst))
<beneroth>
hm
<beneroth>
no wrong
<Regenaxer>
The diff is evaluating the items or not
<beneroth>
yes
<beneroth>
I meant: (apply Lst Foo) vs. (run (make (link 'eval 'Foo) (chain Lst)))
<Regenaxer>
in theory, if Lisp evals (foo . args)
<Regenaxer>
it does (apply foo (mapcar eval args))
<Regenaxer>
(apply foo '(a b c)) is not (foo a b c)
<Regenaxer>
in the second case the symbol values are passed
<beneroth>
ah, right
<Regenaxer>
(you need (apply foo (mapcar eval '(a b c))]
<beneroth>
well, still possible to do it. not meaningful :D
<Regenaxer>
yeah
<Regenaxer>
But Lisp rooks hyperventilate on eval and apply ;)
<beneroth>
T
<Regenaxer>
So 'apply' is nice to have, but not sooo often used
<beneroth>
well the essential core of Lisp is extremely small (that makes Lisp such theoretically elegant)
<beneroth>
I don't remember exactly, but it was something along (eval) (car) (cadr) (quote) (cond) and the rest can be made from that
<Regenaxer>
yeah
<Regenaxer>
(cadr) -> (cdr)
<Regenaxer>
and probably (apply)
<DKordic>
Indeed if >> [ dfn ( id Argument ) ( Argument ) ( apply Mapping Argument ) ( Mapping Argument ) ] <<, therefore also >> ( = ' ( ( M A1 ) A2 ) ' ( M A1 A2 ) ) <<, then >> ( = id apply ) <<! >> ' ( = id apply ) << is the essence of <<\{eta}-reduction>> of <<\{lambda}-Calculus>>. Lambda-Calculus is to Combinators as Roman Numerals is to Natural Numbers!!
<Regenaxer>
haha, sorry, this kind of notation in your posts I never grokked
<DKordic>
W/Flammarion_engraving
<DKordic>
IRC <<msg>> insists on txt, so I escape back into Lisp.
<Regenaxer>
For example, accessing a short number:
<Regenaxer>
: (setq N 7)
<Regenaxer>
-> 7
<Regenaxer>
$: (hex (struct (adr 'N) 'P))
<Regenaxer>
-> "72"
xkapastel has joined #picolisp
<Regenaxer>
Same for a big number, just one more indirection
<beneroth>
chose the tool according to the task
<beneroth>
picolisp is the wrong tool for some things
<Regenaxer>
yeap
<DKordic>
IMHO >> ' ( Forth! dup drop ) << can be viewed as W/Program_synthesis by W/Function_composition of >> ' dup << and >> ' drop << which in this intentionally limited example results in >> ' id << or <<nop>> (no operation).
<Regenaxer>
yes
<Regenaxer>
syntax could also be Lispy
<Regenaxer>
(local) (dup drop) (drop (dup))
<Regenaxer>
or ... (dup) (drop) ...
<Regenaxer>
But then better switch to Forth syntax completely