ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Check also http://www.picolisp.com for more information
pbaille has joined #picolisp
pbaille has quit [Ping timeout: 240 seconds]
pbaille has joined #picolisp
pbaille has quit [Ping timeout: 260 seconds]
pbaille has joined #picolisp
pbaille has quit [Ping timeout: 260 seconds]
pbaille has joined #picolisp
pbaille has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 252 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
pbaille has joined #picolisp
pbaille has quit [Ping timeout: 260 seconds]
aw- has quit [Quit: Leaving.]
aw- has joined #picolisp
pbaille has joined #picolisp
pbaille has quit [Ping timeout: 240 seconds]
pbaille has joined #picolisp
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> but thats horribly inefficient
<beneroth> T
<Regenaxer> (make (link 'eval 'Foo) (chain Lst))) gives something different :)
<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!!
<DKordic> Pleas take a look (for a start) at the quote at the beginning of http://www.cs.toronto.edu/~hehner/ratno.pdf . The whole document is fascinating.
<DKordic> >> [ dfn ( not Proposition True False ) ( Proposition False True ) ( if P1 P2 True False ) ( P1 ( P2 True False ) ( P2 True True ) ) ] <<! Show me >> ' ( n or ) << ;) .
<Regenaxer> I'll take a look
<Regenaxer> later
<DKordic> AKA <<Leftis Numers>>.
<Regenaxer> Inside PicoLisp, if you don't want to change the whole internal number representations, @lib/frac.l is the easiest
<Regenaxer> It fulfills (a), (b) and (c)
<DKordic> Why We can not iterate over any <<cell>> <<typ>>es? How to <<car> and <<cdr>> and destructively update <<num>>s.
<Regenaxer> You can
<Regenaxer> See 'struct' and 'adr'
<Regenaxer> 'adr' for bignums only of course
<DKordic> Shoudn't We have <<num>> as we have <<cons>>?
<DKordic> And <<sym>> <<cons>> as well.
<Regenaxer> I see no reason. It boils down to arithmetics where we have many functions
<Regenaxer> : (vi 'llvm~consSym)
<beneroth> DKordic you are such a fundamentalist ;)
<DKordic> :3 W/Inventor's_paradox .
<Regenaxer> DKordic: What would you do with such low-leve
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
<Regenaxer> DKordic: What would you want to do with such low-level number and symbol accesses?
orivej has joined #picolisp
<DKordic> Regenaxer: I often found them missing. Manipulating <<Binary Data>>?
<Regenaxer> My question is: Why would you need it? To do what?
<DKordic> IMHO We should have a lib for https://man7.org/linux/man-pages/man7/vdso.7.html
<Regenaxer> Well, it says "Applications usually do not need
<Regenaxer> to concern themselves with these details" ;)
<Regenaxer> Again, for what purpose?
<Regenaxer> I mean, why should it be worth the effort?
<DKordic> W/Cognitive_closure_(philosophy) . <<num>>s are <<lst>>s! I see it as a flaw that I can not Destructively Update them!!
<Regenaxer> As I said many times: You *can*
<Regenaxer> Just do it
<DKordic> You are completely right. I need to show the Proof, and I am working on it.
<Regenaxer> Great!
<Regenaxer> Let me know if you need hints
<Regenaxer> implementation details
<DKordic> Than You!
<DKordic> I wanted to share my results so far. I am hoping You will find them as interesting as I did.
<Regenaxer> ok :)
<DKordic> >> [ dfn ( Forth! Data Factor : ; ) ( Data ( Factor : ) ; ) ( swap : A1 A2 ; ) ( : A2 A1 ; ) ( dup : A1 ; ) ( : A1 A1 ; ) ( drop : A1 ; ) ( : ; ) ] <<. >> ( = id ( Forth! dup drop ) ) <<.
<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
<Regenaxer> (should be elaborated)
<DKordic> It is also possible to Define a FEXPR: >> ' [ Forth! dup drop ] <<.
<Regenaxer> yes
<Regenaxer> I understood your code example that way
lodsw has quit [Read error: Connection reset by peer]
lodsw has joined #picolisp
stultulo has joined #picolisp
f8l has quit [Remote host closed the connection]
Nistur has quit [*.net *.split]
Nistur has joined #picolisp
lodsw has quit [Ping timeout: 240 seconds]
lodsw has joined #picolisp
orivej has quit [Ping timeout: 252 seconds]
mtsd has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp