<mfiano>
Well it's been a while since I authored this utility library. It could use some optimizations and more idiomatic code...but it works, so there's that I guess?
<VincentVega>
ah, it's cool. i will just write my own with iterate, since it's so small, but it's good to know there's some library with full fledged functionality for this.
lisp123 has joined #commonlisp
knusbaum has quit [Ping timeout: 252 seconds]
taiju-sub has joined #commonlisp
eddof13 has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
knusbaum has joined #commonlisp
hashfunc569 has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<yitzi>
Unless you have a specific reason to use structs you should use defclass. Then use `defmethod initalize-instance :after` to do late time initialization.
<hashfunc569>
yitzi: ok thanks, i'll give that a try
pranavats has left #commonlisp [Error from remote client]
zacque has quit [Read error: Connection reset by peer]
<hashfunc569>
yitzi: thanks! that saved me some digging
<yitzi>
np
blacked has joined #commonlisp
<blacked>
Hey guys
<blacked>
is there socket.io implementation for common lisp , for realtime data
blacked has left #commonlisp [#commonlisp]
<drbluefall>
🤔
<drbluefall>
Well that was fast.
<raeda>
zacque: how complicated is your target language? Making a bunch of macros might be enough if you want it like CL
kevingal has quit [Read error: Connection reset by peer]
<raeda>
If you want a compiler for a sexp language, it's still going to be a lot of work, but stuff like READ and AST manipulation will be easier
taiju has quit [Ping timeout: 240 seconds]
VincentVega has quit [Ping timeout: 252 seconds]
livoreno has quit [Ping timeout: 250 seconds]
szkl has quit [Quit: Connection closed for inactivity]
Guest74 has joined #commonlisp
hashfunc569 has quit [Ping timeout: 240 seconds]
eddof13 has joined #commonlisp
beach` has quit [Ping timeout: 252 seconds]
Devon has joined #commonlisp
aeth has quit [Ping timeout: 240 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mon_aaraj has quit [Ping timeout: 256 seconds]
aeth has joined #commonlisp
Inline__ has joined #commonlisp
Inline has quit [Ping timeout: 250 seconds]
<qhong>
For DSL creation I think there's a lot to learn from Scala's LMS framework. I'm writing a Lisp version that should be much better than the Scala one, stay tuned.
tyson2 has quit [Remote host closed the connection]
gxt_ has quit [Remote host closed the connection]
gxt_ has joined #commonlisp
<beach>
Good morning everyone!
pranavats has joined #commonlisp
<Guest74>
is there an xml comparison like the json one?
semz_ has joined #commonlisp
semz has quit [Ping timeout: 250 seconds]
vats has joined #commonlisp
azimut has joined #commonlisp
waleee has quit [Ping timeout: 245 seconds]
semz_ is now known as semz
notzmv has quit [Ping timeout: 252 seconds]
hashfunc569 has joined #commonlisp
<hashfunc569>
what is the simplest way to get the absolute directory of a given file pathname. e.g., in pseudo-code: (pathname-directory (pathname "/home/user/file.lisp")) => #P"/home/user/" OR => "/home/user/"
<hashfunc569>
*is there a function that does just that, or will i have to process the result of PATHNAME-DIRECTORY
Giovanni has quit [Remote host closed the connection]
Giovanni has joined #commonlisp
Giovanni has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 252 seconds]
mon_aaraj has quit [Ping timeout: 240 seconds]
fitzsim has quit [Read error: Connection reset by peer]
aartaka has joined #commonlisp
zacque has joined #commonlisp
<zacque>
raeda: Haven't settled down on my target language yet, could be JS, C, or Bash script
<zacque>
That might work, I'll give it a try
<zacque>
My goal is to simply have a lispy frontend to language that I'm using
<zacque>
Then maybe put a macro on top of it
<zacque>
qhong: Ah, first time heard about LMS, thanks for pointing it out
hashfunc569 has quit [Ping timeout: 240 seconds]
aartaka has quit [Read error: Connection reset by peer]
<qhong>
The idea behind LMS is absolutely beautiful, which is essentially "Normalization by Evaluation". I'm surprised that this method haven't seemed to be used for metaprogramming at all in Lisp world. LMS itself is clunky because Scala sucks. It still says a lot about the versatility of NbE, as it can enable powerful metaprogramming even in a horrible language
occ has joined #commonlisp
<beach>
"Normalization" as in "computing a normal form"?
<qhong>
beach: Yes, but in some custom rewriting system
<Josh_2>
I have a frontend and a backend, the backend is standalone (lisp ofc ;) ) I want a way to verify with the backend that the client (the frontend, not the user) is an authorized client
<aeth>
authorized as in DRM?
<Josh_2>
Uh
<Josh_2>
Just trying to avoid abuse of the API because the backend sells tickets to events
<Josh_2>
dont want a malicious user to reserve all of the events
<Josh_2>
all of the tickets*
<Josh_2>
Right now there is a shared secret and the nodejs server that serves the frontend makes a request to the backend using the shared secret to authenticate specific requests with an authentication HTTP header
<aeth>
It's heresy here, but I think I'd use FFI for hiding that
<Josh_2>
FFI?
Cymew has joined #commonlisp
<aeth>
Josh_2: foreign function interface, i.e. a foreign library
<Josh_2>
I thought so, but I dont see how that helps
<Josh_2>
the problem is middle men seeing the headers in HTTP requests
<aeth>
https, then?
<aeth>
or encrypt the secret separately.
<Josh_2>
right now the malicious user could use the authenticated client to grab a bearer token and then put that token into their own application which would then abuse the API
<Josh_2>
because its just an Authentication: Bearer <token>
<Josh_2>
HTTP header. I need a way to make it so even if a third party could get access to <token> it doesn't matter
<Josh_2>
Idk :(
<Josh_2>
Ofcourse I can just do something completely different
<loke[m]>
Josh_2: You make the bearer tokens expire after a certain amount of time.
amb007 has quit [Ping timeout: 250 seconds]
<Josh_2>
They do
amb007 has joined #commonlisp
<phoe>
aw shit
<phoe>
I have positive news, namely, my COVID test
s-liao2 has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
<flip214>
phoe: get negative soon, monday is ELS
<phoe>
flip214: that's the whole thing! they won't let me out of my house until 26th
<beach>
phoe: Wow, weren't you supposed to do something important in Porto like the video stuff?
<phoe>
beach: that's the thing
<phoe>
we're working around this now
<beach>
Yeah, I see.
wyrd has quit [Ping timeout: 240 seconds]
<flip214>
phoe: get better soon! And good luck with Long Covid...
<phoe>
flip214: I'm not feeling all that bad right now, we'll see about the future - thanks
wyrd has joined #commonlisp
MajorBiscuit has joined #commonlisp
lispy has joined #commonlisp
MajorBiscuit has quit [Client Quit]
MajorBiscuit has joined #commonlisp
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
gxt_ has quit [Remote host closed the connection]
gxt_ has joined #commonlisp
amb007 has quit [Ping timeout: 250 seconds]
frgo has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
scymtym has quit [Ping timeout: 256 seconds]
Brucio-61 has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
occ has quit [Ping timeout: 240 seconds]
perrierjouet has quit [Ping timeout: 240 seconds]
lisp123 has quit [Ping timeout: 256 seconds]
Brucio-61 has joined #commonlisp
scymtym has joined #commonlisp
<Josh_2>
phoe: I had covid at christmas, I had a runny nose
<Josh_2>
You will be A-okay
lispy has quit [Quit: Leaving]
<splittist>
My covid was less sever than my hay fever. Different people react differently, but, as Josh_2 says, be of good cheer. We'll have a port cocktail and a francesinha for you...
<splittist>
*severe
<splittist>
(No severing was involved)
perrierjouet has joined #commonlisp
amb007 has quit [Ping timeout: 240 seconds]
karlosz has quit [Ping timeout: 240 seconds]
mon_aaraj has quit [Ping timeout: 250 seconds]
mon_aaraj has joined #commonlisp
<flip214>
people, abstain from duplicating health data on unsecured communication channels... no gdpr will help cleaning up here
<SR-71>
Do you guys have any suggestions on how should I organize my course?
kevingal has quit [Ping timeout: 240 seconds]
kevingal has joined #commonlisp
Posterdati has joined #commonlisp
s-liao has quit [Quit: Ping timeout (120 seconds)]
s-liao has joined #commonlisp
<jackdaniel>
start with an answer to the question "Why Lisp?", then describe REPL and define a simple database as the third part ,)
<SR-71>
Should I include also code walkthroughs?
<jackdaniel>
(this is a joke - point being that practical common lisp is a wonderful introduction course and these are three first chapters)
<jackdaniel>
if I were writing a course, I'd pick a topic that is not covered for common lisp anywhere and work on that
<jackdaniel>
or some topic that is covered somewhere but poorly
<jackdaniel>
(or that the coverage is outdated)
<SR-71>
Initially I planned to write a udemy clone as an exercise.
<SR-71>
But, with a slightly different UI
wacki has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
s-liao has joined #commonlisp
Dynom has quit [Quit: WeeChat 3.4]
razetime has joined #commonlisp
lisp123 has joined #commonlisp
vats has quit [Ping timeout: 256 seconds]
frgo has joined #commonlisp
s-liao has quit [Quit: Client closed]
lisp123 has quit [Ping timeout: 240 seconds]
mon_aaraj has quit [Ping timeout: 250 seconds]
mon_aaraj has joined #commonlisp
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 272 seconds]
X-Scale` is now known as X-Scale
tyson2 has joined #commonlisp
random-nick has joined #commonlisp
heisig has joined #commonlisp
taiju-sub has joined #commonlisp
mon_aaraj has quit [Ping timeout: 250 seconds]
mon_aaraj has joined #commonlisp
nature has joined #commonlisp
occ has joined #commonlisp
heisig has quit [Remote host closed the connection]
heisig has joined #commonlisp
attila_lendvai has joined #commonlisp
aartaka has quit [Ping timeout: 252 seconds]
<Josh_2>
The course is written by Vindarel, its probably pretty solid
<Josh_2>
but ofc you have to pay for Udemy
heisig has quit [Remote host closed the connection]
heisig has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.4.1]
heisig has quit [Remote host closed the connection]
heisig has joined #commonlisp
Brucio-61 has quit [Ping timeout: 245 seconds]
scymtym has quit [Ping timeout: 245 seconds]
s-liao has joined #commonlisp
Bike has joined #commonlisp
heisig has quit [Remote host closed the connection]
heisig has joined #commonlisp
Brucio-61 has joined #commonlisp
raeda has quit [Remote host closed the connection]
raeda has joined #commonlisp
s-liao has quit [Quit: Client closed]
<flip214>
can a DEFMETHOD check for an _exact_ class, ie. so that subclasses do not use that method? Or would I need to declare methods for all subclasses as well?
<Bike>
no, clos is more or less based on liskov substitution
fitzsim has joined #commonlisp
scymtym has joined #commonlisp
<Bike>
you can do things like (when (eq (class-of object) (find-class whatever)) ...) if you need
<scymtym>
not portably, but SB-PCL::CLASS-EQ-SPECIALIZER does exactly that
rogersm has quit [Quit: Leaving...]
wacki has quit [Quit: Leaving.]
<flip214>
I helped myself by splitting the class tree up, with a new common parent class
heisig has quit [Remote host closed the connection]
heisig has joined #commonlisp
mgl has joined #commonlisp
attila_lendvai has quit [Ping timeout: 252 seconds]
<wmblathers>
Guest74: My cl-svg library uses some FORMAT craziness to get approximately human-readable output.
<wmblathers>
~< is useful for this.
<Demosthenex>
Guest74: regarding todo lists, clearly you've never met org-mode with org-capture ;]
<Guest74>
I might look at that. Currently I have correct indentation, except that everything is indented 2 spaces, like 2 spaces before <svg
tane has joined #commonlisp
tane has joined #commonlisp
tane has quit [Changing host]
<hashfuncf39>
i'm honestly finding DEFSTRUCT to be far more conveniant than DEFCLASS. since construction seems more trivial as well as printing. my intuition is that you should always use DEFSTRUCT unless you really need DEFCLASS. is this the communities' consensus?
wacki has quit [Quit: Leaving.]
VincentVega has quit [Ping timeout: 250 seconds]
VincentV` has joined #commonlisp
epolanski has joined #commonlisp
<Bike>
that's kind of the opposite of the consensus.
<Bike>
the main difficulty is that defstruct definitions can't be redefined. if all you want is the accessor names and printing, you can accomplish that fairly easily with a wrapper around defclass.
<_death>
defclass has many features that can prove convenient, like redefinition protocol or multiple inheritance.. defstruct has some pitfalls, and sometimes its defaults get in the way.. but if it works for you..
<yitzi>
Yeah. Give me defclass or give me death.
<_death>
for example, often you actually don't want to print all slot values of an instance
<hashfuncf39>
oh ok. i can see how the redefinition protocol alone is probably worth switching to just usting DEFCLASS. i haven't used that yet. i thought the recompilation errors of my DEFSTRUCT was just a normal thing i had to deal with
<_death>
I think there was a blog post about this recently.. https://lisper.in/do-you-start-with-a-struct-or-a-class .. anyway, I sometimes start with defclass, sometimes with defstruct, depending on what I think I may need
<hashfuncf39>
ok thanks ya'll
VincentV` has left #commonlisp [ERC (IRC client for Emacs 27.2)]
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
<hashfuncf39>
interesting find on https://grep.app/ as well: searching "(defstruct" gives 1,823 occurrences vs "(defclass"'s 3,740 occurrences
attila_lendvai has quit [Ping timeout: 256 seconds]
scymtym has quit [Ping timeout: 245 seconds]
lisp123 has joined #commonlisp
Brucio-61 has quit [Ping timeout: 268 seconds]
lisp123 has quit [Ping timeout: 252 seconds]
kpoeck has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
Dynom has quit [Quit: WeeChat 3.4]
scymtym has joined #commonlisp
Brucio-61 has joined #commonlisp
wyrd has quit [Ping timeout: 240 seconds]
shka has quit [Ping timeout: 240 seconds]
nature has quit [Ping timeout: 250 seconds]
random-nick has quit [Ping timeout: 240 seconds]
wyrd has joined #commonlisp
Everything has quit [Quit: leaving]
<Guest74>
what's interesting is that's not what it shows for me.
ski has joined #commonlisp
<hashfuncf39>
what is it showing for you?
random-nick has joined #commonlisp
aeth has quit [Ping timeout: 252 seconds]
asarch has quit [Quit: Leaving]
aeth has joined #commonlisp
tane has quit [Quit: Leaving]
<Guest74>
(defstruct 2441 (defclass 4848
<hashfuncf39>
we must be querying different servers/data-sets
<hashfuncf39>
fwir i don't think it's real-time github data
<hashfuncf39>
and by the likes of it they aren't keeping a very redundant data-set
<hashfuncf39>
*looks of it
<Guest74>
my bad, didn't even check the options. checking common lisp gives me your numbers.
<Guest74>
but the numbers are a bit biased considering the top two for defclass.