<contrapunctus>
Hm...docstrings in a `defmethod` with a `declare` expression, regardless of whether I place them before or after the `declare`, are being syntax highlighted by `lisp-mode` as regular strings. 🤔️
mm007emko has quit [Quit: Client closed]
<jackdaniel>
because methods are not functions
<jackdaniel>
you specify the documentation as the option :documentation for defgeneric
lisp123 has joined #commonlisp
<_death>
well, methods can also have docstrings
<mfiano>
Indeed they can
<jackdaniel>
I see, sorry for the wrong information
<Nilby>
contrapunctus: your lisp-mode probably isn't working then, since mine does it, but only when the docstring is before the declare.
<contrapunctus>
Nilby: hm, I just noticed the same thing. I think it's happening only for methods with a qualifier.
<mfiano>
That is correct. It's a limitation of how lisp-mode parses the arguments to defmethod.
<Nilby>
contrapunctus: yes, indeed i see it messes that up
<mfiano>
I would recommend attaching documentation strings away from the implementation. Documentation is for client code anyway, not developers.
<lisp123>
mfiano: I see this advice sprouted from time to time. I really don't agree with it
* Nilby
agrees with lisp123
* flip214
believes to agree with Nilby
<flip214>
and this, dear people, is a CONSent chain
<lisp123>
:O
<flip214>
(or rather CONSent list)
<lisp123>
it was perfect, but then you made it better
<mfiano>
Well then, do as you please. I and some others feel that it is too noisy to be inlined into the implementation. It could, and usually should consist of several paragraphs, and vertical space is a resource related to reading code efficiently.
<contrapunctus>
mfiano: I don't usually put docstrings in methods, but in this case I was kind of losing track of which one was for what. Could be a sign of bad design ^^'
<flip214>
mfiano: well, my old-fashioned vim has something called folds... I can visually reduce several lines to a single one, I'd be very surprised if emacs didn't do that as well
<mfiano>
Not all code is read in an editor.
mm007emko has joined #commonlisp
<lisp123>
mfiano: That's sort of the point. I don't have a particular desire to jump across multiple files to understand a function
<jackdaniel>
contrapunctus: without taking sides - you can always put a comment before the method definition if you decide to avoid the docstring
<mfiano>
lisp123: Nobody said anything about files, and still, a keybinding to show the documentation string inline is quite easy with Emacs' virtual text facilities.
<Nilby>
When your repl or editor can display docstrings with a keystroke, as well as appropriate completions, it makes code very explorable.
<lisp123>
mfiano: If you keep everything in the same file, then I have no qualms.
<lisp123>
Nilby: Indeed
<lisp123>
(although to play devil's advocate, placing docstrings elsewhere will not be precluded from this)
<lisp123>
If the text is in the same file, I have no problems. But otherwise, as many people do browse CL in plain text mode (e.g. on GitHub), it would be annoying to have to jump across multiple files to read a docstring
<_death>
in my opinion docstrings should be inline, short and sweet.. if you need more, well, often programmers tell others to "rtfm", but sometimes "wtfm" is appropriate
frgo has quit [Remote host closed the connection]
cosimone has quit [Remote host closed the connection]
Glaucon has joined #commonlisp
<_death>
it's also true that as jackdaniel hinted, method docstrings are (should be) rare.. it's conceivable that some newbies write docstrings for methods where they should be moving it to the generic function
<lisp123>
that's a mistake I used to make...although the format for defgeneric docstrings is a bit clunky
utis has quit [Ping timeout: 240 seconds]
MajorBiscuit has quit [Ping timeout: 244 seconds]
<mfiano>
Docstrings for methods are useful, for instance if you're writing a linear algebra library where all arithmetic generic functions have the same interface, but differ greatly in semantics (scalar multiplication is commutative for example)
cosimone has joined #commonlisp
utis has joined #commonlisp
<_death>
in this case I'd say it's not a good design
<mfiano>
Your opinion is valid, but just that.
<_death>
sure
<lisp123>
_death: Explain
<lisp123>
Because I would do it just like that, but my CLOS skills are still pretty bad
leeb has joined #commonlisp
<contrapunctus>
mfiano: damn, that's fancy.
<_death>
I think it's better to have different names for operators that are commutative and non-commutative
<mfiano>
Right, because math doesn't overload symbols.
<_death>
math notation is actually a hodgepodge of notations full of hysterical raisins, basically terrible
<mfiano>
o.O
<_death>
a generic function should specify semantics, and these should be adhered to by all methods.. if your multiplication GF does not mandate commutativity, that's fine.. but may lead to user errors
<_death>
it can also make trouble for automatic transformations
<_death>
(i.e. you won't be able to easily have those)
<_death>
in fact that's one gotcha with, say, floating point operators in many languages
<utis>
portaudio tells me ``warning: array is copied and/or coerced, lisp type is T, requested cffi type is float.'' does this sound like it could be fixed by the passing of a certain :element-type to #'make-array? i tried 'double-float without success
rogersm has joined #commonlisp
<jackdaniel>
perhaps try single-float, afaik double-float corresponds to cffi type double-float
<utis>
jackdaniel: maybe, i got the impression that portaudio wanted double, but i may have been confused; anyway, using single-float gives the same warning
<Guest74>
I write my documentation in separate files, but I believe they should be viewable when reading the code. I consider this more a convention to deal with a bad editor/or inability to use the editor properly.
ck_ has left #commonlisp [#commonlisp]
MajorBiscuit has joined #commonlisp
cage has joined #commonlisp
Bike has joined #commonlisp
Guest74 has quit [Quit: Ping timeout (120 seconds)]
frgo has joined #commonlisp
Guest74 has joined #commonlisp
Bike has quit [Client Quit]
aeth has quit [Ping timeout: 256 seconds]
Guest74 has quit [Ping timeout: 256 seconds]
Bike has joined #commonlisp
waleee has joined #commonlisp
Glaucon has quit [Ping timeout: 246 seconds]
Bike has quit [Client Quit]
<utis>
jackdaniel: no, you're right, -- thanks!
<_death>
I was a bit flippant earlier.. math notations, like natural languages or programming languages, are terrible but also useful.. we're all being pragmatic.. the "because math does it" argument is a pet peeve, because these notations are often optimized for constraints (e.g., writing on paper, sometimes ad hoc use, communication with nonmachines, external requirements like established cultural/organizational pressure, etc.).. it's not a
<_death>
holy grail.. also, I like CL's generic operators, but then I've not written code that needs to be especially numerically accurate
Glaucon has joined #commonlisp
<_death>
*floating point code
cage has quit [Read error: Connection reset by peer]
Th30n has quit [Quit: WeeChat 3.5]
Guest74 has joined #commonlisp
waleee has quit [Ping timeout: 248 seconds]
<_death>
and then there's the fact that I may read 10 different papers on the same subject and have to figure out 11 different notations..
aeth has joined #commonlisp
<_death>
in a particular subject I've noticed that papers from around 2000 onwards have noticeably different notations (that are more difficult to follow, currently) ... this may be an artifact of specialization, or explosion of students, or different software used to produce them, I don't know
<jackdaniel>
all good notations should start with an opening paren; the rest is silence
Colere has quit [Ping timeout: 264 seconds]
<_death>
excellent.. combined with the attitude that if it's in parentheses it can be ignored :)
waleee has joined #commonlisp
<jackdaniel>
!
Bike has joined #commonlisp
Guest74 has quit [Ping timeout: 248 seconds]
<flip214>
⎛ Unicode has a lot of parenthesis, luckily! )
<flip214>
⎝ hooray! )
<Nilby>
i usually rewrite math notation in lisp so i can understand it and eval it
mon_aaraj has quit [Ping timeout: 268 seconds]
<Nilby>
sometimes i have the urge hack one of the laTeX to s-exp parsers to do it for me
progress__ has quit [Ping timeout: 268 seconds]
Guest74 has joined #commonlisp
dBc has quit [Quit: leaving]
mon_aaraj has joined #commonlisp
alejandrozf has joined #commonlisp
<Guest74>
I've often wondered how the layouting of math formulas should be implemented in lisp.
mm007emko has quit [Quit: Client closed]
<random-nick>
iirc cells was created for something like that
<_death>
dim: representation of sb-impl::*external-formats* changed about a year ago.. maybe something expects the old one
<dim>
yeah, what would be a lib that you can think of that needs an update and didn't see it in debian? ;-)
<_death>
I don't use debian..
<dim>
I'm running through my list of build deps for pgloader, but I'm not finding it yet, and I don't have a principled way in mind to find it
<dim>
the short of debian CL libs is that they're not updated, only when pgloader build breaks...
<dim>
so let's forget about debian, what's a lib that you can think of that required an update after the SBCL change of external-formats internal structure?
<dim>
okay I believe I found the culprit in my own code actually
<dim>
any idea what's the proper way to loop through the sb-impl::*external-formats* nowadays? looked like just a list right?
aartaka has quit [Ping timeout: 272 seconds]
<_death>
not sure there's a proper way in sbcl (other the list in the manual? heh); interestingly there may have been a list-all-external-formats in cmucl that got removed
igemnace has quit [Quit: WeeChat 3.5]
mon_aaraj has quit [Ping timeout: 268 seconds]
mon_aaraj has joined #commonlisp
<Nilby>
it used to be a list, now it's vector, but i guess you could #'map it
<dim>
(loop for encoding across sb-impl::*external-formats* collect (slot-value encoding 'sb-impl::names))
aartaka has joined #commonlisp
<dim>
I'm trying that but still failing, my CL feels rusty as hell just now
rotateq has joined #commonlisp
<_death>
you could do something like that and risk breaking in the future.. or you could ask sbcl devs to properly expose it/hardcode a list
<mfiano>
dim: You're using slot-value on a struct which is UB, though I guess you're also writing implementation-specific code with unexported symbols. I think you should raise this in #sbcl and maybe get some stable interface so you won't be surprised in the future.
<dim>
I had to edit that code once in about 10 years I believe, I can live with that honnestly
<dim>
now if someone was to invest the time and energy I would certainly appreciate it ;-)
<mfiano>
Probably won't happen until you ask for it in #sbcl
<Guest74>
do we have a library of citation formats anywhere?
saura has joined #commonlisp
saura has quit [Ping timeout: 264 seconds]
<Shinmera>
utis: any reason you're using portaudio instead of cl-mixed/harmony?
alejandrozf has left #commonlisp [ERC (IRC client for Emacs 28.0.50)]
aartaka has quit [Ping timeout: 246 seconds]
aartaka has joined #commonlisp
Guest74 has quit [Ping timeout: 268 seconds]
tyson2 has quit [Remote host closed the connection]
orestarod has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 256 seconds]
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
Guest74 has joined #commonlisp
leeb has quit [Quit: WeeChat 3.4.1]
Cymew has joined #commonlisp
morganw has joined #commonlisp
ttree has joined #commonlisp
notzmv has quit [Ping timeout: 264 seconds]
Cymew has quit [Ping timeout: 268 seconds]
Guest74 has quit [Quit: Ping timeout (120 seconds)]
alejandrozf has joined #commonlisp
dra has joined #commonlisp
igemnace has joined #commonlisp
tyson2 has joined #commonlisp
dra has quit [Ping timeout: 272 seconds]
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
<Josh_2>
Guest8247: Are you guest74?
yauhsien has quit [Ping timeout: 268 seconds]
SunClonus has joined #commonlisp
Guest74 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
Dynom has joined #commonlisp
morganw` has joined #commonlisp
Alfr has quit [Killed (iridium.libera.chat (Nickname regained by services))]
Alfr has joined #commonlisp
Bike has quit [Ping timeout: 246 seconds]
d4ryus has quit [Ping timeout: 246 seconds]
morganw has quit [Ping timeout: 246 seconds]
mon_aaraj has quit [Ping timeout: 246 seconds]
igemnace has quit [Ping timeout: 246 seconds]
Bike has joined #commonlisp
mon_aaraj has joined #commonlisp
morganw` has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 28.1)]
aartaka has quit [Ping timeout: 272 seconds]
morganw has joined #commonlisp
aartaka has joined #commonlisp
d4ryus has joined #commonlisp
igemnace has joined #commonlisp
Noisytoot has quit [Excess Flood]
Noisytoot has joined #commonlisp
irc_user has quit [Quit: Connection closed for inactivity]
kpoeck has joined #commonlisp
progress__ has joined #commonlisp
<pjb>
Josh_2: too bad he doesn't have a persistent nick, we will have to re-explain everything!
<Guest74>
Josh_2: how could they be?
<Guest74>
pjb: all the guest nicks are persistent. Now if you explained anything to any guest accounts recently then maybe whatever is logging the channel is getting kicked as often as I am.
<pjb>
Perhaps with a real nick you wouldn't get kicked so often? Or at least, you could still be you.
<Guest74>
when am i not me?
<mfiano>
We wouldn't know. Guest nicks are reserved for...guests.
<Bike>
you're not getting kicked. your client apparently sucks and is not responding to pings, so libera drops you.
<pjb>
Use a real nick, with a real irc client.
<Guest74>
that pretty much equates being kicked in laymans terms.
<Guest74>
so, is the channel being logged properly? Or pjb was justing being pjb?
<mfiano>
do you understand how irc works?
saura has joined #commonlisp
<Bike>
the channel is being logged fine. pjb is merely referring to the inconvenience of your weird refusal to get an actual name.
morganw has quit [Remote host closed the connection]
<Guest74>
just cant be bothered when this thing remembers me perfectly. What's weird is how much it bothers some people.
<Bike>
i don't think it bothers anybody very much. it bothers many people a bit, in the same way that going through the effort to take thirty seconds to configure your client is too bothersome for you.
saura has quit [Ping timeout: 248 seconds]
<Bike>
it's not a big deal or anything. just one of those weird little personal quirks that make talking to people online just a little more annoying for everyone.
<Guest74>
hey, i find it annoying that people don't use their real names as their nicks, but I don't go around complaining to everybody.
<Guest74>
constantly
<rotateq>
that's really not the same thing
<Guest74>
sure, I'm named with a consistent identifier as well as peoples whose nicks have nothing to do with their names..
<mfiano>
I think they are just looking for attention. When we set +R during a flood they might reconsider.
aartaka has quit [Ping timeout: 268 seconds]
<Guest74>
what a silly thing to say.
<yitzi>
Guest74: When a plurality of the residents of this channel tell you that they find it irritating that you won't pick a nickname and you respond that you "just cant be bothered" that is a direct statement of how much you value their opinions/irritation.
<Bike>
because it would be so little effort on your part. easier than arguing about it, even. so your stated reason for refusal is just that you don't mind us being annoyed.
<rotateq>
and I see a nickname as a nice opportunity to express something about what drives one inside :)
<Guest74>
They want me to research and install a client, configure it, register a nick somewhere somehow, all so that they wont be bother by seeing the exact same consistent nick over and over again.
<Bike>
no, i want you to use your web client to pick a name. they pretty much all do that. web.libera.chat does.
<Guest74>
BUT WHY WHEN IT PICKS IT FOR ME ALWAYS THE SAME!!!!
<Bike>
because you entered it once and it stuck with that. if you entered something else it would stick with something else.
<Bike>
if not libera's client, the kiwiirc one does this. i use it on my laptop sometimes.
<mfiano>
It won't stick with that if you leave and the nick generator assigns that name to someone else.
<Bike>
it even lets you hook in your nickserv registration and you won't need to remember your password or anything.
<Guest74>
ffs, I'm really tired of the whole, oh you're so inconsiderate because you don't do things the way we do things and we'll judge you from that standpoint without even giving a thought to your point of view.
<mfiano>
As you have seen with your 7474 countless times
<yitzi>
Because it is considered proper etiquette.
<Guest74>
i never entered anything
<Bike>
your point of view is that you don't care about our annoyance because you don't want to take thirty seconds to configure your client. i have considered your viewpoint and do not consider it worthwhile.
<Guest74>
mfiano, that is exactly what happens like mfiano_
<rotateq>
no one is judged (as I hope)
notzmv has joined #commonlisp
<Bike>
yes, but mfiano_ is obviously mfiano.
<Bike>
guest748 could be anyone.
<Bike>
easy to understand.
<Guest74>
as you people wish
Guest74 has quit [Quit: Connection closed]
<rotateq>
So we can catch up and get back a bit more ontopic. :)
<rotateq>
what was it about persistence? ^^
<Bike>
my least favorite part of being a moderator is when someone is a little bit of an asshole, but not enough that i feel justified in kicking them immediately.
<rotateq>
or maybe resistence
<rotateq>
Bike: oh you see it so by now? :/ hm
<Bike>
what?
<yitzi>
Is there anyway to make the guest numbers random and expire?
<rotateq>
the asshole thing
<Bike>
yes, but i don't understand your question.
aartaka has joined #commonlisp
<Bike>
yitzi: i think the nickname selection is by the client, not libera.
<rotateq>
okay not important of course
<mfiano>
yitzi: The IRC server chooses a random guest name if one is not selected that is not already assigned.
<mfiano>
Which makes it all the more annoying. We never know if Guest74 is the same person.
<yitzi>
mfiano: Thanks. Seems a bit odd that the system permits reuse of the same handles. Probably b.c. the idea that someone would want to keep the same guest handle is bizarre.
<Bike>
oh, if you're asking whether i feel justified kicking guest74, still not really. they just ragequit, i guess.
yauhsien has quit [Remote host closed the connection]
<Bike>
guess i might if they came back still as guest.
Oddity has joined #commonlisp
shka has quit [Ping timeout: 256 seconds]
progress__ has quit [Quit: Leaving]
<Josh_2>
I was just going to make a joke about documentation
<Josh_2>
Guess I can't make it now
<contrapunctus>
Josh_2: do tell
<Josh_2>
Next time, next time
perr_ has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<contrapunctus>
Josh_2: that's inspired one from me.
<contrapunctus>
What do we say to the god of documentation?
<rotateq>
not today? hm no :D
<contrapunctus>
"Not today."
perro has quit [Ping timeout: 248 seconds]
<contrapunctus>
😂
<rotateq>
haha so i remembered correctly
<mfiano>
You Guest correctly
<contrapunctus>
lol
<contrapunctus>
I keep forgetting I've been told to not use emoji here. Used them twice today itself.
<Josh_2>
They work for me :shrug:
<Josh_2>
ERC Emojify
yauhsien has joined #commonlisp
Oladon has joined #commonlisp
<rotateq>
Josh_2: something wents wrong when i try loading that package since i updated to emacs 28, but hey
<mfiano>
That's a client rendering. all we see is GM sunglasses
<Josh_2>
Yeh :sunglasses:
<rotateq>
totally okayish too for me :)
<Josh_2>
rotateq: I am using 27.1 so no issues here
<rotateq>
yeah, like for me a few weeks ago
yauhsien has quit [Ping timeout: 248 seconds]
scymtym has quit [Ping timeout: 244 seconds]
Dynom has quit [Quit: WeeChat 3.5]
fitzsim has quit [Ping timeout: 256 seconds]
mon_aaraj has quit [Ping timeout: 268 seconds]
mon_aaraj has joined #commonlisp
fitzsim has joined #commonlisp
mon_aaraj has quit [Ping timeout: 256 seconds]
mon_aaraj has joined #commonlisp
Brucio-61 has quit [Ping timeout: 240 seconds]
alejandrozf has quit [Remote host closed the connection]
azimut has quit [Ping timeout: 268 seconds]
kpoeck has quit [Quit: Client closed]
dra has joined #commonlisp
<kagevf>
I use irssi and Josh_2's sunglasses are spelled out for me between 2 colons
<Josh_2>
This is very unfortunate for you :sunglasses:
<kagevf>
I pretend it's using a reader macro that subs : for | when writing symbol literals
orestarod has quit [Ping timeout: 268 seconds]
tyson2 has joined #commonlisp
aartaka has quit [Ping timeout: 264 seconds]
aartaka has joined #commonlisp
dra has quit [Ping timeout: 255 seconds]
mrcom has quit [Remote host closed the connection]
mrcom has joined #commonlisp
mrcom has quit [Remote host closed the connection]
mrcom has joined #commonlisp
sander has quit [Ping timeout: 276 seconds]
yauhsien has joined #commonlisp
slyrus__ has quit [Remote host closed the connection]