morganw has quit [Remote host closed the connection]
Oladon has quit [Quit: Leaving.]
hashfunc1818 has quit [Ping timeout: 240 seconds]
orestarod has quit [Ping timeout: 240 seconds]
jkordani has joined #commonlisp
varjag has quit [Ping timeout: 240 seconds]
varjag has joined #commonlisp
Alfr has quit [Ping timeout: 256 seconds]
Bike has quit [Quit: Lost terminal]
s-liao has quit [Ping timeout: 256 seconds]
random-nick has quit [Ping timeout: 240 seconds]
ec has quit [Quit: ec]
s-liao has joined #commonlisp
NotThatRPG is now known as NotThatRPG_away
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
s-liao has quit [Quit: Ping timeout (120 seconds)]
s-liao has joined #commonlisp
varjag has quit [Ping timeout: 256 seconds]
Colleen has quit [Read error: Connection reset by peer]
Colleen has joined #commonlisp
notzmv has quit [Ping timeout: 240 seconds]
eugercek has quit [Remote host closed the connection]
notzmv has joined #commonlisp
ski has quit [Ping timeout: 256 seconds]
ski has joined #commonlisp
Bike has joined #commonlisp
raeda has joined #commonlisp
raeda_ has quit [Read error: Connection reset by peer]
<beach>
Good morning everyone!
<s-liao>
good morning
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #commonlisp
karlosz has joined #commonlisp
notzmv has quit [Ping timeout: 250 seconds]
azimut has quit [Ping timeout: 240 seconds]
igemnace has quit [Remote host closed the connection]
semz_ has joined #commonlisp
notzmv has joined #commonlisp
s-liao has quit [Quit: Client closed]
semz has quit [Ping timeout: 252 seconds]
lisp123 has joined #commonlisp
Inline__ has joined #commonlisp
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
luna-is-here has quit [Remote host closed the connection]
Inline has quit [Ping timeout: 256 seconds]
luna-is-here has joined #commonlisp
hashfunc1353 has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
Bike has quit [Quit: Connection closed]
pranavats has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
<Josh_2>
Mornin'
amb007 has quit [Ping timeout: 272 seconds]
amb007 has joined #commonlisp
igemnace has joined #commonlisp
igemnace has quit [Remote host closed the connection]
Oladon has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
lisp123 has joined #commonlisp
jkordani has quit [Quit: Client closed]
lisp123 has quit [Ping timeout: 256 seconds]
waleee has quit [Ping timeout: 240 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Guest74 has joined #commonlisp
igemnace has joined #commonlisp
<Josh_2>
Using methods to generate code within a macro :sunglasses:
Oladon has quit [Quit: Leaving.]
hashfunc1353 has quit [Ping timeout: 240 seconds]
igemnace has quit [Quit: WeeChat 3.4]
igemnace has joined #commonlisp
igemnace has quit [Client Quit]
igemnace has joined #commonlisp
igemnace has quit [Client Quit]
amb007 has quit [Read error: Connection reset by peer]
Posterdati has quit [Ping timeout: 272 seconds]
igemnace has joined #commonlisp
attila_lendvai has joined #commonlisp
Posterdati has joined #commonlisp
wyrd has quit [Remote host closed the connection]
wyrd has joined #commonlisp
mgl has joined #commonlisp
karlosz has quit [Quit: karlosz]
<scymtym>
Guest74: that was my conclusion as well. though maybe a pair of custom get/put functions can work. i will have to experiment more
<Colleen>
scymtym: Guest7482 said 12 hours, 15 minutes ago: I've got to go now, but forgot to mention that to read those events properly you'd have to change the whole way extensions and events are declared, and how they are read. The easy hacky solution would be to name the second event notify-union and then just get a sequence of card8's that you can assemble into
<Colleen>
the events depending
pjb has quit [Remote host closed the connection]
shka has joined #commonlisp
hashfuncc47 has joined #commonlisp
amb007 has joined #commonlisp
<hashfuncc47>
why is ... 123 ... trying to get called as a function in this macro?
<hashfuncc47>
(defmacro test (file &body body) (princ file) (princ body) (with-open-file (str file :direction :output :if-exists :supersede) (princ body str)))
<hashfuncc47>
(test "~/file" 123)
<hashfuncc47>
in other words, why is ... with-open-file ... treating 123 as a list to be evaluated?
<hashfuncc47>
i understand that 123 gets bound to a list since it is specified as a &body parameter, but why is said list trying to get evaluated?
<hashfuncc47>
i suppose that unless you're only using macros to generate a templated form, it cannot be garaunteed that a form passed to a compile-time-only-macro will not get evaluated? that's the only conclusion i can come to
<beach>
hashfuncc47: Body will be the singleton list (123) and it is in a position to be evaluated.
<beach>
(princ (123) str)
<beach>
hashfuncc47: There is no such thing as "it can't be guaranteed" in Common Lisp.
<beach>
The semantics dictate precisely what is evaluated.
<beach>
This macro of yours doesn't do what a typical macro does, i.e., generate code.
Dynom has joined #commonlisp
<gin>
does (nth k some-list) traverse some-list linearly until it finds the element at index k?
<gin>
I ask this because lists are implemented as cons cells, right? so lists are linked-lists internally. right?
<beach>
gin: Yes, it has to. It CDRs down the list k times.
<gin>
thank you. is there a random access list that can provide kth element in constant time?
<hashfuncc47>
beach: i think i just had the AHA moment
<beach>
Great!
scymtym has quit [Ping timeout: 256 seconds]
<hashfuncc47>
so a macro is just a form, designed such that the arguments passed to said form will not be evaluated in it's lambda list of which it is associated with. but, after that, anything's possible baby
<beach>
A macro is a function that takes source code as an argument and returns source code as a value.
<beach>
Try (funcall (macro-function 'when) '(when x y z) nil)
<hashfuncc47>
for sure for sure. but i think a definition that is less assumptious would be, "A macro is a function that takes source code as an argument". since it very well might not return any source code, but instead be full of code that has side effects?
<beach>
It has no choice. When the compiler (or evaluator) sees a macro form, it calls the macro function, and it uses what the macro function returns and compiles it in place of the original macro form.
<beach>
But, sure, that return value could be something relatively harmless in most cases like a constant.
<hashfuncc47>
i definitely have a more solid understanding of lisp now. slowly but steadily the pieces are coming together. i truly believe this is the language of the future. i don't see it any other way. beach, thanks for the help the past few days
<beach>
Sure. Good luck!
amb007 has quit [Ping timeout: 240 seconds]
<gin>
I think most advanced concepts in Lisp can be built with some simple and very few primitives. like (defun ...) is nothing but a lambda assigned to a symbol name, right? (let ...) is nothing but a lambda evaluated immediately, right?
<beach>
Sort of.
<beach>
The details are a bit more involved than that, but that's the basic idea.
lisp123 has joined #commonlisp
edmrk[m] has quit [Quit: You have been kicked for being idle]
hashfuncc47 has quit [Ping timeout: 240 seconds]
scymtym has joined #commonlisp
ssafar has quit [Ping timeout: 256 seconds]
lisp123 has quit [Ping timeout: 250 seconds]
varjag has joined #commonlisp
lisp123 has joined #commonlisp
MajorBiscuit has joined #commonlisp
cosimone has joined #commonlisp
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 256 seconds]
attila_lendvai has quit [Ping timeout: 272 seconds]
lisp123 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
pjb has joined #commonlisp
kevingal_ has joined #commonlisp
aartaka has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
scymtym has quit [Ping timeout: 260 seconds]
scymtym_ has joined #commonlisp
robin has quit [Quit: Leaving]
attila_lendvai has joined #commonlisp
robin has joined #commonlisp
treflip has joined #commonlisp
scymtym__ has joined #commonlisp
scymtym_ has quit [Ping timeout: 256 seconds]
treflip has quit [Remote host closed the connection]
treflip has joined #commonlisp
pillton has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Brucio-61 has joined #commonlisp
dirtcastle has joined #commonlisp
amb007 has quit [Ping timeout: 250 seconds]
amb007 has joined #commonlisp
random-nick has joined #commonlisp
tyson2 has joined #commonlisp
Dynom has quit [Quit: WeeChat 3.4]
patrice has joined #commonlisp
patrice has quit [Ping timeout: 240 seconds]
s-liao has joined #commonlisp
Bike has joined #commonlisp
scymtym__ is now known as scymtym
<Josh_2>
I need to serialize and store a hash table in Postgres, any suggestions?
<jackdaniel>
what are the keys? what are the values?
<Josh_2>
Well for now I'm not very concerned with either of those, I just want to jam the result in my database
<splittist>
But if the keys are bignums and the values are nested objects, that's going to be very different from fixnums and 20-char strings.
<jackdaniel>
well, you know - your hash table may have as a value another hash table (for example), or a package, or a function
<jackdaniel>
and that nother package may have a few symbols in it
<jackdaniel>
s/nother/another/
<jackdaniel>
but if you don't have such concerns, then use cl-store and serialize the hash table to a binary vector
<jackdaniel>
and store that as a blob
<Josh_2>
its json parsed with jonathan
<Josh_2>
json from an api call
<Josh_2>
Okay I'll give cl-store a try
s-liao has quit [Ping timeout: 256 seconds]
<Josh_2>
Have you used cl-store with a flexi stream?
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
semz_ is now known as semz
alendvai__ has joined #commonlisp
<jackdaniel>
oh, so lively today. everyone watching the news I suppose.
attila_lendvai_ has quit [Ping timeout: 272 seconds]
waleee has quit [Ping timeout: 252 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
waleee has joined #commonlisp
amb007 has joined #commonlisp
<beach>
Not really. Not much I can do.
<jackdaniel>
I share the sentiment; still compulsive checking of news on disturbing times is a known phenomenon. But probably I'm wrong and people are just too busy with their projects to chat on irc
<pjb>
jackdaniel: of course, there's some news browsing.
<pjb>
But indeed, let's try not to be compulsive.
<splittist>
we're all compulsively hitting F5 waiting for the ELS site to update. That's what you meant, right?
<jackdaniel>
precisely
varjag has quit [Ping timeout: 250 seconds]
form_feed has joined #commonlisp
jealousmonk has joined #commonlisp
alendvai__ is now known as attila_lendvai
<edgar-rft>
I hope you don't hit the Northrop F5 :-(
<_death>
here F5 means magit-status
<Guest74>
scymtym: it's unfortunate. There was no reason for them to do so for that extension as there was no chance of them running out of event numbers. It's been almost 8 years! So took my brain a while to remember all the problems.
<Guest74>
Since most people that use clx events seem to have custom macros to define handlers it shouldn't be much work to incorporate the decoding there.
<Guest74>
It's much uglier if you hack into the event reader to special case for this one extension. though if you did it would probably be nice to just read the "data" portion, and then change the event number to what clx expects it to be and then shove it back onto the event queue and clx will decode it properly and everybodies event dispatching will
<Guest74>
work as planned.
dirtcastle has quit [Read error: Connection reset by peer]
dirtcastle has joined #commonlisp
<Guest74>
it's ugly because you have to somehow know within the event reader what extension number is given to randr, which is only possible once a connection is open and may be different for different displays. So that may be an issue for people like me who will open up a connection to their phone.
<Guest74>
the problems that prevented other more useful extensions to be implemented are much uglier.
<Bike>
Xach: quicklisp question - we're seeing that the architecture.builder-protocol quicklisp downloads does not seem to correspond to any commit in scymtym's repo, and the downloaded version has a bug in it. do you know what could be going on?
<scymtym>
Guest74: i was thinking maybe we can keep the event declaration and use a special decoder that dispatches on the sub-type in the declaration body. but i haven't tried it
clos-encounters has joined #commonlisp
<Guest74>
scymtym: the problem is knowing which extension you are dealing with. As the data portion of a reply is usually used for other things.
<scymtym>
Guest74: i think that part of the dispatch including the dynamic registration of extension events works? maybe i'm misunderstanding
<Guest74>
I might not be remembering correctly. I'm not sure if the event reader has the display object. or if the translation to an internel event number is done before the event is read. I'll have to check.
<scymtym>
i'm thinking about defining the second event as (declare-event :rr-notify …) where … would use a decoder that looks at the sub-type and decodes the rest of the event accordingly
<Guest74>
is that quoting me or you saying something?
<scymtym>
not quoting
<Guest74>
if you just work on the part after it's dispatched it's fine.
<scymtym>
yeah, that's what i want to try
<scymtym>
the situation is kind of bizarre. apparently the were ok with allocating two events ids but not four
<scymtym>
*they were
<Guest74>
you also just declare the second event to be a list of all the events that it encompasses. It'll give some semblance of being proper.
<Guest74>
yes, they did stupid stuff. Or at least stupid stuff from our viewpoint. I guess they figured they just hack in a union and choose based on the data.
<Guest74>
s/also/can also/
<scymtym>
i'm not even sure i need any of RRNotify events. i just want to reload the screen geometry when is (un)plugged
<Guest74>
i think you need the output notify for that.
<Guest74>
funny, i was actually going to start working on dual monitor stuff this year.
<Guest74>
I've only ever used the screen-change-notify because so far I've only been concerned with changing resolution and rotating my screen.
<scymtym>
i fixed a bunch of the other stuff already so i can inspect the output configuration properly
v88m has quit [Ping timeout: 240 seconds]
Oladon has joined #commonlisp
waleee has quit [Ping timeout: 245 seconds]
<Guest74>
I think you might be able to get away with just (sequence :format card8) which should do the right thing instead of using sequence-get, which I'm not sure how it'll respond if you always request 30? card8s.
<Guest74>
maybe it's 28.
waleee has joined #commonlisp
<Xach>
Bike: i can look
tyson2 has quit [Remote host closed the connection]
<Xach>
Bike: looks like i had a pull error from diverged upstream
<Bike>
is there something we can do to mitigate this?
<Xach>
Bike: i can correct it locally. rewriting history can cause some trouble for me, but i should be more vigilant about checking for it and correcting it.
<Bike>
so it was due to the git history being rewritten?
rgherdt has quit [Ping timeout: 272 seconds]
<Xach>
Bike: i think so.
<Bike>
i see. that was my best guess, but i don't have the reflog or anything
<Bike>
thanks for fixing it and sorry for the confusion
<scymtym>
i don't remember what happened. sorry in any case
robin has quit [Quit: Leaving]
robin has joined #commonlisp
sterni has quit [Ping timeout: 240 seconds]
sterni has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 256 seconds]
robin has quit [Quit: Leaving]
robin has joined #commonlisp
robin has quit [Client Quit]
robin has joined #commonlisp
robin has quit [Client Quit]
robin has joined #commonlisp
treflip has quit [Remote host closed the connection]
szkl has quit [Quit: Connection closed for inactivity]
rgherdt has joined #commonlisp
dirtcastle has quit [Quit: Quit]
attila_lendvai has quit [Ping timeout: 256 seconds]
varjag has joined #commonlisp
White_Flame has quit [Ping timeout: 250 seconds]
White_Flame has joined #commonlisp
waleee has quit [Ping timeout: 240 seconds]
Guest74 has quit [Quit: Connection closed]
Alfr has joined #commonlisp
jeosol has quit [Quit: Client closed]
morganw has joined #commonlisp
v88m has joined #commonlisp
waleee has joined #commonlisp
notzmv has quit [Ping timeout: 240 seconds]
mgl has quit [Quit: Client closed]
tyson2 has joined #commonlisp
tane has joined #commonlisp
tane has joined #commonlisp
cosimone has joined #commonlisp
dirtcastle has joined #commonlisp
dirtcastle has quit [Client Quit]
Dynom has joined #commonlisp
<wmblathers>
Xach: is there a polite way to get at the underlying ZPNG:PNG object in vecto? I'm doing generative art with a lot of direct pixel work, but sometimes it'd be good to have nice, anti-aliased vector drawing mixed in.
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
Oladon has quit [Quit: Leaving.]
<Xach>
wmblathers: i don't recall, but i won't scold you for just grabbing it
pjb has quit [Read error: Connection reset by peer]
<Xach>
i only ask that you show me any cool art you make
<wmblathers>
Sure. I just didn't want to grab a symbol that might change in the future.
pjb has joined #commonlisp
<phoe>
wmblathers: I remember merging that thing recently
<Demosthenex>
so, i tried making lazy eval'ed slots on my object, and i defined accessors to cover it. however if with-slot or slot-value is used, it appears to bypass that. how can i trigger that lazy eval?
kevingal_ has quit [Ping timeout: 240 seconds]
<jackdaniel>
define slot-unbound method for each and don't initialize them with any value
<jackdaniel>
when slot-unbound method is called then set the slot value and return it
<Demosthenex>
i'll go read on that
<Demosthenex>
ty
wacki has quit [Quit: Leaving.]
scymtym has quit [Ping timeout: 240 seconds]
Brucio-61 has quit [Ping timeout: 268 seconds]
Inline__ is now known as Inline
igemnace has quit [Ping timeout: 256 seconds]
notzmv has joined #commonlisp
tane has quit [Quit: Leaving]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
Dynom has quit [Quit: WeeChat 3.4]
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
wacki has joined #commonlisp
wacki has quit [Quit: Leaving.]
aartaka has quit [Ping timeout: 260 seconds]
opcode has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
aartaka has joined #commonlisp
hashfunc1160 has joined #commonlisp
<hashfunc1160>
in file:///usr/share/doc/hyperspec/Body/f_mexp_.htm "Neither macroexpand nor macroexpand-1 makes any explicit attempt to expand macro forms that are either subforms of the form or subforms of the expansion. Such expansion might occur implicitly, however, due to the semantics or implementation of the macro function."
<hashfunc1160>
isn't that contradictory to the behavior of macroexpand?
<hashfunc1160>
"macroexpand repeatedly expands form until it is no longer a macro form. In effect, macroexpand calls macroexpand-1 repeatedly until the secondary value it returns is nil."
Oladon has joined #commonlisp
_patrice has joined #commonlisp
<Bike>
hashfunc1160: macroexpand repeatedly expands the form, not its subforms. the first thing you qouted is about subforms
<hashfunc1160>
Bike: oh ok. so macroexpand essentially looks at the car of the form and sees that it's a macro form, then expands the form, looks again at the car of the form to see if it's a macro form, etc. etc.
pillton has joined #commonlisp
<hashfunc1160>
while macroexpand-1 just does one iteration of that
<hashfunc1160>
& macroexpand-all (which doesn't appear to be in the spec) macroexpands the macro form and all of its subforms recursively
<hashfunc1160>
i get it now
pranavats has joined #commonlisp
<hashfunc1160>
correct me if i'm wrong please
aartaka has quit [Ping timeout: 256 seconds]
<Bike>
no, you've got it right
<hashfunc1160>
thanks Bike. that's reassuring that things are starting to click for me
hashfunc1160 has quit [Remote host closed the connection]
yewscion has joined #commonlisp
waleee has quit [Ping timeout: 260 seconds]
<jealousmonk>
Here is a section from the book "A Gentle Introduction to Symbolic Computation" https://0x0.st/oKW-.png
<jealousmonk>
According to the CLHS, the function LENGTH is defined only for proper sequences. I wonder if in older implementations it was possible to use LENGTH in a dotted list. The book is from 1990.
<phoe>
yes, that is from before ANSI CL
<phoe>
I assume that old LENGTH on non-null lists simply checked if the CDR was CONSP
<jealousmonk>
Ah!
<phoe>
therefore (A B C . NIL) which is a proper list would get treated the same way as (A B C . T) which is a dotted list
aartaka has joined #commonlisp
Oladon has quit [Quit: Leaving.]
igemnace has joined #commonlisp
scymtym has joined #commonlisp
dra has joined #commonlisp
shka has quit [Ping timeout: 250 seconds]
amb007 has quit [Ping timeout: 256 seconds]
_patrice has quit [Ping timeout: 256 seconds]
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]