<paulapatience>
Yeah, structs I rejected for that reason. But record sounds pretty good. Thanks!
<aeth>
"records" are Schemer for "struct" (and Scheme has no standard OOP)
<aeth>
so that's the only possible point of confusion, but I think people who know multiple Lisps are aware how different Scheme's terminology is for a lot of things
nkatte has quit [Quit: nkatte]
<paulapatience>
I think Haskell has records too
<paulapatience>
Well, perfect, I think those associations are positive, even
X-Scale has quit [Ping timeout: 256 seconds]
mwnaylor has quit [Remote host closed the connection]
mwnaylor has joined #commonlisp
<aeth>
I wouldn't want the readably printable representation should be #.(make-instance ...) instead of defining a constructor (usually without keyword arguments for extra conciseness imo) for immutable data structures
<aeth>
(make-instance 'foo ...) could have a (make-foo ...) with keyword arguments and/or a (foo ...) without keyword arguments, both of which are readably printable if it's immutable with simple state and immutable contents.
<aeth>
but printing it would err on the side of conciseness, i.e. the latter short form constructor
<aeth>
for a bit of a ridiculous example because it's a sequence so it doesn't quite work: (list 1 2 3) vs. (make-list* :car 1 :cadr 2 :caddr 3)
<aeth>
The other thing you usually need with this kind of "record" setup is a foo-equal or some other way to do equality testing.
<aeth>
a make-record macro could automatically generate a print-object method, an equality test predicate, and a short-form constructor
paddymahoney has quit [Ping timeout: 272 seconds]
<aeth>
well, semi-automatic, you'd usually have to say which equality the slots are handled with
paddymahoney has joined #commonlisp
scymtym has quit [Quit: Application exit]
<paulapatience>
I already have exactly a make-record macro (named differently), which makes a short-form constructor and a print-object. I just hadn't though of defining an equality test.
<yottabyte>
can anyone recommend me a VPS here? I found ionos which appears to be very cheap. I don't need anything fast of fancy, just need to run a web server
<paulapatience>
yottabyte: If you like OpenBSD there is openbsd.amsterdam.
<yottabyte>
I've actually never used openbsd before
random-nick has quit [Ping timeout: 260 seconds]
<Bubblegumdrop>
OpenBSD is sweet
<Bubblegumdrop>
yottabyte I like DigitalOcean droplets, when I used to use them they were about $5/mo
<aeth>
yes, DigitalOcean is quite cheap
<aeth>
Though the cheapest reasonable tiers seem to be the $6 1 GB regular tier or the $7 1 GB Premium AMD tier, so, yes, not $5 (they do also have a $4 tier, but 512 MB is quite microscopic in 2024)
<Bubblegumdrop>
I believe they have increased prices since I used them ~10 years ago.
<Bubblegumdrop>
Oracle/IBM used to offer free VPS
<Bubblegumdrop>
I think that went away as well
<aeth>
usually, a free tier only lasts for a year, anyway
<aeth>
with some extra hidden costs that you can always get
shawnw has joined #commonlisp
<yottabyte>
ionos is doing 1 core, 1gb, and 10gb ssd for $2/month
<yottabyte>
but maybe I'll regret that haha
<Bubblegumdrop>
You can run a web server on that.
<Bubblegumdrop>
What kind of content will you be hosting?
<Bubblegumdrop>
That is more than enough for static HTML.
<paulapatience>
Ok, found a name for a library which will have helper macros for defining records: Cartulary
<paulapatience>
I've had need of them in a couple of my libraries
<yottabyte>
it will be a dynamic web app running on radiance
<yottabyte>
I guess I should find out how much ram it uses as a baseline
<yottabyte>
just running the server
scymtym has joined #commonlisp
<Bubblegumdrop>
You will probably want more than 1 core and 1 GB of RAM for that.
<Bubblegumdrop>
Unless you compile the image on one machine and rsync it over?
<Bubblegumdrop>
That may be possible.
alcor` has joined #commonlisp
alcor has quit [Ping timeout: 248 seconds]
chrcav has quit [Quit: leaving]
rtypo has quit [Ping timeout: 265 seconds]
chrcav has joined #commonlisp
neuroevolutus has joined #commonlisp
neuroevolutus has quit [Ping timeout: 256 seconds]
neuroevolutus has joined #commonlisp
mwnaylor has quit [Remote host closed the connection]
mwnaylor has joined #commonlisp
Akbar-Birbal has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life has joined #commonlisp
decweb has quit [Ping timeout: 252 seconds]
King_julian has joined #commonlisp
King_julian has quit [Changing host]
King_julian has joined #commonlisp
King_julian has quit [Read error: Connection reset by peer]
awlygj has joined #commonlisp
Pixel_Outlaw has quit [Quit: Leaving]
dinomug has joined #commonlisp
amb007 has quit [Ping timeout: 264 seconds]
alcor` has quit [Remote host closed the connection]
alcor` has joined #commonlisp
amb007 has joined #commonlisp
neuroevolutus has quit [Ping timeout: 256 seconds]
AetherWind has joined #commonlisp
awlygj has quit [Ping timeout: 255 seconds]
pve has joined #commonlisp
m5zs7k has quit [Ping timeout: 246 seconds]
wacki has joined #commonlisp
skeemer has joined #commonlisp
m5zs7k has joined #commonlisp
neuroevolutus has joined #commonlisp
benjaminl has quit [Read error: Connection reset by peer]
benjaminl has joined #commonlisp
skeemer has quit [Ping timeout: 248 seconds]
Th30n has joined #commonlisp
amb007 has quit [Ping timeout: 246 seconds]
mgl has joined #commonlisp
amb007 has joined #commonlisp
alternateved has joined #commonlisp
amb007 has quit [Ping timeout: 244 seconds]
amb007 has joined #commonlisp
neuroevolutus has quit [Quit: Client closed]
paddymahoney has quit [Ping timeout: 265 seconds]
meaty has quit [Ping timeout: 260 seconds]
paddymahoney has joined #commonlisp
synchromesh has quit [Read error: Connection reset by peer]
<McParen>
does cl have an equivalent of json? if i want to fully "expand" an clos object and read it back in, what is the common way to do that?
svm has joined #commonlisp
<beach>
McParen: I usually define the character [ to be a reader macro and I print instances of standard classes like [class-name :initarg1 value1 :initarg2 value2 ...]
<beach>
McParen: You typically don't want to deal with the slots of the class, but instead with its initargs and its operators.
msv has quit [Ping timeout: 246 seconds]
msv has joined #commonlisp
<beach>
McParen: So it can't be fully automated, because you need to inform the I/O routines what the relevant initargs are.
<ixelp>
GitHub - robert-strandh/Clobber: A simpler alternative to object prevalence for Common Lisp.
<McParen>
I imagined something like nested alists, but at the same time something that is "common" in the lisp ecosystem
<beach>
rainthree: Well, things can be made simpler if only simple I/O is needed.
<rainthree>
right
<beach>
McParen: I am afraid I removed the code for the best example of how to use this. And I don't have time right now to construct an example. The most complete code for it is now in Gsharp.
<beach>
McParen: If you remind me tomorrow (UTC+2) I'll try to come up with something.
<McParen>
I'll try.
lucasta has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
Akbar-Birbal has left #commonlisp [Error from remote client]
Akbar-Birbal has joined #commonlisp
White_Flame has quit [Read error: Connection reset by peer]
White_Flame has joined #commonlisp
prokhor_ has joined #commonlisp
prokhor has quit [Ping timeout: 252 seconds]
wacki has quit [Ping timeout: 248 seconds]
phantomics_ has quit [Read error: Connection reset by peer]
phantomics_ has joined #commonlisp
wacki has joined #commonlisp
taku has quit [Ping timeout: 276 seconds]
lagash has joined #commonlisp
mgl has joined #commonlisp
taku has joined #commonlisp
skeemer has quit [Ping timeout: 246 seconds]
Akbar-Birbal has left #commonlisp [#commonlisp]
rainthree has quit [Quit: Leaving]
paddymahoney has quit [Ping timeout: 255 seconds]
paddymahoney has joined #commonlisp
McParen has left #commonlisp [#commonlisp]
phantomics has joined #commonlisp
phantomics_ has quit [Ping timeout: 252 seconds]
mgl has quit [Ping timeout: 265 seconds]
phantomics_ has joined #commonlisp
phantomics has quit [Ping timeout: 260 seconds]
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
AetherWind has quit [Remote host closed the connection]
taku has quit [Changing host]
taku has joined #commonlisp
taku has quit [Remote host closed the connection]
X-Scale has quit [Quit: Client closed]
treflip has quit [Ping timeout: 265 seconds]
paddymahoney has quit [Ping timeout: 245 seconds]
paddymahoney has joined #commonlisp
elderK has joined #commonlisp
<aeth>
Nested plists, not nested alists.
<aeth>
Because if you parse them you can turn them into calling the CAR with the plist CDR treated as keyword arguments (perhaps even with APPLY)
josrr has quit [Ping timeout: 276 seconds]
mgl has joined #commonlisp
zxcvz has joined #commonlisp
skeemer has joined #commonlisp
zxcvz has quit [Client Quit]
varjag has joined #commonlisp
paddymahoney has quit [Ping timeout: 260 seconds]
paddymahoney has joined #commonlisp
spdegabrielle has joined #commonlisp
pve has quit [Quit: leaving]
<paulapatience>
What do we call the result of a reader generic function? It's not the slot value, because it can differ.
<Bubblegumdrop>
reader generic function?
<Bubblegumdrop>
like slot accessors?
<paulapatience>
Yes
<bike>
i would just call it a slot value anyway
<bike>
what's in the instance is an implementation detail
<Bubblegumdrop>
I think that's what I call it, a slot value, and when you define it with :reader it's a reader function, and with :writer it's a writer function, and with :accessor it's both
<Bubblegumdrop>
it's just called a reader-function-name
<Bubblegumdrop>
I'm not sure there's an "official" terminology, Isn't there a lisp spec or something? XJ13? I don't know.
<Bubblegumdrop>
I've never read it.
<Bubblegumdrop>
Or the Hyperspec *is* the spec?
<bike>
paulapatience is asking what the value returned by the function is called, not what the function is called.
<Bubblegumdrop>
Good question.
mgl has quit [Ping timeout: 248 seconds]
<paulapatience>
bike: The mere mention of slots makes me think of the implementation, but I guess if there's no better name for it, slot value should do. Especially if the library exposes only accessors; there should be no ambiguity.
brokkoli_origin has quit [Remote host closed the connection]
hirez- has quit [Ping timeout: 260 seconds]
brokkoli_origin has joined #commonlisp
varjag has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.2)]
hirez has joined #commonlisp
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
netdoll has joined #commonlisp
shka has quit [Ping timeout: 252 seconds]
kevingal has joined #commonlisp
akoana has joined #commonlisp
<paulapatience>
aeth: I am reminded of your comment on the abundant corner cases required to implement define-function. I decided to allow arbitrary lambda-lists for the record constructors, and I have spent all day on just that part.
supercode has joined #commonlisp
<aeth>
yes, lambda lists are messy
<aeth>
there are probably libraries, but now you have to learn the library and they probably miss some corner cases
<paulapatience>
What I'm struggling with more is the interaction between default-initargs, default lambda-list parameter values, and how I want to represent missing values.
<paulapatience>
For example, I've introduced the merge function, which replaces the slots of the first object with the non-NIL slots of the second.
<paulapatience>
But now if the default initargs are non-NIL, things become inconsistent.
<aeth>
oh, yeah, that's advanced, a library probably is not going to help
<paulapatience>
Same thing with a MAKE-INSTANCE–based PRINT-OBJECT specialization. I wanted to omit any initargs for slots whose values are NIL, to make the printed representation shorter.
<paulapatience>
But if there are default-initargs, the object is in a kind of limbo.
skeemer has quit [Ping timeout: 244 seconds]
mwnaylor has joined #commonlisp
alternateved has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 244 seconds]
alcor has quit [Ping timeout: 252 seconds]
paddymahoney has quit [Ping timeout: 260 seconds]
elderK has quit [Quit: WeeChat 4.4.2]
paddymahoney has joined #commonlisp
X-Scale has joined #commonlisp
chomwitt has quit [Ping timeout: 265 seconds]
rtypo has quit [Ping timeout: 260 seconds]
paddymahoney has quit [Ping timeout: 246 seconds]
paddymahoney has joined #commonlisp
donleo has quit [Ping timeout: 252 seconds]
reb has joined #commonlisp
supercode has quit [Quit: Client closed]
amb007 has joined #commonlisp
<contrapunctus>
I'm using `quri:make-uri` and if I pass it something like `:params '(("key" . "val1,val2"))`, it URL-encodes the comma into %2C, and if I use that URI with `dex:request`, the request is rejected by the server (400 bad request). How do I prevent `quri` from URL-encoding the parameter value?
kevingal has quit [Remote host closed the connection]
random-nick has quit [Ping timeout: 265 seconds]
amb007 has quit [Ping timeout: 252 seconds]
msv has quit [Ping timeout: 252 seconds]
anticomputer has quit [Remote host closed the connection]