pankajgodbole has quit [Remote host closed the connection]
linli has joined #lisp
linli has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 258 seconds]
themsay has quit [Read error: Connection reset by peer]
khisanth_ has quit [Ping timeout: 246 seconds]
orivej has quit [Ping timeout: 248 seconds]
vms14 has quit [Quit: WeeChat 2.3]
khisanth_ has joined #lisp
notzmv has joined #lisp
DGASAU has quit [Remote host closed the connection]
shifty has joined #lisp
<LdBeth>
Good morning
<Josh_2>
Mornin
bexx has joined #lisp
libertyprime has joined #lisp
leb has quit []
<libertyprime>
hey guys. could someone please write a macro for me pretty please. I just want something that's analogous to this emacs lisp. http://ix.io/1LhA ie.e it should run some code but first pass the code through another function
<Bike>
what are "run" and "try"
<libertyprime>
run is pretty much apply
<libertyprime>
try is an emacs builtin which runs the code but doesnt throw an exception
<libertyprime>
if it fails
FreeBirdLjj has joined #lisp
<libertyprime>
essentially i just need something which i can wrap around some syntax form and run a side effect using the raw code, then pass the raw code through transparently
<Bike>
i mean, i don't really get this, if run is apply then the func is actually called at macroexpansion time, and not at r untime
<oni-on-ion>
webpage ain't loading
FreeBirdLjj has quit [Remote host closed the connection]
<oni-on-ion>
also, may be better to ask in #emacs libertyprime
<Bike>
also, identity apparently only takes one argument.
<oni-on-ion>
i think it does not matter what the meaning is. why are there two? it would work the same in common lisp as emacs lisp.
<Bike>
okay, so your macro applys func at macroexpansion time. is it supposed to? that seems like a very strange thing to do
<libertyprime>
i think im not good enough at emacs lisp to optimise it. all i know is it does the job for me. id just like to know how to achieve what i want, properly, in common lisp
<Bike>
But I don't understand hwat job it is.
<Bike>
Do you actually want it to call this function at macroexpansion time or no?
<Bike>
I'm not asking about optimization, I'm asking what it is supposed to do.
FreeBirdLjj has joined #lisp
<oni-on-ion>
nah, he clearly doesnt
<oni-on-ion>
i dont think a macro is needed at all
<oni-on-ion>
so if func is not supplied, it becomes identity
<oni-on-ion>
run just wraps apply...
<oni-on-ion>
what i do not get is why there are two references to identity
<Bike>
yeah that really doesn't make sense. IDENTITY only takes one argument but it'll get a whole bunch of them here.
<libertyprime>
identity is used in 2 different ways here. when i macro expand the sideeffect function, i could expand it into a (progn) or an (identity), identity is able to handle the case where the body expands into a literal string, say
<oni-on-ion>
oh! i think it should be `(try (run func ,@body) nil) ...
<oni-on-ion>
what is 'try' catching otherwise ?
<Bike>
i just tried it in my emacs: (identity 4 5) is an error.
<Bike>
so if you ww
<libertyprime>
try caches the case where an identifier is provided but it hasnt been defined
<Bike>
Sorry. So if you wrote (sideeffect anything 4 5) it would be an error.
<libertyprime>
bike: that's alright. i havent found a way yet to handle multiple things. currently, it only handles a single argument, sexp or literal
wxie has joined #lisp
<Bike>
Then why did you write &rest?
FreeBirdLjj has quit [Ping timeout: 245 seconds]
<libertyprime>
i initially tried to handle multiple arguments
jeosol has quit [Ping timeout: 256 seconds]
<Bike>
It's not alright. In order to translate this for you we need to understand what it does, but what it does is incoherent.
<libertyprime>
thats ok. i dont need your help bike
<libertyprime>
if you cant handle a bit of incoherent code then you shouldnt be *helping* newer prammers
<Bike>
That's why I'm asking you what it does, but you haven't answered my macroexpansion question. Do you understand the question?
jeosol has joined #lisp
<libertyprime>
sorry, id like it to happen at macro expansion time because if i were to say make a trace function, i want to see the expression before its evaluated
<libertyprime>
sorry i lost my temper
<Bike>
So what you want is a macro that takes an operator and a body. At macroexpansion time it applies the operator to the unevaluated body. The macroexpansion then runs the body while suppressing errors. Is that right?
<libertyprime>
yup exactly
FreeBirdLjj has joined #lisp
<libertyprime>
sigh sorry im sitting next to this girl i asked out -- demonstrating for computer science school
<libertyprime>
and she has a boyfriend so im pretty on edge, trying to find a distraction
<Bike>
(defmacro sideffect (operator &rest body) (when operator (apply operator body)) `(ignore-errors ,@body)) (sideeffect print (error "hey")) => prints (error "hey") at macroexpansion time, then returns NIL, #<SIMPLE-ERROR>
<Bike>
in general you should avoid side effects at macro expansion time, though, since the implementation can macroexpand things as many times as it feels like
<pjb>
Bike: you didn't say an operator or nil.
terpri_ has joined #lisp
<libertyprime>
sitting next to tihs girl is pretty much a sideeffect
<libertyprime>
thanks for help
<Josh_2>
oof
terpri has quit [Ping timeout: 272 seconds]
sjl has joined #lisp
elfmacs has joined #lisp
Lord_of_Life has quit [Ping timeout: 248 seconds]
Lord_of_Life has joined #lisp
<abarbosa>
lol
ricekrispie has joined #lisp
vt240 has quit [Quit: WeeChat 1.9.1]
vt240 has joined #lisp
Josh_2 has quit [Quit: ERC (IRC client for Emacs 26.1)]
emacsomancer has quit [Ping timeout: 245 seconds]
<beach>
Good morning everyone!
bexx has quit [Remote host closed the connection]
<oni-on-ion>
gm!
karlosz_ has joined #lisp
zotan has quit [Ping timeout: 258 seconds]
zotan has joined #lisp
<abarbosa>
gn
libertyprime has quit [Ping timeout: 258 seconds]
karlosz_ has quit [Quit: karlosz_]
libertyprime has joined #lisp
emacsomancer has joined #lisp
ym555 has joined #lisp
<beach>
Sometimes the Common Lisp HyperSpec is not very precise.
<beach>
Does that mean that get-setf-expansion always returns something useful?
<beach>
Or does it mean that if get-setf-expansion does not return anything useful, then the SETF macro itself returns (SETF F)?
<beach>
Note to self: Improve the specification of GET-SETF-EXPANSION in WSCL.
elfmacs has quit [Ping timeout: 245 seconds]
abarbosa has quit [Remote host closed the connection]
<Bike>
i don't think any implementations don't have the default be returned by get-setf-expansion, at least.
<beach>
I am willing to believe that.
<Bike>
i mean, if you're worried about that in addition to the imprecision
<beach>
I am not worried about it.
kdas_ is now known as kushal
<oni-on-ion>
beach, i think that is exactly what it means
<beach>
oni-on-ion: Thanks a lot... since I gave two different interpretations.
<oni-on-ion>
okay, i think they are the same thing
<beach>
They are not.
<oni-on-ion>
i suppose that depends what you mean by 'useful
<Bike>
in the other case, get-setf-expansion would signal an error or return gibberish or something if the operator did not have a defined expansion.
<beach>
Yes.
<Bike>
a specially defined expansion*
<oni-on-ion>
the default is (setf f) , is that an error ?
<beach>
oni-on-ion: The default EXPANSION is that.
<beach>
But it says nothing about what get-setf-expansion does if there is no expander.
<beach>
oni-on-ion: GET-SETF-EXPANSION does not return (SETF F).
<beach>
oni-on-ion: So the question is what GET-SETF-EXPANSION returns for the place (F ...).
<beach>
But it doesn't matter.
<oni-on-ion>
but that is what it says: ' Any compound form is a valid place, since any compound form whose operator f has no setf expander are expanded into a call to (setf f). ' --- if no expander.. ?
leb has joined #lisp
Pixel_Outlaw has joined #lisp
<beach>
oni-on-ion: Suppose you are implementing the specification. What do you return from GET-SETF-EXPANSION, if it is given a place (F ...) that does not have an expander associated with it?
xkapastel has quit [Quit: Connection closed for inactivity]
<oni-on-ion>
(setq 'f #:NEW1)
<beach>
That looks like a single value, rather than the 5 values you are supposed to return.
<beach>
And it looks wrong too.
<oni-on-ion>
NIL NIL (#:NEW1) (SETQ F #:NEW1) F
<beach>
oni-on-ion: An where in the Common Lisp HyperSpec did you find this?
<beach>
oni-on-ion: Don't tell me you just tried it out in one implementation.
<oni-on-ion>
im experimenting in sbcl about it
<oni-on-ion>
=(
<beach>
That's not how specifications work.
<mfiano>
oni-on-ion: It's a recurring problem that you reply nonsense and disrupt otherwise constructive conversations. please just stop.
<oni-on-ion>
but.. defaulting to setq seems to make sense
<beach>
mfiano: I see. I should be quiet then.
actuallybatman has quit [Ping timeout: 248 seconds]
nowhereman has quit [Ping timeout: 258 seconds]
nowhere_man has joined #lisp
<oni-on-ion>
whoa.. and i am actually trying to learn this stuff. way to shame someone publically ! now what do i do? never talk? or think that everything i say is disruptive and destructive? i will understand if my words disturb you but it is not fair to myself or others to make something personal like this. why have you not told me earlier something like this??
<oni-on-ion>
does everyone really think i am always a fool, and nonsense ? i am not sure what i am supposed to do or think here.
<oni-on-ion>
mfiano, in the meantime i will take this lightly and assume this is some carry-over from #lispgames and possibly a kind of personal issue with me you have not discussed or mentioned or hinted at. i would appreciate if you would discuss your problems with me, with just me personally. i will carry on as i was otherwise.
<oni-on-ion>
i can't imagine this feels good for either of us right now, whatever it is. i can learn to talk smarter at least, i will tr.
<oni-on-ion>
try*
nanoz has joined #lisp
actuallybatman has joined #lisp
<mfiano>
This has nothing to do with #lispgames, and more to do with all the complaints from multiple channels I've heard about you recently, but this is not the forum for that discussion, so that's all I have to say.
janetlouis88 has joined #lisp
Jeanne-Kamikaze has joined #lisp
karlosz_ has joined #lisp
aindilis has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
_whitelogger has joined #lisp
<libertyprime>
oni-on-ion is super helpful in all the cool chat rooms #haskell #lisp #emacs. oni-on-ion we love you. haters will hate
zhlyg has joined #lisp
<libertyprime>
as a side note, my phone is locked in lost property, my car key is snapped like the shards of narsil. i didnt get the job, i didnt get the girl, she has a boyfriend. im a little on edge!
<libertyprime>
we're all on edge. and irc is our happy place. dont forget that!
<no-defun-allowed>
libertyprime: prolly should pick a different girl then
shka_ has joined #lisp
Pixel_Outlaw has quit [Quit: Leaving]
nowhere_man has quit [Ping timeout: 246 seconds]
torbo has joined #lisp
nowhere_man has joined #lisp
flazh has quit [Ping timeout: 258 seconds]
flazh has joined #lisp
Bike has quit [Quit: Lost terminal]
nowhere_man has quit [Ping timeout: 258 seconds]
iovec has joined #lisp
atgreen has quit [Ping timeout: 248 seconds]
vlatkoB has joined #lisp
karlosz_ has quit [Quit: karlosz_]
_whitelogger has joined #lisp
leb has quit []
Jeanne-Kamikaze has quit [Quit: Leaving]
torbo has quit [Remote host closed the connection]
nowhere_man has joined #lisp
elfmacs has joined #lisp
donotturnoff has joined #lisp
rozenglass has quit [Remote host closed the connection]
GoldRin has quit [Read error: Connection reset by peer]
varjag has joined #lisp
varjag has quit [Ping timeout: 246 seconds]
lnostdal_ has joined #lisp
techquila has joined #lisp
lnostdal has quit [Ping timeout: 248 seconds]
<libertyprime>
i talked to her. +5 . also, lasagne discovered in the oven. +1
random-nick has joined #lisp
dale has quit [Quit: dale]
actuallybatman has left #lisp ["ERC (IRC client for Emacs 26.2)"]
Inline has quit [Quit: Leaving]
makomo has joined #lisp
<no-defun-allowed>
you still would have to be better than her bf. +most-negative-fixnum, and this isn't really a place for talking about relationships so i should shut up. +#c(0 #.most-positive-fixnum)
orivej has joined #lisp
cosimone has joined #lisp
<makomo>
morning
cosimone has quit [Client Quit]
vaporatorius has quit [Read error: Connection reset by peer]
ravenousmoose has joined #lisp
donotturnoff has quit [Remote host closed the connection]
ggole has joined #lisp
libre-man has quit [Ping timeout: 248 seconds]
libre-man has joined #lisp
Inline has joined #lisp
srji has joined #lisp
janetlouis88 has left #lisp [#lisp]
admich has joined #lisp
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
beach has quit [Ping timeout: 252 seconds]
dkmueller has joined #lisp
dddddd has quit [Remote host closed the connection]
cosimone has joined #lisp
beach has joined #lisp
Inline has quit [Ping timeout: 264 seconds]
SaganMan has joined #lisp
cosimone has quit [Quit: WeeChat 2.4]
Lycurgus has joined #lisp
_whitelogger has joined #lisp
ravenousmoose has joined #lisp
SaganMan has quit [Ping timeout: 248 seconds]
dkmueller has quit [Quit: WeeChat 1.6]
DGASAU has joined #lisp
elfmacs has quit [Ping timeout: 248 seconds]
shifty has quit [Ping timeout: 244 seconds]
xkapastel has joined #lisp
MichaelRaskin has joined #lisp
v88m has quit [Ping timeout: 258 seconds]
Inline has joined #lisp
Lycurgus has quit [Quit: Exeunt]
<moldybits>
libertyprime: why do you want to print the expression at macroexpansion time, though? why not just have it print the expression right before it is evaluated? (progn (print 'expr) expr)
nowhere_man has quit [Ping timeout: 248 seconds]
random-nick has quit [Read error: Connection reset by peer]
Bike has joined #lisp
atgreen has joined #lisp
atgreen_ has joined #lisp
atgreen has quit [Ping timeout: 272 seconds]
random-nick has joined #lisp
Necktwi has joined #lisp
gareppa has joined #lisp
zulu-inuoe has joined #lisp
v88m has joined #lisp
q3d has joined #lisp
nowhere_man has joined #lisp
lnostdal_ has quit [Remote host closed the connection]
wxie has quit [Quit: wxie]
lnostdal has joined #lisp
_whitelogger has joined #lisp
<shka_>
hello everyone
<shka_>
is there a way to document slots in the structure?
<shka_>
using docstrings, that is
lispyone_ has joined #lisp
Josh_2 has joined #lisp
lispyone has quit [Ping timeout: 258 seconds]
lispyone_ is now known as lispyone
v0|d has joined #lisp
<beach>
It doesn't look like it. But why would you want to do that? Slots are implementation details, so the documentation would be in comments, since it would be meant for the same person as the one reading the code.
donotturnoff has joined #lisp
<libertyprime>
moldybits: thanks, yeah that's probably what i was really after. cheers
<moldybits>
and you can have a macro write that for you, of course.
<puchacz>
hi, can Parenscript generate Javascript with async/await?
<puchacz>
or modules?
manualcrank has quit [Ping timeout: 245 seconds]
rjvehn has quit [Ping timeout: 256 seconds]
lnostdal has quit [Remote host closed the connection]
_whitelogger has joined #lisp
kajo has quit [Ping timeout: 258 seconds]
gareppa has quit [Quit: Leaving]
igemnace has joined #lisp
v88m has quit [Read error: Connection reset by peer]
v88m has joined #lisp
q3d has quit [Ping timeout: 256 seconds]
Inline has quit [Ping timeout: 264 seconds]
v88m has quit [Read error: Connection reset by peer]
v88m has joined #lisp
refpga has joined #lisp
dddddd has joined #lisp
actuallybatman has joined #lisp
_whitelogger has joined #lisp
Lord_of_Life_ has joined #lisp
xantoz has quit [Quit: WeeChat 2.4]
cosimone has joined #lisp
xantoz has joined #lisp
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lord_of_Life_ is now known as Lord_of_Life
ebrasca has joined #lisp
Jeanne-Kamikaze has joined #lisp
Inline has joined #lisp
Jeanne-Kamikaze has quit [Quit: Leaving]
ebrasca has quit [Remote host closed the connection]
nowhere_man has quit [Ping timeout: 259 seconds]
nowhereman has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
leb has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
gravicappa has joined #lisp
lnostdal has joined #lisp
dkmueller has joined #lisp
abarbosa has joined #lisp
zcid has quit [Ping timeout: 246 seconds]
abarbosa has quit [Read error: Connection reset by peer]
leb has quit []
abarbosa has joined #lisp
abarbosa has quit [Read error: Connection reset by peer]
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
zcid has joined #lisp
Kundry_Wag has quit [Ping timeout: 258 seconds]
leb has joined #lisp
v0|d has quit [Ping timeout: 272 seconds]
vlatkoB_ has joined #lisp
vlatkoB has quit [Ping timeout: 248 seconds]
leb has quit []
v88m has quit [Read error: Connection reset by peer]
v88m has joined #lisp
Kundry_Wag has joined #lisp
marusich has joined #lisp
shifty has joined #lisp
anamorphic has joined #lisp
leb has joined #lisp
lnostdal has quit [Quit: "Fascism, Nazism, Communism and Socialism are only superficial variations of the same monstrous theme—collectivism." -- Ayn Rand]
leb has quit [Client Quit]
lnostdal has joined #lisp
Kundry_Wag has quit [Ping timeout: 246 seconds]
rippa has joined #lisp
anamorphic has quit [Ping timeout: 245 seconds]
karlosz_ has joined #lisp
dacoda has joined #lisp
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cosimone has quit [Ping timeout: 259 seconds]
nanoz has quit [Ping timeout: 248 seconds]
cosimone has joined #lisp
karlosz_ has quit [Quit: karlosz_]
gareppa has joined #lisp
dacoda has quit [Read error: Connection reset by peer]
random-nick has quit [Ping timeout: 248 seconds]
dacoda has joined #lisp
Kundry_Wag has joined #lisp
nowhereman has quit [Ping timeout: 272 seconds]
Kundry_Wag has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
nanoz has joined #lisp
Kundry_Wag has quit [Ping timeout: 246 seconds]
makomo has quit [Quit: WeeChat 2.4]
cosimone has quit [Quit: WeeChat 2.4]
gareppa has quit [Quit: Leaving]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Client Quit]
nicdev has quit [Quit: ERC (IRC client for Emacs 26.1)]
nicdev has joined #lisp
nanoz has quit [Quit: Leaving]
nicdev has quit [Quit: ERC (IRC client for Emacs 26.1)]
torbo has joined #lisp
kajo has joined #lisp
nicdev has joined #lisp
v0|d has joined #lisp
karlosz_ has joined #lisp
Inline has quit [Read error: Connection reset by peer]
Inline has joined #lisp
dacoda has quit [Remote host closed the connection]
dacoda has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
karlosz_ has quit [Quit: karlosz_]
kajo has quit [Ping timeout: 248 seconds]
abarbosa has joined #lisp
abarbosa has quit [Remote host closed the connection]
nowhereman has joined #lisp
nicdev has quit [Quit: ERC (IRC client for Emacs 26.1)]