beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: https://libera.irclog.whitequark.org/picolisp | Check www.picolisp.com for more information
geri has joined #picolisp
<geri> hey, what do you use to do `(let S '(a . b) (set S 'A) S)` for cdr of the pair?
ygrek has joined #picolisp
<abu[7]> Hi geri! It is 'con''
<abu[7]> (con S 'A)
<DKordic> The «(setf (cdr List) '(new tail))» idea is interesting.
<abu[7]> Pil has no 'setf' (at least not built-in)
<abu[7]> It it a semantic rape of Lisp
<DKordic> I don't remember Common Lisp quirks. Haskell variant is... very important to me. It clarifies many other mechanisms (sold as ""language features""^TM). [dfn (CAR (CONS R _)) R]. IMHO [>_ : '(an expression) -> '(an expression)]. (de Cons)truct (possibly Hash) Table to unpack Keyword Parameters.
<geri> i honestly dont get anything xd
<geri> im guessing you like scheme's set-car! and set-cdr! more abu[7]
<geri> i remember this one
<geri> ive been having a lot of of reimplementing scheme builtins using scheme's basic functions this weekend :D
<geri> like a while loop with a macro and some recursive magic
<geri> pretty fun
<DKordic> geri: Now you are ready to reduce TSP to 3-SAT ;) .
<geri> im not even ready to understand all this lingo
<geri> :D
<geri> what is a monad, explain eli DKordic
<geri> eli5*, minus "explain"
<DKordic> geri: ``A monad is a type for which lawful implementations of bind and return exist. '' – tdamers, #scheme, 2020-04-09T
<geri> hands down a pretty good explanation assuming i know what bind and return give me
<geri> does haskell have polymorphism?
<geri> type polymorphism probably?
<DKordic> geri: Warning: Proceed at your own peril! 0K: http://okmij.org/ftp/Computation/free-monad.html
<geri> inb4 ill get hacked
<DKordic> geri: ""The Rape of the Mind"" by Joost Meerloo?
<geri> spooky stuff
<DKordic> geri: You can search YouTube for a start.
<geri> theres some animated summary video on it, very nice
<geri> i have way too many books i wanna read and cant get around to doing so
<abu[7]> I plan to translate SICP to PicoLisp
<abu[7]> will take time ...
<geri> sicp is also on my todo list
<geri> now thats what i call fun weekends
<abu[7]> T
<abu[7]> First non-bla chapter is https://7fach.de/pub/sicp/book-Z-H-10.html
<geri> nice
<DKordic> geri: Seen https://buildingasecondbrain.com/ ?
<tankf33der> abu[7]: i will test and check sicp
<geri> DKordic: no, but sounds like zettelkasten
<abu[7]> Great! But I'll need a lot of time
<DKordic> Yes.
<abu[7]> Perhaps I can concentrate on it between the years
<abu[7]> (sicp I mean)
<tankf33der> abu[7]: We need to find a way to join forces. How can I help?
<tankf33der> count on me. you know where to find me. :)
<abu[7]> Thanks! Perhaps we can operate on separate chapters
<abu[7]> I want to find out first which parts differ most
<abu[7]> Some things must be done differently
<abu[7]> eg. continuations vs, coroutines
<abu[7]> or explaining symbols, as Scheme does not have them
<abu[7]> All the "true" / "false" nonsense must be repaired in the pil version
<abu[7]> A chapter about Symbol properties should be written (Scheme has no properties)
<abu[7]> Case insensitivity in Scheme is perhaps also an issue
<DKordic> Yes, I find it archaic.
<abu[7]> Yeah. In gereral Scheme is more awkward and verbose cause NIL is not general
<abu[7]> (car '()) -> error
<geri> agree wholeheartedly
<abu[7]> (does () or NIL really need to be quoted in Scheme?)
<geri> nil is just a symbol, if its not set itll error
<geri> '() has to be quoted
<abu[7]> I see
<geri> its called null there
<abu[7]> So () and nil is not the same? But null?
<geri> i guess null is a synonym for nil but nil is only an end of list marker instead of also being boolean false
<abu[7]> Yes
<abu[7]> "false"
<geri> theres other weird stuff like (when #f 'ignore) returns an implementation-specified value, typically called "void" or "unspecified" or "undefined" etc.
<geri> returning nil is just better imo
<geri> or if you dont have nil just return #f
<tankf33der> afk
<abu[7]> So lots of SICP can be simplified :)
<geri> fun
<abu[7]> see you tankf33der!
<geri> i like some of scheme's ideas a lot but others are really yucky
<geri> it doesnt feel "minimalist" like it apparently was originally either
<abu[7]> Which ones are good?
<abu[7]> ideas
<geri> you can do a lot of fancy flow control with continuations, proper tco lets you do loops without special constructs
<geri> i kinda like function naming with ! and ? used somewhat consistently too
<abu[7]> ok
<geri> idea of minimalism, but that's kinda lost now imo
<geri> i like single namespace more than separating function and value namespace like in cl too
<geri> :D
<geri> but picolisp has that
<abu[7]> T
<abu[7]> Not a namespace issue though
<abu[7]> Lisp1
<abu[7]> In Pil namespaces are not about definitions
<abu[7]> only scope
<geri> its often referred to as "namespaces", even though its not really related to namespaces
<geri> cause naming stuff is hard i guess
<abu[7]> Yeah
<abu[7]> It is separate value and function field in a symbol
<geri> yeah, in cl and emacs lisp
<abu[7]> Scheme has no symbols, so "namespace" makes sense here
<geri> it feels less welcoming to write in functional style with them separated
<abu[7]> yeah
<geri> abu[7]: chez scheme has symbols with value cells and actually function cell too internally for optimizations
<geri> cl has value cells for dynamic bindings too
<geri> its kinda confusing honestly
<abu[7]> yes
<geri> cause when i think lexical binding i think hash table lookups
<geri> lexical closures in scheme are pretty nice too honestly, a little more involved in pil
<geri> not horribly so though
<DKordic> geri: Lexical Scope is a consequence of ""Substitution Model"" itself a consequence of ""eval"" or more accurately ""reduced"" being a Function.
<DKordic> (Assuming fixed Functionm in this case ""reduced"") Same argument (in this case Expression) implies same result.
<geri> *dies*
<DKordic> if Expressions are in Normal Form, different Expressions imply different Values (represented).
<DKordic> [>_ : '((M A.1) A.2) -> '(M A.1 A.2) : '(M) -> 'M : '() -> 'id]
<geri> what even is this notation
<geri> wdym by "substitution model", "reduced" (that is being a function) & fixed Function(m?)
corecheckno has quit [Remote host closed the connection]
<DKordic> An Expression '(M A) representing Specialization of M at A is reduced by substituting the parameter with argument in the result expression given by definiton of M.
<geri> that's cool and all but you dont need eval in the language to have lexical scoping, and you dont really need to inline anything either unless you want to avoid function calls
<DKordic> I don't think I implied any of that.
<geri> > ""Substitution Model"" itself a consequence of ""eval""
<DKordic> Expression is defined by it's Interpretation.
<DKordic> It seems You are confusing Language and it's Implementation.
<geri> look, i dont understand half the words you're saying
<geri> im confusing everything cause you use overly specialized lingo
<abu[7]> indeed :)
<abu[7]> I'm pragmatic, don't like the distinction between language and implementation
<geri> abu[7]: 日本語を練習しますか?
<DKordic> When a Lang can refer to it's own eval is _a_ reflection property.
<DKordic> geri: I have a challenge for You: Implement W/De_Bruijn_index .
<geri> abu[7]: there are differences between java pil and llvm pil though...
<abu[7]> ちょっと
<abu[7]> yes
<abu[7]> different languages
<geri> better than nothing :D
<geri> so you just treat them as completely different languages to not have to separate impl from the language ?
<abu[7]> but for Pil the definition *is* language :)
<geri> so every function i write extends the language B)
<abu[7]> yeah
<abu[7]> and you look up the definition to understand the language
<geri> "pragratic" because you avoid the "we wrote a spec for a language that cannot possibly be implemented"?
<geri> funni lambda calculus DKordic
<abu[7]> DKordic; De_Bruijn_index is '@' in Pil
<abu[7]> (in two variations)
<geri> damn
<DKordic> abu[7]: Yes... an approximation.
<abu[7]> ok
<geri> why were function calls expensive in C? abu[7]
<DKordic> geri: ""Lambda Calculus"" is to Combinators as ""Roman Numbers"" is to Numbers.
<abu[7]> just a little expensive
<geri> pushing a pointer doesnt sound all that slow...
<abu[7]> passing vars
<abu[7]> T
<abu[7]> But there is also the jump
<abu[7]> push and jump
<geri> loops do jumps all the time though
<abu[7]> loses cached code
<geri> ah
<abu[7]> a loop stays in the cache
<abu[7]> if small enough
<geri> fair
<abu[7]> thus C uses inline
<abu[7]> or PilSrc
<geri> oh you reminded me
<geri> have you written much pilsrc outside of pil interpreter itself? :D
<abu[7]> never :)
<abu[7]> well
<abu[7]> the two libs
<geri> write something for fun ;)
<abu[7]> ext and ht
<abu[7]> T
<geri> show me hello world in pilsrc :DD
<geri> DKordic: who needs accurate counting past 10 anyway
<abu[7]> wrong
<geri> what does $ do?
<abu[7]> only single '\'
<geri> also what does Exe signify
<abu[7]> It createt a contant string
<abu[7]> Exe is the arg lis
<abu[7]> t
<abu[7]> unused here
<geri> that reminded me, why does arg list seem to include function name?
<geri> i think youre getting cdr of exe every time in llvm code
<abu[7]> T
<abu[7]> It is needed sometimes
<abu[7]> eg. method calls
<abu[7]> You need the symbol
<abu[7]> also for debug
<geri> car of exe is the symbol called itself?
<abu[7]> (de f ..) (setq g f)
<abu[7]> (f ..)
<abu[7]> T, like 'f' or 'g' here
<abu[7]> The value of 'meth' is stored in all message symbolt
<abu[7]> (dm foo> () ...
<abu[7]> (== foo> meth) -> T
<geri> "the value of meth" sounds pretty funny
<geri> :D
<abu[7]> : meth
<abu[7]> -> 5928825908088
<abu[7]> :
<geri> foo> and meth take same arguments or no?
<geri> oh wait i think i got it
<abu[7]> : put!>
<abu[7]> -> 5928825908088
<abu[7]> ok
<geri> using the symbol name you get which method to call on the object
<abu[7]> yes
<geri> makes sense
<abu[7]> searches the inheritance tree
<geri> yeah
<geri> i think there was some point at which linear search in a linked list is faster than a hash map because less overhead
<abu[7]> if the list is short enough
<abu[7]> It is traversed before the hash is calculated
<geri> does splitting the list into many lists a la bucketing in hash tables help with performance? 🤔
<abu[7]> possibly
<abu[7]> hard to say in gereral
<abu[7]> *general
<geri> maybe one day ill get some benchmarks :)
<abu[7]> good
<geri> btw, what's the story with you going to live to japan for years?
<abu[7]> in the future?
<geri> in the past :D
<geri> you said you were there for 6 years i think?
<geri> i wonder how you ended up there
<abu[7]> Yes, in one piece, but also shorter periods before and after
<abu[7]> 1981 ... 1986
<geri> 😲
<geri> that's so long ago
<abu[7]> Tourist in 1977 for 3 months
<abu[7]> then again in 1979
<abu[7]> then a research schorarship
<geri> ah
<abu[7]> later a working visa
<geri> sounds fun
<abu[7]> I went back to DE in 1986 but still worked for that japanese company in 札幌
<abu[7]> till 1994 or so
<abu[7]> So I went to Japan ewery few months
<geri> i knew that name but forgot :(
<geri> thank god its few months and not every week
<geri> sounds pretty eventful
<geri> what were you researching?
<abu[7]> Low Temperature humidity measurements
<abu[7]> I'm a meteorologist
<abu[7]> (back then ;)
<abu[7]> The is a low temp institute ie Hokkaido Daigaku
<abu[7]> s/ie/in
<geri> wait, are you working with metorologist degree as a programmer? :D
<abu[7]> T
<abu[7]> Never worked as a meteorologist
<geri> kinda sad
<abu[7]> Not at all
<abu[7]> Computers were far more interesting at that time
<abu[7]> The first micros
<abu[7]> I build them for my measurements
<geri> so you got into computers cause you needed them for meteorology?
<abu[7]> So I got deep into soldering the hardware
<abu[7]> yes
<geri> well then not as sad
<abu[7]> and I needed to write my own software
<geri> got a passion, a wife and language skills for that degree :D
<abu[7]> cause there was none
<abu[7]> indeed :)
<abu[7]> language skills are rather gone though
<geri> refreshing them for you is gonna be infinitely easier than for me to learn it from scratch
<abu[7]> true, and I can ask 雅子 :)
<geri> :D
<abu[7]> btw, Steno has nice Kanji input
<abu[7]> 日本語
<geri> very nice
<geri> setting up japanese inputs on nixos was hell
<abu[7]> oh
<geri> but now itll pretty much never break, so thats nice
<abu[7]> 👍
<geri> okay, i gotta start winding down
<geri> laters
<abu[7]> ok, see you! :)
<geri> 👋
geri has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
<DKordic> abu[7]: We can Implement Continuations if We "con" appropriate "Prg", right?
<DKordic> Something like ret Addr.
<abu[7]> DKordic: A continuation can be implemented in a coroutine if I understand continuations right
<abu[7]> An independent first class execution context
<abu[7]> afk
aw- has quit [Ping timeout: 246 seconds]
aw- has joined #picolisp
aw- has quit [Ping timeout: 252 seconds]