ebrasca has quit [Remote host closed the connection]
MajorBiscuit has joined #commonlisp
larix has quit [Quit: Leaving]
causal has quit [Quit: WeeChat 3.7.1]
<antoszka>
Yo guys, what's the "go-to" swank client for Vim or Neovim these days? I haven't checked in, like, years and I'm curious of there's been any progress, something with the usability level of Slime maybe?
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
_cymew_ has joined #commonlisp
Lord_of_Life has joined #commonlisp
<hayley>
SLIMV?
notzmv has joined #commonlisp
<antoszka>
Dunno. That's what I'm asking ;)
aartaka has quit [Ping timeout: 260 seconds]
<jackdaniel>
try it and see, each time the vim topic pops up slimv is recomended (and vlime is mentioned) and people who use it are apparently satisfied
aartaka has joined #commonlisp
<antoszka>
OK, cool, thanks.
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
_cymew_ has quit [Ping timeout: 252 seconds]
dipper has quit [Remote host closed the connection]
dipper has joined #commonlisp
Brucio-61 has quit [Remote host closed the connection]
Brucio-61 has joined #commonlisp
_cymew_ has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.7.1]
perrierjouet has joined #commonlisp
cage has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
_cymew_ has quit [Ping timeout: 256 seconds]
Lycurgus has joined #commonlisp
cosimone has joined #commonlisp
White_Flame has quit [Remote host closed the connection]
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
doyougnu has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
aartaka has quit [Ping timeout: 248 seconds]
seletz has quit [Ping timeout: 260 seconds]
<splittist>
antoszka: and report back (:
pranavats has joined #commonlisp
seletz has joined #commonlisp
aartaka has joined #commonlisp
tyson2 has joined #commonlisp
ec_ has quit [Ping timeout: 255 seconds]
ec_ has joined #commonlisp
doyougnu has quit [Ping timeout: 246 seconds]
doyougnu has joined #commonlisp
goober has quit [Remote host closed the connection]
ec_ has quit [Remote host closed the connection]
ec_ has joined #commonlisp
gxt has quit [Ping timeout: 255 seconds]
anticomputer has quit [Ping timeout: 255 seconds]
gxt has joined #commonlisp
dipper has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
_cymew_ has joined #commonlisp
doyougnu has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
gxt has quit [Remote host closed the connection]
anticomputer has quit [Remote host closed the connection]
ec_ has quit [Remote host closed the connection]
pdietz has joined #commonlisp
azimut has joined #commonlisp
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
NotThatRPG has joined #commonlisp
notzmv has quit [Ping timeout: 248 seconds]
anticomputer has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
ec_ has joined #commonlisp
gxt has joined #commonlisp
Inline_ has joined #commonlisp
Inline has quit [Ping timeout: 252 seconds]
Bicyclidine has joined #commonlisp
easye has quit [Remote host closed the connection]
easye has joined #commonlisp
nij- has joined #commonlisp
Cymew has quit [Ping timeout: 268 seconds]
goober has joined #commonlisp
goober has quit [Client Quit]
morganw has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
thuna` has joined #commonlisp
Inline_ has quit [Quit: Leaving]
seletz has quit [Ping timeout: 256 seconds]
<dsx>
phoe, edgar-rft thank you!
aartaka has quit [Ping timeout: 252 seconds]
pranavats has left #commonlisp [Error from remote client]
aartaka has joined #commonlisp
Oladon has joined #commonlisp
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
igemnace has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 264 seconds]
aartaka has joined #commonlisp
NotThatRPG_ has joined #commonlisp
alejandrozf has joined #commonlisp
NotThatRPG has quit [Ping timeout: 256 seconds]
ttree has joined #commonlisp
NotThatRPG_ has quit [Ping timeout: 256 seconds]
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 260 seconds]
jolby has joined #commonlisp
<mfiano>
I started my Lisp journey with slimv and used it for about 6 years before I gave in and learned Emacs. The experience is much more seamless and featureful with SLIME or SLY on Emacs; like night and day. I also recently, like a couple years ago, spent a few months writing a few thousand line Vim/Neovim configuration to try to get vlime patched up to be comparable to the Emacs experience, and it
<mfiano>
just...wasn't going anywhere after a while. I think if you are a Vim user you will be happy with either choice, but if you are a serious Lisp hacker, you won't know what you're missing. My 2c
pranavats has left #commonlisp [Error from remote client]
pranavats has joined #commonlisp
dsx has joined #commonlisp
<Catie>
So it looks like "special forms" and "special operators" are distinct categories?
<mfiano>
a special operator is just the car of a special form.
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
<mfiano>
I remember something along the lines of macros allowed to be implemented as special operators or something, but maybe I'm just losing my mind because I can't find it. I also haven't looked at CL in about 6 months until this week so...
<Catie>
I guess I'm caught on the phrase "special evaluation rules", whether or not that includes macros' delayed argument evaluation or not
<Catie>
Oh "special form . a list, other than a macro form ..."
<mfiano>
A special operator is a one of a set of 25 CL symbols that when appearing in CAR position of a form, produce a special form, with special evaluation rules, that cannot be implemented as a macro, or the standard decided not to.
cosimone has joined #commonlisp
jolby has quit [Quit: Client closed]
gxt has quit [Ping timeout: 255 seconds]
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
gxt has joined #commonlisp
Devon has joined #commonlisp
ym has quit [Ping timeout: 260 seconds]
<phoe>
alejandrozf: sounds like a bug to me
sloanr has quit [Remote host closed the connection]
<phoe>
AFAIK it's permissible for the implementation to define new special operators, but not define additional CL symbols to be ones
<_death>
"An implementation is free to implement a Common Lisp special operator as a macro. An implementation is free to implement any macro operator as a special operator, but only if an equivalent definition of the macro is also provided."
azimut has quit [Ping timeout: 255 seconds]
<phoe>
I have been proven wrong
<phoe>
_death: thanks, today I remembered
<mfiano>
I have remembered something half right
<_death>
I agree that there's an inconsistency there
<Catie>
I remembered not a damn thing, but I sure learned something
cosimone` has joined #commonlisp
Devon has quit [Ping timeout: 265 seconds]
waleee has joined #commonlisp
azimut has joined #commonlisp
cosimone has quit [Ping timeout: 268 seconds]
<alejandrozf>
ok, thank you so much guys, it seems it is not a bug after all, but it was confuse to me
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
jolby has joined #commonlisp
alejandrozf has quit [Ping timeout: 256 seconds]
varjagg has joined #commonlisp
waleee has quit [Ping timeout: 264 seconds]
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
Oladon has quit [Quit: Leaving.]
waleee has joined #commonlisp
Inline has joined #commonlisp
Devon has joined #commonlisp
Inline has quit [Max SendQ exceeded]
Inline has joined #commonlisp
Inline has quit [Read error: Connection reset by peer]
Inline has joined #commonlisp
waleee has quit [Ping timeout: 260 seconds]
Inline has quit [Max SendQ exceeded]
asarch has joined #commonlisp
Inline has joined #commonlisp
NotThatRPG has quit [Ping timeout: 256 seconds]
NotThatRPG has joined #commonlisp
cosimone` has quit [Remote host closed the connection]
cosimone has joined #commonlisp
aartaka has quit [Ping timeout: 246 seconds]
Inline has quit [Quit: Leaving]
waleee has joined #commonlisp
Inline has joined #commonlisp
Inline has quit [Remote host closed the connection]
pve has quit [Quit: leaving]
jmdaemon has joined #commonlisp
_cymew_ has quit [Ping timeout: 260 seconds]
Devon has quit [Ping timeout: 255 seconds]
szs has joined #commonlisp
peterhil has joined #commonlisp
cosimone` has joined #commonlisp
cosimone has quit [Ping timeout: 268 seconds]
asarch has quit [Quit: Leaving]
nij- has joined #commonlisp
<nij->
I have two objects of the same class I defined. How do I define equality for them?
mariari has quit [Read error: Connection reset by peer]
<pdietz>
You can't make any builtin equality function change on them. You can define your own equality function, probably generic, and define methods for it.
<Bike>
lisp doesn't have a general extensible equality operator to specialize, if that's what you mean. instead you usually pass a particular comparator to whatever operation, e.g. the :test arguments to sequence functions
<Bike>
so you can just write a normal function that compares two of your things, and pass that around
<pjb>
nij-: equality is just an equivalence relationship. Any equivalence relationship can be useful. Which one do you want?
<pjb>
nij-: for example, Pascal equals Bernard modulo their height!
<pjb>
or Pascal equals pjb modulo their nicknames.
<pdietz>
It can make sense to define a group of functions together: equality, hash function, canonicalization, copier.
<nij->
How to loop over all slots?
<nij->
Should I use MOP for that?
Devon has joined #commonlisp
<nij->
I want to say if all slots are #'equal, then two objects are #'equals.
<Josh_2>
You can use closer-mop:class-slots or class-direct-slots etc
<Catie>
You might want it to be all slots #'equals if you plan on storing a class in a slot
<pdietz>
A nice way to loop over all slots is to put each slot in a superclass by itself, then do something on each slot using method combination that combines individual methods on those superclasses.
<aeth>
the only problem is that stuff like this is best done in a utility library so it's used in many, many places
<phoe>
nij-: yes, there is no standard and efficient way of getting all slots of a class without MOP
<phoe>
in theory you could DO-ALL-SYMBOLS over SLOT-EXISTS-P but that would be literally the worst way to approach this problem
<aeth>
Personally, I have generics defined for CLEANUP and NAME because nearly every DEFCLASS has a NAME and just about every wrapped resource with a WITH- will want a CLEANUP. But I don't try to define my own shallow copy/equality methods automatically and if I had them, I'd just require that the user defines them.
<nij->
But (closer-nop:class-direct-slots 'person) tells me that there's no applicable method.
<Josh_2>
(find-class 'person)
<nij->
Yes! Thanks folks!
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<_death>
probably better to explicitly say what you want to compare (and use readers) and how.. slots are implementation details, and it's not difficult to imagine a scenario where two objects should be treated as equivalent but have slots that are quite different (say caches, audit trails, etc.)
<Josh_2>
Assign a unique ID to each person and compare those
<pjb>
pdietz: assume you have (defclass person () (… (age :type integer))) What should (equals (in-year 2022 (make-instance 'person :name "Pascal" :birthday (date 1980-01-01))) (in-year 2002 (make-instance 'person :name "Pascal" :birthday (date 1980-01-01)))) give?
mariari has joined #commonlisp
<aeth>
_death: right... the problem is that slots don't really matter, *accessors* do, and you can't really determine that automatically like you can with slots
<phoe>
pjb: depends on the contents of the ellipsis
<pjb>
pdietz: the point is that a class can have slots that are computed and contextual, and that should not be used in an equals function. birthdate ok, age not.
<phoe>
and, huh, you have some sort of IN-YEAR there; I assume it establishes some dynamic scope?
<pjb>
phoe: yes; a context.
<aeth>
given the problem, it's probably best to just have a macro DEFINE-EQUALITY-METHOD that takes a list of readers (from the accessors) that matter for equality
<pjb>
Am I the same person as I was yesterday?
<phoe>
that would be another variable then, how this context affects instance creation
euandreh has quit [Quit: euandreh]
<phoe>
pjb: no two rivers are equal
<_death>
one cannot step twice in the same river
<pjb>
We assume identity but animals are bunches of cells that live and die, and are entirely renewed every 9 months.
<nij->
OH.. I realize once I defined #'equals for my class, I need to define those for list-of-such-objects, hash-table-of-such-objects.. and so on.
<nij->
Doesn't seem to be a nice design..
<_death>
(heraclitus)
<nij->
Any thoughts?
<pjb>
(not all at the same time, eg. red cells last about 3 months).
<Josh_2>
_death: :sunglasses:
<aeth>
nij-: oh, that comes for free, actually
<nij->
?
<aeth>
nij-: just recursively call it when given a sequence or hash table
<pjb>
nij-: check cdr-8
<aeth>
nij-: and define an implementation for all built-ins using one of the built-in equalities
<pjb>
There's an equals system in quicklisp.
<remexre>
cl-ppcre can't work over byte arrays, right?
Devon has quit [Ping timeout: 260 seconds]
<nij->
(I will think about it. I have to run for 30 minutes.)
<aeth>
I know you would have to check the size for hash tables since you're just seeing if :A in A equals :A in B
<aeth>
I guess you have to do that for sequences, too. Not too bad
<aeth>
(actually hash-table-count, not hash-table-size)
<Josh_2>
The solution is #'eq :joy:
<Alfr>
Josh_2, yeah, like (eq 5 5) => nil
<aeth>
The hardest part with this generic will actually be numbers because you'll need to define what you mean by equality there. The highest level is #'= and not one of the built-in more generic ones but is that what you want? Do you want (equals 1 1f0) to be T or NIL?
<Josh_2>
Well if you want to be 100% sure that the two instances of person are the same
<Josh_2>
#'eq will do that :P
<aeth>
(You'd also probably want strings to be a special case that uses string= instead of the generic sequence solution)