brettg_ has quit [Remote host closed the connection]
dddddd has quit [Remote host closed the connection]
smokeink has quit [Ping timeout: 248 seconds]
terpri has quit [Ping timeout: 276 seconds]
karlosz has quit [Quit: karlosz]
elfmacs has joined #lisp
robotoad has quit [Quit: robotoad]
robotoad has joined #lisp
Guest56583 has quit [Remote host closed the connection]
itruslove has quit [Remote host closed the connection]
xrash has quit [Ping timeout: 260 seconds]
itruslove has joined #lisp
robotoad has quit [Quit: robotoad]
giraffe has joined #lisp
giraffe is now known as Guest76646
aindilis has quit [Remote host closed the connection]
EvW1 has quit [Ping timeout: 240 seconds]
jasmith has joined #lisp
aindilis has joined #lisp
milanj__ has quit [Quit: This computer has gone to sleep]
doesthiswork has quit [Quit: Leaving.]
Pixel_Outlaw has joined #lisp
karlosz has joined #lisp
Khisanth has quit [Ping timeout: 248 seconds]
okok111 has joined #lisp
xrash has joined #lisp
kristof has joined #lisp
<kristof>
So, uh
<kristof>
I have stumbled onto something quite accidentally that I read about exactly once in an erik naggum flamewar and I would like to know where in the spec this particular behavior is described
zachk has quit [Quit: Leaving]
<Bike>
enticing.
<kristof>
(defvar variable-name) (defun function-name (variable-name) ;;body) will *bind* variable-name to the value
<Bike>
you mean, will be a special binding? yes.
<aeth>
expected
Kundry_W_ has joined #lisp
<aeth>
I wonder, is there a portability library for lexical globals? Is it common enough?
<kristof>
there's no need due to naming conventions
<kristof>
I just chose to eschew the naming conventions today and immediately discovered why there are naming conventions
Khisanth has joined #lisp
Kundry_Wag has quit [Ping timeout: 264 seconds]
<Bike>
so if you're asking what says this is the case, it's described in
<Bike>
"When used in a proclamation, a special declaration specifier applies to all bindings as well as to all references of the mentioned variables."
<Bike>
and defvar/parameter make such a proclamation.
<aeth>
There are so many fun ways to avoid globals. You can create a closure by putting one or more defuns in a top-level let, for instance. Or you could create a macro that tracks what you want to track.
<kristof>
Ok, my confusion has been dispelled.
<kristof>
I do like globals. They're in the language, and special bindings are unique among all the lexically scoped languages that they deserve to be understood and used.
<aeth>
This is one way I avoided having a global variable via a macro: (let (... (version (if (fboundp name) (multiple-value-bind (value version) (funcall (fdefinition name)) (declare (ignore value)) (if (and version (integerp version)) (incf version) 1)) 0))) ...)
<aeth>
I turned the second return value into the version counter for redefinitions
<kristof>
I was actually using a defvar in this case to specify a dynamically scoped value that I just didn't want to pass as an argument. I find that valuable
<kristof>
I do wonder why there wasn't a lexical declaration
<aeth>
That does make sense, but I find that the things that make sense as special variables usually already exist (things like *standard-output*)
gabiruh has quit [Ping timeout: 240 seconds]
<kristof>
and why it wasn't enforced for, say, defun params
okok111 has quit [Quit: Page closed]
<Bike>
if you declare a variable special _locally_, and then bind it again in that extent, that binding will be lexical, so no need for a declaration
<Bike>
proclaiming something globally special is extra special
test1600_ has quit [Ping timeout: 244 seconds]
catern has quit [Excess Flood]
kdas_ is now known as kushal
SenasOzys has joined #lisp
SenasOzys has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 248 seconds]
SenasOzys has joined #lisp
caltelt has joined #lisp
pierpal has joined #lisp
quazimodo has joined #lisp
kristof has quit [Remote host closed the connection]
nickenchuggets has quit [Read error: Connection reset by peer]
nickenchuggets has joined #lisp
nickenchuggets has quit [Changing host]
nickenchuggets has joined #lisp
stacksmith1 has joined #lisp
potatonomicon has joined #lisp
SenasOzys__ has joined #lisp
slyrus1 has joined #lisp
Plazma_ has joined #lisp
tazjin_ has joined #lisp
borodust- has joined #lisp
nckx- has joined #lisp
asedeno_ has joined #lisp
caltelt_ has joined #lisp
sakalli_ has joined #lisp
mrm_ has joined #lisp
vertigo_ has joined #lisp
vert2_ has joined #lisp
nimiux_ has joined #lisp
tessier_ has joined #lisp
nimiux_ has quit [Changing host]
nimiux_ has joined #lisp
eagleflo_ has joined #lisp
ineiros_ has joined #lisp
tessier_ has quit [Changing host]
tessier_ has joined #lisp
reverse_1ight has joined #lisp
impulse- has joined #lisp
justinmcp has joined #lisp
parjanya` has joined #lisp
eli_oat has joined #lisp
buffergn0me has joined #lisp
juristi1 has joined #lisp
robotoad has joined #lisp
dlowe_ has joined #lisp
stacksmith has quit [Ping timeout: 240 seconds]
tazjin has quit [Ping timeout: 240 seconds]
aeth has quit [Ping timeout: 240 seconds]
charh has quit [Ping timeout: 240 seconds]
vert2 has quit [Ping timeout: 240 seconds]
jxy has quit [Ping timeout: 240 seconds]
saturn2 has quit [Ping timeout: 240 seconds]
nimiux has quit [Ping timeout: 240 seconds]
uint has quit [Ping timeout: 240 seconds]
phadthai_ has joined #lisp
flazh has joined #lisp
Bike has joined #lisp
lansiir has joined #lisp
runejuhl has quit [Ping timeout: 240 seconds]
k-hos has quit [Ping timeout: 240 seconds]
Ober has quit [Ping timeout: 240 seconds]
Bike has quit [Ping timeout: 240 seconds]
parjanya has quit [Ping timeout: 240 seconds]
flazh has quit [Ping timeout: 240 seconds]
juristi has quit [Ping timeout: 240 seconds]
dlowe has quit [Ping timeout: 240 seconds]
benny has quit [Ping timeout: 240 seconds]
Younder has quit [Ping timeout: 240 seconds]
elts has quit [Ping timeout: 240 seconds]
cmatei has quit [Ping timeout: 240 seconds]
Plazma has quit [Ping timeout: 240 seconds]
justinmcp_ has quit [Ping timeout: 240 seconds]
eagleflo has quit [Ping timeout: 240 seconds]
bend3r has quit [Ping timeout: 240 seconds]
asedeno has quit [Ping timeout: 260 seconds]
nckx has quit [Ping timeout: 260 seconds]
slyrus has quit [Ping timeout: 260 seconds]
borodust has quit [Ping timeout: 260 seconds]
dieggsy has quit [Ping timeout: 260 seconds]
sakalli has quit [Ping timeout: 260 seconds]
mrm has quit [Ping timeout: 260 seconds]
asedeno_ has joined #lisp
tazjin_ has joined #lisp
vert2_ has joined #lisp
cmatei_ has joined #lisp
xrash has quit [Ping timeout: 260 seconds]
HDurer has quit [Ping timeout: 260 seconds]
kori has quit [Ping timeout: 260 seconds]
vertigo has quit [Ping timeout: 260 seconds]
tessier has quit [Ping timeout: 260 seconds]
phadthai has quit [Ping timeout: 260 seconds]
caltelt has quit [Ping timeout: 260 seconds]
SenasOzys has quit [Ping timeout: 260 seconds]
impulse has quit [Ping timeout: 260 seconds]
oldtopman has quit [Ping timeout: 260 seconds]
Murii_ has quit [Ping timeout: 260 seconds]
bexx_ has quit [Ping timeout: 260 seconds]
reverse_light has quit [Ping timeout: 260 seconds]
ineiros has quit [Ping timeout: 260 seconds]
asedeno_ has quit [Changing host]
vert2_ has quit [Changing host]
nckx- is now known as nckx
dlowe_ is now known as dlowe
slyrus1 is now known as slyrus
tazjin_ is now known as tazjin
stacksmith1 is now known as stacksmith
Younder has joined #lisp
lansiir has quit [Changing host]
saturn3 has joined #lisp
lansiir has joined #lisp
xrash has joined #lisp
xrash has quit [*.net *.split]
Younder has quit [*.net *.split]
flazh has quit [*.net *.split]
lansiir has quit [*.net *.split]
Bike has quit [*.net *.split]
phadthai_ has quit [*.net *.split]
nhandler_ has quit [*.net *.split]
phadthai has joined #lisp
Murii_ has joined #lisp
aeth has joined #lisp
runejuhl has joined #lisp
kori has joined #lisp
catern_ has joined #lisp
HDurer has joined #lisp
bend3r has joined #lisp
aeth has quit [Changing host]
aeth has joined #lisp
Ober has joined #lisp
beach` has joined #lisp
HDurer has quit [Changing host]
HDurer has joined #lisp
Bike has joined #lisp
lansiir has joined #lisp
flazh has joined #lisp
xrash has joined #lisp
Younder has joined #lisp
lansiir has quit [Max SendQ exceeded]
lansiir has joined #lisp
lansiir has quit [Changing host]
lansiir has joined #lisp
nhandler_ has joined #lisp
skapata has quit [Remote host closed the connection]
bexx_ has joined #lisp
beach has quit [Ping timeout: 256 seconds]
dieggsy has joined #lisp
saturn3 has quit [Quit: WeeChat 1.0.1]
catern_ is now known as catern
jxy has joined #lisp
clone_of_saturn has joined #lisp
clone_of_saturn is now known as saturn2
benny has joined #lisp
benny is now known as Guest49727
uint has joined #lisp
rumbler31 has joined #lisp
terpri has joined #lisp
Kundry_W_ has quit [Read error: Connection reset by peer]
kerframil has quit [Quit: Leaving]
Kundry_Wag has joined #lisp
k4rtik has joined #lisp
eli_oat has quit [Quit: Leaving.]
asedeno_ is now known as asedeno
aindilis has quit [Ping timeout: 240 seconds]
gabiruh has joined #lisp
pierpa has quit [Quit: Page closed]
gabiruh has quit [Ping timeout: 260 seconds]
bjorkintosh has quit [Quit: Leaving]
Kundry_Wag has quit []
deng_cn has quit [Remote host closed the connection]
deng_cn has joined #lisp
AetherWind has joined #lisp
NoNumber has joined #lisp
nickenchuggets has quit [Quit: Leaving]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
aindilis has joined #lisp
montxero has joined #lisp
k4rtik has quit [Ping timeout: 256 seconds]
k4rtik has joined #lisp
SaganMan has quit [Quit: WeeChat 1.6]
SaganMan has joined #lisp
gabiruh has joined #lisp
eli_oat has joined #lisp
Pixel_Outlaw has quit [Remote host closed the connection]
karlosz has quit [Quit: karlosz]
gabiruh has quit [Ping timeout: 260 seconds]
isospin has joined #lisp
SaganMan has quit [Quit: WeeChat 1.6]
SaganMan has joined #lisp
didi` has joined #lisp
<didi`>
Can I define methods on struct types?
<Bike>
if the defstruct doesn't have a head :type option, yes
<didi`>
Bike: Thank you.
<Bike>
try (find-class name nil). if you get a class, you can use it as a specializer for methods
<didi`>
Nice.
smokeink has joined #lisp
eli_oat has quit [Quit: eli_oat]
eli_oat has joined #lisp
shka_ has joined #lisp
k4rtik has quit [Ping timeout: 240 seconds]
eli_oat has quit [Client Quit]
eli_oat has joined #lisp
<didi`>
Hum, SBCL must do something interesting with the order of slots of a struct, because changing the order of the slots and redefining the struct freaks out the compiler.
brettgilio has joined #lisp
<Bike>
well, it uses that order for the internal data layout
smokeink has quit [Ping timeout: 244 seconds]
<Bike>
hypothetically i guess it could recognize that you only permuted them
<flip214>
didi`: just redefine the same struct a second time ;)
<flip214>
that will be silent.
<Bike>
redefining a structure class is undefined behavior
<Bike>
in sbcl's case it means anything using parts of the structure definition will need to be recompiled
SaganMan has quit [Remote host closed the connection]
<didi`>
Heh, I redefine structures all the time. :-P
<flip214>
me too.
<didi`>
"Ops, I forgot to add a specific slot. Redefining it, it is."
<flip214>
and ASDF's :SERIAL T takes care of recompilation most of the time
<Bike>
it's one of the criteria santa uses, you know
<flip214>
yeah, or changing a type afterwards...
<didi`>
Bike: :-P
<flip214>
Bike: that's not a strong argument in central europe
edgar-rft has quit [Quit: edgar-rft]
eli_oat has quit [Quit: eli_oat]
SaganMan has joined #lisp
andrei-n has joined #lisp
smokeink has joined #lisp
brettgilio has quit [Remote host closed the connection]
kark has quit [Ping timeout: 248 seconds]
eli_oat has joined #lisp
eli_oat has quit [Client Quit]
kark has joined #lisp
smokeink has quit [Ping timeout: 240 seconds]
pjb has quit [Remote host closed the connection]
Bike has quit [Quit: Lost terminal]
mflem has joined #lisp
elfmacs has quit [Remote host closed the connection]
pjb has joined #lisp
aindilis has quit [Ping timeout: 260 seconds]
elfmacs has joined #lisp
pjb has quit [Remote host closed the connection]
aindilis has joined #lisp
beach` is now known as beach
test1600 has joined #lisp
light2yellow has quit [Quit: light2yellow]
pjb has joined #lisp
test1600 has quit [Ping timeout: 260 seconds]
Inline_ has quit [Quit: Leaving]
gabiruh has joined #lisp
_cosmonaut_ has joined #lisp
<beach>
Good morning everyone!
montxero has quit [Ping timeout: 260 seconds]
gabiruh has quit [Ping timeout: 244 seconds]
<oni-on-ion>
good morning
vlatkoB has joined #lisp
didi` has left #lisp ["there are always reasons to /part"]
orivej has quit [Ping timeout: 268 seconds]
pjb has quit [Remote host closed the connection]
pjb has joined #lisp
pjb is now known as Guest33926
nckx- has joined #lisp
MoziM has joined #lisp
Guest33926 has quit [Remote host closed the connection]
nckx has quit [Ping timeout: 245 seconds]
nckx- is now known as nckx
Guest33926 has joined #lisp
brendyn has joined #lisp
Guest33926 has quit [Remote host closed the connection]
Guest33926 has joined #lisp
Guest33926 has quit [Ping timeout: 276 seconds]
gabiruh has joined #lisp
montxero has joined #lisp
Guest33926 has joined #lisp
gabiruh has quit [Ping timeout: 240 seconds]
Guest33926 has quit [Ping timeout: 256 seconds]
gector has quit [Read error: Connection reset by peer]
sauvin has joined #lisp
Guest33926 has joined #lisp
gector has joined #lisp
ku has joined #lisp
Guest33926 has quit [Remote host closed the connection]
buffergn0me has quit [Ping timeout: 248 seconds]
matijja has joined #lisp
edgar-rft has joined #lisp
potatonomicon has quit [Ping timeout: 240 seconds]
Oddity has quit [Ping timeout: 240 seconds]
Guest33926 has joined #lisp
shrdlu68 has joined #lisp
rippa has joined #lisp
Guest33926 has quit [Remote host closed the connection]
makomo has quit [Ping timeout: 240 seconds]
bexx_ has quit [Quit: see you]
Folkol has quit [Read error: Connection reset by peer]
Oddity has joined #lisp
Folkol has joined #lisp
dmiles has quit [Ping timeout: 244 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
Murii_ has quit [Remote host closed the connection]
gabiruh has quit [Ping timeout: 268 seconds]
muresanvlad_ has joined #lisp
trittweiler has quit [Ping timeout: 248 seconds]
trittweiler has joined #lisp
mooshmoosh has joined #lisp
Lord_Nightmare has joined #lisp
schweers has joined #lisp
caltelt_ has quit [Ping timeout: 264 seconds]
shrdlu68 has quit [Ping timeout: 268 seconds]
shrdlu68 has joined #lisp
crsc has quit [Quit: leaving]
<Myon>
svillemot: hi, are you taking over cl-interpol (#900623), or should I upload a fix?
captgector has joined #lisp
gector has quit [Ping timeout: 276 seconds]
pierpal has quit [Ping timeout: 240 seconds]
<svillemot>
Myon: I'll do it
saki has joined #lisp
<Myon>
svillemot: thanks
shrdlu68_ has joined #lisp
shrdlu68 has quit [Ping timeout: 265 seconds]
angavrilov has joined #lisp
shrdlu68 has joined #lisp
shrdlu68_ has quit [Client Quit]
shrdlu68 has quit [Ping timeout: 240 seconds]
gector has joined #lisp
chiyosaki has joined #lisp
shrdlu68 has joined #lisp
captgector has quit [Ping timeout: 265 seconds]
gabiruh has joined #lisp
<knobo>
I've made a live-reload prototype for clack. It works for files, but now I want to add support for reload when I recompile a function.
<knobo>
But it could get quite complicated.
<beach>
What is "clack"?
<knobo>
beach: Web application environment for Common Lisp
saki has quit [Ping timeout: 240 seconds]
<knobo>
I'm not shure if it would be possible to do what I want.
gector has quit [Ping timeout: 240 seconds]
chiyosaki has quit [Ping timeout: 260 seconds]
<knobo>
I want to find out what could be possible.
gabiruh has quit [Ping timeout: 268 seconds]
shrdlu68 has quit [Ping timeout: 244 seconds]
saki has joined #lisp
<knobo>
Like, if it is possible to trace the function call tree when an url is accessed, and send update to the browser when any of those functions are recompiled.
shrdlu68 has joined #lisp
saki has quit [Client Quit]
<akkad>
everyone knows about clack!
<blep-on-external>
clack sounds complicated
<blep-on-external>
it's about the same as bare node.js in my opinion
<knobo>
blep-on-external: bare node.js?
saki has joined #lisp
dddddd has joined #lisp
shrdlu68 has quit [Remote host closed the connection]
chiyosaki has joined #lisp
shrdlu68 has joined #lisp
smokeink has joined #lisp
chiyosaki1 has joined #lisp
saki has quit [Ping timeout: 244 seconds]
<knobo>
Maybe use some xref functionality, but I still don't know how to hook that in to the compiler.
chiyosaki has quit [Ping timeout: 260 seconds]
JuanDaugherty has quit [Quit: Exeunt]
shrdlu68 has quit [Ping timeout: 240 seconds]
mflem has quit [Read error: Connection reset by peer]
shrdlu68 has joined #lisp
terpri has quit [Ping timeout: 240 seconds]
<blep-on-external>
like you're given the request object and the response object and you have to parse them and all tha
<blep-on-external>
*that. very bare.
shrdlu68 has quit [Ping timeout: 256 seconds]
_cosmonaut_ has quit [Ping timeout: 240 seconds]
shrdlu68 has joined #lisp
smokeink has quit [Quit: Leaving]
shrdlu68 has quit [Remote host closed the connection]
shrdlu68 has joined #lisp
v0|d has joined #lisp
<knobo>
blep-on-external: but nobody uses only clack. Most people would use somthing on top. For example caveman.
<v0|d>
Xach: no bits type in ecl afaik (declare (type .. bits)) fails in salza2. maybe #-ecl.
Domaldel has joined #lisp
<knobo>
I appreciate any suggestions.
<knobo>
maybe I should talk to #sbcl.
_cosmonaut_ has joined #lisp
<fe[nl]ix>
merhaba v0|d
montxero has quit [Ping timeout: 260 seconds]
chiyosaki1 has quit [Ping timeout: 276 seconds]
montxero has joined #lisp
<v0|d>
fe[nl]ix: lol
<v0|d>
i should go an learn some romanian, embarrasd*.
saki has joined #lisp
cymew has joined #lisp
mrm_ is now known as mrm
mrm has quit [Changing host]
mrm has joined #lisp
muresanvlad_ has quit [Remote host closed the connection]
montxero has quit [Remote host closed the connection]
nowhere_man has joined #lisp
muresanvlad_ has joined #lisp
bigfondue has quit [Ping timeout: 260 seconds]
gabiruh has joined #lisp
<akkad>
da
gabiruh has quit [Ping timeout: 260 seconds]
SenasOzys__ has quit [Remote host closed the connection]
random-nick has joined #lisp
oni-on-ion has quit [Read error: Connection reset by peer]
dmiles has joined #lisp
random-nick has quit [Remote host closed the connection]
random-nick has joined #lisp
frgo has joined #lisp
shrdlu68 has quit [Ping timeout: 268 seconds]
shrdlu68 has joined #lisp
bigfondue has joined #lisp
shrdlu68 has quit [Ping timeout: 264 seconds]
shrdlu68 has joined #lisp
trittweiler has quit [Ping timeout: 260 seconds]
frgo has quit [Remote host closed the connection]
trittweiler has joined #lisp
m00natic has joined #lisp
lumm has joined #lisp
milanj__ has quit [Quit: This computer has gone to sleep]
milanj__ has joined #lisp
igemnace has quit [Ping timeout: 240 seconds]
shifty has quit [Ping timeout: 240 seconds]
shifty has joined #lisp
scymtym has quit [Ping timeout: 256 seconds]
<blep-on-external>
i still use hunchentoot, should i move to caveman?
nowhere_man has quit [Ping timeout: 265 seconds]
Kaisyu has quit [Quit: Connection closed for inactivity]
gabiruh has joined #lisp
xantoz has quit [Read error: Connection reset by peer]
xantoz has joined #lisp
pierpal has joined #lisp
gabiruh has quit [Ping timeout: 268 seconds]
shrdlu68 has quit [Ping timeout: 240 seconds]
Smokitch has joined #lisp
shrdlu68 has joined #lisp
lumm has quit [Read error: Connection reset by peer]
lumm has joined #lisp
AetherWind has quit [Quit: Leaving]
<Xach>
v0|d: bits is the variable, not the type
milanj__ has quit [Quit: This computer has gone to sleep]
rawste has joined #lisp
terpri has joined #lisp
frgo has joined #lisp
wigust- has joined #lisp
scymtym has joined #lisp
wigust has quit [Ping timeout: 264 seconds]
<v0|d>
oh.
<v0|d>
right. so what about this bitstream-buffer-bit-count?
frgo has quit [Remote host closed the connection]
<Xach>
v0|d: it's defined in types.lisp
nowhere_man has joined #lisp
ave1 has joined #lisp
tokik has joined #lisp
<v0|d>
can't reproduce, wierd.
<v0|d>
sry.
<Xach>
no worries
tokik has left #lisp [#lisp]
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
quazimodo has quit [Ping timeout: 244 seconds]
quazimodo has joined #lisp
charh has joined #lisp
orivej has joined #lisp
Josh_2 has joined #lisp
skapata has joined #lisp
Josh_2 has quit [Remote host closed the connection]
milanj has joined #lisp
jmercouris has joined #lisp
<jmercouris>
I'm looking here at gentle introduction to symolic computation and they say you can only sharp-quote normal functions, can't do it for macro functions
<minion>
jmercouris, memo from flip214: if the image is uncompressed, the mmap() is quite fast. if it's compressed, larger images will take more time to run.
<jmercouris>
I see
<jmercouris>
yet, in SBCL, I can #'if no problem
<jmercouris>
is this something that SBCL does not obey from the specification? is the author mistaken?
<ebzzry>
jmercouris: sbcl takes that liberty. ccl and clisp barfs with #'if.
<shka>
jmercouris: don't count on doing that though, standard states that if is a special form and it is up to implementation to decide how to implement it
<jmercouris>
I see, so undefined
<shka>
yes
lumm has quit [Ping timeout: 260 seconds]
<shka>
as for #' in macros
<jmercouris>
What's the equivalent of sharp quoting a macro?
<jmercouris>
is there a way?
<shka>
honestly it never occured to me
<shka>
because who would want to do it anyway?
<shka>
what for?
ave1 has left #lisp ["Leaving"]
xantoz has quit [Read error: Connection reset by peer]
<ebzzry>
jmercouris: so, yes. it is not portable behavior.
<jmercouris>
I see I see
lumm has joined #lisp
<jmercouris>
I always thought mapcar was a strange name, and it only just occured to me that we are mapping a function onto the car of each cons cell
<jmercouris>
unbelievable...
<ebzzry>
jmercouris: :)
<ebzzry>
jmercouris: see mapcan. :)
hhdave has joined #lisp
<jmercouris>
Aha, so many derivatives
gabiruh has joined #lisp
<jmercouris>
ebzzry: I'm not there yet though, don't want to go down that rabbit hole just yet, first I would like to finish this book
kajo has joined #lisp
<ebzzry>
jmercouris: CLAGITSC by Touretzky?
<jmercouris>
Yes
<ebzzry>
jmercouris: that’s a good book.
<jmercouris>
I've already done PCL, and I've been doing some lisp programming for approximately a year now, but I felt there are so many gaps in my knowledge, decided to go back to basics from cover to cover
<ebzzry>
jmercouris: that’s the path that I suggest. CLAGITSC before PCL.
<jmercouris>
Well, it's too late now :D
orivej has quit [Ping timeout: 260 seconds]
<ebzzry>
jmercouris: that’s ok. you’ll get a better appreciation of recursion in lisp with that book.
<ebzzry>
jmercouris: and some introductory concepts of symbolic programming.
<jmercouris>
I intend to become much better at recursion, its been a weakness of mine for a long time
<jmercouris>
Yeah, I like the book, because it is indeed gentle
<jmercouris>
there are some exercises where I feel like I am wasting my time, but for the most part, it has been a very valuable experience
<ebzzry>
jmercouris: [:
<knobo>
blep-on-external: Depends on your project.
gabiruh has quit [Ping timeout: 264 seconds]
housel has quit [Read error: Connection reset by peer]
nowhere_man has quit [Ping timeout: 240 seconds]
pierpal has quit [Quit: Poof]
<beach>
jmercouris: You can use MACRO-FUNCTION to get to the function that a macro defines, but it has a strange signature, so you can't just FUNCALL it with the arguments to the macro.
pierpal has joined #lisp
<jmercouris>
beach: interesting, thanks
<jmercouris>
the hyperspec makes it sound like a predicate
<jmercouris>
"Determines whether symbol has a function definition as a macro in the specified environment. "
<beach>
You need to read further, I guess.
Josh_2 has joined #lisp
<jmercouris>
Yeah, I read the whole thing, its just a strange way to start the description
kerframil has joined #lisp
lavaflow_ has quit [Ping timeout: 240 seconds]
rumbler31 has quit [Remote host closed the connection]
v0|d has quit [Remote host closed the connection]
chrnok has quit [Remote host closed the connection]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #lisp
isospin has quit [Ping timeout: 244 seconds]
EvW has joined #lisp
shrdlu68 has quit [Ping timeout: 240 seconds]
shrdlu68 has joined #lisp
gabiruh has joined #lisp
lumm has quit [Ping timeout: 264 seconds]
gabiruh has quit [Ping timeout: 244 seconds]
shrdlu68 has quit [Ping timeout: 240 seconds]
shrdlu68 has joined #lisp
makomo has joined #lisp
shrdlu68 has quit [Ping timeout: 240 seconds]
gabiruh has joined #lisp
shrdlu68 has joined #lisp
orivej has joined #lisp
igemnace has joined #lisp
JuanDaugherty has joined #lisp
FreeBirdLjj has joined #lisp
ebrasca has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<beach>
I guess I can test the memory allocator by allocating and freeing random chunks and verifying after each operation how much total space is left on the heap.
nowhere_man has joined #lisp
deng_cn has quit [Quit: deng_cn]
<Josh_2>
I guess you can
<shka>
beach: that's what i would do
scymtym_ has joined #lisp
flamebeard has quit [Remote host closed the connection]
<beach>
Anything else I can test?
lumm has joined #lisp
flamebeard has joined #lisp
<shka>
let i run for half a day, and keep verifing memory
<shka>
beach: maybe verify whole heap with checksums?
isospin has joined #lisp
<beach>
How so?
scymtym has quit [Ping timeout: 240 seconds]
<shka>
beach: scudo allocator embeds 16 bit checksum into chunks
<shka>
so they can verify if chunk was corrupted somehow
<beach>
Oh, I see.
<shka>
not sure if you can easily do something similar, but it may be helpfull debuging tool
dmiles has quit [Ping timeout: 240 seconds]
<beach>
Absolutely. I'll think about it.
<shka>
maybe you can maintain separate checksum list just for testing
<beach>
Maybe so.
<beach>
I'll do the simple one first. Then we'll see.
mindCrime has joined #lisp
flamebeard has quit [Remote host closed the connection]
flamebeard has joined #lisp
borodust- is now known as borodust
LiamH has joined #lisp
test1600 has joined #lisp
shrdlu68 has quit [Ping timeout: 268 seconds]
shrdlu68 has joined #lisp
logicmoo has joined #lisp
Bike has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
<Xach>
borodust!!!
<Xach>
borodust: the cl-muth problems vex me!
lthms has joined #lisp
<lthms>
hi
<jackdaniel>
are we shifting towards latin or something in this spirit lately? ;)
<jackdaniel>
\o
kerframil has quit [Quit: Leaving]
<makomo>
o/
shifty has quit [Ping timeout: 260 seconds]
rawste has quit [Quit: Sleep....]
EvW has joined #lisp
eli_oat has joined #lisp
al-damiri has joined #lisp
jamec has joined #lisp
rawste has joined #lisp
Oddity has quit [Ping timeout: 260 seconds]
SaganMan has quit [Ping timeout: 260 seconds]
SaganMan has joined #lisp
Oddity has joined #lisp
<borodust>
Xach: hi!
<borodust>
lets see
<borodust>
Xach: looks like it is fixed itself - i don't see it in the last report ;p
<Xach>
ok phew
jamec has quit [Read error: Connection reset by peer]
<borodust>
or well, maybe you just removed it XD
<Xach>
no, i think it is resolved. thanks for double-checking!
jamec has joined #lisp
<borodust>
it's weird, it should have been fixed a week ago when i saw it first appeared in 06/25 report..
<Xach>
i think i had stale repos from 6/22
gabiruh has quit [Read error: Connection reset by peer]
<Xach>
i updated things to have a fresher start
gabiruh has joined #lisp
<borodust>
Xach: ah, i see, thanks!
<borodust>
hello lthms o/
jamec has quit [Quit: ERC (IRC client for Emacs 26.1)]
lavaflow_ has joined #lisp
lumm has quit [Ping timeout: 240 seconds]
Murii_ has joined #lisp
w17t has joined #lisp
lavaflow_ has quit [Ping timeout: 240 seconds]
rumbler31 has joined #lisp
w17t has quit [Remote host closed the connection]
w17t has joined #lisp
cmatei_ has quit [Remote host closed the connection]
karlosz has joined #lisp
cmatei has joined #lisp
sjl has joined #lisp
rumbler31 has quit [Ping timeout: 265 seconds]
nowhere_man has quit [Ping timeout: 240 seconds]
nowhere_man has joined #lisp
frgo has joined #lisp
kuwze has joined #lisp
karlosz has quit [Ping timeout: 265 seconds]
jack_rabbit has quit [Ping timeout: 264 seconds]
m00natic has quit [Read error: Connection reset by peer]
m00natic has joined #lisp
flamebeard has quit [Read error: Connection reset by peer]
flamebeard has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
JuanDaugherty has left #lisp ["Deus Ex"]
markoong has joined #lisp
Bike has quit [Ping timeout: 252 seconds]
surya has joined #lisp
frgo has quit [Ping timeout: 260 seconds]
pierpal has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
Plazma_ is now known as Plazma
flamebeard has quit []
pierpal has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
EvW has quit [Ping timeout: 265 seconds]
pierpal has joined #lisp
housel has joined #lisp
pierpal has quit [Ping timeout: 244 seconds]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Client Quit]
matijja has quit [Ping timeout: 240 seconds]
cymew has quit [Remote host closed the connection]
pierpal has joined #lisp
sjl__ has joined #lisp
nowhere_man has quit [Ping timeout: 240 seconds]
nowhere_man has joined #lisp
cymew has joined #lisp
sjl has quit [Ping timeout: 240 seconds]
xrash has quit [Ping timeout: 240 seconds]
cnx has joined #lisp
parjanya` has quit [Ping timeout: 244 seconds]
<cnx>
hi guys, suddenly my swank from emacs cannot be loaded, saying `Package ASDF does not exist.'
<cnx>
it run fine a few days earlier and I didn't run any update or tweak any config
<cnx>
anybody?
cymew has quit [Ping timeout: 248 seconds]
raynold has quit [Quit: Connection closed for inactivity]
isospin has quit [Ping timeout: 260 seconds]
cymew has joined #lisp
serviteur has joined #lisp
<jackdaniel>
cnx: I assume you try to load *all* contribs including swank-asdf, because swank itself does not depend on asdf whatsoever
<jackdaniel>
most likely scenario is that you had quicklisp initialized in your implementation init file (i.e ~/.sbclrc) and you have removed it
<jackdaniel>
just put "(require 'asdf)" in ~/.sbclrc in that case
cymew has quit [Ping timeout: 244 seconds]
nowhereman_ has joined #lisp
nowhere_man has quit [Ping timeout: 244 seconds]
cymew has joined #lisp
zxcvz has joined #lisp
theseb has joined #lisp
cymew has quit [Ping timeout: 240 seconds]
<theseb>
is this a great macro strategy?....do as much as you can with a "normal" function and then call that helper function from your shiny new macro?....in short..use macros to change the syntax of the language but do the real work in regular code?
sjl__ is now known as sjl
<beach>
Sounds good.
cymew has joined #lisp
<theseb>
beach: thanks...people were always warning about overdoing it with macros...my strategy above seemed like such a simple way to strike a balance...it should be more widely taught
<beach>
theseb: It's the traditional way of doing it, but perhaps it is not said so explicitly in the literature.
andrei-n has quit [Read error: Connection reset by peer]
<theseb>
beach: ah ok thanks
<beach>
There is an exception for very small macros.
surya has quit [Ping timeout: 240 seconds]
<beach>
But if you look in the CLIM II specification, for instance, you will find several pairs like WITH-FOO and INVOKE-WITH-FOO.
cymew has quit [Ping timeout: 240 seconds]
andrei-n has joined #lisp
elfmacs has quit [Ping timeout: 240 seconds]
jmercouris has quit [Remote host closed the connection]
nowhereman_ has quit [Ping timeout: 240 seconds]
jmercouris has joined #lisp
<jmercouris>
let's say I want to write my own setter instead of using the default accessor
<jmercouris>
how would I refer to a given slot without an accessor?
<Xach>
slot-value
<jmercouris>
Ah, okay, thank you
<beach>
jmercouris: But why would you want to do that?
<Xach>
another option is to use :writer (setf %my-slot)
<jmercouris>
beach: Because I want side-effects to occur when a given slot is changed
<Xach>
jmercouris: one way to do that is an around method on the setter.
<jmercouris>
I have an interface object that abstracts an interface framework
<beach>
jmercouris: Use an auxiliary method on the setter.
<Xach>
or after, or before method.
<theseb>
Xach: everyone knows Common Lisp is the Lisp for "real work"...however...I've been checking out Clojure which seem to also be good for "real work" since uses JVM...what do think of Clojure?
<theseb>
if i may ask?
jkordani has quit [Read error: Connection reset by peer]
<jmercouris>
beach: Ok, will do
<Xach>
theseb: I don't think about it. And this is not the channel to discuss it.
<beach>
theseb: Off topic. Sorry.
<jmercouris>
Isn't it possible to run CL on the JVM? I thought there was an implementation that had interop of some sort
<figurelisp>
I have heard a lot about lisp. Is it good to learn it now? I am thinking about common lisp
<figurelisp>
Why should i learn lisp is my main question.
<Josh_2>
yeh u should learn it
<beach>
figurelisp: Because it is one of the best languages around.
francogrex has joined #lisp
<francogrex>
hi, I have a lisp (or fasl) file in a specific common network directory/folder (UNC path: //network1/specs/called.fasl) that is being loaded from a user's local lisp program. is there a way to make sure that the user is loading that specific fasl file (and not a local one he may have copied into his local folder?)
<Josh_2>
beach: what's another?
<beach>
figurelisp: And it will change your way of thinking about programming.
<figurelisp>
Is lisp seriously that good
<Josh_2>
You'll have to find out ;)
<ebrasca>
For me it is.
<jmercouris>
We are all extremely biased in this channel
<figurelisp>
I'm new in programming so i don't know other languages well and won't be able ito compare it
<Josh_2>
ahh
<jmercouris>
I think it is best to learn it when you are new to programming
<beach>
figurelisp: It really is that good.
shrdlu68 has quit [Ping timeout: 240 seconds]
<jmercouris>
becasue you won't be influenced by prior knowledge
<Josh_2>
well I learned CL first and now I don't want to learn any others cos I'm lazy and they suck
<ebrasca>
figurelisp: Yea it is #lisp irc .
<jmercouris>
Josh_2: How would you know? You don't know any other langauges
<Josh_2>
jmercouris: av done Python, Ruby C++ ya know
<figurelisp>
Josh_2 if you haven't learned any other how do you know they suck
<Josh_2>
and Javascript n PHP
Lord_of_Life has quit [Excess Flood]
<Josh_2>
meh they probably don't, they have their place like
<jmercouris>
Anyways, these kinds of debates are pointless, if you wish to learn Lisp, obviously you'd have the endorsement of this channel
<ebrasca>
I hate Javascript.
<jmercouris>
Who doesn't?
<Josh_2>
I say you should learn CL :D
<random-nick>
jmercouris: many people love javascript
<ebrasca>
haha
<jmercouris>
random-nick: Secretly they hate it
<ebrasca>
random-nick: Are you sure?
Lord_of_Life has joined #lisp
<jackdaniel>
any argument supporting my ideas is valid. contrary arguments are just other people delusions (and false claims), like it ought to be ;-)
<random-nick>
ebrasca: well, why would thing like node.js exist otherwise?
<Josh_2>
figurelisp: get gentle introduction to symbolic computation, is very good intro to programming :)
<figurelisp>
I'll be starting learning CL from the book cl: gentle introduction to symbolic computimg
theseb has left #lisp ["ERC (IRC client for Emacs 25.2.2)"]
<Josh_2>
^^ that's how I did it
<jmercouris>
jackdaniel: Preach!
<figurelisp>
Ok great
<jmercouris>
jackdaniel: as long as I agree with you
<figurelisp>
Thank you all
<jackdaniel>
jmercouris: confirmation bias won't do any good to you. Lisp zealotry just closes you in a fixed mindset.
<jmercouris>
jackdaniel: I know, I'm only joking
<jmercouris>
I like Lisp, but I won't pretend like it is the best thing to ever happen ever
<random-nick>
but what if Lisp really is the best thing to ever happen ever?
<jackdaniel>
usually jokes carry convictions despite being humorous, but tha'ts offtopic on my side, sorry
<jmercouris>
My convictions are nothing but intense irony
<beach>
figurelisp: Make sure you ask for advice when you get ready to install your environment. It is easy to get it wrong.
<beach>
figurelisp: Also, it is OK, to paste your code somewhere and give us a link, in case you want feedback on it. Newbie questions are tolerated as long as it looks like you are making progress and following advice.
<figurelisp>
Ok thanks :) i have already setup my emacs with slime+sbcl
<beach>
OK, good.
nowhereman_ has joined #lisp
DingoSaar has joined #lisp
cnx has quit [Ping timeout: 264 seconds]
rumbler31 has joined #lisp
k4rtik has joined #lisp
<antoszka>
figurelisp: there's also a #clnoobs channel, just in case :)
rumbler31 has quit [Remote host closed the connection]
<schweers>
figurelisp: my advice: don’t let people tell you that the lisp you chose (Common Lisp, as I understand) has some flaw, and that another lisp is better. Or at least in some way better. Its not that they are wrong (if you really want to do functional programming, Clojure has a more pleasant out of the box experience). Its that you shouldn’t let that distract you. I made that mistake, bouncing from one lisp to anothe
<schweers>
getting really good with any of them.
<Josh_2>
schweers: idk if I agree with you, GISC is a real good intro to functional programming
<figurelisp>
schweers will keep that in mind and won't be distracted
<schweers>
Josh_2: sorry, GISC?
<Josh_2>
gentle introduction to symbolic computation
<Josh_2>
something like that
<schweers>
ah
skapata has quit [Remote host closed the connection]
* schweers
has to admit to never having read that book
<antoszka>
I think "Touretzky" is the recognizable shorthand name for the book here ;)
<Josh_2>
Well I didn't know that
<antoszka>
That's why I mentioned it :)
francogrex has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
<Josh_2>
am gonna forget that
kuwze has quit [Quit: Page closed]
<jmercouris>
When writing predicates, when do you use a hyphen, and when do you just stick it onto the word?
buffergn0me has joined #lisp
<antoszka>
jmercouris: there's a rule for that
serviteur has quit [Remote host closed the connection]
<jmercouris>
And the rule is..?
<schweers>
jmercouris: I think most people use a dash if the predicate consists of more than one word
<antoszka>
jmercouris: if it's a single word predicate, you just slam on the p
<schweers>
i.e. if you have dashes in it anyway
<antoszka>
+ what schweers says :)
<schweers>
composite-type-p vs typep
<antoszka>
yep
<schweers>
which can muck with automatically named predicates, but that’s another story
bexx_ has joined #lisp
<random-nick>
is the proper naming convention for definition macros to prefix with "def" if it is just one word and to use dashes and prefix it with "define-" for multiple words?
<Xach>
The rule is explained in CLtL2 and I copied it to cliki some time ago
<Xach>
concluding with: The name string-less-p would incorrectly imply that it is a predicate that tests for a kind of object called a string-less, and the name stringlessp would connote a predicate that tests whether something has no strings (is "stringless")!
<Xach>
random-nick: sorry, this is for jmercouris's question about predicates
<random-nick>
Xach: but the page also answers my question
<Xach>
that was not my intent so i cannot take any credit
<jmercouris>
Aha, I see
<jmercouris>
there is some nuance here
<jmercouris>
Makes me feel too much like a comptuer parsing the string
NoNumber has left #lisp ["ERC (IRC client for Emacs 25.2.2)"]
k4rtik has quit [Ping timeout: 256 seconds]
k4rtik has joined #lisp
<jmercouris>
If I use (with-slots) within a method body, is it any quicker than using the slot accessors every time?
<jmercouris>
is it even worth thinking about?
figurelisp has quit [Read error: Connection reset by peer]
k4rtik has quit [Client Quit]
<makomo>
jmercouris: i'm not sure if this is correct (someone can correct me), but i would think it could be slower because it has the extra dispatch to go through for the accessor
<jmercouris>
makomo: I was thinking that exactly
<makomo>
but i don't think it's something you should really worry early on
<makomo>
worry about*
<beach>
jmercouris: No, and it might be slower.
<beach>
jmercouris: I would use WITH-ACCESSORS instead.
<jmercouris>
that would be counterintuitive that it could be slower
<makomo>
hm, why?
<jmercouris>
with-accessors is new to me, thanks
<makomo>
jmercouris: also, WITH-ACCESSORS supports any accessor and doesn't have to be used just for objects/slots
<makomo>
the clhs page is pretty misleading if you ask me
<jmercouris>
ah, that makes it even more useful
<beach>
jmercouris: WITH-SLOTS uses SLOT-VALUE. SLOT-VALUE takes a symbol to name the slot. If the implementers are not careful, they have to look up the name, find the slot metaobject, find the slot offset, then access the slot.
<makomo>
oh wait, no, i might be wrong
<beach>
jmercouris: But the accessor can usually go directly to the slot.
<jmercouris>
Oh, I see
<jmercouris>
that is an interesting thought
<makomo>
beach: we discussed this once -- the fact that WITH-ACCESSORS doesn't have to be used just for slots. is this true or is my memory just failing?
<jmercouris>
I feel like maybe the only way to really learn this stuff is to make your own CL implementation of the spec
<makomo>
it does take an object though, so i'm not sure what i remember anymore
<beach>
makomo: I think it's true. It only introduces symbol macros.
<makomo>
ah right, so INSTANCE-FORM could be anything, right?
<beach>
makomo: Every Common Lisp object is an instance of some class.
<makomo>
hmm, right, good point
<makomo>
right, heh
galiley has quit [Read error: Connection reset by peer]
kajo has quit [Ping timeout: 256 seconds]
karswell has joined #lisp
<makomo>
then, not an instance of a class that's a STANDARD-CLASS?
<makomo>
but i guess that's not surprising at all anyway
<makomo>
since everything is an instance of some class
<makomo>
hm right, i think now the clhs page is finally clear to me
<beach>
Look at the bottom of the Common Lisp HyperSpec page. It says what with-accessors does.
<makomo>
i forgot that everything is an instance of some class
<makomo>
for some reason i thought you were limited to instanced of classes that are DEFCLASS'd
<makomo>
not sure why
<makomo>
instances*
<makomo>
jmercouris: hmm idk, why would you think that?
<makomo>
it's not complicated. maybe it's just because you've only heard about it for the first time
EvW has joined #lisp
<jmercouris>
makomo: I don't know, I just have these vague ideas in my mind, it would seem to me that with-slots is kind of like some version of let, so you don't have to keep getting the value every time
<jmercouris>
and you are just creating a temporary binding
buffergn0me has quit [Ping timeout: 240 seconds]
<jmercouris>
I assume that (slot-accessor object) is a funcall
pjb has joined #lisp
Inline has joined #lisp
figurelisp has joined #lisp
eli_oat1 has joined #lisp
k4rtik has joined #lisp
k4rtik has quit [Changing host]
k4rtik has joined #lisp
<makomo>
jmercouris: ah, well, it could have been made to do that instead i guess. it's all about the documentation and standardized stuff in the end :D
<makomo>
standardizing*
eli_oat1 has quit [Client Quit]
<beach>
jmercouris: SLOT-VALUE is a function call as well.
<makomo>
jmercouris: but i think this name is more fitting for the thing it does
<makomo>
what you describe is something that could be called SLOT-LET or similar maybe?
<jmercouris>
Maybe, I'm not sure
<jmercouris>
it is still so vague in my head
<jmercouris>
I need to sleep on it, I'm just now beginning to grasp very basic CLOS things
<beach>
jmercouris: And, in the worst case, it must find the class of the object (another function call), then find the slot metaobject with that name (another call), then access that object to find the slot offset (another call), then access memory (another call).
karlosz has joined #lisp
<makomo>
jmercouris: heh, that's how i felt while implementing this macro: https://plaster.tymoon.eu/view/844#844. now i finally feel like the idea has crystallized
<beach>
jmercouris: There are tricks to get around it when the slot name is quoted, but it is not simple to implement.
Bike has joined #lisp
jmercouris has quit [Ping timeout: 240 seconds]
mflem has joined #lisp
quazimodo has quit [Ping timeout: 260 seconds]
kajo has joined #lisp
quazimodo has joined #lisp
eli_oat1 has joined #lisp
eli_oat1 has quit [Client Quit]
hhdave has quit [Ping timeout: 264 seconds]
shka_ has joined #lisp
dyelar has quit [Remote host closed the connection]
graphene has joined #lisp
rawste has quit [Quit: Sleep....]
Murii_ has quit [Ping timeout: 265 seconds]
eli_oat1 has joined #lisp
<jasom>
beach: can you declare the type of an object in such a way to remove some of those lookups (with declarations in the standard)?
EvW has quit [Ping timeout: 240 seconds]
m00natic has quit [Remote host closed the connection]
eli_oat1 has quit [Client Quit]
<Bike>
jasom: even if you declare the type of an object, its class could be redefined.
eli_oat1 has joined #lisp
<Bike>
strictly speaking, the compilation semantics allow you not to worry about that, i think
<Bike>
ah, no, you actually do have to
<Bike>
that is, there's no restriction that the slots of a class have to be the same at compile and run time
karlosz has quit [Quit: karlosz]
<Bike>
the metaclass and superclass only
<Bike>
superclass-es.
nowhereman_ has quit [Ping timeout: 265 seconds]
eli_oat1 has quit [Quit: Leaving.]
_cosmonaut_ has quit [Ping timeout: 240 seconds]
karlosz has joined #lisp
lumm has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
figurelisp has left #lisp ["AndroIRC"]
karlosz has quit [Ping timeout: 240 seconds]
EvW has joined #lisp
Kundry_Wag has joined #lisp
w17t has quit [Quit: Leaving]
<jasom>
can its metaclass be redefined?
<Bike>
uh... maybe
Kundry_Wag has quit [Read error: Connection reset by peer]
<Bike>
"Classes defined by defclass in the compilation environment must be defined at run time to have the same superclasses and same metaclass." is the text
<jasom>
So it would require a separate declaration that indicates the class would not be redefined.
Kundry_Wag has joined #lisp
nowhere_man has joined #lisp
<beach>
jasom: I don't think declaring the type will help.
rumbler31 has joined #lisp
<beach>
jasom: But one can play the same kind of tricks as one can with an accessor, provided the slot name is constant.
<beach>
jasom: But things may have to be recompiled when the class changes, just like the accessors do. That can be done of course.
surya has quit [Ping timeout: 244 seconds]
karlosz has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
rawste has joined #lisp
lavaflow_ has joined #lisp
lumm has quit [Read error: Connection reset by peer]
nowhere_man has quit [Ping timeout: 240 seconds]
lavaflow_ has quit [Ping timeout: 240 seconds]
chiyosaki has joined #lisp
saki has quit [Ping timeout: 244 seconds]
rawste has quit [Quit: Sleep....]
moei has quit [Quit: Leaving...]
asdf123 has joined #lisp
<makomo>
what arguments exactly does a macro function take?
<makomo>
for example, if i have (macro-function 'alexandria:once-only), how do i funcall this properly?
<shka_>
pjb: you really should not paste such line into irc
<pjb>
Now, for html, it's a tad more complex, since there are sometimes optional open or close tag, and various set of attributes, etc. so you'd need more than one function, but, it this could still be used.
<pjb>
shka_: but technically I don't paste those lines into irc. I type them right there!
<makomo>
is there anything that could go wrong if i just pass in NIL for the envrionment?
<makomo>
i mean, are there corner cases where it's required to do so
<makomo>
so you have to drag the environment around through everything
<pjb>
Yes. It's for local macros (macrolets)
<makomo>
anything else?
moei has joined #lisp
<pjb>
If you want to call this function from within a macro, you should (defmacro m (… &environment environment) … (gen-html-tag form environment) …)
<pjb>
now, notice that the above function didn't use the environment, but if it called macroexpand, it would have to pass it.
<pjb>
Notably, macroexpand let you detect or process symbol-macros (not only normal macros), and you would see symbol-macrolets, only by using this environment.
rumbler31 has joined #lisp
<makomo>
aha
<makomo>
welp, that concludes my macro-function solution and it's no better than what i had before
<pjb>
makomo: you have a bug in the docstring: "Evaluates INITFORMS to get a list…"
<makomo>
mhm?
<pjb>
makomo: for a macro, you cannot just "evaluate" something. You have to make it explicit if it is evaluated at macroexpansion time, or if you return a form that will evaluate it at run-time.
<makomo>
pjb: right, i meant the former
<makomo>
i'll fix it
<pjb>
Then it is possible, but difficult. Since this evaluation is done, eg. in the compilation environment, it cannot rely on anything defined in the program.
<pjb>
Only things loaded in the compilation environment.
<makomo>
yes, indeed
<pjb>
So you need to have a good reason to be wanting to do that.
<Bike>
makomo: (defun zip (&rest seqs) (apply #'mapcar #'list seqs))
<makomo>
Bike: heh yeah, not sure why i have an extra layer of indirection there, thanks
<Bike>
eval-with is scary
<makomo>
i know :D
<makomo>
pjb: right, and the context is this: we were discussing how to solve the multiple evaluation problem when you don't know the number of symbols "at compile-time" (???)
<pjb>
makomo: but as I said, you only need to add a macro. Ie. instead of evaluating initforms in the once-only-list macro, evaluate it at macro expansion time in a macro that expands to once-only-list (or whatever).
<makomo>
not sure if that's the right terminology, but i hope you get what i mean -- you can't tell ONCE-ONLY to do it for a list of symbols
<makomo>
pjb: ONCE-ONLY-LIST injects the macroexpansion-time evaluation into another macro
<makomo>
and FBIND is the one that ends up evaluating at macroexpansion time
<makomo>
so it can make ONCE-ONLY work for an arbitrary list of symbols
lavaflow_ has joined #lisp
<Bike>
i don't understand how this works. in fbind-2, is (mapcar #'second bindings) evaluated when once-only-list-eval is macroexpanded?
<makomo>
Bike: yes, indeed
<Bike>
that can't be right
<makomo>
the point is to reuse ONCE-ONLY, instead of having to write a function (or rely on the authors to do so) that will return me the expansion of ONCE-ONLY
<makomo>
i don't see another way to do this
<Bike>
BINDINGS doesn't even have a value at macroexpansion time
<makomo>
Bike: what do you mean it doesn't have a value?
<makomo>
ONCE-ONLY-LIST will expand into something that will evaluate that form
<Bike>
so it's not evaluated when once-only list-eval is expanded. it's evaluated by its expansion.
<makomo>
Bike: ah right, my bad
<makomo>
but both of those are macroexpansion-time though, right?
<pjb>
makomo: what does fbind do?
<Bike>
no.
<Bike>
i mean, macroexpansion is done at compile time.
<makomo>
pjb: take a look at the example at the bottom
<makomo>
pjb: allows you to use a function object without having to use FUNCALL
<makomo>
i.e. just syntactic sugar
<makomo>
Bike: erm, yeah, but the FBIND macro itself is also expanded at compile-time, and it contains the expansion of ONCE-ONLY-EVAL-LIST
<pjb>
ok.
<makomo>
so the evaluation is done at macroexpansion-time, but within FBIND
<Bike>
i'm just going to look at the expansion
<makomo>
the expansion of FBIND is pretty nice :D
<makomo>
it's the same as phoe's from yesterday really
<makomo>
except he redid what ONCE-ONLY does manually
<jackdaniel>
did I got transferred one day into the past or it's just another iteration? :-)
<makomo>
jackdaniel: :D
<makomo>
hey, this stuff is great to think about
<makomo>
double backquoting is becoming almost second nature
<Bike>
i meant theexpansion of once-only-list-eval, which is again, scary
<jackdaniel>
sure, enjoy. it was a funny impression though (semi-dejavu-like)
<makomo>
jackdaniel: i can imagine :D
<makomo>
Bike: yeah, true, it's non-trivial, but it's interesting to see the same patterns pop up when writing macros
<Bike>
i feel like there's got to be a way to do this without eval
<Bike>
since you don't even use the particular bindings, just the list of them
<makomo>
you start to feel it
<Bike>
yeah like pjb did.
<pjb>
I have to confess, that I never use once-only and rarely with-gensyms…
<makomo>
hm let me see
<makomo>
right, but this is reinventing ONCE-ONLY
<makomo>
that's the point of this whole thing, to avoid doing that
<makomo>
what's the point of all this lisp goodness if i can't reuse macros with ease
<makomo>
that's what bothers me the most
<pjb>
Perhaps, but doing this I don't get lost into using eval in a macro…
<makomo>
yeah, true, i agree
<makomo>
i had to show that it can be done, and in multiple ways too
<makomo>
but you see, i can't avoid EVAL
<Bike>
you have a weird idea of 'ease', yo.
<makomo>
is this really the curse we have to live with?
<makomo>
heh
<Bike>
once-only-list and once-only are kind of different things.
<pjb>
makomo: perhaps you could use once-only. But the thing is that you must evaluate your expressions in the right macro. The parameters to a macro aren't evaluated by the called macro, so you need to compute them in the caller!
<makomo>
pjb: pretty much, and that's the whole problem
<pjb>
Hence the let that computes names, initforms, and funs in fbind, not in an once-only-list.
<makomo>
pjb: that happens in my FBIND too, it's just that ONCE-ONLY-LIST expands into code that does that
<pjb>
Well you could do that, but you don't need to evaluate the arguments.
<makomo>
Bike: i guess so, but is there even a way to write a "list" version of ONCE-ONLY?
saki has joined #lisp
<pjb>
Expand to a `(once-only-list ,initform …) form.
<makomo>
i don't think there is, since macros receive source code
<makomo>
the stuff you wrote when you called ONCE-ONLY is what it receives, that's it
<makomo>
there's no way around this problem really :^(
chiyosaki has quit [Ping timeout: 244 seconds]
<makomo>
pjb: erm, where would you put that?
EvW has quit [Remote host closed the connection]
<makomo>
i wonder if meta-meta-programming would solve this issue
k4rtik has quit [Ping timeout: 240 seconds]
<makomo>
and even the macro-function version ends up using EVAL
<makomo>
Bike: also, you would probably use ONCE-ONLY if you didn't have an arbitrary number of bindings
<makomo>
because that's the point of ONCE-ONLY, to help you write macros and reduce boilerplate when writing them
<makomo>
but as soon as the number of symbols isn't constant, you're out of luck
edgar-rft has quit [Quit: edgar-rft]
cymew has joined #lisp
<pjb>
Again, I drop it, there's no need to implement something like once-only-list, or to use once-only. It only makes the macros more complicated than they should be.
<makomo>
pjb: but ONCE-ONLY doesn't complicate anything by itself
<makomo>
it makes writing macros easier if anything
<makomo>
but only if you have a *constant number of forms* you want to evaluate
<pjb>
perhaps. On the other hand, I like to use different names for the expression and the variable bound to the expression. (let ((,vstuff ,stuff)) …) instead of (once-only (stuff) …).
<Bike>
wow, and fbind itself expands into something easy to understand, despite its horrible upbringing
<Bike>
that's spooky
<makomo>
Bike: exactly, that's the most beautiful part
<Bike>
but yes i don't usually use once-only either.
<makomo>
pjb: ONCE-ONLY supports lists as specs too
<makomo>
you can say (once-only ((hello stuff)) ...)
<makomo>
whatever form is bound to STUFF within the macro is evaluated once within the expansion into a gensym, which is bound to HELLO within the macro
<pjb>
In macros, it's important to keep separate the bindings in the different environments, or levels of backquotes. Once-only confuses things up, IMO.
<Bike>
yeah.
<makomo>
Bike: i'm looking at your annotation
<makomo>
meh, idk, i don't feel like it's that confusing. it's just a thing that you get used to, just another "black box" if you will
cymew has quit [Ping timeout: 240 seconds]
<makomo>
ONCE-ONLY only confuses things because its docs are a bit crappy
<pjb>
makomo: I can agree to the getting used to.
<makomo>
it doesn't really say anything about INITFORMs
brettgilio has joined #lisp
<makomo>
perhaps a PR for that wouldn't be bad
<makomo>
Bike: does your solution work or?
<Bike>
seems to.
slyrus_ has quit [Ping timeout: 240 seconds]
quazimodo has quit [Ping timeout: 240 seconds]
<makomo>
Bike: err, but i don't think this ONCE-ONLY does anything?
<makomo>
removing it changes nothing
<makomo>
i think you just did it manually again using GENSYM yourself
<Xach>
Friends, this day we will have a new Quicklisp dist update! I can feel it in my bones!
<Bike>
you mean the alexandria:once-only in the once-only-list macro function?
<makomo>
Bike: yes
quazimodo has joined #lisp
<makomo>
hmm
<makomo>
yeah, what does it even do?
<makomo>
the argument INITFORMS within ONCE-ONLY-LIST is bound to the symbol INITFORMS
<Bike>
it prevents multiple evaluation of the initforms form in the macro
<Bike>
it doesn't matter in this particular case
<Bike>
but you could try removing it, and then rewriting fbind to do (once-only-list (funs (mapcar #'second bindings)) ...),and then macroexpand it
<Bike>
it'll do the mapcartwice
<Bike>
mapcar twice
<Bike>
i friggin hate writing code like this. i have to reverse engineer what i wrote thirty seconds after writing it because it doesn't stay in my head
shka_ has quit [Ping timeout: 260 seconds]
<makomo>
Bike: ah you're right, but it doesn't have the same function as the ONCE-ONLY i used within my expansions
<makomo>
this is only for the purposes of your own macro's hygiene, it has nothing to do with the ultimate goal, i.e. reusing ONCE-ONLY
<makomo>
aren't you still doing it all manually
<makomo>
yeah, pretty much reinvented ONCE-ONLY from what i can see
<makomo>
Bike: yeah lol, it's not the easiest thing
<makomo>
but once it is written, you can forget about it and use it like a black box, so who cares how complex it is underneath if it's well documented and does it job
<makomo>
(until bugs pop in i guess :D)
<makomo>
its*
<Bike>
yes, i'm doing it "manually", because like i said, once-only and once-only-list are not the same thing.
<makomo>
right, but they're pretty close in their functionality
Kundry_Wag has quit [Remote host closed the connection]
<makomo>
one takes a list of a constant number of specs, the other takes an arbitrary number of specs
<makomo>
that's it
<makomo>
and yet that immediately requires you to use EVAL
<makomo>
at macroexpansion-time, as we said
pagnol has joined #lisp
<Bike>
yeah, like (+ 3 4 5) is easy but (apply #'+ list) is different
<makomo>
yeah, pretty much
<makomo>
right, exactly that
k4rtik has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
<makomo>
but this whole problem is bigger than ONCE-ONLY
slyrus_ has joined #lisp
<makomo>
all macros have this "problem"
<_death>
I think macros are for syntactic convenience and clarity, and this "re-use" inverts the purpose ;)
<makomo>
i don't know, i feel like macros should be composable as well, just like functions
<makomo>
otherwise you can't escape from constantly rewriting the same things over and over again, such as avoiding multiple evaluation
<makomo>
(in the case of an arbitarary number of forms, that is; otherwise you just use ONCE-ONLY)
<Bike>
this is the first time i have run into a situation even vaguely like this
mindCrime__ has joined #lisp
<_death>
also, once-only rebinds the names passed to it.. in this situation I don't think you need that
<_death>
that's why a simple solution using gensym + let works pretty well
<makomo>
_death: right, but those disappear in the end anyway because nobody uses those rebound symbols
<makomo>
Bike: definitely not the first time for me
<makomo>
literally anything that you want to generalize to an arbitary number of arguments is screwed
mindCrime has quit [Ping timeout: 256 seconds]
<_death>
but you don't usually need to rebind the names.. so once-only isn't the exact fit
<makomo>
hm, why not?
k4rtik has quit [Ping timeout: 264 seconds]
<makomo>
so in the end, the only solutions are (1) use the original macro and EVAL to make it work for an arbitrary number of arguments or (2) write two versions of the same macro
<makomo>
but i guess the constant size version could just delegate to the list version?
<makomo>
by quoting the thing to be evaluated
<makomo>
and by "original macro" i mean the constant size version
charh has quit [Quit: leaving]
<_death>
the fact that you call gensym by yourself already indicates an issue.. after all once-only is supposed to hide the use of gensyms
<makomo>
_death: right, but this is only to generate dummy symbols for the ONCE-ONLY to use
<makomo>
these are the symbols that then get rebound, but nobody cares about them anyway, because nobody knows their names and what initforms they correspond to
<makomo>
we care about the gensyms made by ONCE-ONLY, those that are part of the expansion that ONCE-ONLY helped write
<makomo>
that's what i bind to the list "oo"
<makomo>
and also, this gensym creation thing is hidden away anyway
<makomo>
this isn't something the user does, this is just to actually implement the list version of ONCE-ONLY
<makomo>
take a look at FBIND for the usage
<makomo>
no gensyms at all
z3t0 has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
<makomo>
and EVAL wouldn't even be a problem if i didn't have to explictily pass variables of the using macro to ONCE-ONLY-LIST so that they're available in the EVAL
<_death>
if you look at your final fbind macro, it looks pretty similar to the fbind that uses a function that returns the gensyms and the bindings
<makomo>
_death: do you have the FBIND version that uses a function? i don't have it
<makomo>
right, but i don't see how that's a bad thing. it's not something you can avoid either, since there's an arbitrary number of symbols you have to create
<makomo>
they'll have to be gensyms
<_death>
yes, but what does the macro give you that the function doesn't
<makomo>
the fact that i don't have to write the prefix LET myself
<makomo>
and the fact that i don't have to write such a function myself
<_death>
just a gnarly macro ;)
arbxs has joined #lisp
<makomo>
the call to this function and then binding its results and using them to prefix my own macro with a LET
<makomo>
that's what i want to avoid, and that's the job of ONCE-ONLY and ONCE-ONLY-LIST
<makomo>
i don't want to do that every time
ku is now known as k-hos
<_death>
and still you can have a once-only-list macro that doesn't use once-only and it should be much simpler
<makomo>
right, true, and that's the one Bike wrote
<makomo>
to me that seems like the best solution i think
<makomo>
although it then requires that the author plan ahead for the arbitrary version right away, instead of the constant version
<makomo>
and the constant version can then be derived from the arbitrary one, i think
<_death>
only the name is confusing because the analogy isn't very good
<makomo>
hmm. yeah, the arbitrary one evaluates at macroexpansion time so maybe that's why it appears to be different?
<makomo>
_death: huh... i don't think the constant version can be written using the arbitrary version... without EVAL
<makomo>
i'm not sure yet, i'll try
vlatkoB has quit [Remote host closed the connection]
lumm has joined #lisp
shifty has joined #lisp
lumm has quit [Ping timeout: 240 seconds]
JuanDaugherty has quit [Quit: Exeunt]
<pjb>
makomo: in scheme eval takes an environment argument (like macroexpand or the macro functions). This is what makes it actually rather useless! You don't usually have the environment you want to evaluate things…
<pjb>
(and since scheme doesn't have dynamic bindings (by default), …)
brendyn has quit [Ping timeout: 240 seconds]
zxcvz has quit [Quit: zxcvz]
lumm has joined #lisp
<Xach>
auricle: What is GLL?
brettgilio has quit [Remote host closed the connection]
arzoriac has joined #lisp
arzoriac has left #lisp [#lisp]
housel has quit [Read error: Connection reset by peer]
<auricle>
Xach: that seems liek a beefed up regex library. I think GLLs are like beefed up PEGs (they can parse CFGs)
<Xach>
"literally the bnf grammar" is what made me think of it
<auricle>
Xach: by that I meant being able to write "expr -> expr + expr" whereas that would never work in most parsers... you'd need to factor it out; not so with GLLs
mindCrime__ has quit [Ping timeout: 240 seconds]
<auricle>
Xach: have you ever translated a library from scheme that I could use as a reference for all the tricky "..." (scheme's macro ellipses) etc?
<Xach>
auricle: no, sorry.
charh has joined #lisp
angavrilov has quit [Remote host closed the connection]
Smokitch has quit []
<auricle>
Xach: in case you're interested there's apparently a so-called "Earley algorithm" that gives us PEGs with left-recursion. anyway, I'm out, have a good day, and thanks for all you do for CL
nickenchuggets has joined #lisp
nickenchuggets has joined #lisp
nickenchuggets has quit [Changing host]
<Xach>
beach has sung earley's praises in that pst
Bike has quit [Ping timeout: 252 seconds]
LiamH has quit [Quit: Leaving.]
xrash has joined #lisp
quazimodo has quit [Ping timeout: 264 seconds]
quazimodo has joined #lisp
nickenchuggets has quit [Read error: Connection reset by peer]
nickenchuggets has joined #lisp
nickenchuggets has quit [Changing host]
nickenchuggets has joined #lisp
mindCrime__ has joined #lisp
eli_oat has quit [Ping timeout: 240 seconds]
karlosz has quit [Quit: karlosz]
brettgilio has quit [Remote host closed the connection]
karlosz has joined #lisp
kerframil has joined #lisp
JuanDaugherty has joined #lisp
kajo has quit [Ping timeout: 240 seconds]
kajo has joined #lisp
Murii_ has quit [Remote host closed the connection]
al-damiri has quit [Quit: Connection closed for inactivity]
warweasle_ has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
warweasle_ is now known as warweasle
rumbler31 has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
scymtym has joined #lisp
Bike has joined #lisp
lumm has quit [Ping timeout: 240 seconds]
MoziM has quit [Ping timeout: 240 seconds]
MoziM has joined #lisp
vertigo_ has quit [Ping timeout: 244 seconds]
DingoSaar has quit [Remote host closed the connection]
DingoSaar has joined #lisp
karlosz has quit [Quit: karlosz]
test1600 has quit [Ping timeout: 260 seconds]
brettgilio has joined #lisp
caltelt_ has joined #lisp
phoe has quit [Ping timeout: 276 seconds]
k4rtik has quit [Ping timeout: 265 seconds]
skapata has joined #lisp
igemnace has quit [Ping timeout: 260 seconds]
rumbler31 has quit [Remote host closed the connection]
nowhere_man has joined #lisp
pagnol has quit [Quit: Ex-Chat]
robotoad has quit [Quit: robotoad]
cymew has joined #lisp
JuanDaugherty has quit [Quit: Exeunt]
cymew has quit [Ping timeout: 244 seconds]
orivej has quit [Ping timeout: 260 seconds]
Kaisyu7 has quit [Quit: ERC (IRC client for Emacs 25.3.2)]
mindCrime__ has quit [Ping timeout: 264 seconds]
dyelar has joined #lisp
nullniverse has joined #lisp
orivej has joined #lisp
nickenchuggets has quit [Read error: Connection reset by peer]
jack_rabbit has joined #lisp
pseudonymous_ has quit [Ping timeout: 248 seconds]
robotoad has joined #lisp
random-nick has quit [Read error: Connection reset by peer]
pierpa has joined #lisp
dyelar has quit [Quit: Leaving.]
didi has joined #lisp
<didi>
Is anyone aware of an expression language for defining dates? Like CL-PPCRE accepts a parse tree for defining regular expressions.