<Xach>
pdietz: i tend to do that for the more complex macros - stitch together parts from separate functions that can be traced/tested independently during development. but for small things i often do it directly.
* Xach
is thrown off by the missing "f"
karlosz has quit [Quit: karlosz]
Lycurgus has quit [Quit: Exeunt]
Colt has quit [Remote host closed the connection]
Colt has joined #commonlisp
poselyqualityles has joined #commonlisp
makomo has quit [Ping timeout: 252 seconds]
elderK has joined #commonlisp
yewscion has quit [Ping timeout: 252 seconds]
poselyqualityles has quit [Ping timeout: 252 seconds]
karlosz has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.3]
perrierjouet has joined #commonlisp
taiju has quit [Ping timeout: 240 seconds]
karlosz has quit [Quit: karlosz]
perrierjouet has quit [Quit: WeeChat 3.3]
perrierjouet has joined #commonlisp
akoana has quit [Quit: leaving]
slyrus has joined #commonlisp
Guest74 has joined #commonlisp
kakuhen has joined #commonlisp
taiju has joined #commonlisp
kakuhen has quit [Client Quit]
kakuhen has joined #commonlisp
srhm has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
kakuhen has quit [Quit: Leaving...]
<Guest74>
How do you get emacs to change the indentation of a macro? I have this https://plaster.tymoon.eu/view/2760#2760 which looks really ugly in the editor because :headers gets indented only 2 spaces.
euandreh has quit [Ping timeout: 268 seconds]
euandreh has joined #commonlisp
peterhil_ has quit [Remote host closed the connection]
peterhil_ has joined #commonlisp
peterhil_ has quit [Read error: Connection reset by peer]
<dre>
Guest74, use &rest or something along those lines
<beach>
Good morning everyone!
<dre>
Good morning!
aartaka has joined #commonlisp
pillton has joined #commonlisp
cjb has quit [Quit: rcirc on GNU Emacs 29.0.50]
<Guest74>
dre: I don't understand how that is going to change emacs indenting.
<White_Flame>
&rest, &body, and normal terms in the defmacro affect how its usage is indented
<White_Flame>
*in the defmacro's lambda list
<Guest74>
&rest doesn't affect it. There's a &key in there.
<beach>
Guest74: 2 spaces is the usual indentation.
<Guest74>
for lambda lists?
<beach>
That doesn't look like a lambda list to me.
<Guest74>
it is all part of the macros lambda list
<beach>
I don't see a DEFMACRO in there.
peterhil has quit [Read error: Connection reset by peer]
<beach>
It would be highly unusual for a keyword such as :headers to be part of a lambda list.
peterhil_ has joined #commonlisp
<beach>
The only place where it would be allowed would be in a &KEY parameter to change the default keyword used in the argument.
peterhil_ has quit [Read error: Connection reset by peer]
peterhil_ has joined #commonlisp
<beach>
... as in &KEY ((:HEADERS something-other-than-HEADERS))
lisp123 has quit [Remote host closed the connection]
semz has quit [Ping timeout: 268 seconds]
Catie has quit [Quit: rcirc on GNU Emacs 29.0.50]
s-liao has joined #commonlisp
semz has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
taiju has quit [Ping timeout: 252 seconds]
<pillton>
Is there a convention for naming "collection" operators where 1) a function is applied to each element of a collection and the results are ignored and 2) a new collection is created from the results of applying a function to each element of a collection?
<beach>
Both wold typically be prefixed with MAP-, but I don't know of any distinction between the two cases.
<pillton>
beach: Yes. MAP is an outlier as it is capable of (1) and (2).
Guest74 has quit [Ping timeout: 268 seconds]
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
aartaka has quit [*.net *.split]
slyrus has quit [*.net *.split]
igemnace has quit [*.net *.split]
elderK has quit [*.net *.split]
perrierjouet has quit [*.net *.split]
skeemer__ has quit [*.net *.split]
Oladon has quit [*.net *.split]
engblom has quit [*.net *.split]
MichaelRaskin has quit [*.net *.split]
dale has quit [*.net *.split]
scymtym has quit [*.net *.split]
Schnouki has quit [*.net *.split]
raeda__ has quit [*.net *.split]
hobo has quit [*.net *.split]
payphone has quit [*.net *.split]
edgar-rft has quit [*.net *.split]
Jach has quit [*.net *.split]
thomaslewis has quit [*.net *.split]
hhdave has quit [*.net *.split]
frgo has quit [*.net *.split]
axvr has quit [*.net *.split]
phadthai has quit [*.net *.split]
pjb has quit [*.net *.split]
xantoz has quit [*.net *.split]
alvaro121_ has quit [*.net *.split]
lottaquestions has quit [*.net *.split]
stylewarning has quit [*.net *.split]
jcowan has quit [*.net *.split]
aeth has quit [*.net *.split]
djuber has quit [*.net *.split]
anddam has quit [*.net *.split]
Posterdati has quit [*.net *.split]
hineios has quit [*.net *.split]
CrashTestDummy has quit [*.net *.split]
paule32 has quit [*.net *.split]
mfiano has quit [*.net *.split]
utis has quit [*.net *.split]
OlCe has quit [*.net *.split]
okflo has quit [*.net *.split]
Demosthenex has quit [*.net *.split]
kagevf has quit [*.net *.split]
greyrat_ has quit [*.net *.split]
d4ryus has quit [*.net *.split]
selwyn has quit [*.net *.split]
jackdaniel has quit [*.net *.split]
ultera has quit [*.net *.split]
ryanbw has quit [*.net *.split]
derelict has quit [*.net *.split]
snits has quit [*.net *.split]
semz has quit [*.net *.split]
terrorjack has quit [*.net *.split]
rotateq has quit [*.net *.split]
ogamita has quit [*.net *.split]
pranavats has quit [*.net *.split]
unyu has quit [*.net *.split]
sm2n has quit [*.net *.split]
zoglesby has quit [*.net *.split]
Odin- has quit [*.net *.split]
ori has quit [*.net *.split]
TMA has quit [*.net *.split]
jmercouris has quit [*.net *.split]
form_feed has quit [*.net *.split]
micro has quit [*.net *.split]
jdz has quit [*.net *.split]
zagura has quit [*.net *.split]
minion has quit [*.net *.split]
stacksmith has quit [*.net *.split]
antoszka has quit [*.net *.split]
Mandus has quit [*.net *.split]
travv0 has quit [*.net *.split]
spacebat3 has quit [*.net *.split]
dcx has quit [*.net *.split]
amk has quit [*.net *.split]
hefner has quit [*.net *.split]
easye has quit [*.net *.split]
mikko has quit [*.net *.split]
BytesAndCoffee has quit [*.net *.split]
ecraven has quit [*.net *.split]
energizer has quit [*.net *.split]
mgxm has quit [*.net *.split]
susam has quit [*.net *.split]
cross has quit [*.net *.split]
gin has quit [*.net *.split]
cpape has quit [*.net *.split]
pillton has quit [*.net *.split]
igemnace has joined #commonlisp
pillton has joined #commonlisp
terrorjack has joined #commonlisp
aartaka has joined #commonlisp
semz has joined #commonlisp
perrierjouet has joined #commonlisp
rotateq has joined #commonlisp
skeemer__ has joined #commonlisp
slyrus has joined #commonlisp
engblom has joined #commonlisp
MichaelRaskin has joined #commonlisp
dale has joined #commonlisp
unyu has joined #commonlisp
djuber has joined #commonlisp
Posterdati has joined #commonlisp
raeda__ has joined #commonlisp
anddam has joined #commonlisp
hineios has joined #commonlisp
CrashTestDummy has joined #commonlisp
edgar-rft has joined #commonlisp
payphone has joined #commonlisp
Jach has joined #commonlisp
thomaslewis has joined #commonlisp
hhdave has joined #commonlisp
ogamita has joined #commonlisp
axvr has joined #commonlisp
frgo has joined #commonlisp
TMA has joined #commonlisp
paule32 has joined #commonlisp
mfiano has joined #commonlisp
phadthai has joined #commonlisp
pjb has joined #commonlisp
xantoz has joined #commonlisp
elderK has joined #commonlisp
aeth has joined #commonlisp
Oladon has joined #commonlisp
hobo has joined #commonlisp
pranavats has joined #commonlisp
scymtym has joined #commonlisp
Schnouki has joined #commonlisp
OlCe has joined #commonlisp
lottaquestions has joined #commonlisp
zoglesby has joined #commonlisp
alvaro121_ has joined #commonlisp
sm2n has joined #commonlisp
Odin- has joined #commonlisp
antoszka has joined #commonlisp
ori has joined #commonlisp
okflo has joined #commonlisp
Demosthenex has joined #commonlisp
form_feed has joined #commonlisp
jmercouris has joined #commonlisp
kagevf has joined #commonlisp
micro has joined #commonlisp
greyrat_ has joined #commonlisp
jdz has joined #commonlisp
d4ryus has joined #commonlisp
stylewarning has joined #commonlisp
jcowan has joined #commonlisp
spacebat3 has joined #commonlisp
ryanbw has joined #commonlisp
derelict has joined #commonlisp
snits has joined #commonlisp
easye has joined #commonlisp
mikko has joined #commonlisp
ecraven has joined #commonlisp
energizer has joined #commonlisp
utis has joined #commonlisp
travv0 has joined #commonlisp
Mandus has joined #commonlisp
mgxm has joined #commonlisp
stacksmith has joined #commonlisp
minion has joined #commonlisp
zagura has joined #commonlisp
jackdaniel has joined #commonlisp
selwyn has joined #commonlisp
hefner has joined #commonlisp
dcx has joined #commonlisp
amk has joined #commonlisp
ultera has joined #commonlisp
BytesAndCoffee has joined #commonlisp
cpape has joined #commonlisp
gin has joined #commonlisp
cross has joined #commonlisp
susam has joined #commonlisp
AndrewYu has quit [Max SendQ exceeded]
Lord_of_Life has quit [Max SendQ exceeded]
AndrewYu has joined #commonlisp
Lord_of_Life has joined #commonlisp
<jmercouris>
best programming font for Lisp?
Colt has quit [Remote host closed the connection]
Colt has joined #commonlisp
<akater[m]>
pillton: It is customary to call (2) a “transducer” these days.
<pillton>
On the subject of implementing operator (2). Assuming the collection can be subclassed, what is the common way of instantiating the new collection such that subclasses have the ability to copy slots from the collection given to the map operator? I was thinking of using (make-instance (class-of collection) :copy-from collection).
<pillton>
akater[m]: Where is that used?
<beach>
pillton: That seems like a reasonable solution.
_death has quit [*.net *.split]
Duuqnd has quit [*.net *.split]
paulapatience has quit [*.net *.split]
jemoka has quit [*.net *.split]
loke has quit [*.net *.split]
antoszka-r has quit [*.net *.split]
gabc has quit [*.net *.split]
SAL9000 has quit [*.net *.split]
Xach has quit [*.net *.split]
loke has joined #commonlisp
Xach has joined #commonlisp
gabc has joined #commonlisp
adeht has joined #commonlisp
jemoka has joined #commonlisp
antoszka-r has joined #commonlisp
SAL9000 has joined #commonlisp
lisp123 has joined #commonlisp
<akater[m]>
pillton: The term is popularized by Clojure but technically it means something subtly different there. In academic use, it's closer to (1) as is, iiuc.
<pillton>
akater[m]: Ok. Thanks.
<pillton>
beach: Thanks.
spiaggia has joined #commonlisp
lisp123 has quit [Ping timeout: 245 seconds]
paulapatience has joined #commonlisp
Duuqnd has joined #commonlisp
_whitelogger has joined #commonlisp
spec has joined #commonlisp
danirukun[m] has joined #commonlisp
Spawns_Carpet[m] has joined #commonlisp
sepanko has joined #commonlisp
asen has joined #commonlisp
<beach>
pillton: The issue you just mentioned is the main reason I moved away from Keene-style constructors. They hard-wire the class in the name of the constructor, so you can't do what you suggested with a variable class. But I am now leaning toward an indirection like MAKE-<collection-name> but that has the same signature as MAKE-INSTANCE. That way, I can trace and put additional methods on this function without disturbing make-inst
<pillton>
beach: Oh that is a good idea. I have been using MAKE-<protocol-name>-LIKE in some instances.
taiju has joined #commonlisp
<beach>
Sure, that works too.
spiaggia has quit [Ping timeout: 245 seconds]
<hayley>
The SICL hash tables have to be created with MAKE-HASH-TABLE, but that function additionally takes a :CLASS keyword argument.
Algernon91 has joined #commonlisp
<beach>
And it defaults to the value of a special variable, yes?
<pillton>
beach: I tend to like the Keene-style constructor as you can 1) easily see what arguments are needed to initialize the instance 2) you have the ability to specialize the instance according to the arguments given to the constructor and 3) you know what implementation/representation is needed for the use case.
<hayley>
beach: Yes, right.
<beach>
pillton: Yes, I know the advantages. I just told you about the disadvantage that is sometimes unacceptable.
notzmv has quit [Ping timeout: 252 seconds]
<hayley>
There is a constructor function with a similar signature for decentralise2 "passing" connections, but there is a default class rather than the value of a special variable.
Algernon91 has quit [Ping timeout: 240 seconds]
<pillton>
beach: Ok. Sure. I was just saying why I still like them.
<beach>
Right.
karlosz has joined #commonlisp
karlosz has quit [Ping timeout: 240 seconds]
spiaggia has joined #commonlisp
Cymew has joined #commonlisp
Oladon has quit [Quit: Leaving.]
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
s-liao has quit [Quit: Client closed]
gaqwas has joined #commonlisp
attila_lendvai has joined #commonlisp
shka has joined #commonlisp
makomo has joined #commonlisp
<dre>
<jmercouris> best programming font for Lisp? <-- Comic Mono
<dre>
lisp doesn't actually compile without it
<hayley>
Computer Modern Typewriter Text or go home
<spiaggia>
I sure hope we can use proportional fonts some day.
<dre>
what is it with people demanding proportional fonts in programming
<spiaggia>
It saves a lot of horizontal space, which is a precious resource as we all know
<spiaggia>
That's what's "with us".
<dre>
there's been a few conversations I've had now where people (often new to programming) demand a way to use a proportional fonts in XYZ.
<spiaggia>
I can assure you I am not in that category. I started programming in 1975.
makomo has quit [Ping timeout: 240 seconds]
<spiaggia>
... and I am not making any demands. I am working to make it happen.
<hayley>
I was tempted to use a LaTeX "pseudocode" package for my ELS paper, because it looked nicer. But then the paper wouldn't have much Lisp in it.
<spiaggia>
Speaking of which, when is the ELS deadline?
taiju has quit [Ping timeout: 268 seconds]
<spiaggia>
The submission deadline, I mean.
<hayley>
Good question.
taiju has joined #commonlisp
<spiaggia>
Never mind. I'll look it up.
<hayley>
Seems to be January 23.
<spiaggia>
Rapidly approaching.
<dre>
what is ELS?
<hayley>
Are you planning to submit any papers for ELS 2022?
<minion>
Sorry, I couldn't find anything in the database for ``ELS22''.
<flip214>
minion: ELS2022
<minion>
Sorry, I couldn't find anything in the database for ``ELS2022''.
<spiaggia>
flip214: You can use private messages with minion.
<dre>
is the source code for minion anywhere? I like it :)
<semz>
Is there a define-condition option that sets the function documentation of a slot reader? I can find one for the slot itself but that's not quite it. I guess I could do (setf (documentation 'foo 'function) "bar") at the toplevel.
<spiaggia>
dre: I don't know where you are located, but ELS is definitely not reserved for Europeans. We have regular visitors from the USA, Japan, and other exotic places. So feel free to attend.
<dre>
thanks :) it looks very cool
<hayley>
To my knowledge, there is going to be an online part for ELS, so you can attend without travelling to Europe. Made it easy for me last year (living in Australia).
lisp123w has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
<dre>
I'm finishing up work now but I'll look into it, and I'll check out some of the older postings
<spiaggia>
It is. Before COVID we had around 90 participants every year
<hayley>
Of course I couldn't stay up for all of it, but I got about halfway through the day before bed.
<dre>
yeah I'm in the exotic Australian place as well
<dre>
suprised there didn't seem to be many "LISPERS IN SYDNEY" or whatever on meetup.com but oh well, I don't have much time for meetups anyway.
Algernon91 has quit [Ping timeout: 250 seconds]
<spiaggia>
dre: When I spent one year in Auckland, I discovered that there were around 5 Lispers within a radius of a one-hour flight. In Europe, there are hundreds.
<dre>
haha yes that sounds likely
<spiaggia>
Sorry, 3 hour fight I mean.
<dre>
a shame
<spiaggia>
Definitely.
<dre>
I'll have to go around door knocking, spreading the good word
<dre>
I'm enjoying what I've learned so far. I'm trying to smash out work so I can get back to my AoC puzzles
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
pve has joined #commonlisp
gaqwas has quit [Ping timeout: 240 seconds]
spiaggia has quit [Quit: ERC (IRC client for Emacs 26.3)]
karlosz has joined #commonlisp
s-liao has joined #commonlisp
s-liao has quit [Client Quit]
karlosz has quit [Ping timeout: 240 seconds]
VincentVega has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
taiju has quit [Ping timeout: 252 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<VincentVega>
spiaggia: re: "I sure hope we can use proportional fonts some day." variable-pitch-mode in emacs?
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<beach>
VincentVega: The problem is indentation and spacing. Already, Emacs is not good enough for that, and with proportional font, it would make a complete mess out of the code.
<VincentVega>
beach: yeah, true, I didn't think about that one
<jackdaniel>
yitzi makes an impressive work with pretty printer in sicl
<jackdaniel>
I saw a screenshot where a proportional font was used for loop and things were indented top notch
<beach>
Yes, and there might be some commonalities to identify between that code and Second Climacs.
<VincentVega>
jackdaniel: neat, thanks for the link
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
taiju has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
lisp123 has joined #commonlisp
cranium has joined #commonlisp
lisp123 has quit [Ping timeout: 252 seconds]
igemnace has quit [Remote host closed the connection]
cosimone has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life_ is now known as Lord_of_Life
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
dre has quit [Remote host closed the connection]
lisp123w has left #commonlisp [ERC (IRC client for Emacs 26.3)]
edgar-rft has quit [Quit: Leaving]
<pjb>
VincentVega: beach: it's not so bad: https://pasteboard.co/g0pQtigiY6CF.png Indeed, :initial-element is not indented correctly, or loop always is not aligned on for; but that remains usable.
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
pranavats has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
kennyd has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
dickbar__ has joined #commonlisp
dre has quit [Ping timeout: 265 seconds]
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
dre has joined #commonlisp
<rotateq>
i should participate at ELS this year too
<Shinmera>
Agreed.
<rotateq>
and don't worry, it will just be possible for me online ^^
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 265 seconds]
yewscion has joined #commonlisp
Algernon666 has quit [Ping timeout: 250 seconds]
yewscion has quit [Ping timeout: 252 seconds]
lottaquestions has quit [Quit: Konversation terminated!]
Algernon666 has joined #commonlisp
unyu has quit [Quit: brb]
unyu has joined #commonlisp
random-nick has joined #commonlisp
yewscion has joined #commonlisp
VincentV` has joined #commonlisp
tyson2 has joined #commonlisp
VincentVega has quit [Ping timeout: 256 seconds]
Xach has joined #commonlisp
Xach has quit [Changing host]
asen has quit [Quit: Leaving]
Bike has joined #commonlisp
Catie has joined #commonlisp
kennyd has quit [Quit: CGI:IRC (Ping timeout)]
lisp123 has joined #commonlisp
VincentV` has quit [Ping timeout: 252 seconds]
lisp123 has quit [Ping timeout: 268 seconds]
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
<pdietz>
I keep telling myself I should send something to ELS, but then it gets close and I'm not ready. Too distracted by other things.
Cymew has quit [Ping timeout: 265 seconds]
Lycurgus has joined #commonlisp
Algernon91 has joined #commonlisp
lisp123 has joined #commonlisp
Algernon666 has quit [Ping timeout: 250 seconds]
lisp123 has quit [Remote host closed the connection]
_73 has joined #commonlisp
<_73>
is there a convention for naming a special variable that is also a closure?
aartaka has quit [Ping timeout: 252 seconds]
<jackdaniel>
I don't recall such convention
tyson2 has quit [Remote host closed the connection]
<jdz>
One parameter functions are sometimes called "thunks".
<_73>
In general do you reccomend trying to differentiate closure variables, or is it usually obvious?
<Bike>
this is actually the first time i've heard of the idea of trying to distinguish closure variables
<semz>
Wouldn't the name usually suggest that it is a function anyway?
<Bike>
they're just another kind of value
<jdz>
*One parameter _anonymous_ functions.
<Bike>
i thought a "thunk" was a no-parameter function
* semz
thought the same
<jdz>
Is this about variables bound to closures, or bindings captured by closures?
<_73>
jdz: variables bound to closures
<jdz>
Bike: You may be right, I've seen the name, but have no idea where the name comes from.
<Bike>
well if they're captured they're not special variables, so
<Bike>
jdz: goofy version of "think"
<Bike>
and algol
<semz>
You could go for names like *foo-conversion-function* instead of *foo-converter* to remove a bit of ambiguity, but honestly I don't think it's a big deal.
<Guest74>
thanks for that. I was hoping they'd mention usual queries, but it seems not. Trying to make the IDENTIFIER deal with regular use cases, also need a more generic name for it.
thomaslewis has left #commonlisp [#commonlisp]
peterhil_ has quit [Remote host closed the connection]
peterhil_ has joined #commonlisp
makomo has joined #commonlisp
peterhil_ has quit [Remote host closed the connection]
peterhil_ has joined #commonlisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
<jeosol>
I want to thank the sbcl dev and maintenance for their continuing work. Just migrated from 2.1.9 to 2.1.11, no issues to building software
<jeosol>
Good morning all!
<yitzi>
Its in the URI one rfc 3986
<yitzi>
Sorry...didn't see that someone else respond.
<Guest74>
yeah, I guess I'm looking more for usual queries to be able to handle them all as the required arg of the resulting function.
<jeosol>
is any one running containers on the cloud using SBCL, what cloud provider are you using and any recommendation. I am trying to demo something (not a full webapp) just run the docker containers and expose an api
<beach>
yitzi: I think yours is significantly better, mainly because of more basic indentation for nested forms.
<jeosol>
** above, I wanted to say I use only SBCL
x88x88x- has quit [Ping timeout: 265 seconds]
<yitzi>
Thanks beach. There still some oddness going on with some the line lengths. I have some ideas percolating on that though.
<White_Flame>
Guest74: what do you mean by "usual queries"?
<White_Flame>
it's a custom field, afaik
<Catie>
pl
<Catie>
Sorry, wrong window
<Guest74>
well, it's seems q is the default for most.
<beach>
yitzi: I see.
<Guest74>
but some take latitude/longitude without a q.
<White_Flame>
Guest74: it all depends on what the server side handler expects
<Guest74>
I'm not familiar with more apis than just the weather/maps ones i've been lookin gat.
<White_Flame>
there aren't any "standard" keys in the k=v format, and apparently k=v format isn't even necessary
<yitzi>
beach: Plus implementing pprint-extended-loop and its use of logical blocks to contain loop phrases (which wasn't even possible in the XP algorithm) has opened up a lot of possibilities like enclosing key/value pairs in a plist in logical blocks.
<Guest74>
but there does seem to be a standard for q
<White_Flame>
but all webservers that I've seen do break it up into k/v pairs for you
<White_Flame>
I see no standard
<White_Flame>
there's some ad hoc use because it's a "query"
<Guest74>
there's always an initial query and then additional optional args. The optional args are handled by key-queries.
<beach>
yitzi: Nice!
<White_Flame>
if there's just basically a single unnamed value they're sending, but apparently I haven't seen that as much as you have
<White_Flame>
no, it's just a list of k/v pairs
<White_Flame>
there's nothing special about the first one
perrierjouet has quit [Quit: WeeChat 3.3]
<yitzi>
Guest74: RFC2616 maybe?
<Guest74>
what i have seen is the first value uauall being q=query.
<Guest74>
yitzi: doesn't seem to be. I guess usual suspects would be somewhere else as rfcs seem to specify only the mechanism.
<Guest74>
If there isn't always a specific thing you're querying about then I guess I need the macro to deal with that and create a function with no required args.
<White_Flame>
there are no "usual suspects"
<White_Flame>
it's just a key/value list
<Guest74>
well, there are for a whole bunch of apis I have seen. cause you usually have a specific query.
<White_Flame>
and that's API-specific
<White_Flame>
sure there are styles and whatnot, but there's nothing in the spec to my knowledge listing accepted/required/suggested/anything about the query field content literals
<Guest74>
well, like I said, they seem to only define mechanism.
<Guest74>
anyways, any help on variable capture or making it accept symbols for key-queries?
<White_Flame>
you posted your code, but didn't actually say what was breaking/errored/etc
<Guest74>
any help on variable capture or making it accept symbols for key-queries?
<Bike>
what do you mean by variable capture
<White_Flame>
key-queries is only passed into another function that you didn't post, so who knows what it's doing?
<Guest74>
I'm just using PG's terminology. I really don't know much about macros.
<White_Flame>
what's breaking?
<Bike>
I don't know PG's terminology. What are you worried about exactly? If you mean using gensyms and stuff, yeah, needs a few changes
<Guest74>
probably that.
<Bike>
BASE, which is user-provided, is evaluated while a bunch of stuff is bound, so that stuff should be gensyms
<Bike>
ditto path
perrierjouet has joined #commonlisp
<White_Flame>
macros just generate source code. What happens at runtime is separated from the compile-time execution environment of the defmacro body's evaluation
<Guest74>
so because they are used in function call if I'm understanding correctly?
<White_Flame>
and is only determined by that generated/returned source code
<Guest74>
White_Flame: you are not helping.
<Bike>
BASE and PATH are evaluated because they're obviously evaluated by the code the macro returns. in this case yes because they are arguments to function calls, but it's just the normal evaluation rules.
<Bike>
parse-fn and transform-fn are also evaluated
<White_Flame>
Guest74: sorry, but you haven't presented a problem
<White_Flame>
in terms of notions of "capture", there is no capture between the macro invocation and the runtime
<White_Flame>
the data item returned by the macro is used as the source code to compile the runtime code
<Guest74>
ok, i think that makes sense.
<White_Flame>
there is no capture or sharing at all with the defmacro body variables
<White_Flame>
those have executed and returned, exiting their scope
<Guest74>
to be able to pass in a symbol to key-queries, which needs to be operated on as a list, would I have to basically have a macro within a macro?
<White_Flame>
(defmacro foo (x) ...), if you call (foo bar), then X is bound to the symbol BAR
<White_Flame>
(inside the macroexpansion code)
<White_Flame>
and so (setf ,x 3) generates (setf bar 3), and (baz ',x) generates (baz 'bar)
<White_Flame>
depending on if BAR is a lexical symbol in the generated code that you want the code to evaluate, or quoted if you want the symbol to be passed as a symbol object
voltron has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 240 seconds]
<Guest74>
are there any implementations that have a very limited amount of key args allowed? The youtube api has tons of args.
amb007 has joined #commonlisp
poselyqualityles has joined #commonlisp
ebrasca has joined #commonlisp
<White_Flame>
the spec sets the hard minimum at 50 total lambda parameters
voltron has quit [Remote host closed the connection]
<pdietz>
I don't know of any implementation for which the limit is that small, but there may be one.
amb007 has joined #commonlisp
lisp123 has joined #commonlisp
<Guest74>
thanks. I guess someone will let me know if they run into any problems
<Guest74>
still would like to figure out how, or if it's possible, to pass a symbol with the key-value pairs. As a lot of apis seem to have overlapping pairs for different endpoitns.
dvush has joined #commonlisp
<Catie>
6
amb007 has quit [Ping timeout: 252 seconds]
<Catie>
Once again, I'm sorry
lisp123 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
<rotateq>
don't worry Catie :)
<jackdaniel>
pdietz: up until a few years ago ecl had a bug where it mishandled calls with more than 63 parameters (because everything above is passed in a stack frame as the "last" argument)
<jackdaniel>
the error was not hard to notice because it "ate" only one argument (off by one error) and because there are rarely functions with so many arguments
<jackdaniel>
some drei function in mcclim exposed this issue
<jackdaniel>
s/not hard to notice/hard to notice/
<jackdaniel>
afaik c89 has a minimum limit of 31 call arguments and c99 improves it to 127
<rotateq>
maybe even 31 would be enough in most cases
<rotateq>
the limit in GHC for tuple elements is around 63 iirc
<Guest74>
youtube's search has upto 31 args.
<jackdaniel>
with keywords number of call arguments doubles
<rotateq>
ah right
<jcowan>
jackdaniel: (apply f list) can easilly provoke such a failure
<jcowan>
where f is + or the like
<jackdaniel>
jcowan: after you knew about the issue you could reproduce it in many ways
<jcowan>
I mean that this particular way has in fact bitten me, adding up numbers
karlosz has joined #commonlisp
<jcowan>
you can replace it with reduce or fold, of course
dvush has quit [Quit: Client closed]
<Guest74>
so if I want to get only the id from a bunch of <tr id=blah> on a webpage, is that something I'd do with lquery? Because I'd rather not have to type out all these args.
Catie has quit [Remote host closed the connection]
Catie has joined #commonlisp
Algernon91 has quit [Ping timeout: 265 seconds]
robin has joined #commonlisp
poselyqualityles has quit [Ping timeout: 265 seconds]
lisp123 has joined #commonlisp
yewscion has quit [Ping timeout: 240 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<jasom>
Am I just failing at reading docs, or does neither the standard nor alexandria have a function for converting bit-vectors to integers?
<Guest74>
it doesn't seem like it. we discussed this a few days ago.
karlosz has quit [Ping timeout: 252 seconds]
<Catie>
It was pretty easy to get working though!
lisp123 has quit [Remote host closed the connection]
Algernon91 has joined #commonlisp
<jackdaniel>
a naive way of doing this would be to print the vector to string
<jackdaniel>
and then read to string with :start 2
<jackdaniel>
(and read-base 2)
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
<Guest74>
and make sure you've got the right bit first.
<Catie>
Or parse-integer with :radix 2
<jackdaniel>
right bit first? what do you mean?
<Guest74>
lsb msb
<jackdaniel>
good point with parse integer
nature has joined #commonlisp
<Guest74>
this was a problem with the bit arrays given in AoC
<White_Flame>
hmm, it does from-end, so assumes "big endian"
<White_Flame>
oh, it tracks PLACE separately, n/m
<jackdaniel>
can't we just reverse digits? #*10000 -> 16 -> 61 vola :)
<White_Flame>
that's what I did above ;)
<jackdaniel>
n ono, you've reversed the binary string, I've reversed the final result ;p
pdietz has quit [Ping timeout: 256 seconds]
<pjb>
(reverse #*110001) #| --> #*100011 |#
<Guest74>
Shinmera: at https://shinmera.github.io/lquery/ after ADD-CLASS every SRC link points to the previous function. and NEXT-UNTIL has silings instead of siblings.
<Shinmera>
yeah the links can go out of date if the docs aren't regenerated with every change.
<Guest74>
I'm not understanding how to filter on something that (html) returns.
<Guest74>
i'd like to have to select only the 'th" that has "parameters" for the html.
<pjb>
You'd have to write a recursive function to walk the tree of HTML entities.
thomaslewis has joined #commonlisp
Algernon69 has joined #commonlisp
<Shinmera>
(lquery:$ (initialize "<a>foo</a><a>bar</a>") "a" (contains "foo")) => #(#<..>)
<Guest74>
ah, it's case sensitive. I wondered why it was returning an empty vector.
thomaslewis has left #commonlisp [#commonlisp]
tfeb has quit [Quit: died]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
cage has joined #commonlisp
<Guest74>
ugh, still having problems. I'd like to return all attributes "id" only from a "th" that contains "Parameters" but I'm obviously doing it wrong. (lquery:$ *doc* "th" (contains "Parameters") "tr" (attr "id"))
thomaslewis has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
gaqwas has joined #commonlisp
aeth has quit [Ping timeout: 265 seconds]
igemnace has quit [Ping timeout: 265 seconds]
aeth has joined #commonlisp
<resttime>
Suppose we have generic functions on defstruct, is there any chance reimplementing either/both with closures would get higher performance?
<White_Flame>
there's a lot of research into GF dispatch performance, and things like branching being faster than indirection in some cases
<White_Flame>
on modern hardware
<White_Flame>
unless you're in a really tight loop, and you're optimizing for your fixed environment, might not be worth it
<pjb>
resttime: the way structures are specified, gives the implementation opportunity to make it faster than the general CLOS standard-objects. But only the access to the structure slot. It's independent from the CLOS generic function method dispatching.
thomaslewis has left #commonlisp [#commonlisp]
<White_Flame>
I presume the question was GFs with struct objects as parameters?
<pjb>
It seems, yes.
<resttime>
White_Flame: Yeah, context is that I'm writing a raytracer and am trying to squeeze out as much performance as possible. Different structs would have different properties so currently that's handled with generic functions
<White_Flame>
semantically, that's reasonable for GFs
<Shinmera>
Guest74: the second selector will only select "tr" elements within the "th" elements. Why is that selector there?
<Guest74>
I only want tr elements from the th element that (contains "paramaters) but it doesn't work.
<Shinmera>
? th elements are within tr elements, not the other way around
poselyqualityles has joined #commonlisp
tyson2 has joined #commonlisp
<Shinmera>
if you want the parent, use the PARENT function.
<Guest74>
huh, I must have been reading the source wrong.
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]
thomaslewis has joined #commonlisp
cjb has joined #commonlisp
Lycurgus has joined #commonlisp
thomaslewis has left #commonlisp [#commonlisp]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<Guest74>
Thanks Shinmera: for pointing out it was just my stupidity for why it wasn't working. I've got it working, now just wondering if there is a simpler way to write it.
<Shinmera>
Might be time to learn about CSS selectors.
<Guest74>
might be
thomaslewis has joined #commonlisp
<Shinmera>
dunno what document you have, but id attributes are supposed to be globally unique, so you might also be able to drop the section part.
thomaslewis has left #commonlisp [#commonlisp]
<Guest74>
It's one of the api pages for youtube. just #params seems to work.
Lycurgus has quit [Quit: Exeunt]
lisp123 has quit [Ping timeout: 265 seconds]
<Guest74>
Shinmera: thanks again. One step closer to auto generating the api. I should probably read about css selectors first.
<Shinmera>
No problem
Lycurgus has joined #commonlisp
aeth has quit [Ping timeout: 240 seconds]
Lycurgus has quit [Client Quit]
<theothornhill>
What is the best way to handle nil vs null/false in common lisp? I want to distinguish between boolean types, with true/false, null as a value and nil.
aeth has joined #commonlisp
<Catie>
My (very limited) understanding is that for the most part we just treat them as interchangeable
<theothornhill>
I could coerce values to :true/:false, and :null, then deal with it separately like that, but not sure how nice that is
cranium has quit [Quit: Leaving]
<theothornhill>
Catie: Yeah, but I don't see a very nice way to treat them as interchangeable here. The domain I'm working on is to make values that can be valid json in the end
<theothornhill>
most importantly I need to distinguish between :null and :false, I think...
<pjb>
theothornhill: (values (eq 'nil 'null) (eq 'nil 'false) (eq 'null 'false)) #| --> nil ; nil ; nil |# they already are distinct! What more do you want?
<theothornhill>
yeah, so just using the symbols is ok?
<pjb>
theothornhill: now, CL:BOOLEAN = (member CL:NIL CL:T) so you don't mean CL:BOOLEAN.
<theothornhill>
yeah, now I made (deftype bool () '(or true false))
* rotateq
thought NULL is a built-in-class or function and not a value like NIL
aartaka has quit [Ping timeout: 252 seconds]
<pjb>
rotateq: NULL is a symbol like any other symbol! (type-of 'null) #| --> symbol |#
<rotateq>
a symbol, yes of course
<pjb>
rotateq: but it is used to designate a type, and to name a class, and a function: (subtypep 'null 't) #| --> t ; t |# (find-class 'null) #| --> #<built-in-class null> |# (fdefinition 'null) #| --> #<Compiled-function null #x3000000E39BF> |#
<rotateq>
but without a quote it is not bound by default like NIL
<theothornhill>
So I don't need to reexport null, right? Just document how it is used in this condext?
<pjb>
It can be used to name other things too…
<pjb>
such as a block: (block null (return-from null nil))
<rotateq>
pjb: didn't doubt that
<pjb>
or a variable: (let ((null 0)) (+ null 1))
<pjb>
rotateq: indeed, NULL is not bound as a variable by CL. Which is why you are allowed to use it as a local lexical variable.
<rotateq>
i know
<theothornhill>
Thanks, pjb. I think I can roll with this
<rotateq>
ah interesting to see again its class precedence list: NULL, SYMBOL, LIST, SEQUENCE, T
x88x88x- has joined #commonlisp
x88x88x- has quit [Remote host closed the connection]
x88x88x- has joined #commonlisp
x88x88x- has quit [Remote host closed the connection]
thomaslewis has joined #commonlisp
dre has quit [Ping timeout: 240 seconds]
thomaslewis has left #commonlisp [#commonlisp]
Algernon69 has quit [Remote host closed the connection]
Algernon69 has joined #commonlisp
x88x88x- has joined #commonlisp
x88x88x- has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
<phoe>
well, NIL is the only value of type NULL
<phoe>
and NIL is both a SYMBOL and a LIST, and a LIST is naturally a SEQUENCE
<phoe>
and then everything is a T
nature has quit [Ping timeout: 265 seconds]
<theothornhill>
phoe: even nil?
<theothornhill>
(typep nil t) ;; T. Huh
<jackdaniel>
mind that there is a type NULL that has a single element
<jackdaniel>
and there is a type NIL that has no elements
Algernon91 has joined #commonlisp
pillton has joined #commonlisp
Algernon69 has quit [Ping timeout: 265 seconds]
theothornhill has quit [Ping timeout: 252 seconds]