jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
bubblegum has quit [Ping timeout: 260 seconds]
bubblegum has joined #commonlisp
<Kingsy> ok nevermind. I am misunderstanding how macros work
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
<Bubblegumdrop> macros took me forever to wrap my head arond and I still struggle
<Bubblegumdrop> Kingsy I see you may be working with caveman or similar
<Bubblegumdrop> Kingsy here is some code I wrote that is very similar to yours: http://paste.debian.net/1307577/
<ixelp> debian Pastezone
<Bubblegumdrop> oic hunchentoot
<Kingsy> yeah hunchentoot. I figured it out. its not perfect. but its better
<Kingsy> Bubblegumdrop: https://bpa.st/PIZA BUT I am not sure why I had to put a ,@ on the if to get the ,@body to work within it... tbh I don't really understand ,@ yet.
<ixelp> View paste PIZA
<Kingsy> but I do see that ` and , are flipping in and out of "data mode"
<Bubblegumdrop> Kingsy ah yeah I really struggled with it too. Shinmera's code is actually really great if you look at their 3d-vectors code they use macros heavily. I learned mostly from them.
<Bubblegumdrop> Kingsy `() and '() are mostly equivalent, but inside `() you can use , to get something from "outside"
<Bubblegumdrop> because macros are code that gets transformed into the actual code that runs
<Bubblegumdrop> macros are primarily how you "write code that writes code"
<Bubblegumdrop> ,@ is like , except it list appends, I think? lemme see if I can find a page I actually was just reading about this.
<Bubblegumdrop> And if you want to execute a &body of code you need to use (progn ,@body)
<Bubblegumdrop> because the generated code will generate multiple forms, and only the first form will get evaluated without the progn
<Kingsy> ohhhhhhh
<Kingsy> ok this helps. thanks!
<Bubblegumdrop> Okay I can't find the page I was reading that explains what , ,@ are/do but
<ixelp> Macros
<Bubblegumdrop> This is probably sufficient for your needs for now.
<Bubblegumdrop> But the thing I really struggled to understand was the "transformation" step
<Bubblegumdrop> If you keep in mind that every time you use defmacro you're writing code that gets transformed into the actual code that gets evaulated, it helps a lot to reason about it
notzmv has joined #commonlisp
<Kingsy> yeah its so so confusing. but I can alrady see its pretty cool.
<Bubblegumdrop> oh it looks like you're writing very similar code to what I was trying to achieve. Please ping me if you figure out a nice solution.
<Bubblegumdrop> I gave up on mine, as I wasn't able to find a nice solution.
<Kingsy> Bubblegumdrop: in what way? I have something now that works. but its not very nice. it uses a single block though, so I could wrap it in a handler
<Bubblegumdrop> indeed, I kept coming up with sloppy solutions
<Bubblegumdrop> I will paste code
<Bubblegumdrop> It looks as though I may have deleted the code, but here is the gist of it: http://paste.debian.net/1307578/
<ixelp> debian Pastezone
<Bubblegumdrop> Oh, I meant to paste with-connection. it's very similar.
<ixelp> debian Pastezone
<Bubblegumdrop> with-connection comes from caveman https://github.com/fukamachi/caveman/
<ixelp> GitHub - fukamachi/caveman: Lightweight web application framework for Common Lisp.
<Kingsy> yeah, let me show you mine. its a funcion that grabs a lambda. that lambda then gets added to a dispatch map and usd later in my acceptor
<Bubblegumdrop> I've written a lot of apps with caveman. it's a great framework once you get past the whole "no docs" thing.
<Kingsy> Bubblegumdrop: https://bpa.st/LBCQ <- it works. its ugly mind. :D
<ixelp> View paste LBCQ
<Bubblegumdrop> woof
<Bubblegumdrop> I'm not certain you need to wrap all that in a lambda?
<Bubblegumdrop> I'm also curious about your use of `(( ...))
<Kingsy> I do because I need a function that can be added to a hashmap
<Bubblegumdrop> I've never seen that before.
<Bubblegumdrop> Oh, it returns a function.
<Bubblegumdrop> Very cool!
<Kingsy> oh thats a type
<Kingsy> typo
<Kingsy> the (())
<Bubblegumdrop> Yes, should be `()
<Kingsy> yerr
<Bubblegumdrop> Very nice work.
<Bubblegumdrop> I did not get far with these tools because they are powerful and I couldn't stop coming up with neat ideas.
green_ has joined #commonlisp
<Kingsy> haha thanks.
<Bubblegumdrop> like having a web page be a pipeline of deferrered lambda()s
<Bubblegumdrop> wow I can't believe I just wrote lambda()
<Bubblegumdrop> can you tell I've been writing C a lot?
<Kingsy> :D
<Bubblegumdrop> Oh, have you read sicp? understanding the whole tag body thing helps a lot with macros too.
<ixelp> Macros
<Bubblegumdrop> There's a lot of historical stuff with lisp
<skin> I have these functions that generate vectors, and I would like to know how to unit test them.
<skin> The problem is that `equal` only returns true if both vectors are `eq`, but I want them to return true if both vectors' contents are the same. What to do about this.
lagash has quit [Ping timeout: 255 seconds]
<Bubblegumdrop> skin try equalp?
<Bubblegumdrop> http://clhs.lisp.se/Body/f_equal.htm See Also
<skin> clhs equalp
<ixelp> CLHS: Function EQUALP
<Bubblegumdrop> thanks ixelp
<ixelp> P.S.: The Best of Intentions
<skin> There's _another_ equal in lisp?
<Alfr> skin, aka make your own, if nothing suits you.
<skin> eq, eql, equal, equalp
<skin> Nah, equalp suits, just didn't know about it
<Bubblegumdrop> skin you could also use deftype I think?
<Alfr> skin, you may or may not like that it treats strings case insensitively.
<Bubblegumdrop> oh boy, COPY-OBJECT
<Kingsy> yeah this is still not the right way of handling this. so frustrating, it means hunchentoot stops printing the stack traces to the repl.
<skin> Alfr: Thanks for the link. I didn't know about the strings caveat, that helps.
<Bubblegumdrop> Kingsy since you're returning a lambda perhaps you need a matching funcall?
<Bubblegumdrop> whever you use it.
<Bubblegumdrop> wherever
<Kingsy> no its calling the function just fine. its because I am catching the error and overriding. there has to be some kinda mechanism to let me extend what is there. but I just cant see it
<Bubblegumdrop> Oh, possibly define-condition?
<ixelp> CLHS: Function SIMPLE-CONDITION-FORMAT-CONTROL...
<Bubblegumdrop> I don't know anything about simple-condition-format-control either
<Kingsy> hmm I just don't kow
<Kingsy> hehe I need to talk to someone that knows hunchentoot! :D
<Bubblegumdrop> seems like it yeah, I don't use hunchentoot much
<ixelp> Hunchentoot - The Common Lisp web server formerly known as TBNL
<Bubblegumdrop> hunchentoot has great docs
<Kingsy> yeah I think I am just thinking about this all wrong. I am catching everything which isnt what I want.
<Renfield> beach: Yes, I saw your explanation. Thanks. I discovered that what I needed to do was use a second back tick and comma to get the *my-param* to be replaced with "passed-in" instead of "global."
<Bubblegumdrop> it's forms all the way down...
<Renfield> aeth: Thanks, shortly after I wrote that question, as I was taking a shower I realized it was a stupid one and of course I could just use (list ...).
<skin> `equalp` uses `char-equal` instead of `char=` and that hurts my feelings. *sigh* I had thought of using trivia instead. I guess I'll have to write my own.
<skin> Pitmann's article makes me feel better about it though.
ymir has quit [Remote host closed the connection]
<Bubblegumdrop> clhs every
<ixelp> CLHS: Function EVERY, SOME, NOTEVERY, NOTANY
<Bubblegumdrop> good luck
ymir has joined #commonlisp
<skin> Bubblegumdrop: Thanks!
<Bubblegumdrop> You can also "zip" lists like (mapcar #'list list-one list-two) to get (list (car list-one) (car list-two)) ... and so on
<Bubblegumdrop> (every (lambda (pair) (eq (car pair) (cdr pair))) (mapcar #'list list-one list-two))
<Bubblegumdrop> I use this pattern a lot.
<Bubblegumdrop> I'm not sure if deftype is of any use here.
<Bubblegumdrop> I know for a fact I'm not using as many of the languages feature as I could be, e.g. define-condition, deftype
bubblegum has quit [Ping timeout: 256 seconds]
bubblegum has joined #commonlisp
<skin> I haven't ever needed to use deftype of for
<skin> before
<skin> I've used define-condition plenty though.
bubblegum has quit [Read error: Connection reset by peer]
bubblegum has joined #commonlisp
bubblegum has quit [Read error: Connection reset by peer]
bubblegum has joined #commonlisp
ldb has joined #commonlisp
bubblegum has quit [Ping timeout: 272 seconds]
bubblegum has joined #commonlisp
robin_ has quit [Ping timeout: 268 seconds]
bilegeek has joined #commonlisp
awlygj has quit [Quit: leaving]
kenanb has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.2)]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
dra has quit [Ping timeout: 246 seconds]
waleee has quit [Ping timeout: 272 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 246 seconds]
decweb has quit [Ping timeout: 272 seconds]
bubblegum has quit [Ping timeout: 272 seconds]
bubblegum has joined #commonlisp
bilegeek has quit [Quit: Leaving]
st_aldini has quit [Quit: st_aldini]
random-nick has quit [Ping timeout: 264 seconds]
bilegeek has joined #commonlisp
lagash has joined #commonlisp
gorignak has joined #commonlisp
gorignak has quit [Client Quit]
tok has quit [Remote host closed the connection]
bubblegum has quit [Ping timeout: 264 seconds]
bubblegum has joined #commonlisp
ymir has quit [Ping timeout: 240 seconds]
bubblegum has quit [Read error: Connection reset by peer]
bubblegum has joined #commonlisp
jonatack has quit [Ping timeout: 264 seconds]
jonatack has joined #commonlisp
<Bubblegumdrop> skin oh actually it looks like the page Alfr linked actually has an implementation of that
<Bubblegumdrop> (defmethod equivalent-objects ...)
pfdietz has joined #commonlisp
bubblegum has quit [Ping timeout: 255 seconds]
bubblegum has joined #commonlisp
bubblegum has quit [Read error: Connection reset by peer]
bubblegum has joined #commonlisp
bubblegum has quit [Ping timeout: 255 seconds]
bubblegum has joined #commonlisp
azimut has joined #commonlisp
<skin> yeah. a very interesting read. I kind of feel like how he did it is a hack though
<skin> I could easily surprise the optional argument of the wrong intended type but I guess that would mean that I intended a different type so it still works I guess
<skin> Supply not surprise
ymir has joined #commonlisp
bubblegum has quit [Read error: Connection reset by peer]
bubblegum has joined #commonlisp
josrr has quit [Remote host closed the connection]
<Bubblegumdrop> I'm curious how coerce is implemented after this conversation
<Bubblegumdrop> I guess at some level you can't avoid setf.
szkl has quit [Quit: Connection closed for inactivity]
Pixel_Outlaw has quit [Quit: Leaving]
random-jellyfish has joined #commonlisp
random-jellyfish has quit [Changing host]
random-jellyfish has joined #commonlisp
markb1 has quit [Ping timeout: 246 seconds]
akoana has joined #commonlisp
amb007 has joined #commonlisp
<beach> It looks to me like COERCE could be implemented in an implementation-independent way. A small library could be a good thing.
ymir has quit [Ping timeout: 256 seconds]
jmdaemon has joined #commonlisp
amb007 has quit [Ping timeout: 268 seconds]
random-jellyfish has quit [Ping timeout: 264 seconds]
<aeth> Bubblegumdrop: SETF when building a list can be avoided, avoiding that would just be :collect in a LOOP... and that is the main use of SETF in that file
<aeth> the LOOP is probably SETFing, though
markb1 has joined #commonlisp
<aeth> and while the generic sequence-to-list (as opposed to vector-to-list*) cannot use LOOP in the general portable case, SBCL does use an extension to let you iterate over sequences iirc... and it only has to exist because of extensible-sequences
<Bubblegumdrop> Hey that's another great one, thanks aeth ...
<Bubblegumdrop> Oh boy. that's a doozy.
<aeth> note lines 88-89
<aeth> "KLUDGE: In SBCL, we only really use variant (1), and any generality for the other variants is wasted. -- WHN 20000121"
<aeth> so it is not the best possible implementation of loop in 2000 lines, it is an old implementation of loop
<beach> Bubblegumdrop: If you are interested in how LOOP is implemented, I recommend you look at Khazern.
<Bubblegumdrop> Oh this is so cool. I always wondered about (loop for ...) vs (loop :for ...)
<Bubblegumdrop> like this?
<ixelp> GitHub - s-expressionists/Khazern: A portable and extensible Common Lisp LOOP implementation
<beach> That's it.
samebchase has quit [Quit: The Lounge - https://thelounge.chat]
<Bubblegumdrop> This is so cool. I think I read about this one on the CL Cookboko https://github.com/yitzchak/trivial-package-locks
<ixelp> GitHub - yitzchak/trivial-package-locks: A standard interface to the various package lock implementations of Common Lisp [...]
<Bubblegumdrop> The intrinsic loader uses this to replace the built in loop facility.
<Bubblegumdrop> I need to read more about readtables too. I've seen some crazy code where you can write [e.g. inline SQL/Python/C]
<Bubblegumdrop> like (funcall [strlen s] "hello") kind of thing
<aeth> Bubblegumdrop: for vs :for being string=, right? Yes, it's weird how string= works on symbols to essentially ignore the package and only look at the symbol-name, but it's there, and it's how LOOP works e.g. ,(string= :foo 'foo)
<ixelp> (string= :foo 'foo) => T
<Bubblegumdrop> I think I knew that one. I have definitely seen some code exploit these properties, but nothing comes to mind. I'm sure there's some cool uses for it, too.
samebchase has joined #commonlisp
ello has quit [Ping timeout: 268 seconds]
ello has joined #commonlisp
xaltsc has quit [Ping timeout: 255 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
easye has quit [Ping timeout: 255 seconds]
Lycurgus has joined #commonlisp
wacki has joined #commonlisp
alcor has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
ldb has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
pranavats has joined #commonlisp
traidare has joined #commonlisp
rgherdt has joined #commonlisp
bubblegum has quit [Ping timeout: 264 seconds]
akoana has quit [Ping timeout: 268 seconds]
danza has joined #commonlisp
bubblegum has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
bubblegum has quit [Read error: Connection reset by peer]
bubblegum has joined #commonlisp
amb007 has joined #commonlisp
bilegeek has quit [Quit: Leaving]
pve has joined #commonlisp
shka has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
bitspook has joined #commonlisp
bitspook has quit [Ping timeout: 255 seconds]
amb007 has quit [Ping timeout: 255 seconds]
bubblegum has quit [Ping timeout: 264 seconds]
amb007 has joined #commonlisp
dcb has quit [Quit: Connection closed for inactivity]
danza has quit [Remote host closed the connection]
<beach> Am I reading things right that Lem uses foreign code both for its NCURSES and its SDL2 front-ends?
danza has joined #commonlisp
<beach> Either way, since it seems to have a vim-compatible interface, perhaps we should recommend it to Common Lisp programmers who are used to using vim.
jjnkn has joined #commonlisp
NicknameJohn has quit [Ping timeout: 272 seconds]
<beach> Any Lem developers here? I wonder why they seem to have started from scratch when there are things like Cluffer and McCLIM that could have been used.
<alcor> I watched an interesting talk yesterday about Lem and some of the design decisions that went to it. I believe it was from EmacsConf 2023
<ixelp> EmacsConf - 2023 - talks - The Emacsen family, the design of an Emacs and the importance of Lisp
<beach> Oh, interesting. Thank you.
<alcor> In the talk they mention that Lem supports multiple UI frontends. They have SDL2 and Terminal frontends. But they even had an Electron UI frontend as well, until it got dropped at some point
<beach> I see.
<alcor> "Why not McCLIM/Cluffer for Lem?" is an interesting question though. It would be definitely possible to build a Lem frontend based on McCLIM. I wonder it it's the spotty windows support that was the issue, since Lem tries to support all 3 major platforms (Linux, OSX, MSWin)
<beach> Maybe so.
<beach> Perhaps if the Lem developers don't hang out here much, they didn't know of Cluffer, nor of the editor library that is being worked on to go on top of Cluffer.
cage has joined #commonlisp
danza_ has joined #commonlisp
danza has quit [Read error: Connection reset by peer]
bubblegum has joined #commonlisp
<beach> [watching the Lem presentation] It is interesting that the speaker refers to SLIME as "awesome" and "superb".
mulk has quit [Ping timeout: 255 seconds]
benkard has joined #commonlisp
benkard is now known as mulk
Lycurgus has quit [Quit: leaving]
ym has joined #commonlisp
<beach> Oh! [listening to the Q&A] Started by Japanese Common Lisp programmers. I don't think they hang out here much.
d4ryus has quit [Quit: WeeChat 4.1.2]
<alcor> The JP Lisp subculture is pretty fun and creative, but somewhat insular (no pun intended)
<beach> Yeah. I share that impression.
_cymew_ has joined #commonlisp
d4ryus has joined #commonlisp
dino_tutter has joined #commonlisp
unl0ckd has joined #commonlisp
mgl has joined #commonlisp
unl0ckd has quit [Ping timeout: 268 seconds]
Inline has quit [Ping timeout: 252 seconds]
danza_ has quit [Ping timeout: 264 seconds]
Inline has joined #commonlisp
elderK has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Inline has quit [Ping timeout: 252 seconds]
rendar has joined #commonlisp
elderK has quit [Changing host]
elderK has joined #commonlisp
elderK has quit [Quit: WeeChat 4.1.1]
elderK has joined #commonlisp
elderK has quit [Client Quit]
ym has quit [Ping timeout: 256 seconds]
random-nick has joined #commonlisp
dra has joined #commonlisp
decweb has joined #commonlisp
Inline has joined #commonlisp
akoana has joined #commonlisp
<pl> What's cluffer?
<ixelp> GitHub - robert-strandh/Cluffer: General-purpose text-editor buffer.
<beach> It is the result of some 40 years of (not continuous though) research into editor buffer implementations.
<Shinmera> most japanese folks don't have a great grasp of english, so following english-only channels like this is difficult for them.
<beach> Yeah.
<beach> When I understood that the Lem developers are Japanese, that explained a lot of things that puzzled me before.
<Shinmera> I met up with fukamachi, cxxxr, snmsts, and sint in september last year. They're all really nice, but it's clear that english is a big struggle. They would very much like to broaden the cooperation, but it's difficult.
<beach> I see.
<Shinmera> snmsts' english is pretty good, but he said it's still a big mental effort for him to speak it, so I understand why he wouldn't hang around here
<beach> I wonder why Japan is still like that. The French used to be bad, but the online gaming generation changed all that.
<Shinmera> it's a big country and still very culturally insular. they have their own versions of pretty much everything, especially when it comes to games.
<beach> That explains it.
<Shinmera> I also figure that the time zone makes it less likely to talk to the rest of the internet
<beach> Sure.
<beach> They could talk to the Kiwis :)
<beach> And the Australians.
<alcor> Western US is close too (kind of)
<Shinmera> I'm not saying it's impossible, I just figure it's a small compounding factor compared to the other example of france
<beach> Indeed.
<louis77> probably a reason why fukamachi's libs are so badly documented?
<Shinmera> it's a big factor, yes
<pfdietz> How good is automatic Japanese - English translation?   Documentation in Japanese would be better than no documentation at all, and if the translation were good enough it would be useful to people like me.
<louis77> never thought about that before
<Shinmera> pfdietz: deepl is pretty good these days and it's what we used to communicate a lot when my spotty japanese / their spotty english failed us
<pfdietz> I suppose one could test if what one writes is being translated adequately by round tripping it through translators and seeing if it comes back too garbled.
<Shinmera> round tripping translators always garbles
<pfdietz> "Execute me to the ball game..."
<Shinmera> there's even a "genre" of game mod these days where they feed all the game text through a bunch of automated translations and then back to english
<Shinmera> it's quite amusing
<pfdietz> All your base
yitzi has joined #commonlisp
<thuna`> The intent/tone is also never really preserved though translations, IME. I always verify them in small chunks so that I can lookup dictionaries, grammar, etc. Though that's obviously not reasonable or feasible in all situations
green_ has quit [Ping timeout: 255 seconds]
<beach> And that might not be crucial for documentation.
<Shinmera> back to lem, as far as I understand it started quite some years ago, and the mcclim situation was probably quite different, and cluffer probably just slipped them by.
<pfdietz> The round tripping would enable one to write the kind of text that would not be as subject to such issues.
<beach> Shinmera: Sounds plausible.
<alcor> Another thing is, MSWin is still the most popular platform in Japan, even for development work
<alcor> So they're very likely constrained by portability concerns
<alcor> I'm not exactly sure how this situation is today, but the east-asian IME situation on *nix was not up to par for many years
<Shinmera> IMEs have been fine for as long as I've used linux. The problem is more having a UI toolkit that properly handles textual input :)
<Shinmera> as I understand both mcclim and lem do not do so
dra has quit [Ping timeout: 246 seconds]
<Shinmera> alloy does... in theory. but because the only backend right now is glfw, which does not, it's in the same situation.
<Shinmera> glfw3.4 should release soon, which should fix this problem, too, though
SunClonus has quit [Read error: Connection reset by peer]
Inline has quit [Ping timeout: 268 seconds]
tyson2 has joined #commonlisp
Inline has joined #commonlisp
msavoritias has joined #commonlisp
jmdaemon has quit [Ping timeout: 260 seconds]
mgl has quit [Ping timeout: 260 seconds]
akoana has quit [Quit: leaving]
holycow has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
jonatack has quit [Ping timeout: 264 seconds]
amb007 has quit [Ping timeout: 268 seconds]
amb007 has joined #commonlisp
josrr has joined #commonlisp
Odin- 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]
amb007 has joined #commonlisp
wacki has quit [Read error: Connection reset by peer]
Lycurgus has joined #commonlisp
Lycurgus has quit [Changing host]
Lycurgus has joined #commonlisp
wacki has joined #commonlisp
random-jellyfish has joined #commonlisp
traidare has quit [Ping timeout: 272 seconds]
ronald has quit [Ping timeout: 255 seconds]
ronald has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<Shinmera> e: nvm, IME support is glfw3.5
azimut has quit [Ping timeout: 255 seconds]
amb007 has quit [Ping timeout: 264 seconds]
amb007 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
rgherdt_ has joined #commonlisp
rgherdt has quit [Ping timeout: 272 seconds]
random-jellyfish has quit [Ping timeout: 264 seconds]
dcb has joined #commonlisp
ymir has joined #commonlisp
Inline has quit [Ping timeout: 268 seconds]
rtypo has quit [Read error: Connection reset by peer]
Inline has joined #commonlisp
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
Devon has quit [Ping timeout: 252 seconds]
Inline has quit [Ping timeout: 264 seconds]
dra has joined #commonlisp
ronald has quit [Read error: Connection reset by peer]
ronald_ has joined #commonlisp
ymir_ has joined #commonlisp
ymir has quit [Ping timeout: 255 seconds]
random-jellyfish has joined #commonlisp
Inline has joined #commonlisp
NickC has joined #commonlisp
<NickC> Does anyone know what time tomorrow the ELS submission deadline is? AoE?
mgl has joined #commonlisp
Algernon69 has joined #commonlisp
tyson2 has joined #commonlisp
Algernon69 has quit [Client Quit]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<splittist> Is it that time already? I feel just about prepared for starting on my January tasks. (January 2002...)
azimut has joined #commonlisp
Pixel_Outlaw has joined #commonlisp
louis77 has quit [Remote host closed the connection]
<beach> They usually don't give a time zone.
<beach> NickC: But it doesn't have to be perfect. It only has to be "accept"-able. You will have time to fix it up when you get the referee reports.
triffid has quit [Ping timeout: 255 seconds]
msavoritias has quit [Remote host closed the connection]
ymir_ has quit [Ping timeout: 246 seconds]
triffid has joined #commonlisp
traidare has joined #commonlisp
ronald_ has quit [Ping timeout: 264 seconds]
ronald has joined #commonlisp
traidare has quit [Ping timeout: 256 seconds]
prokhor_ has quit [Remote host closed the connection]
prokhor_ has joined #commonlisp
eddof13 has quit [Quit: eddof13]
johnjaye has quit [Ping timeout: 255 seconds]
foretspaisibles has quit [Ping timeout: 272 seconds]
foretspaisibles has joined #commonlisp
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
Odin-LAP has joined #commonlisp
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
jrx has joined #commonlisp
SunClonus has joined #commonlisp
NickC has quit [Ping timeout: 250 seconds]
dodoyada has joined #commonlisp
erc-test has joined #commonlisp
jsatk_ is now known as jsatk
yitzi has quit [Ping timeout: 264 seconds]
yitzi_ has joined #commonlisp
yitzi_ has quit [Remote host closed the connection]
yitzi has joined #commonlisp
erc-test has quit [Quit: ERC 5.6-git (IRC client for GNU Emacs 30.0.50)]
<jfloren_> Anybody here ever interface with a bluetooth device from Lisp?
<gilberth> jfloren_: Ask mfiano.
random-jellyfish has quit [Ping timeout: 246 seconds]
tane has joined #commonlisp
tane has joined #commonlisp
ymir_ has joined #commonlisp
<phantomics_> jfloren_ I have
<phantomics_> BT is a real mess
<jfloren_> agreed
<jfloren_> what did you end up doing?
<phantomics_> Not using BT and instead using a web app hosted on a Wifi access point hosted from the device I wanted to control
<phantomics_> I was experimenting with BT Android apps and found a couple that I could decipher signals from
Lycurgus has quit [Quit: leaving]
<phantomics_> They were remote control apps
<phantomics_> But the signals were so weird - one of the remote apps, when a button was pressed, would register both keydown and keyup events when the button was pressed, and then the inverse events when the button was released
<phantomics_> In other words, press button 1 and get keycode 244 down, keycode 246 up, release button 1 and get codes 244 up, 246 down. And these codes registered as being for the mouse
<phantomics_> Then I tried pairing a different phone with the same app but while the phone could pair, the app would never connect
<phantomics_> This is all upstream from CL, I was using cl-gamepad to read events, bypassing its gamepad-specific features and just querying the /dev/input/eventX device I wanted
wacki has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jjnkn has quit [Quit: leaving]
zyni-moe has joined #commonlisp
SunClonus has quit [Quit: Leaving]
zyni-moe has quit [Client Quit]
zyni-moe has joined #commonlisp
mgl has quit [Ping timeout: 246 seconds]
tfeb has joined #commonlisp
zyni-moe has quit [Client Quit]
SunClonus has joined #commonlisp
mariari has quit [Ping timeout: 255 seconds]
tfeb has quit [Client Quit]
wacki has joined #commonlisp
Inline has quit [Ping timeout: 255 seconds]
Inline has joined #commonlisp
mariari has joined #commonlisp
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
rgherdt__ has joined #commonlisp
rgherdt_ has quit [Read error: Connection reset by peer]
rgherdt_ has joined #commonlisp
younder has joined #commonlisp
johnjaye has joined #commonlisp
rgherdt__ has quit [Ping timeout: 256 seconds]
<younder> whats wrong with this picture? (pomo:disconnect *database*) So something tells me I got to get that start-session to keep track of the 'client' database..
<younder> It all works so well assuming it is just one user with one connection..
triffid has quit [Remote host closed the connection]
azimut has quit [Ping timeout: 255 seconds]
azimut has joined #commonlisp
SunClonusX has joined #commonlisp
<younder> http instead of https.. Un-encrypted cookies (ironclad?) argh! Just the usual growing pains. And why are web certificates 400$ a month from AWS
SunClonusX has quit [Client Quit]
triffid has joined #commonlisp
SunClonus has quit [Ping timeout: 240 seconds]
jonatack has joined #commonlisp
fe[nl]ix has quit [Quit: Valete!]
yitzi has quit [Read error: Connection reset by peer]
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
azimut has joined #commonlisp
fe[nl]ix has joined #commonlisp
_cymew_ has quit [Ping timeout: 256 seconds]
cage has quit [Quit: rcirc on GNU Emacs 29.1]
jrx has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1.50)]
rendar has quit [Ping timeout: 268 seconds]
mgl has joined #commonlisp
jonatack has quit [Ping timeout: 264 seconds]
random-jellyfish has joined #commonlisp
zetef has joined #commonlisp
zetef has quit [Remote host closed the connection]
ym has joined #commonlisp
Devon has joined #commonlisp
Devon has quit [Ping timeout: 268 seconds]
<skin> Hey, wondering about comparison in the standard. There's `char=` and `char<`, but not `charcmp`, as in e.g.
<skin> `(defun charcmp (a b) (declare (type char a b)) (- (char-code a) (char-code b)))`
<skin> Like comparator in java. Returns 0 if they are equal, negative if a < b, positive if b > a. Was it just not a familiar concept or were there perf concerns or?
<skin> Like why didn't they have something like that in there. I guess it's a silly question, but it feels like kinda obvious. I don't know.
<skin> I'm making a version comparison function right now and trying to decide whether to write a `version<` function or a good ol fashioned `vercmp`
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
<thuna`> CHAR-CODE (and CHAR-INT as well) is completely arbitrary (AFAICT) so it wouldn't be portable.
<skin> I get what you're saying. I know that _particular_ example is not portable
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<skin> I'm just wondering why they didn't use this negative-zero-positive cmp concept. I ask this because it feels like it's hard to write a comparison function without tripping over other results
<skin> It's hard to write `version<` for example without checking for equality. I might as well report that, hey, these things are equal.
<skin> I already know they are, but it's `version<` so I have to throw out that information.
<skin> So I'm surprised that the standard doesn't have this for chars, I guess.
Devon has joined #commonlisp
NicknameJohn has joined #commonlisp
tok has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
johnjaye has quit [Ping timeout: 256 seconds]
johnjaye has joined #commonlisp
dodoyada has quit [Quit: Client closed]
azimut has quit [Ping timeout: 255 seconds]
<skin> thuna: Actually, reading up. CHAR-CODE and CHAR< are consistent with each other, and their codes MUST obey at least a partial ordering
azimut has joined #commonlisp
<thuna`> The only enforced ordering of characters are those in 13.1.6. If your case is one of those, then I /think/ you can do (- (CHAR-INT C1) (CHAR-INT C2))? It's 0 if (CHAR= C1 C2), as per CHAR-INT, but I don't see a similar thing for CHAR<. Item three in 13.1.6 actually explicitly says that it's not reliable, though I imagine it's practically-standard in the ascii range.
<skin> Yes I would have to lower-case everything first for this to work, reading 13.1.6 now
<thuna`> Or does item one supersede it, actually?
<skin> But if that were the case, I could use the above code
<thuna`> What kind of an input are you expecting? It might be more robust to convert it to a list of versions and compare that instead, though it's probably ok to do it this way too
<skin> Item one just means `(< 0 (- (CODE-CHAR a) (CODE-CHAR b)))` implies `(CHAR< a b)`
<thuna`> Only if they have the same attributes, though
<skin> I'm using the debian version comparison algorithm as a base, changing a few things so that it can compare semver versions as well
<ixelp> Semantic Versioning 2.0.0 | Semantic Versioning
<skin> I wrote all this up in clojure once, sort of doing a re-write https://gitlab.com/djhaskin987/serovers
<thuna`> Where does character comparison come into play here?
<thuna`> (In your algorithm)
<skin> Debian has its own lexical comparison algo. alpha chars compare before non-alpha ones.
dodoyada has joined #commonlisp
wacki has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dodoyada has quit [Client Quit]
<thuna`> So is the goal to avoid having both CHAR= and CHAR<?
<thuna`> (In place of (- (INT A) (INT B)) in the source)
<skin> Well, I can just do the char-code subtraction there, but other parts of the code I have to compare two strings
<skin> And in that part, I run into `string<` and `string=` where it would just have been really nice to call `strcmp`
<skin> I'll check in my code and send a link
<ixelp> ~skin/zippm (add-version): src/version.lisp - sourcehut git
mgl has quit [Ping timeout: 255 seconds]
tyson2 has quit [Remote host closed the connection]
<thuna`> Hmm, you maybe do a quick VERSION= or equivalent check at the beginning and proceed with VERSION>= checks afterwards.
<thuna`> Although you already seem to have that
Inline has quit [Ping timeout: 272 seconds]
<skin> An interesting idea. Splitting them up may not be so bad if VERSION= was _fast_.
<skin> Which it could be -- it may be (to a first approx) just `string=`. I get the feeling there's some corner case though. Version numbers are complicated.
<skin> For example, "a0" sorts as EQUAL to "a"
<thuna`> If you're assuming a single (or two if you're mixing debian and semver), canonical, string representation per version, then you could just STRING=
<skin> Debian thinks those are the same version.
<skin> But yeah, it's my party so I can change the vercmp rules to be more well behaved if I want to
<skin> It's just that debian vercmp is really very good. It is in my opinion the best one out there, and I've implemented lots and dealt with lots.
<skin> That one is just so good.
<skin> But it does feel slimy that "a" and "a0" are the "same version"
<skin> But the STRING= route seems promising anyway. Then I could make a looser check availabe like >= that was also fast.
<skin> decomplect
<skin> anyways.
<skin> Or I could just, you know, use a semver library and move on with my life. :facepalm: https://github.com/cldm/cl-semver
<ixelp> GitHub - cldm/cl-semver: Semantic Versions handling in Common Lisp
<skin> (╯°□°)╯︵ ┻━┻
* skin wonders what I've been doing all week
tane has quit [Quit: Leaving]
<thuna`> classic
Inline has joined #commonlisp
aurelius_nero has quit [Quit: Leaving]
dodoyada has joined #commonlisp
shka has quit [Ping timeout: 252 seconds]
traidare has joined #commonlisp
lucasta has joined #commonlisp
amb007 has quit [Ping timeout: 255 seconds]
jonatack has joined #commonlisp
dino_tutter has quit [Ping timeout: 256 seconds]
rendar has joined #commonlisp
pve has quit [Quit: leaving]
ronald_ has joined #commonlisp
ronald has quit [Read error: Connection reset by peer]
tyson2 has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
jon_atack has joined #commonlisp
traidare has quit [Ping timeout: 260 seconds]
jonatack has quit [Ping timeout: 246 seconds]
rgherdt_ has quit [Remote host closed the connection]