rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest15636 has quit [Quit: Lost terminal]
ayuce has joined #lisp
jruiz has joined #lisp
pjb has joined #lisp
mono has joined #lisp
monok has quit [Ping timeout: 272 seconds]
CrazyPython has quit [Remote host closed the connection]
CrazyPython has joined #lisp
Josh_2 has quit [Ping timeout: 272 seconds]
dale has joined #lisp
dddddd has quit [Remote host closed the connection]
wsinatra has quit [Quit: WeeChat 2.8]
CrazyPython has quit [Remote host closed the connection]
CrazyPython has joined #lisp
lxbarbosa has quit [Ping timeout: 246 seconds]
nwoob has joined #lisp
Fare has quit [Ping timeout: 246 seconds]
mono has quit [Remote host closed the connection]
jruiz has quit [Remote host closed the connection]
refpga has quit [Ping timeout: 272 seconds]
Fare has joined #lisp
pjb has quit [Ping timeout: 272 seconds]
turona has quit [Ping timeout: 272 seconds]
turona has joined #lisp
VPS has quit [Quit: Departure requested.]
lonjil2 has joined #lisp
cgw has joined #lisp
ArthurStrong has quit [Ping timeout: 260 seconds]
ArthurStrong has joined #lisp
refpga has joined #lisp
shifty has quit [Remote host closed the connection]
shifty has joined #lisp
corpix has quit [Ping timeout: 240 seconds]
efm has quit [Ping timeout: 264 seconds]
cgw has quit [Ping timeout: 256 seconds]
corpix has joined #lisp
efm has joined #lisp
cgw has joined #lisp
ahungry has joined #lisp
CrazyPython has quit [Ping timeout: 260 seconds]
cgw has quit [Remote host closed the connection]
__jrjsmrtn__ has quit [Ping timeout: 240 seconds]
_jrjsmrtn has joined #lisp
ArthurStrong has quit [Ping timeout: 246 seconds]
ArthurStrong has joined #lisp
<beach>
Good morning everyone!
<ArthurStrong>
beach: good morning indeed
<no-defun-allowed>
marcoxa: Is it supposed to be read as "HEAP" or "HELP"?
<no-defun-allowed>
Or as ηελρ but uppercase?
entel has quit [Quit: Connection closed for inactivity]
vlatkoB has joined #lisp
shka_ has joined #lisp
rwcom34 has quit [Read error: Connection reset by peer]
rwcom34 has joined #lisp
zaquest has joined #lisp
pilne has quit [Quit: Say What?]
ArthurStrong has quit [Quit: leaving]
ayuce has quit [Remote host closed the connection]
Bike has quit [Quit: Lost terminal]
jeosol has joined #lisp
Nilby has joined #lisp
Archenoth has joined #lisp
refpga has quit [Ping timeout: 246 seconds]
renzhi_ has quit [Ping timeout: 260 seconds]
pjb has joined #lisp
toorevitimirp has joined #lisp
torbo has quit [Remote host closed the connection]
refpga has joined #lisp
ahungry has quit [Remote host closed the connection]
pjb has quit [Ping timeout: 244 seconds]
shifty has quit [Ping timeout: 265 seconds]
rwcom34 has quit [Quit: Ping timeout (120 seconds)]
rwcom34 has joined #lisp
rwcom341 has joined #lisp
whythat has joined #lisp
rwcom34 has quit [Ping timeout: 260 seconds]
CrazyEddy has quit [Remote host closed the connection]
notzmv has quit [Ping timeout: 260 seconds]
whythat has quit [Ping timeout: 240 seconds]
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
sdumi has quit [Ping timeout: 272 seconds]
gravicappa has joined #lisp
narimiran has joined #lisp
shka_ has quit [Ping timeout: 265 seconds]
shka_ has joined #lisp
sdumi has joined #lisp
refpga has quit [Ping timeout: 260 seconds]
refpga has joined #lisp
Oladon has quit [Quit: Leaving.]
theosvoitha has joined #lisp
JohnMS_WORK has joined #lisp
Nilby has quit [Quit: 👽愛🆑]
whythat has joined #lisp
whythat has quit [Ping timeout: 240 seconds]
epony has quit [Ping timeout: 258 seconds]
Oladon has joined #lisp
epony has joined #lisp
wxie has joined #lisp
MilenaDevi has joined #lisp
shifty has joined #lisp
MilenaDevi has quit [Client Quit]
toorevitimirp has quit [Ping timeout: 260 seconds]
holycow has joined #lisp
ayuce has joined #lisp
gxt has quit [Quit: WeeChat 2.8]
ayuce has quit [Read error: Connection reset by peer]
gxt has joined #lisp
whythat has joined #lisp
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
random-nick has joined #lisp
whythat has quit [Ping timeout: 240 seconds]
Fare has quit [Ping timeout: 240 seconds]
ayuce has joined #lisp
wxie has quit [Ping timeout: 244 seconds]
Jesin has quit [Ping timeout: 256 seconds]
duncan_ has joined #lisp
ljavorsk has joined #lisp
sz0 has joined #lisp
Oladon has quit [Quit: Leaving.]
ljavorsk has quit [Remote host closed the connection]
ljavorsk has joined #lisp
pjb has joined #lisp
karlosz has quit [Quit: karlosz]
Cymew has joined #lisp
karlosz has joined #lisp
rogersm has quit [Quit: Leaving...]
asarch has joined #lisp
orivej_ has quit [Ping timeout: 260 seconds]
redeemed has joined #lisp
Bourne has quit [Remote host closed the connection]
pjb has quit [Ping timeout: 272 seconds]
SGASAU has joined #lisp
whythat has joined #lisp
Aishawhite has joined #lisp
Aishawhite has quit [Client Quit]
jprajzne has joined #lisp
pve has joined #lisp
rgherdt has joined #lisp
doomlist3 has joined #lisp
rogersm has joined #lisp
holycow has quit [Quit: leaving]
nopf has joined #lisp
pjb has joined #lisp
ggole has joined #lisp
<doomlist3>
in functional programming if i print something is it purely functional?
<beach>
Who cares?
<beach>
Common Lisp is not a functional programming language in that sense anyway.
<edgar-rft>
doomlist3: if you're using a printing device that returns a value depending on whether "something" was printed or not, then yes
nwoob`` has joined #lisp
nwoob has quit [Ping timeout: 258 seconds]
Bourne has joined #lisp
elinow has joined #lisp
jeosol has quit [Remote host closed the connection]
<no-defun-allowed>
Probably not, but it wasn't a side effect that, say, the Scheme developers must have cared about. There, the relevant function is named DISPLAY, not DISPLAY!
<ralt>
any I/O should be considered a side effect
<Shinmera>
purely functional programming is purely useless because you can't put your result anywhere.
<ralt>
which is why you have monads
whythat has quit [Ping timeout: 240 seconds]
<ralt>
I mean, all told, a monad in X is just a monoid in the category of endofunctors of X, with product × replaced by composition of endofunctors and unit set by the identity endofunctor.
<ralt>
(yes, I copy pasted that)
Jesin has joined #lisp
<phoe>
the construct of a monad is required in the purely functional languages because it makes them actually useful - as Shinmera said, even if a program can accept input as a part of its source code, it can't store the result anywhere without a monad that bridges the pure world of computation and the impure world of side effects
<phoe>
this implies that CL doesn't really need them, as an "impure" language
<p_l>
the not-really-a-monad haskell monads were created as "nice hack" by Glasgow University to make IO in Haskell not suck
<p_l>
before that, all I/O had to be wrapped in functions that consumed Future and returned Past
<p_l>
which is a bit of a bother, believe me
* phoe
moves to #lispcafe
rogersm has quit [Quit: Leaving...]
doomlist3 has quit [Ping timeout: 260 seconds]
<MichaelRaskin>
People do use monads in Common Lisp / Scheme, usefully — for some data structure generalisations, for instance
nmg has joined #lisp
IRC-Source_21 has joined #lisp
doomlist3 has joined #lisp
<p_l>
they make sense when you explicitly want to encapsulate certain behaviours, instead of the Haskell sense of "we need a trapdoor out of purity"
rwcom341 has quit [Remote host closed the connection]
<Odin->
It seems to me that CL tries to make whatever paradigm of programming you want to use available to you, rather than being particularly opinionated on any of them.
rwcom341 has joined #lisp
* White_Flame
again, as always also points to "functional programming" also naming a style of programming where you pass around first-class function objects
<p_l>
well, yeah, purity invasion happened long after Lisp defined functional programming
whythat has joined #lisp
<phoe>
yes, there's a difference between functional programming as functions-as-first-class-objects and functional programming as in force-all-side-effects-into-cages
<phoe>
Lisp is in the first camp
<White_Flame>
and of course if you're passing them around to be called willy-nilly, they'll usually be functional-in-the-mathematical sense because side effects will stack, but that only describes that function, not the entire system
<p_l>
to put it into perspective - lisp happened few years after McCarthy introduced modern-looking IF statement to the world
<Odin->
I rather suspect that JavaScript's use of that paradigm means it's disregarded as a serious thing by many.
<Odin->
And in that sense, JS is _heavily_ functional.
<aeth>
you generally want side effects at the outermost layer if possible... but when you can't, that's what streams in dynamic variables are for... just rebind *standard-output*
rwcom341 has quit [Quit: Ping timeout (120 seconds)]
rwcom341 has joined #lisp
<White_Flame>
Odin-: yeah, I wonder if there's a clear distinction between continuation-oriented imperative functions and transformative functions for things like the MAP functions
<White_Flame>
in terms of style
pjb has quit [Ping timeout: 265 seconds]
akoana has quit [Remote host closed the connection]
<phoe>
aeth: in a way, (with-output-to-string (*standard-output* ...) ...) is a purifying operation
<aeth>
:o
akoana has joined #lisp
<aeth>
that's a good point... I've never noticed
<no-defun-allowed>
(I mean, Haskell has a monad for "localised" state, which is not dissimilar in purpose to with-output-to-string.)
rwcom341 has quit [Quit: Ping timeout (120 seconds)]
rwcom341 has joined #lisp
<no-defun-allowed>
(ST, I believe)
<aeth>
And another angle to look at is, I use with-output-to-string a lot in macros... which makes sense, since the DEFMACRO itself must be pure (with some caveats we discussed the other day)
ljavorsk_ has joined #lisp
ljavorsk has quit [Remote host closed the connection]
heisig has joined #lisp
asarch has quit [Quit: Leaving]
jonatack has quit [Quit: jonatack]
fourier has joined #lisp
rogersm has joined #lisp
jonatack has joined #lisp
sdumi has quit [Read error: Connection reset by peer]
sdumi has joined #lisp
joshcom has joined #lisp
ljavorsk_ has quit [Remote host closed the connection]
nwoob`` has quit [Read error: Connection reset by peer]
nwoob`` has joined #lisp
IRC-Source_21 has quit [Ping timeout: 240 seconds]
liberliver has joined #lisp
varjag has joined #lisp
karlosz has quit [Quit: karlosz]
davsebam1e has joined #lisp
McParen has joined #lisp
flazh has quit [Quit: flazh]
Necktwi has joined #lisp
milanj has joined #lisp
davsebamse has quit [Ping timeout: 260 seconds]
flazh has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
entel has joined #lisp
joshcom has quit [Ping timeout: 272 seconds]
karswell_ has joined #lisp
ebrasca has joined #lisp
Necktwi has quit [Ping timeout: 265 seconds]
nwoob`` has quit [Ping timeout: 265 seconds]
ljavorsk has joined #lisp
motersen has joined #lisp
scymtym_ has joined #lisp
scymtym has quit [Ping timeout: 264 seconds]
dddddd has joined #lisp
rgherdt has quit [Ping timeout: 272 seconds]
rogersm has quit [Ping timeout: 240 seconds]
scymtym_ has quit [Remote host closed the connection]
joshcom has joined #lisp
refpga has quit [Ping timeout: 246 seconds]
scymtym has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
refpga has joined #lisp
pjb has joined #lisp
marcoxa has joined #lisp
Lord_of_Life_ has joined #lisp
cosimone has joined #lisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
rgherdt has joined #lisp
theosvoitha has quit [Quit: Connection closed for inactivity]
rgherdt has quit [Read error: Connection reset by peer]
<jmercouris>
so subseq complains if we go PAST the bounds of a list, alternative?
<jmercouris>
to set the maximum length of a list?
<jmercouris>
(subseq listy 0 5) ;; problem when list length less than 5
jonatack has quit [Ping timeout: 246 seconds]
jonatack has joined #lisp
<phoe>
jmercouris: (subseq list 0 (min 5 (length list)))
<jmercouris>
ah, I didn't think of min
<jmercouris>
thank you
<jmercouris>
I was going to use a conditional
joshcom has quit [Ping timeout: 260 seconds]
<phoe>
that's equivalent
<jmercouris>
I know, but it looks nicer with min
monokrom has joined #lisp
shangul has joined #lisp
fourier has quit [Ping timeout: 260 seconds]
bitmapper has joined #lisp
<Shinmera>
(loop for el in list repeat 5 collect el)
<Shinmera>
avoids potentially counting a long list.
<jmercouris>
right because length wont break out
cosimone has quit [Quit: Quit.]
<Xach>
this is a chance to use the underused ldiff
<Xach>
not a good chance but a chance nonetheless
rozenglass has quit [Ping timeout: 272 seconds]
* Shinmera
muses about a 'symbol popularity poll'
<jmercouris>
could write a nice little script to figure out
pjb has quit [Ping timeout: 272 seconds]
<jmercouris>
that could actually be really useful to know
<phoe>
I vote for NIL
<Xach>
I thought SIGNUM was obscure but then someone told me "oh if you use fortran a lot it's obvious"
<Xach>
owned by fortranners
<Shinmera>
Signum is nice but I often have to write a SIGNUM* that makes 0 be +1
gxt has quit [Ping timeout: 240 seconds]
nwoob`` has joined #lisp
karswell_ is now known as karswell
gxt has joined #lisp
nwoob`` has quit [Ping timeout: 272 seconds]
rozenglass has joined #lisp
rogersm has joined #lisp
rogersm has quit [Ping timeout: 240 seconds]
Bike has joined #lisp
nwoob`` has joined #lisp
fourier has joined #lisp
<flip214>
I oppose NIL and so want T, or perhaps :T to sit on the throne, just because
<MichaelRaskin>
For me «signum» is «yes, that's how we always read sgn in formulas on the blackboard»
cosimone has joined #lisp
Plazma has joined #lisp
doomlist3 has quit [Ping timeout: 272 seconds]
refpga has quit [Ping timeout: 260 seconds]
gko has joined #lisp
<jmercouris>
Shinmera: I'm getting Binding stack exhausted. with Plump
<froggey>
calculated by instrumenting the mezzano reader (counting whenever a symbol was read) and doing a full build, so this includes mezzano and a bunch of supporting libraries
nmg` has joined #lisp
nmg has quit [Remote host closed the connection]
<phoe>
froggey: surprisingly satisfying
IRC-Source_21 has joined #lisp
<phoe>
I however find your lack of LOAD-LOGICAL-PATHNAME-TRANSLATIONS worrying
<pjb>
jmercouris: (defun length-to (list n) (loop for len from 0 while (and list (plusp n)) do (decf n) (pop list) finally (return len))) (length-to '(1 2 3) 5) #| --> 3 |# (length-to '(1 2 3 4 5 6 7 8 9) 5) #| --> 5 |#
rogersm has joined #lisp
shifty has quit [Ping timeout: 260 seconds]
Guest35617 has quit [K-Lined]
duuqnd has quit [Read error: Connection reset by peer]
duuqnd has joined #lisp
Fare has joined #lisp
rpg has joined #lisp
red-dot has joined #lisp
<Shinmera>
froggey: That's... surprisingly in line with what I expected!
<Shinmera>
I was intending on doing this with the Eclector reader, but hooking intern to just count instead.
dvdmuckle has quit [Remote host closed the connection]
<Shinmera>
Maybe some other day, though.
dvdmuckle has joined #lisp
rogersm has quit [Quit: Leaving...]
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
shka_ has quit [Ping timeout: 272 seconds]
shka_ has joined #lisp
patlv has joined #lisp
amerlyq has joined #lisp
IRC-Source_2162 has joined #lisp
IRC-Source_21 has quit [Ping timeout: 260 seconds]
CrazyPython has quit [Read error: Connection reset by peer]
ChoHag has quit [Ping timeout: 264 seconds]
<flip214>
MichaelRaskin: swank:macroexpand-all? or simply COMPILE and then decompile.
<Bike>
lol simply.
liberliver has quit [Ping timeout: 265 seconds]
<MichaelRaskin>
flip214: well, you can also just call your compiler's macroexpand-all
ChoHag has joined #lisp
dale_ has joined #lisp
dale_ is now known as dale
theosvoitha has left #lisp [#lisp]
karswell has quit [Remote host closed the connection]
karswell_ has joined #lisp
<phoe>
(ql:quickload :trivial-macroexpand-all)
<phoe>
oh, it actually exists
<MichaelRaskin>
The more interesting question is how up to date it is, of course
<phoe>
20 Oct 2017
sjl_ has joined #lisp
<MichaelRaskin>
(Although all this does not matter, you start from top-level, that's the easy case)
ChoHag has quit [Ping timeout: 240 seconds]
liberliver has joined #lisp
ChoHag has joined #lisp
lonjil2 has quit [Quit: WeeChat 2.8]
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
<jmercouris>
(defparameter s (cl-ppcre:create-scanner "[A-Za-z]")) (cl-ppcre:scan s "</textarea>")
<jmercouris>
returns whereas I want ONLY strings with alphabetical ONLY
<jmercouris>
do I have to ^ at the front or something?
<jmercouris>
seems so...
<jmercouris>
I guess this does behave like Perl
igemnace has joined #lisp
<phoe>
one of the letters in PPCRE stands for Perl, so
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
IRC-Source_2162 has quit [Quit: Connection closed]
red-dot has joined #lisp
duuqnd has quit [Remote host closed the connection]
duuqnd has joined #lisp
theseb has joined #lisp
ayuce has quit [Remote host closed the connection]
theseb has quit [Read error: Connection reset by peer]
<jmercouris>
when in Lisp, how to print version and implementation?
theseb has joined #lisp
motersen has quit [Ping timeout: 260 seconds]
<theseb>
Are there different kinds of macros? i just read about reader, runtime, compile time and symbol macros!? The only kind i know are the kind that generate Lisp code....what kind is that?
<_death>
all of them generate lisp code
nmg` has quit [Remote host closed the connection]
<theseb>
_death: all the code generation and substitution all happens before evaluation of the final code so they all seem the same
<Bike>
there's no distinction of "runtime" and "compile time" macros
<Bike>
reader macros are different in that they operate in the reader, rather than later in the evaluator or compiler
<Bike>
symbol macros are just macros that transform symbol forms intead of cons forms
<Aurora_v_kosmose>
I'll probably go with fiddlerwoaroof's, CCL isn't available in my distro.
<jmercouris>
good luck if you are trying to do anything with Cocoa
<Aurora_v_kosmose>
Does messing with GNUstep/WMaker count?
<jmercouris>
2
<jmercouris>
no
<Aurora_v_kosmose>
Alright. Thanks.
<jmercouris>
no problem
<jmercouris>
so, no way to print current lisp implementation?
<Bike>
as travv0 said, it's lisp-implementation-type
<jmercouris>
oh I didn't see that
<jmercouris>
thank you travv0
whythat has joined #lisp
<travv0>
no problem
<Bike>
if you look at the "Environment" dictionary you can see there are also functions to get information about the OS or machine, if you want that too
<jmercouris>
what about *features*
<Bike>
what about it?
<jmercouris>
could I look there too?
<Bike>
sure, but it's not very standardized.
<Bike>
i think there's a library for doing some normalization
<jmercouris>
Bike: what is the "Environment" dictionary you are talking about?
<Bike>
in clhs.
<Bike>
up from the page travv0 linked.
<jmercouris>
I'm on that page
fourier has quit [Ping timeout: 260 seconds]
<jmercouris>
I don't see Environment
<jmercouris>
what do you mean "Up?"
<jmercouris>
oh the arrows
<marcoxa>
jmercouris quicklisp has a number of environment introspection functionalities, you could look at its guts. Same for UIOP, which caomes with ASDF (and which, IMHO, should be split from it).
marcoxa has quit [Quit: Time's up!]
hiroaki has joined #lisp
redeemed has quit [Quit: q]
ajb` has left #lisp ["ERC (IRC client for Emacs 25.2.2)"]
theseb has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 256 seconds]
ayuce has joined #lisp
scymtym_ has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
gko has quit [Ping timeout: 246 seconds]
whythat has quit [Ping timeout: 240 seconds]
shka_ has quit [Ping timeout: 246 seconds]
ayuce has quit [Remote host closed the connection]
shka_ has joined #lisp
ayuce has joined #lisp
whythat has joined #lisp
toorevitimirp has joined #lisp
shangul has quit [Ping timeout: 265 seconds]
jeosol has joined #lisp
red-dot has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
rozenglass has quit [Quit: WeeChat 2.3]
rozenglass has joined #lisp
notzmv has joined #lisp
jmarciano has joined #lisp
shka_ has quit [Ping timeout: 256 seconds]
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
ayuce has quit [Remote host closed the connection]
ayuce has joined #lisp
akoana has left #lisp ["Leaving"]
nwoob``` has joined #lisp
nwoob`` has quit [Ping timeout: 260 seconds]
rogersm has joined #lisp
gravicappa has quit [Ping timeout: 256 seconds]
rumbler3117 has joined #lisp
gravicappa has joined #lisp
rogersm has quit [Quit: Leaving...]
phoe is now known as phoe_krk
phoe_krk is now known as phoe
IRC-Source_21 has joined #lisp
rgherdt has quit [Quit: Leaving]
rumbler3117 has quit [Ping timeout: 245 seconds]
whythat has quit [Ping timeout: 240 seconds]
efm_ has joined #lisp
efm_ has quit [Client Quit]
efm has quit [Ping timeout: 265 seconds]
whythat has joined #lisp
|Pirx| has joined #lisp
whythat has quit [Ping timeout: 240 seconds]
ahungry has quit [Ping timeout: 260 seconds]
whythat has joined #lisp
ahungry has joined #lisp
efm has joined #lisp
rumbler3161 has joined #lisp
IRC-Source_21 has quit [Ping timeout: 258 seconds]
Bourne has quit [Read error: Connection reset by peer]
ayuce has left #lisp ["ERC (IRC client for Emacs 28.0.50)"]
jmarciano has quit [Read error: Connection reset by peer]
whythat has quit [Quit: whythat]
karlosz has joined #lisp
ebrasca has joined #lisp
seok has quit [Ping timeout: 245 seconds]
sauvin has quit [Ping timeout: 265 seconds]
vutral has joined #lisp
vutral has quit [Changing host]
vutral has joined #lisp
shifty has joined #lisp
marcoxa has joined #lisp
xuxuru has joined #lisp
<gendl>
marcoxa: uiop is indeed split from asdf. We build production Gendl images which contain uiop but not asdf.
<Fare>
The hard problem is not splitting uiop from asdf. The hard problem is convincing vendors to deliver the two as separate modules.
<gendl>
the monolithic compile bundle stuff in asdf is a bit broken though the last time I checked for the case of systems which depend-on uiop — so we have to include its fasl explicitly in the build.
<Fare>
(although there *are* interesting issues with splitting uiop from asdf, they are comparatively simple)
<gendl>
yes, asdf by default comes as one inseparable thingie including uiop. You have to clone asdf sources to get uiop as a separate item. Or (I think) you can get it (some version of it) thru Quicklisp.
Bourne has joined #lisp
duuqnd has quit [Quit: Leaving]
Josh_2 has quit [Remote host closed the connection]
<phoe>
"It must be the case that the function or macro named by access-fn evaluates all of its arguments."
<phoe>
if I understand this correctly, then 'X must be evaluated to produce X in jackdaniel's example
random-nick has quit [Ping timeout: 272 seconds]
<phoe>
to have it consistent with (abc *something* 'x 1) which would be a function call or a macro call that evaluates all arguments
shka_ has quit [Ping timeout: 256 seconds]
dddddd has quit [Ping timeout: 258 seconds]
<Bike>
evaluated by the expansion.
<jackdaniel>
I'm not using ccl daily, but when I do it often surprises me how it got right things which are wrong/unsatisfying in ecl and even in sbcl
<phoe>
Bike: I don't understand, evaluated by the expansion
<Bike>
okay, so when you write a long form defsetf you're kind of writing a macroexpander.
<phoe>
no no, I understand that
<Bike>
the macroexpander gets forms.
<phoe>
it's just that this sentence says nothing about the expansion; just about the original function for which we define setf
<Bike>
i just mean the macroexpander isn't going to get the symbol X if you write (abc 'x), because evaluation isn't don eyet.
<phoe>
yes, it gets (QUOTE X) at that point
<phoe>
but I mean that if ACCESS-FN must evaluate all its arguments, then it seems weird if SETF ACCESS-FN does something different
<Bike>
well yes, but that doesn't affect what the macroexpander gets.
<phoe>
that's correct
<Bike>
the thing is that defsetf also has to arrange that the macroexpander doesn't have to take care of once-only.
<Bike>
so the expander doesn't get the actual input forms.
<phoe>
...this gets complicated really quickly though
<phoe>
...so if it gets a &key, it should actually recognize that it is given quoted symbols, unquote them, and properly bind them
<jackdaniel>
setf expansions are a real brain stretch :)
<phoe>
worse, what if it's given symbols bound to lexical variables, or provided via function calls
<phoe>
oh golly
<jackdaniel>
either way there is a bug, I'm happy with this conclusion and I carry on :)
<jackdaniel>
no-defun-allowed: thank you for fixing the issue in flexichain for ecl
<jackdaniel>
or, to be correct, thank you kpoeck, got mislead by the commiter
<phoe>
no-thanks-allowed
<Bike>
if defsetf has to handle keywords but also work like a function then it probably can't handle keywords that will be evaluated. sorta like define-compiler-macro.
<Bike>
i figure the spec writers just did not consider this scenario.
<phoe>
so, basically, all symbols that aren't from the KEYWORD package and that don't name constants
<phoe>
it should be possible to defer some lambda list parsing to execution-time though, if that's required
<Bike>
i mean, say you have a function foo with lambda list (&key x), and you write a defsetf foo, and then you write (setf (foo y 4) nv). what's the defsetf expander get?
<Bike>
y might evaluate to be :x, or it might not.
<phoe>
that should be doable with a execution-time destructuring-bind that will signal a destructuring error if Y does not evaluate to :X and will signal a compile-time warning if Y turns out to be unbound
<phoe>
dirty and execution-time, but would work
<Bike>
what, like, it expands the macro at runtime and evaluates the result?
<Bike>
or you expand the macro ahead of time under the assumption that x will be the 4 form?
<phoe>
the macro expands into something like (let ((args (list y 4))) (destructuring-bind (&key x) args ...))
<markasoftware>
cool, string1 and string2 are indeed string designators
<markasoftware>
i would never have guessed. Thank you!
<pjb>
(find-symbol name #.(package-name *package*)) contains a string in the source, while (find-symbol name #.*package*) contains a package. The CL system may have difficulties storing the package in the object file when compiling this.
<Fare>
or, use Scheme hygienic macros.
jeosol has quit [Remote host closed the connection]
<aeth>
oh, weird, I'd normally intern or manually stringify in such situations
<markasoftware>
i had no idea string designators worked for all these functions, including string-downcase and stuff