<White_Flame>
that can output the "identity" when printing
<White_Flame>
which will generally be used inside defmethod print-object specializations for your objects. But since you're probably just using function objects, you'd still need some way of distinguishing if it's one of yours or not
Oladon has joined #commonlisp
<saturn2>
you probably want to use a :test 'eq hash-table or funcallable-objects
beach` has joined #commonlisp
beach has quit [Ping timeout: 252 seconds]
beach` is now known as beach
jeosol has joined #commonlisp
montxero has quit [Read error: Connection reset by peer]
montxero has joined #commonlisp
<beach>
Good morning everyone!
theBlackDragon has quit [Ping timeout: 252 seconds]
theBlackDragon has joined #commonlisp
Qwnavery_ has joined #commonlisp
Qwnavery has quit [Ping timeout: 245 seconds]
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
akoana has quit [Quit: leaving]
attila_lendvai has joined #commonlisp
Bike has quit [Quit: leaving]
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
Oladon has quit [Quit: Leaving.]
john__ has joined #commonlisp
ad-absurdum has joined #commonlisp
lisp123 has joined #commonlisp
Qwnavery_ has quit [Quit: WeeChat 3.2]
Qwnavery has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Duuqnd38 has joined #commonlisp
Duuqnd38 has left #commonlisp [#commonlisp]
john__ has quit [Ping timeout: 252 seconds]
Duuqnd has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
attila_lendvai has quit [Quit: Leaving]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
attila_lendvai has joined #commonlisp
attila_lendvai has quit [Client Quit]
attila_lendvai has joined #commonlisp
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
Qwnavery has quit [Ping timeout: 252 seconds]
lisp123 has quit [Remote host closed the connection]
kakuhen_ has joined #commonlisp
kakuhen has quit [Ping timeout: 252 seconds]
pve has joined #commonlisp
shka has joined #commonlisp
attila_lendvai has quit [Quit: Leaving]
attila_lendvai has joined #commonlisp
kakuhen_ has quit [Quit: Leaving...]
kakuhen has joined #commonlisp
hhdave has joined #commonlisp
hhdave_ has joined #commonlisp
hhdave has quit [Ping timeout: 244 seconds]
hhdave_ is now known as hhdave
Cymew has joined #commonlisp
waleee has joined #commonlisp
<mfiano>
Could anyone recommend a library providing a message queue? I'm not sure what the proper terminology is, but I need an efficient non-heap-based queue where consumers only dequeue items that are addressed to them.
<mfiano>
I could try to roll my own event queue, but i was just worrying about performance here and if it's been done before.
<mfiano>
(many event types, worried about large case-based jump table)
<hayley>
Define "addressed"? Is each message going to one consumer? Does every consumer get one? I've heard "message queue" before but I couldn't guess the general data structure used.
<mfiano>
Not particularly. I am implementing a module system, where each module is a separate system/package, and it wants to check a queue to see if any other modules left a message type it is interested in. It's just an attempt to remove coupling of modules, since they shouldn't know of each other.
<mfiano>
Which I suppose means the message should be left intact until all modules get a chance to read from the queue. Maybe...I don't know yet.
<mfiano>
Not sure if anything like this is known as something. Sounds similar to the actor paradigm...idk. Not sure if this is even recommended for my use-case or what a good way to go about implementing it is yet. Just trying to get some ideas to refine it a bit
<hayley>
Actors would be "each message goes to exactly one consumer" to my knowledge.
<mfiano>
Oh I see
<mfiano>
Sounds similar to a syncrhonous "event bus" then
lisp123 has joined #commonlisp
hhdave has quit [Ping timeout: 252 seconds]
<mfiano>
Hmm, maybe all I really want is progn method combination here.
<mfiano>
Will try that first, since it's simple, and see what I think. Thanks for the rubber duck.
hendursa1 has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
hendursaga has quit [Ping timeout: 276 seconds]
GreaseMonkey has quit [Read error: Connection reset by peer]
greaser|q has joined #commonlisp
waleee has quit [Quit: WeeChat 3.2]
karlosz has joined #commonlisp
alphapapa[m] has quit [Ping timeout: 250 seconds]
waleee has joined #commonlisp
scymtym_ has quit [Remote host closed the connection]
silasfox has joined #commonlisp
hhdave has joined #commonlisp
alphapapa[m] has joined #commonlisp
<mfiano>
Ok so progn alone won't work, since any messages sent while modules are registering themselves won't be seen by subsequent modules, but I can just store the closures in a queue and execute once per iteration.
<mfiano>
Dead simple and will work for what I need I think.
hhdave has quit [Ping timeout: 245 seconds]
<pjb>
lad: the identifier that is printed by print-unreadable-object, IS the object itself. (or you must consider as such); as saturn2 said, you can use eql (or eq) to compare the object instead of using = on integers… That said, there's (com.informatimago.common-lisp.cesarum.utility:object-identity (lambda (x) (+ 1 x))) --> "#x30200557227F" (it just tries to parse the printed string, not conforming!).
<pjb>
mfiano: you seem to have quite specific specifications for your message queue…
cage has joined #commonlisp
lisp123 has joined #commonlisp
vats has quit [Ping timeout: 252 seconds]
ullbeking has quit []
ullbeking has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
rain3 has joined #commonlisp
hhdave has joined #commonlisp
cage has quit [Remote host closed the connection]
cage has joined #commonlisp
waleee has quit [Ping timeout: 256 seconds]
lad has quit [Ping timeout: 252 seconds]
drmeister has quit []
drmeister has joined #commonlisp
phoe has quit [Ping timeout: 272 seconds]
phoe has joined #commonlisp
lisp123 has joined #commonlisp
etimmons has quit [Ping timeout: 245 seconds]
etimmons has joined #commonlisp
Gnuxie has quit [Ping timeout: 245 seconds]
<beach>
Here is an interesting project suggestion: A McCLIM-based program that combines the features of `gitk' and `magit'.
karlosz has quit [Quit: karlosz]
yitzi has quit [Remote host closed the connection]
yitzi has joined #commonlisp
hhdave has quit [Ping timeout: 244 seconds]
yitzi has quit [Client Quit]
kakuhen has quit [Quit: Leaving...]
Gnuxie has joined #commonlisp
<beach>
It could be called McGIT for example.
lisp123 has quit [Ping timeout: 245 seconds]
<flip214>
MCLIgit, spoken as "mmmhhh...clickit"
lisp123 has joined #commonlisp
<lisp123>
beach: I found magit overrated, I tried replicating its 'transient' menu but found it pretty average to be honest. One of the biggest issues was that menus are not dynamically created, everything is hardcoded.
<lisp123>
A version with dynamic menus would be a considerable improvement. All that said, I (personally) find Magit overly complicated in its UI. Plain hydras I think are much better, with a level of nesting on the menu
<beach>
I guess I tend to agree. With a tool like magit, most of the functionality is used very infrequently, and then it is hard to remember the commands to invoke that functionality. It would be a much better solution for such a tool to use way more menus.
<beach>
In fact, I think McCLIM would be the perfect GUI toolkit for such a project.
silasfox has quit [Ping timeout: 245 seconds]
hhdave has joined #commonlisp
<lisp123>
I agree
silasfox has joined #commonlisp
yitzi has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 252 seconds]
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
hhdave has quit [Ping timeout: 252 seconds]
lisp123_ has joined #commonlisp
cosimone has joined #commonlisp
igemnace has quit [Ping timeout: 245 seconds]
lisp123 has quit [Ping timeout: 256 seconds]
Lord_of_Life has joined #commonlisp
tyson2 has joined #commonlisp
igemnace has joined #commonlisp
jcowan has quit []
jcowan has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
yitzi has quit [Remote host closed the connection]
hhdave has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
cosimone has quit [Ping timeout: 252 seconds]
Alfr has quit [Quit: Leaving]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
VincentVega has joined #commonlisp
random-nick has joined #commonlisp
sm2n_ has joined #commonlisp
sm2n has quit [Read error: Connection reset by peer]
<mfiano>
pjb: Indeed, but I solved it. Gotta love when builtin language features make a good replacement to complex data structures (progn method combination here, well and a simple Norvig queue, too)
<beach>
pjb: Wow, that's impressive.
<beach>
Let me contemplate what to do about it.
<beach>
pjb: I might just let you manage it. :)
<pjb>
beach: but it may have a better visibility under s-expressionists; or perhaps at common-lisp.net?
yitzi has joined #commonlisp
<beach>
I'll think about it.
<beach>
pjb: Thanks for doing that!
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
<lotuseater>
I was asked yesterday by someone new why typing in lower case in code. I said it's easier to type, that the reader nonetheless (in default readcase) transforms it to uppercase and it's more convenient. What would you answer?
<beach>
Lower case is easier to *read* because of the varied vertical shape of the characters.
<beach>
The translation to upper case is for hysterical raisins.
<lotuseater>
yeah, you mean historical reasons? ^^
<beach>
Of course.
<lotuseater>
I wonder how the hysterical raisins would yell at one. :)
<pjb>
lotuseater: early hardware (pre-computer) used 5-bit codes to encode the 26 letters, space and 5 other codes.
<pjb>
lotuseater: this gives you the telegraphic style where numbers and digits are spelled out and count as words.
<pjb>
lotuseater: then early computers added 1 bit to encode letters, digits and a few special characters.
<lotuseater>
some times I asked kids I was working with why the codes for A-Z are smaller than those for a-z :)
<pjb>
The ibm-709 character set where lisp was developped had the following charcters and encoding: "0123456789#=\"###+ABCDEFGHI%.)###-JKLMNOPQRØ'*### /STUVWXYZ±,(###" # = unassigned)
<pjb>
Note: digits 0-9 were encoded as codes 0-9 ;-)
<lotuseater>
and on telegraphs you had real backspace to make a new symbol out of two, like ⌹
<pjb>
0 was also end of list, so 0 = integer 0, character 0, boolean false, and nil and ().
<lotuseater>
wow okay
<pjb>
lotuseater: and of course, they also introduced shifting codes (amongst those 5 free) to have extended character sets.
<lotuseater>
:)
<pjb>
lotuseater: 6*6 = 36 you could easily pack 6 characters in a 36-bit word or register.
<pjb>
Then ascii was invented which used 7-bit, plus 1 parity bit, so 8-bit and 32-bit computers became a thing.
<pjb>
The iso-8859-* using the full 8-bit, because ascii with national variants was a mess.
<lotuseater>
and how was it with certain lisp machines, they had 36 bit word length, right?
<pjb>
Then unicode because iso-8859 iso-2202 koi-r and big5 chinese encoding were still a mess.
<lotuseater>
haha yes i can imagine, a mess
<pjb>
And now we have a new unicode version every year, with added emojis, and it's still amess.
<lotuseater>
someone posted i think it was in #lispcafe a picture of a big circled chinese keyboard
<lotuseater>
phew yes all those ever new emojis
<pjb>
Do you think the martians will be able to impose a single clean computing architectures, or will they have to be compatible with Earth and Chinese base communications?
<pjb>
LOL
<lotuseater>
sure texting with it can be quite compressive
<pjb>
We're making a stellar mess, and soon an interstellar mess!
<lotuseater>
as long as it doesn't infect the multi/omniverse
<Duuqnd>
Imagine making first contact with intelligent alien life and they take one look at our computers and just leave
<pjb>
well there was an early IBM chinese keyboard where you had to remember 4-decimal-digit codes for each ideogram. One chinese girl could do that for the demoes. Then the chinese put a professor in reeducation camp, and he came with the common chinese encoding system, based on the graphical decomposition of the ideograms, which he had implemented when he was freed.
<lotuseater>
duuqnd: i think they would leave cause for example of the financial system madness
<pjb>
No, I think they would just bring the chips and beer and have a good laugh the whole evening. And then leave. This is why there are so many UFO but so few aliens.
witchuer has quit []
witchuer has joined #commonlisp
<pjb>
You wouldn't say to live even a week in a zoo! You just go there for an afternoon, fill your belly with popcorn and icecream and then bring back the children home.
<lotuseater>
yeah we're just for entertainment, all this unnecessary violence and hatred
vats has joined #commonlisp
<pjb>
lotuseater: of course. Gladiators, and all the violence in movies we watch.
<lotuseater>
but too much is still real in this world, things you don't want to even imagine
<pjb>
For the amusement of gods and alien visitors.
<lotuseater>
yes
<lotuseater>
but with some chosen ones they could talk "Surely we have Common Lisp too."
Bike has joined #commonlisp
<lotuseater>
but okay, the animal world is full of big wars, like ants vs ants or fungi vs bacteria
semz has joined #commonlisp
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #commonlisp
<contrapunctus>
TFW Lisp talk in #lispcafe and non-Lisp talk in #commonlisp 🙃
<hayley>
Hey, I will have you know that my monologues on comparing snapshot-at-the-beginning and incremental update write barriers aren't exclusively Lisp talk, thankyou very much.
<contrapunctus>
😁
<hayley>
And, well, all the interesting GC papers since...the 90s I guess seem to either cover ML (or Haskell) or Java. So...there's that.
<hayley>
(With the exceptions of CONS should not CONS its arguments, and An improvement to sliding garbage collection, of course.)
keir has joined #commonlisp
waleee has joined #commonlisp
didi has joined #commonlisp
<jcowan>
Well, I don't see no p'ints about Lisp GCs that's any better'n any other GCs.
<jcowan>
--not quite Mark Twain
<didi>
Speaking of user-extensible sequences in Common Lisp, is it possible to use SBCL's sequence protocol to implement an infinite sequence? As far as I can tell it's impossible because one needs to specialize `length'.
<beach>
didi: But LENGTH can signal an error if the sequence is not proper. Then, it can also go into an infinite loop.
<beach>
That's conforming behavior.
<didi>
beach: What do you mean?
<beach>
didi: Try (length '#1=(a b c . #1#))
<beach>
That's an infinite list.
<beach>
You can do the same with your sequence.
<beach>
Or if you know that it is infinite, you can have LENGTH signal an error.
<Bike>
the sequences protocol isn't really intended to work for infinte lists. in particular a circular list is not actually a proper sequence by clhs's definition, and some sequence functions may be written to try to take lengths beforehand (e.g. map)
<didi>
Bike: oic. Thank you.
silasfox has quit [Quit: WeeChat 3.2]
markthom_ has quit [Quit: Ping timeout (120 seconds)]
tyson2 has joined #commonlisp
lisp123_ has quit [Remote host closed the connection]
Duuqnd has quit [Ping timeout: 252 seconds]
lisp123 has joined #commonlisp
raeda_ has quit [Ping timeout: 252 seconds]
lisp123 has quit [Quit: Leaving...]
raeda has joined #commonlisp
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
charles__ has quit [Read error: Connection reset by peer]
charles__ has joined #commonlisp
<lotuseater>
Interesting, I found online by coincidence the list of books in the personal of Erik Naggum that were sold back in 2010.
yitzi has quit [Remote host closed the connection]
<pve>
I just want to say I love "McGIT", and I hope it becomes a thing :)
<lotuseater>
ha yes the name has something ^^
<pve>
Reminds me of DrRacket, or Mr. Coffee
<lotuseater>
DrRacket sounds like a therapist
<beach>
pve: Heh, glad you like the name.
didi has left #commonlisp [O bella ciao bella ciao bella ciao, ciao, ciao.]
elf_fortrez has joined #commonlisp
lotuseater has quit [Ping timeout: 252 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
vats has quit [Ping timeout: 256 seconds]
<beach>
pjb: I am not sure how those links work. I can click on an org link, but the links in the project list seem to go to non-existing HTML files. What am I missing?
elf_fortrez has quit [Ping timeout: 256 seconds]
Oladon has joined #commonlisp
<jcowan>
Link for "McGIT"? Dr. Google not helpful today
<beach>
That's good news. It means it is not taken.
<moon-child>
with load the form will be evaluated, so you will need to wrap it with a quote. If you just use read, you won't have to do that
frgo has joined #commonlisp
<Yehowshua>
ah - gotcha
<Yehowshua>
and thx thanks pjb
<moon-child>
also be aware of security issues with read
<Yehowshua>
oh?
<lotuseater>
moon-child: you mean #. ?
<moon-child>
don't call READ on untrusted input
<moon-child>
lotuseater: yes
<lotuseater>
or/and setting *read-eval* to NIL
<Yehowshua>
ah
<lotuseater>
cause you can use it for readtime evaluation for example '(1 2 #.(+ 1 2))
kakuhen has joined #commonlisp
<lotuseater>
and if you need some more of "howto" with a compiler, there's a section in the end of Paradigms of Artificial Intelligence Programming about how a possible Scheme compiler can be constructed (the section before with interpreting)
<lotuseater>
but okay I don't know if you wanna generate directly native code or from CL to another lang or elsewise
<saturn2>
READ also opens a DoS attack by interning millions of new symbols
Qwnavery has joined #commonlisp
<pjb>
You could sign your data, and validate the signature before loading or reading it with *read-eval* ;-)
<lotuseater>
hey Qwnavery :)
<Qwnavery>
lotuseater: helloo
<pjb>
#.(loop (gentemp)) ;-)
<lotuseater>
args
<lotuseater>
till your heap overflows
<pjb>
Perhaps there's a limit on the package size?
<lotuseater>
ahh
<lotuseater>
then #.(loop collect 1)
karlosz has quit [Ping timeout: 240 seconds]
<Qwnavery>
also lotuseater I have a solid understanding of the concepts but I haven't been able to hold myself accountable and actually write the until loop. :(
<lotuseater>
Yehowshua: and WITH-OPEN-FILE is good, it manages your file stream gets closed nonetheless what happens
<lotuseater>
don't worry
<lotuseater>
good when the writing was not too bad