<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]
<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).
<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