<clothespin>
it's available with every CLOS implementation derived from PCL, portable common loops
amb007 has quit [Ping timeout: 256 seconds]
<clothespin>
so SBCL, ACL, CMUCL and Lispworks all are derived from PCL
dnhester has joined #commonlisp
<Kingsy>
CLOSER-MOP:DEFMETHOD, COMMON-LISP:DEFMETHOD <- it means you cant use CL with mop? haha this seems like a fairly big deal to just iterate over some slots.
<yitzi>
I dunno. Just wondering why you are telling us what the symbol package resolves to.
<clothespin>
my point would then be not to create unneccessary confusion for someone not familiar with mop
<Kingsy>
clothespin: hmm ok, so sb-mop:slot-value-using-class doesnt seem to just be returning the value, it returns a "weak pointer" or something. I hve not seen this before. thoughts?
<clothespin>
slot-value-using-class returns the slot value when called correctly
<yitzi>
They should use closer-mop or appropriate compatibility layer (trivial-xyz) to avoid poking around in the specific CL implementation details. Unless you've got a good reason to use sb-mop you should write portable code that doesn't depend on SBCL.
ldb has joined #commonlisp
<clothespin>
you should not also give a noob the impression that there is a function defined by closer mop that is somehow different
jmdaemon has joined #commonlisp
<clothespin>
Kingsy: closer-mop is just a thin compatibility layer to make it easier for people to write MOP progams which work on all CLOS's with MOPs
<Kingsy>
clothespin: hmm I mean I get really strange output -> https://bpa.st/C2CA
<ixelp>
View paste C2CA
<yitzi>
I didn't say it was different as I hadn't explained initially beyond "use closer-mop." Don't put words in my mouth.
<clothespin>
sb-mop:slot-value-using-class class dao slotd
<clothespin>
i fucking hate pretentious bitchy lispers
clothespin has left #commonlisp [Konversation terminated!]
<Kingsy>
yeah I am an idiot.
<yitzi>
Wow. Ok, noted.
<_death>
probably closer-mop should give a better explanation for why it provides its own DEFMETHOD macro, but it does give some explanation in the readme.. if you don't do advanced mop hackery, just want to get the list of slot definitions of a class, it's ok to still use CL:DEFMETHOD
<_death>
but I would question the desire to create a hash-table from the slots.. the latter should be an implementation detail
<ldb>
thinking that there is no standard defined way to inject into defmethod, the answer should be obivious
mgl has quit [Ping timeout: 252 seconds]
dra has quit [Ping timeout: 272 seconds]
<pillton>
Kingsy: Why does your class have lots of slots?
pawa2 has joined #commonlisp
<Kingsy>
pillton: its a dao for postmodern that links to a table that has about 12 columns.
<Kingsy>
haha so by alot I mean 12 :D
rogersm has joined #commonlisp
fitzsim has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
rogersm has quit [Ping timeout: 264 seconds]
<pillton>
I'm not familiar with postmodern enough to be of much use but I agree with _death's question. I am not sure what you mean by building "a hashmap of the class" but it strikes me as something the database already does for you.
jon_atack has joined #commonlisp
NicknameJohn has quit [Ping timeout: 240 seconds]
jonatack has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
ldb has quit [Ping timeout: 255 seconds]
amb007 has quit [Ping timeout: 255 seconds]
knusbaum has quit [Ping timeout: 255 seconds]
Lord_of_Life has quit [Ping timeout: 264 seconds]
Lord_of_Life has joined #commonlisp
ronald has quit [Ping timeout: 255 seconds]
ronald has joined #commonlisp
bubblegum has joined #commonlisp
ymir has quit [Ping timeout: 268 seconds]
santiagopim has quit [Ping timeout: 252 seconds]
bubblegum has quit [Ping timeout: 272 seconds]
bubblegum has joined #commonlisp
yitzi has quit [Remote host closed the connection]
bubblegum has quit [Read error: Connection reset by peer]
bubblegum has quit [Read error: Connection reset by peer]
bubblegum has joined #commonlisp
SunClonus has quit [Quit: Leaving]
rogersm has joined #commonlisp
ronald has quit [Read error: Connection reset by peer]
rogersm has quit [Ping timeout: 268 seconds]
ronald has joined #commonlisp
tyson2` has quit [Remote host closed the connection]
decweb has quit [Ping timeout: 255 seconds]
thuna` has joined #commonlisp
brokkoli_origin has quit [Ping timeout: 264 seconds]
brokkoli_origina has joined #commonlisp
gorignak has joined #commonlisp
fitzsim has quit [Remote host closed the connection]
markb1 has quit [Ping timeout: 255 seconds]
gorignak has quit [Quit: quit]
waleee has quit [Ping timeout: 255 seconds]
k_hachig has joined #commonlisp
pawa2 has quit [Quit: leaving]
markb1 has joined #commonlisp
ymir has quit [Ping timeout: 268 seconds]
ymir has joined #commonlisp
k_hachig has quit [Quit: WeeChat 4.2.1]
ldb has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
bilegeek has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
ymir has quit [Read error: Connection reset by peer]
bilegeek_ has joined #commonlisp
aurelius_nero has joined #commonlisp
bilegeek has quit [Ping timeout: 272 seconds]
mulk has quit [Ping timeout: 252 seconds]
rogersm has joined #commonlisp
mulk has joined #commonlisp
wacki has joined #commonlisp
rogersm has quit [Ping timeout: 246 seconds]
igemnace has joined #commonlisp
thuna` has quit [Remote host closed the connection]
ymir has joined #commonlisp
ebrasca has quit [Remote host closed the connection]
jjnkn has joined #commonlisp
dustinm` has quit [Quit: Leaving]
msavoritias has joined #commonlisp
ymir has quit [Ping timeout: 252 seconds]
dustinm` has joined #commonlisp
pve has joined #commonlisp
amb007 has joined #commonlisp
Inline has joined #commonlisp
Pixel_Outlaw has quit [Quit: Leaving]
rgherdt has joined #commonlisp
zetef has joined #commonlisp
rogersm has joined #commonlisp
rogersm has quit [Remote host closed the connection]
rogersm has joined #commonlisp
zetef has quit [Remote host closed the connection]
rogersm has quit [Ping timeout: 268 seconds]
ronald has quit [Ping timeout: 260 seconds]
ronald has joined #commonlisp
NicknameJohn has joined #commonlisp
kopiyka has quit [Remote host closed the connection]
rogersm has joined #commonlisp
kopiyka has joined #commonlisp
gjvc has quit [Quit: leaving]
bilegeek__ has joined #commonlisp
bilegeek_ has quit [Ping timeout: 260 seconds]
rogersm has quit [Ping timeout: 246 seconds]
thuna` has joined #commonlisp
NicknameJohn has quit [Ping timeout: 255 seconds]
bendersteed has joined #commonlisp
azimut has joined #commonlisp
shka has joined #commonlisp
Cymew has joined #commonlisp
rogersm has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
zetef has joined #commonlisp
markb1 has quit [Ping timeout: 260 seconds]
chiselfu1e is now known as chiselfuse
traidare has joined #commonlisp
danse-nr3 has joined #commonlisp
alcor has joined #commonlisp
zetef has quit [Ping timeout: 264 seconds]
markb1 has joined #commonlisp
epony has joined #commonlisp
ronald has quit [Ping timeout: 246 seconds]
ronald has joined #commonlisp
zetef has joined #commonlisp
<dnhester>
beach: thanks for answering. The use case is that I have a user table in the DB which contains password hashes and other data which is sensitive. I want to serialize the object as json and send it to the front end client without the sensitive data. But I don't want to serialize it by hand. I realize I can make the class mapped to the DB inherit from another class the main fields that are usable in the front end client, and then
<dnhester>
serialize the instance of the front end client class to avoid including those sensitive slots.
mm007emko has quit [Ping timeout: 255 seconds]
<beach>
I think I understand.
mm007emko has joined #commonlisp
<beach>
But that sounds like the inverse scenario, i.e., you want to change the class of a to be an instance of B so that you will lose some slots.
<beach>
But it doesn't matter. You seem to have figured it out.
<dnhester>
exactly
<dnhester>
I wanted to loose those slots
<dnhester>
yeah, thanks
<beach>
Got it.
dino__ has joined #commonlisp
donleo has joined #commonlisp
bilegeek__ has quit [Quit: Leaving]
epony has quit [Remote host closed the connection]
epony has joined #commonlisp
mgl has joined #commonlisp
zetef has quit [Remote host closed the connection]
mm007emko has quit [Read error: Connection reset by peer]
mm007emko has joined #commonlisp
dcb has quit [Quit: Connection closed for inactivity]
<dnhester>
If I call a function in (loop for a in (get-me-list)) will it be evaluated once or every run of the loop?
wbooze has joined #commonlisp
<beach>
Once.
<dnhester>
thanks
<beach>
You can check that by tracing the function.
<dnhester>
I've never done that, I have to learn to do it, I'll check the reference. (trace (foo))?
<beach>
(trace foo)
jon_atack has joined #commonlisp
<beach>
It wouldn't make any sense to call it in each iteration. What element would be chosen in subsequent iterations?
jonatack has quit [Ping timeout: 264 seconds]
<beach>
If the next element would be chosen, then you would have a quadratic list traversal, because the function would return a fresh list each time, so LOOP would have to CDR down the list once more in each iteration.
<dnhester>
is the benefit of the "when" conditional clause in the loop just to avoid the parenthesis?
<dnhester>
right that makes sense
<dnhester>
it's just that I saw someone else's code doing a let beforehand and I was wondering why
<beach>
Without a WHEN clause, you could not do a conditional COLLECT.
<dnhester>
they were also using some (iter (for item in list)) which I'm not acquiented with
<beach>
That's an external library, yes.
<beach>
,(loop for i in '(1 2 3 4 5 6) when (oddp i) collect i)
<ixelp>
(loop for i in '(1 2 3 4 5 6) when (oddp i) collect i) => (1 3 5)
<beach>
,(loop for i in '(1 2 3 4 5 6) do (when (oddp i) collect i))
<ixelp>
(loop for i in '(1 2 3 4 5 6) do (when (oddp i) collect i)) ERROR: Unbound variable: COLLECT
<dnhester>
,(loop for i in '(1 2 3 4 5 6) do (when (oddp i) collect i))
<ixelp>
(loop for i in '(1 2 3 4 5 6) do (when (oddp i) collect i)) ERROR: Unbound variable: COLLECT
<dnhester>
ahh
<dnhester>
didn't know that
<dnhester>
if I want to collect two items, I have to do two whens? the specs seem to say only the next clause, and then it continues executing
<beach>
,(loop for i in (1 2 3 4 5 6) when (oddp i) collect i and collect (* 3 i))
<ixelp>
(loop for i in (1 2 3 4 5 6) when (oddp i) collect i and collect (* 3 i)) ERROR: While compiling an anonymous function : ↩ In the form (1 2 3 4 5 6), 1 is not a symbol or lambda expression.
<beach>
Hmm.
<beach>
It seems you need two WHEN.
<beach>
,(loop for i in (1 2 3 4 5 6) for x = (oddp i) when x collect i when x collect (* 3 i))
<ixelp>
(loop for i in (1 2 3 4 5 6) for x = (oddp i) when x collect i when x collect (* 3 i)) ERROR: While compiling an anonymous function : ↩ In the form (1 2 3 4 5 6), 1 is not a symbol or lambda expression.
<beach>
Oh, my bad
<beach>
,(loop for i in '(1 2 3 4 5 6) when (oddp i) collect i and collect (* 3 i))
<ixelp>
(loop for i in '(1 2 3 4 5 6) when (oddp i) collect i and collect (* 3 i)) => (1 3 3 9 5 15)
<ixelp>
6.1 The LOOP Facility | Common Lisp (New) Language Reference
<dnhester>
thank
<beach>
It is.
<dnhester>
thanks
<beach>
Sure.
<dnhester>
not in the when sectin, it's in a different section, I didn't put two plus two equals four
<dnhester>
it would be ncie to add it over there to see how things come together
<beach>
Sure.
<dnhester>
maybe I'll add some examples in each section of using other loop keywords? or maybe a section on combining loop keywords to see how they come together? what do you think?
<beach>
Sounds good.
<dnhester>
I'm afraid of writing it because I don't have my glossary definitions worked out at a level where I'll be using the right words to express the meaning I intend. I'm still too fresh in terms of the CL word definitions
rogersm has quit [Remote host closed the connection]
<beach>
We will proofread.
<dnhester>
ok, great
<dnhester>
thanks
<beach>
Sure. But right now I am off for a break.
rogersm has joined #commonlisp
<splittist>
,(loop for i in '(1 2 3 4 5 6) when (oddp i) collect i into odds else collect i into evens finally (return (values odds evens)))
<ixelp>
(loop for i in '(1 2 3 4 5 6) when (oddp i) collect i into odds else collect i into evens finally (return (values odds evens))) => (1 3 5); (2 4 6)
wbooze has quit [Quit: Vision[]: i've been blurred!]
<splittist>
,(loop for c across "12 x 12 = 144" when (digit-char-p c) collect it)
<ixelp>
(loop for c across "12 x 12 = 144" when (digit-char-p c) collect it) => (1 2 1 2 1 4 4)
<dnhester>
splittist: those are some cool examples, thanks
<dnhester>
how can I tell if an argument is a clos object?
markb1 has quit [Ping timeout: 260 seconds]
<dnhester>
hm, take that back
czy has quit [Remote host closed the connection]
dra has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
markb1 has joined #commonlisp
tibfulv has joined #commonlisp
danse-nr3 has quit [Ping timeout: 240 seconds]
gjvc has joined #commonlisp
zetef has joined #commonlisp
zetef has quit [Remote host closed the connection]
czy has joined #commonlisp
rgherdt has quit [Ping timeout: 268 seconds]
danse-nr3 has joined #commonlisp
a51 has quit [Quit: WeeChat 4.2.1]
ronald has quit [Ping timeout: 272 seconds]
zetef has joined #commonlisp
dnhester has quit [Ping timeout: 268 seconds]
czy has quit [Remote host closed the connection]
ronald has joined #commonlisp
zetef has quit [Client Quit]
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
rgherdt has joined #commonlisp
pillton has quit [Remote host closed the connection]
rogersm has quit [Remote host closed the connection]
rogersm has joined #commonlisp
msv has quit [Remote host closed the connection]
random-nick has joined #commonlisp
dnhester has joined #commonlisp
msv has joined #commonlisp
rogersm has quit [Remote host closed the connection]
rogersm has joined #commonlisp
jmdaemon has quit [Ping timeout: 252 seconds]
rogersm has quit [Remote host closed the connection]
thuna` has quit [Remote host closed the connection]
yitzi has joined #commonlisp
<beach>
The term CLOS object is meaningless, as I often point out.
<beach>
You probably either mean a standard object or an instance of a standard class, probably the latter.
zetef has joined #commonlisp
<beach>
So (TYPEP (CLASS-OF ARGUMENT) 'STANDARD-CLASS) in that case.
rogersm has quit [Remote host closed the connection]
thuna` has quit [Remote host closed the connection]
rogersm has joined #commonlisp
josrr has quit [Remote host closed the connection]
jonatack has joined #commonlisp
josrr has joined #commonlisp
donleo has joined #commonlisp
rogersm has quit [Ping timeout: 255 seconds]
tyson2 has joined #commonlisp
szkl has joined #commonlisp
ldb has joined #commonlisp
yitzi has quit [Remote host closed the connection]
SunClonus has joined #commonlisp
unl0ckd has joined #commonlisp
alcor has quit [Remote host closed the connection]
alcor has joined #commonlisp
tyson2 has quit [Read error: Connection reset by peer]
danse-nr3 has joined #commonlisp
<younder>
Is it just me or does the way our Tokyo lispers seem a bit odd.. Roswell is run on the command line to generate projects.The projects have a main function. An editor LEM perhaps is used to edit code. The editor is exited and then Ros run is used to run main in the lisp code.
Pixel_Outlaw has joined #commonlisp
<younder>
Their web server clack and djula uses django templates. (python)
<younder>
That's not how I use Lisp at all. I use in interactively from within Emacs and rarely, if ever, go to the command line. There is never a main. Instead function's are called from the REPL. Beyond that I am happy with hunchentoot and spinneret (instead of cl-who). Development is interactive with the database and web servers running at all times.
<aeth>
younder: defining a "main" as the entry point for something that you run as a program or as a script can make sense... putting it in the project itself feels wrong, though.
josrr has quit [Ping timeout: 255 seconds]
tyson2 has joined #commonlisp
rogersm has joined #commonlisp
rogersm has quit [Remote host closed the connection]
bendersteed has quit [Quit: bendersteed]
eddof13 has joined #commonlisp
<younder>
Well 'Tokyo style' does take care of the problem of functions using 'stale' macro definitions etc.
josrr has joined #commonlisp
<splittist>
Using django / jinja-style templates means you can hand them off to designers who don't know spinneret
amb007 has quit [Ping timeout: 264 seconds]
amb007 has joined #commonlisp
BrokenCog has quit [Quit: leaving]
<ldb>
well that's the reason I dont use roswell, it is weired to me to run things from command line like that
unl0ckd has quit [Ping timeout: 268 seconds]
jmdaemon has joined #commonlisp
BrokenCog has joined #commonlisp
unl0ckd has joined #commonlisp
ldb` has joined #commonlisp
ldb has quit [Ping timeout: 256 seconds]
<aeth>
roswell is weird because it's designed to bootstrap from 0 Lisp
<aeth>
it would be more useful if it assumed a Lisp already
<aeth>
it's often easy to get a hold of a Lisp, it just might be out of date (e.g. if through your distro) or not the particular implementation you want to try.
<aeth>
I think it also uses the most recent Lisp you used iirc. Separating host and guest would be better. If I'm trying out 10 Lisps, I don't necessarily want a really slow one to be the one running the scripts because it happened to be the one I launched last.
ldb` has quit [Remote host closed the connection]
ldb` has joined #commonlisp
<ldb`>
and if only use one lisp then very unlikely have need for a tool like that
st_aldini has joined #commonlisp
<alcor>
It's impressive how the ocicl ecosystem grew in ~6 months. I'm checking the github organisation and it seems there's a lot of buy-in & activity now
unl0ckd has quit [Ping timeout: 268 seconds]
<younder>
Regarding occicl. Hope we don't end up with the 'version hell' that has plagued Python. When software is required to specify a version of the software it often takes the one currently on the machine. Now all others who ant to use the lib need to upgrade to that version. Which means old lib's won't wok. So you have a multitude of different versions and need virtual environment with local copies of all libraries just
<younder>
to avoid version conflicts.
jmdaemon has quit [Ping timeout: 268 seconds]
fitzsim has joined #commonlisp
traidare has quit [Ping timeout: 268 seconds]
yitzi has joined #commonlisp
SunClonusX has joined #commonlisp
knusbaum has joined #commonlisp
zxcvz has joined #commonlisp
SunClonus has quit [Ping timeout: 256 seconds]
<ldb`>
I see Clozure CL has been fading out
<yitzi>
It has a few updates lately.
<gilberth>
Yes, and how many updates do you need?
<alcor>
the missing arm64 support might be deal breaker for some
<yitzi>
Was that directed at me? I was just making the point that it has actually been updated lately, not that weren't enough updates.
<gilberth>
yitzi: I noticed. I was referring to the general impression or expectation that a software is "dead" when it doesn't have updates regularly for the sole sake of having updates.
<yitzi>
Gotcha.
amb007 has quit [Read error: Connection reset by peer]
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
amb007 has joined #commonlisp
Odin- has quit [Quit: Whut?]
igemnace has quit [Quit: WeeChat 4.2.1]
<gilberth>
Documentation with CCL is imho the greater issue. Unfortunately I can't clone myself otherwise I'd fix that. Besides as much as I like to prepare documentation for the web properly as terrible I am at writing.
<ldb`>
gilberth: it is not really about updates, but many newer CL packages rejects to support CCL
<gilberth>
That's hardly CCL's fault. And sad.
dra has joined #commonlisp
<yitzi>
ldb`: Specific examples? Just curious.
bubblegum has quit [Ping timeout: 268 seconds]
bubblegum has joined #commonlisp
bubblegum has quit [Read error: Connection reset by peer]
bubblegum has joined #commonlisp
ldb` has quit [Ping timeout: 246 seconds]
danse-nr3 has quit [Read error: Connection reset by peer]
danse-nr3 has joined #commonlisp
bubblegum has quit [Ping timeout: 260 seconds]
bubblegum has joined #commonlisp
dcb has joined #commonlisp
bubblegum has quit [Read error: Connection reset by peer]
knusbaum has quit [Remote host closed the connection]
knusbaum has joined #commonlisp
bubblegum has joined #commonlisp
bubblegum has quit [Read error: Connection reset by peer]
bubblegum has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
Cymew has quit [Ping timeout: 252 seconds]
epony has quit [Remote host closed the connection]
epony has joined #commonlisp
bubblegum has quit [Ping timeout: 252 seconds]
bubblegum has joined #commonlisp
knusbaum has quit [Ping timeout: 264 seconds]
<johnjaye>
is there a reader macro or something to abbreviate parentheses?
bubblegum has quit [Read error: Connection reset by peer]
<johnjaye>
like instead of saying (f (g (h x)) you would write f->g->h.x
<younder>
Not sure what you mean
bubblegum has joined #commonlisp
<johnjaye>
i mean basically a way to encapsulate just single argument functions
<johnjaye>
so you can eliminate the parens when it's just 1 argument
<johnjaye>
so you'd still write (f a b) but if it was (f a) you would write f.a or f+a or some syntax
<aeth>
But of the many infix reader macros, macros, etc., that people have written, few people actually use them
<aeth>
I've even written infix a few times.
<aeth>
As for arrows and similar, that's probably to address the complaint that you're programming "inside out" instead of in order when you do (h (g (f x))) although doing that for something like EXPT is probably just going to confuse people.
<johnjaye>
no i think i want something more like srfi 197.
<johnjaye>
basically something to just save a few parens
bubblegum has quit [Read error: Connection reset by peer]
bubblegum has joined #commonlisp
msavoritias has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
bubblegum has quit [Ping timeout: 252 seconds]
bubblegum has joined #commonlisp
jjnkn has quit [Quit: leaving]
<_death>
my advice is to get over it
pfdietz has quit [Quit: Client closed]
bubblegum has quit [Ping timeout: 260 seconds]
bubblegum has joined #commonlisp
bubblegum has quit [Read error: Connection reset by peer]
bubblegum has joined #commonlisp
bubblegum has quit [Ping timeout: 246 seconds]
bubblegum has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
pfdietz has joined #commonlisp
khrbtxyz has quit [Ping timeout: 264 seconds]
khrbtxyz has joined #commonlisp
waleee has joined #commonlisp
rogersm has joined #commonlisp
<gilberth>
I am new to $LANG, is there some way to write f(a,b) instead of a.f(b) to save confusion? Also I can't remember precedence, is there a way to get a more uniform syntax so that I can write +(3, *(3, 4)) instead?
traidare has joined #commonlisp
<pfdietz>
Language designers hate this one trick...
_cymew_ has joined #commonlisp
pfdietz has quit [Quit: Client closed]
pfdietz has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 29.1]
rogersm has quit [Quit: Leaving...]
jonatack has quit [Ping timeout: 255 seconds]
_cymew_ has quit [Ping timeout: 272 seconds]
attila_lendvai_ has quit [Ping timeout: 264 seconds]
NicknameJohn has joined #commonlisp
Lycurgus has quit [Quit: leaving]
alcor has quit [Remote host closed the connection]
Lycurgus has joined #commonlisp
Inline has quit [Quit: Leaving]
danse-nr3 has quit [Ping timeout: 256 seconds]
ymir has joined #commonlisp
amb007 has quit [Ping timeout: 264 seconds]
<jmercouris>
is there a way to ensure some code is run right before my object is gc'd?
<aeth>
a finalizer?
<jmercouris>
aeth: maybe, I'll have to look into them
<jmercouris>
this seems a very similar problem to what I have
<jmercouris>
basically I have some lisp objects that spawn threads
<jmercouris>
I want those threads to be killed when there are no more references to the main object
<bike>
that is what a finalizer does.
<yitzi>
try trivial-garbage
<jmercouris>
perfect, I'm already reading the documentation for that
<jmercouris>
thanks
<jmercouris>
oh, and by the way, is there any way I can write this in infix notation?
<jmercouris>
In case it wasn't clear, I'm joking about the last bit, reading the scroll-up made me chuckle.
<yitzi>
Use python. :P
<Pixel_Outlaw>
A macro for infix notation is a schoolboy exercise I've been rolling around in my head for a while.
<ixelp>
GitHub - ruricolist/infix-math: An extensible infix syntax for math in Common Lisp.
<aeth>
that does precedence, which a lot of infix macros don't do, for good reason
<aeth>
hard enough when every programming language has its own precedence, now every macro can?
<Pixel_Outlaw>
I think InterLisp may do proper order of operations in it's "Do What I Mean" infix brackets.
<Pixel_Outlaw>
*its
yitzi has quit [Remote host closed the connection]
<aeth>
The order of operations is arbitrary, though. You may have learned PEMDAS. Or BEDMAS. Or BODMAS. Or BIDMAS. Etc. And that doesn't cover most of what a programming language has (equality, and/or/not, etc.)
<jmercouris>
I've always thought the order of operations was an absurd notion as a young math student
bubblegum has quit [Ping timeout: 240 seconds]
<aeth>
even in math, you add stuff like dot product, cross product, matrix multiplication, matrix transpose, etc., etc., etc.
<aeth>
I suppose you're supposed to treat the multiplicationish things like multiplication, but you never really know
<aeth>
Math doesn't really have to know the specifics, but a programming language has to know.
<jmercouris>
one thing that irritated me about math was a l ot of the "rules" you had to know, rather than things just being clearly described. I spent so much time fighting with the notation and not being able to understand it
<aeth>
oh, and in programming, modulo, bit shift, etc., are also a thing.
<jmercouris>
I guess mathematicians didn't like writing a lot, so they came up with a lot of shorthand rules
<aeth>
jmercouris: there is a good reason for that, though... math, like philosophy, can easily get bogged down when you go to the foundations
<jmercouris>
yeah, but I am just a simple user
<aeth>
so you always have some level of assumptions and loose notation or else you basically just specialize in foundational logic etc.
<jmercouris>
I don't care about their problems, I just want a simple tool to use
<aeth>
right, every time you use a symbol, it's ungoogleable
<aeth>
and most aren't typable unless you do a poor ascii approximation
<aeth>
and one letter variable names are also quite overloaded depending on the context