jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/> | News: ELS'22 this Monday (2022-03-21), see https://european-lisp-symposium.org
jmdaemon has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
rabp has quit [Remote host closed the connection]
rabp has joined #commonlisp
sloanr has quit [Remote host closed the connection]
Guest74 has joined #commonlisp
sloanr has joined #commonlisp
jealousmonk has quit [Remote host closed the connection]
notzmv has quit [Ping timeout: 255 seconds]
akoana has quit [Quit: leaving]
<Guest74> I don't know how people write java.  I thought I'd take a look at the code of Languagetool that mfiano mentioned.  My eyes are confused.
Oladon has quit [Quit: Leaving.]
yauhsien has joined #commonlisp
kiki_lamb has joined #commonlisp
kiki_lamb has left #commonlisp [#commonlisp]
Seok__ has quit [Ping timeout: 246 seconds]
yauhsien has quit [Ping timeout: 268 seconds]
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
rabp has quit [Remote host closed the connection]
rabp has joined #commonlisp
rabp has quit [Remote host closed the connection]
rabp has joined #commonlisp
Devon has quit [Read error: Connection reset by peer]
tyson2 has quit [Remote host closed the connection]
rabp has quit [Remote host closed the connection]
rabp has joined #commonlisp
<ck_> Guest74: only briefly, so I don't get slapped with the off-topic parenthesis, I'll say that for most of these very ritualistic languages, tooling probably plays a major role; it's why "the IDE" is so important there
<ck_> that's my take anyway
rabp has quit [Remote host closed the connection]
rabp has joined #commonlisp
Bike has quit [Quit: Lost terminal]
saura has joined #commonlisp
<beach> Good morning everyone!
saura has quit [Ping timeout: 240 seconds]
saura has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
saura has quit [Ping timeout: 256 seconds]
notzmv has joined #commonlisp
waleee has quit [Ping timeout: 244 seconds]
Bike has joined #commonlisp
saura has joined #commonlisp
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
saura has quit [Ping timeout: 256 seconds]
pillton has joined #commonlisp
alejandrozf has joined #commonlisp
pranavats has joined #commonlisp
alejandrozf has quit [Ping timeout: 246 seconds]
[deleted] has quit [Quit: Quit]
livoreno has joined #commonlisp
yauhsien has joined #commonlisp
Madsy_ has joined #commonlisp
slyrus__ has joined #commonlisp
EsoAlgo1 has joined #commonlisp
modula has joined #commonlisp
grawlinson has quit [Ping timeout: 246 seconds]
Fade has quit [Ping timeout: 246 seconds]
grawlinson_ has joined #commonlisp
copec_ has joined #commonlisp
psf has quit [Ping timeout: 246 seconds]
Mandus has quit [Ping timeout: 246 seconds]
copec has quit [Ping timeout: 246 seconds]
kagevf has quit [Ping timeout: 246 seconds]
defaultxr has quit [Ping timeout: 246 seconds]
modula is now known as defaultxr
grawlinson_ is now known as grawlinson
hisacro has quit [Ping timeout: 246 seconds]
Madsy has quit [Ping timeout: 246 seconds]
utis has quit [Ping timeout: 246 seconds]
EsoAlgo has quit [Ping timeout: 246 seconds]
EsoAlgo1 is now known as EsoAlgo
copec_ is now known as copec
slyrus_ has quit [Ping timeout: 246 seconds]
snits has quit [Ping timeout: 246 seconds]
snits has joined #commonlisp
Fade has joined #commonlisp
psf has joined #commonlisp
kagevf has joined #commonlisp
utis has joined #commonlisp
Mandus has joined #commonlisp
hisacro has joined #commonlisp
<bitspook[m]> Good morning!
yauhsien has quit [Ping timeout: 264 seconds]
hineios1 has joined #commonlisp
hineios has quit [Ping timeout: 246 seconds]
hineios1 is now known as hineios
yauhsien has joined #commonlisp
Bike has quit [Quit: Connection closed]
rotateq has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
rabp has quit [Remote host closed the connection]
<contrapunctus> I saw the `<slot>-of` convention for accessors on Cliki yesterday, and was thinking of using it...any reason not to?
<mfiano> There was a lengthy discussion about this yesterday in #clschool that I really don't want to repeat, but the short answer is, don't. Always %-prefix your slot names, and never export %-prefixed symbols.
<contrapunctus> Hm...#clschool doesn't seem to have public logs :\
<contrapunctus> mfiano: can you pastebin the discussion, perhaps?
<mfiano> I don't log that channel and my buffer doesn't go back that far. Maybe beach can.
<contrapunctus> I've noticed the %slot convention, but don't understand the reason for it. Is it to act as a warning sign for code depending on implementation details?
<pranavats> I hadn't thought of %-prefixing my slot names. That might solve some name clash issues for me.
<Nilby> but people who like to follow opinionated style pronouncements probably won't be using lisp in the first place
<mfiano> contrapunctus: The rationale is simple. Slots are implementation details. They should _never_ be exposed to consumers of your code.
<mfiano> By %-prefixing slot names and remembering never to export % prefixed symbols, you are protecting yourself and your users from bypassing protocols.
causal has joined #commonlisp
<mfiano> Also, every experienced Lisper knows that %-prefixed symbols already means dangerous, or low-level.
<Nilby> also you "should" _never_ have used CL, you "should" have use Clojure
<mfiano> It is the most important style convention in my opinion. Unlike most other languages, constructs such as accessors, classes, etc are not exported, but _symbols_ are.
<contrapunctus> I've heard about never exposing slots to consumers, and I can see how it makes code brittle, but so far I've accessed slots directly all the same...mainly because `with-slots` is much more concise than `with-accessors` x-P
<contrapunctus> I wonder if there's some kind of solution for that.
<mfiano> contrapunctus: That is a problem if your users want to extend an accessor that sets a slot value in their code, by adding an auxillary method.
<mfiano> and if you don't want them to, you don't export that accessor, and add another %-prefixed accessor for your own internal use.
<mfiano> Using slot-value, and by extension, with-slots, prevents modularity.
<pillton> You can also specify more than one reader, writer and/or accessor e.g. ((name :initarg :name :reader name :accessor %name)).
<mfiano> That's what I was implying, yes.
<contrapunctus> I'm talking the increased verbosity of `(with-accessors ((a a) (b b) (c c)) obj ...)` vs `(with-slots (a b c) obj ...)` ...but I suppose it's no worse than `let`.
<mfiano> contrapunctus: My recommendation is to prefer explicitness over with-slots/with-accessor/symbol-macrolet. It is easier to understand, and you don't run into performance traps by eg; evaluating an expensive accessor more than once.
<mfiano> concision does not = easier to understand
dmh has quit [Quit: rip]
<contrapunctus> Oh. Didn't realize you were recommending against `with-accessors` too.
<mfiano> Indeed I am. Considering an accessor can be any arbitrary method that performs any amount of work as part of its logic, using such a thing would result in redundant computations, which is a problem both for performance reasons, and that of side-effects.
<mfiano> But moreso because (accessor foo) just reads better than some symbol that you have to scan backwards to see how it was defined and its value mutated along the way.
<contrapunctus> I see...
<mfiano> You can let-bind accessors that you only want to compute once.
<mfiano> I'm not saying symbol macros (which includes with-slots and with-accessors), but their utility is limited in my opinionated idea of good code.
<mfiano> symbol macros are useless*
<mfiano> They can be used for some pretty interesting things, such as pandoric macros.
<mfiano> If you don't know what they are, don't worry; you're not missing much. Just read Let Over Lambda some time.
<mfiano> That book is very much a "hey, look what macros can do" rather than a practical book.
<contrapunctus> Thanks. I'll probably get down to applying this to my projects sometime.
<beach> contrapunctus: WITH-ACCESSORS rarely have entries like (a a) (b b). More likely it will be (a some-package-prefix:a) (b some-package-prefix:b).
<mfiano> Sure. Like most Lispers, I have different advice on good style than others. I would suggest you not to blindly apply this style to your code, but to think of why it is preferred by me (and some others)
<pjb> contrapunctus: we don't have sin-of square-root-of tan-of etc!
<pjb> contrapunctus: functions shall be named after their result.
<pjb> contrapunctus: consider: (defpackage "POO" (:use "CL") (:export "KOO" "SOO")) (in-package "POO") (defclass koo () ((soo :initarg :soo :accessor soo)))
<pjb> then since soo is exported, a client can write: (setf (slot-value (make-instance 'koo) 'soo) 42)
<pjb> accessing the slot directly! But perhaps you have additionnal methods on the accessor soo to validate or synchronize the the slot. With (setf slot-value) those methods wouldn't be called, and the client would have broken your class.
<beach> contrapunctus: The -of convention suggests that it accesses a slot. But you want to do everything you can to prevent a slot from being even suggested. So this convention has the same problem as the get- and set- convention in other languages. You want to leave the flexibility of changing the implementation from accessing a slot to computing the value, or vice versa.
<pjb> contrapunctus: instead with: (defpackage "POO" (:use "CL") (:export "KOO" "SOO")) (in-package "POO") (defclass koo () ((%soo :initarg :soo :accessor soo)))
<pjb> %soo is not exported, and is clearly marked as internal: the client should not use.
<beach> contrapunctus: Or else, you would have to name all the functions in your protocol with the -of convention, which would be truly silly.
<pjb> (he can stil use it, but now he must write: (setf (slot-value (make-instance 'koo) poo::%soo) 42), with both :: and % clear markers that he shouldn't.
<pjb> (but perhaps he has to, so CL still leaves the possibility)).
<pjb> In any case, the reader of the source will know that something iffy is occuring with this ::%
Algernon69 has joined #commonlisp
<beach> pjb: Though if you saw the discussion in #clschool yesterday, you know that if you have a protocol package that contains only exported symbols, then the implementation package need not have any exported symbols at all, so no need for the % convention.
<mfiano> beach: Absolutely spot on. -of is completely sily and conveys the wrong meaning.
<mfiano> silly*
saura has joined #commonlisp
<pjb> beach: exactly, but we still have two different symbols POOapi:SOO and POOimplementation::SOO
<beach> contrapunctus: Imagine you have DATE-OF-BIRTH-OF as a slot reader, but you have AGE as a function that computes the age from the date of birth and today's date. Now if you decide to cache that computation, do you then change the name of the protocol function?
<beach> pjb: Absolutely.
saura has quit [Ping timeout: 240 seconds]
hide-difference has joined #commonlisp
saura has joined #commonlisp
saura has quit [Remote host closed the connection]
saura has joined #commonlisp
saura has quit [Remote host closed the connection]
saura has joined #commonlisp
<contrapunctus> pjb: yeah, I get the rationale, I just haven't had any logic to put in accessors yet. Probably because most of the projects where I use CLOS are still in early stages. As I said, I'll probably remove the exporting of slots, sometime.
<contrapunctus> beach, pjb: thanks, I guess I'll not be using the `-of` convention ^^
saura has quit [Ping timeout: 256 seconds]
leeb has joined #commonlisp
OlCe has joined #commonlisp
treflip has joined #commonlisp
snits has quit [Ping timeout: 248 seconds]
lagash has quit [Ping timeout: 248 seconds]
Algernon91 has joined #commonlisp
Algernon69 has quit [Ping timeout: 260 seconds]
ttree has quit [Ping timeout: 264 seconds]
<jackdaniel> if we assume, that using slot-value is bad™, then it doesn't matter whether the slot name is the same as the reader or not
<mfiano> I'm not even going to touch that one.
Everything has joined #commonlisp
<jackdaniel> I don't have a strong opinion about <slot>-of, but it is worth noting that there are two types of slots: caching some computation, and storing some value; -of convention may (or may not) be a hint to the code reader with this regard
rendar has quit [Ping timeout: 244 seconds]
<beach> It is also a hint to client code, which it shouldn't be.
<jackdaniel> why the client shouldn't know what is the (semantic) role of yhe accessor? this does
<jackdaniel> s/this does//
<beach> As I explained, client code should not need to know whether something is stored or computed.
<beach> It is not about semantics. Of course, client code should know the semantics. It's about the implementation details that make the semantics work. And client code should not have to know about implementation details.
<beach> I had hoped my example with DATE-OF-BIRTH-OF and AGE was clear.
dim has quit [Ping timeout: 260 seconds]
<beach> Here, you have an example where the semantics of AGE can be realized in (at least) two different ways.
<Nilby> (o:elt (make-instance 'foo :bar 1 :baz 2) :baz) ⇒ 2 or even (o:elt (make-instance 'foo :bar 1 :baz 2) 1) ⇒ 2
<Nilby> but yeah call (org.io.foo.fooo.fooo:ye-olde-accessor-of-foo x) if'n ye want ta
<ck_> I'm sorry I believe you forgot -singleton
<Nilby> ck_: good point
<Nilby> why is flexibility so troubling?
<jackdaniel> DATE-OF-BIRTH-OF vs AGE touches what mfiano suggested - he does use full accessors to make it apparent that an expensive computation may happen
<jackdaniel> having DATE-OF-BIRTH-OF suggests, that calling this function is cheap, because it is just a storage (with some optional auxiliary functions)
<beach> So you would advocate changing the name from AGE to AGE-OF if the maintainer decides that it may be advantageous to cache the result?
<jackdaniel> no
pve has joined #commonlisp
<jackdaniel> age is a matter of computation (because it changes with time), while date of birth is the object property
<jackdaniel> semantically speaking
<jackdaniel> so I would not advocate changing AGE to AGE-OF
<beach> I am pretty sure there are cases that are not as clear in this respect as this one.
<Nilby> one might have (age person) "Ages ‘person’ by one Plank unit." and (age-of person) "Return the age of ‘person’ in Plank units."
<jackdaniel> beach: I agree; and as I said I don't have a strong opinion; but in some clear cases it /may/ be a useful convention
MajorBiscuit has joined #commonlisp
progress__ has joined #commonlisp
analogsalad has joined #commonlisp
<Nilby> I'm not sure why any of this is issue with a language where we can programaticly re-map any accessor/slot in any package in any way, probably without runtime overhead. We have the best practical API compatibility of nearly any language. A bigger issue seems: did the programmer even bother to document what anything does.
<jackdaniel> are you arguing against any code conventions?
<jackdaniel> s/any/all/
<Nilby> i love, easy to read, unsurprising, internally consitent code. but it doesn't have to obey any strict conventions.
dBc has joined #commonlisp
igemnace has joined #commonlisp
<Nilby> i especially love when people use ample docstrings and comments, e.g. edi weitz
<Nilby> digit-char-p gives me a weird feeling, but it's very useful
<jackdaniel> for sure internal consistency is more important
ahlk has quit [Ping timeout: 255 seconds]
shka has joined #commonlisp
<Nilby> I'm good with the convention that every function returns a value and every value is lisp obejct. And using one natural language increases my small brained code comprehension (나선형-우주 x)
rodicm has joined #commonlisp
attila_lendvai has joined #commonlisp
<jackdaniel> /whois Nilby
<jackdaniel> whops
<hayley> Nilby is Nilby.
* jackdaniel often uses whois to check channel overlap
<pjb> jackdaniel: it doesn't matter. The object could instead store the age and the date-of-the-day and compute the date-of-birth.
<pjb> jackdaniel: the point is that for modularity, it's got to let the implementation change without changing the API.
<jackdaniel> I believe that you miss the point of what I've wnated to convey; probably that's my fault
<jackdaniel> s/wnated/wanted/
<pjb> jackdaniel: ah, perhaps you meant the distinction in the semantic field. Well, perhaps.
<pjb> It's not too useful, since it's already implied by the semantics.
igemnace has quit [Remote host closed the connection]
<pjb> That said, personnally, I'm not in favor of strong conventions. They depend on the circumstances and projects, and circumstances and projects can change.
<gjvc> "strong opinions weakly held"
<pjb> Yes.
gpiero has quit [Read error: Connection reset by peer]
gpiero has joined #commonlisp
famicom_guy has quit [Quit: ZNC 1.8.2 - https://znc.in]
famicom_guy has joined #commonlisp
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
jmdaemon has quit [Quit: ZNC 1.8.2 - https://znc.in]
progress__ has quit [Quit: Leaving]
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
prokhor has joined #commonlisp
prokhor__ has quit [Ping timeout: 256 seconds]
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 264 seconds]
analog_salad has joined #commonlisp
yauhsien has joined #commonlisp
analogsalad has quit [Ping timeout: 276 seconds]
mm007emko has joined #commonlisp
analog_salad has quit [Quit: bye]
dBc has quit [Quit: Lost terminal]
<jackdaniel> oh, kandria got funded. it seems I'll get my soundtrack after all ,)
pillton has quit [Remote host closed the connection]
robin has quit [Remote host closed the connection]
robin has joined #commonlisp
azimut has quit [Ping timeout: 268 seconds]
azimut has joined #commonlisp
Algernon91 has quit [Ping timeout: 264 seconds]
random-nick has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
<Josh_2> GM :sunglasses:
yauhsien has joined #commonlisp
Algernon91 has joined #commonlisp
Algernon91 has quit [Quit: Leaving]
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
rendar has joined #commonlisp
livoreno has quit [Ping timeout: 264 seconds]
random-nick has quit [Ping timeout: 240 seconds]
random-nick has joined #commonlisp
Oddity has quit [Ping timeout: 264 seconds]
Guest74 has quit [Quit: Ping timeout (120 seconds)]
prokhor__ has joined #commonlisp
Gnuxie has quit [Read error: Connection timed out]
Gnuxie has joined #commonlisp
Guest74 has joined #commonlisp
dim has joined #commonlisp
attila_lendvai has quit [Ping timeout: 256 seconds]
prokhor has quit [Ping timeout: 255 seconds]
Oddity has joined #commonlisp
Guest74 has quit [Quit: Ping timeout (120 seconds)]
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
Guest74 has joined #commonlisp
waleee has joined #commonlisp
<Guest74> The one I really don't understand is the not exporting slots.  But, are we really exporting slots?  I thought it was all symbols? Maybe those symbols define my protocol?  Isn't it only a current implementation detail that they are slots?  If I specifiy my protocol and never mention slots, do I need to safeguard against somebody coming along and
<Guest74> using an internal implementation detail that isn't part of the protocol?
<pjb> Guest74: indeed, only symbols are exported. But slots are named by symbols. So if you export symbols naming slots, you give access to the client (the code that uses your package) to the slots that should be a private implementation detail.
<pjb> Guest74: it should be sufficient to tell the client not to use slot-value on your objects.
<Guest74> if accessing them as slots isn't part of the protocol, then what is the problem?
<pjb> Guest74: but not everybody read the documentation, so in big projects, with lots of people, it is nice to make it harder to use slot-value on your classes.
<pjb> By not providing the symbol naming your slots.
Brucio-61 has quit [Quit: Application exit]
<pjb> Guest74: the problem is that CL is not into BDSM: it doesn't prevent anybody to use anything.
<Guest74> So I have to stop people from being bad programmers?
scymtym has quit [Remote host closed the connection]
<pjb> Yes. When those people are coworkers.
<pjb> You could also say that this can be catch in code review.
<pjb> caught
<Guest74> i prefer not to jump through hoops to prevent someone else from doing things not as intended.  But that's just my take.  I'm not big into dictating what others should do.
tyson2 has joined #commonlisp
grawlinson has quit [Ping timeout: 248 seconds]
grawlinson has joined #commonlisp
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
Guest74 has quit [Ping timeout: 248 seconds]
<flip214> You can't (practically) prohibit anyone having code in the same process as your library from getting the address and using FFI to access the low-level data, anyway. So having some kind of protocol should be good enough.
treflip` has joined #commonlisp
Guest74 has joined #commonlisp
treflip` has quit [Remote host closed the connection]
treflip has quit [Ping timeout: 264 seconds]
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
<beach> Guest74: I know that Xach (among others I guess) considers any use of SLOT-VALUE and related functions to be "forbidden" by client code. And, yes, if your clients are well trained, that should be enough. The % convention is just a reminder for them, since (as people pointed out) with modern Common Lisp systems you can't really prevent anything.
<beach> Guest74: You can also use the structure where the protocol package contains only its exported symbols, as I outlined above. That's a very nice organization, and it prevents any use of SLOT-VALUE automatically, without requiring any naming conventions like %.
igemnace has joined #commonlisp
<Guest74> Sure, I have that for quite a few protocols, most of mine there is no concrete object anyways, which is the purpose of the protocol..
<beach> Interesting! Where did you learn that structure? And how do you then define your implementation packages?
livoreno has joined #commonlisp
<beach> I am asking because I know of only CLIM as being a system that requires this structure.
mm007emko has quit [Quit: Client closed]
<pjb> Guest74: sure. It's a matter of context. Size of the project, number of programmers, who will use it, etc.
<Guest74> I can't say I learned it from programming. It just makes sense the way my brain works.  Implementations are just methods on the protocol functions.  I'm not sure what else you mean?
<pjb> flip214: if you build a controlled environment which sicp with it's first time environment will allow and make it usable, you can remove FFI and thus prevent low-level access and such security bugs.
<Guest74> pjb: I have no interest in limiting things or people.
<beach> Guest74: If you put the DEFGENERIC in the protocol package, then the protocol package will contain not only exported symbols, but also names of parameters and other noise.
<pjb> It may happen that your employer has such interests.
<pjb> beach: most of those symbol will disappear after compilation (with (debug 0))
<beach> Guest74: Like I said, the proposed structure is to have the protocol package contain only exported protocol symbols, so no internal symbols.
<beach> mop generation-function-lambda-list
<specbot> Couldn't find anything for generation-function-lambda-list.
<beach> Er,
<hayley> I wonder if anyone would notice if their "FFI" solution involved compiling C to Lisp code.
<beach> mop generic-function-lambda-list
<beach> pjb: The lambda list will remain in the package.
<Guest74> I'm not sure what the big deal is about args? Most of them are just the name of the protocol anyways(at least in my case)
<pjb> hayley: if you compile C to lisp, then you can do ffi staying in the lisp controlled environment: C programs will be safe!
<hayley> Yes, that's the idea.
<pjb> it's not foreign anymore.,
<beach> Guest74: It is not a big deal, but you said you often use the structure I suggested, and if you put the DEFGENERIC form in the protocol package, you do not use that structure.
<hayley> Else (for some other language) I would have to write a guide like "How to do FFI in language: 1. You don't"
<beach> Guest74: So I was asking where you learned the structure where the DEFGENERIC forms are not written in the protocol package, because that structure is highly unusual.
Guest74 has quit [Quit: Ping timeout (120 seconds)]
<beach> I guess we'll never know.
snits has joined #commonlisp
<hayley> We have the Vacietis compiler which compiles C to Common Lisp, so I wonder how the compiler fares compiling a SSL library. CL+SSL is the only FFI library I use routinely, so I would basically never have to touch FFI again if this idea works.
<jackdaniel> vacietis is a crude hack, don't overestimate its design
<jackdaniel> I think that froggey's iota is closer towards the goal in question
<hayley> Sure, though I wouldn't mind if the generated CL used Common Lisp objects rather than an octet vector for memory. I believe Iota uses the latter, which is still better for compatibility.
<random-nick> iota uses LLVM though
livoreno has quit [Read error: Connection reset by peer]
livoreno has joined #commonlisp
<jackdaniel> it would be nice to have a good C compiler targetting CL runtime
Guest74 has joined #commonlisp
<Guest74> Beach: Perhaps I misunderstood you, but you said contains only its exported symbols and I must have easily confused that with only exports symbols naming the protocol, which is the only thing I do intentionally.  now would not having these args in the package hinder debugging?  ...seems something keeps kicking me off the network.
<froggey> iota is definitely a crude hack, but definitely designed to be fairly compatible with existing C code
<hayley> So I'd prefer the Zeta-C-ish approach that Vacietis uses, I think. But if you say it's a hack, I'll see how it fairs.
<froggey> I did compile mbedtls with it ages ago and got that working
<hayley> Nice!
<beach> Guest74: I see. Debugging would be done by the author of the module, who obviously uses internal symbols in the module, so I see no impact on debugging.
<hayley> I also have to wonder how much software written in C breaks in practise, if you use bignums for char, int, long, etc. It would help if I could pick a MAX_INT perhaps.
<froggey> something that does away with the big byte vector for memory would be nice, but gets surprisingly close to the pointer provenance problem
<froggey> I thought about it a bit, but always ended up with a fairly exotic memory model which I'd guess most C code won't like
<Nilby> hayley: There's quite a lot C software that relies on integer size, wrapping, truncation, etc. Maybe more than not.
mixotricha has quit [Quit: Client closed]
<Nilby> I can imagine an autoconf setup for C->Lisp might be quite unusual
Oddity has quit [Ping timeout: 240 seconds]
Bike has joined #commonlisp
Guest74 has quit [Quit: Ping timeout (120 seconds)]
<Nilby> i feel like iota is not such a bad way, and rather impressive
<dlowe> I wonder how hard it would be to make a C compiler emit sbcl's IL
<dlowe> could just compile libraries right into the lisp image
lisp123 has joined #commonlisp
<dlowe> the libc could be in CL
<dlowe> sbcl could be even more self-hosting
<lisp123> I was speaking to one of my old friends after many years and I mentioned I started using CL
<lisp123> His first job in the 90s was to use CL to port between versions of COBOL
<lisp123> pretty cool
<Nilby> dlowe: Vacietis has a fair bit of a libc in CL, iota too has a bit of a Mezzano specific libc
Guest74 has joined #commonlisp
<Guest74> welp, that's annoying.
saura has joined #commonlisp
<dlowe> Yeah, but Vacietis is a C compiler targeting a collection of bytecode interpreters
<dlowe> there's not the integration that would be possible with a native compiler
<Guest74> beach: So you write the generics in a package, then create a separate package just to import/export the symbols naming the generic functions?  I'm guessing maybe mcclim is doing that because it both creates and implements the protocol in the same space?
<hayley> There's bytecode? I thought I read code that generated CL forms.
<dlowe> hm. okay, maybe I'm confusing this with another C-in-X language project
<jackdaniel> Guest74: we are a bit smarter, the implementation package "uses" the protocol package
<Nilby> Shinmera: ~1k per day, not bad, congrats!
saura has quit [Ping timeout: 240 seconds]
<Shinmera> I kinda doubt it'll continue like that, heh
<froggey> Nilby: the iota libc is mostly portable common lisp. though it needs nibbles and some float stuff to actually work, but there are portability libraries for that
igemnace has quit [Read error: Connection reset by peer]
<Nilby> froggey: Thanks. Now that I'm looking it might help me finish my Mezzano portability layer
<beach> Guest74: No. The package system allows you to do thing the other way around. You write your package definition (say) (defpackage #:api ... (:export #:fun1 #:fun2)).
<beach> Guest74: Then you write your implementation.lisp file like this (cl:in-package #:api-implementation) (defgeneric api:fun1 (...)).
<beach> Guest74: That's the difference between a module system and a package system.
Guest74 has quit [Ping timeout: 240 seconds]
hide-difference has quit [Quit: Client closed]
<dlowe> Shinmera: congrats on getting funded!
<Shinmera> Thanks!
Guest74 has joined #commonlisp
<Guest74> beach: do you have a specific example to look at?  Did you really mean defgeneric and not defmethod in your example?  This constant kicking isn't helpful.
[deleted] has joined #commonlisp
<beach> I meant any code, including DEFGENERIC.
<Guest74> Then I need an example
<beach> Guest74: The package CLOSTRUM contains only exported symbols.
livoreno has quit [Ping timeout: 256 seconds]
<beach> Guest74: The file clostrum.lisp is written in the CLOSTRUM-IMPLEMENTATION package.
<Guest74> So implementation doesn't mean implementation of the protocol, but definition of it?
<beach> In this case, it means any code.
igemnace has joined #commonlisp
<Guest74> any code that defines it?  or that actually implements it as in has defmethod etc...
sloanr has quit [Remote host closed the connection]
<beach> Notice the prefix ENV: which defines the protocol functions.
sloanr has joined #commonlisp
<beach> Any code.
<beach> No code is written in the CLOSTRUM package, so no DEFGENERIC forms.
<beach> Again, it is not a module system, so there is no module that defines the protocol.
<beach> There is only a package that contains the symbols that are included in the protocol.
lisp123 has quit [Remote host closed the connection]
rodicm has quit [Ping timeout: 268 seconds]
<Guest74> Ok, I'm getting how you do it.  And what are the benefits to this uncluttered namespace?
<mfiano> I am also curious why a protocol would not define the protocol generic functions.
<beach> The one benefit that made me tell you about it was that the code in the implementation package now needs to respect no naming conventions, in particular %. Client code does not have access to any symbols except the protocol symbols.
<mfiano> Oh this again
<beach> mfiano: Because it is not a module system.
<mfiano> What is a "module system"?
<beach> One where a module contains code, some of which is exported, like functions, classes, etc.
<beach> Packages contain no code. Only symbols.
<beach> That's what makes this organization possible.
<beach> You keep thinking of packages as if they were modules.
<mfiano> I do?
<beach> "The protocol defining the protocol generic functions" suggested that.
<Guest74> that's not right
<jackdaniel> isn't that rather cosmetic separation? if someone uses "protocol package" in uncanny way, then nothing prevents them from using the "implementation package"
<beach> "The protocol" is just documentation saying what functions and classes do what.
<Guest74> does this defintion of protocol come from somewhere?
<beach> jackdaniel: *sigh* we have already been through this. Nothing prevents anybody from doing anything in Common Lisp. It's all about conventions.
<mfiano> It still seems odd to have the implementation define the schema for its methods.
<Guest74> yes, the word implementation is bothering me.
<jackdaniel> beach: you seem to argue, that there is some benefit to the client code from a separate package that has interned only symbols that are part of the protocol; so I'm asking what's the practical purpose of this convention? i.e if you don't export X, then using foo::x or foo-internal::x doesn't make much difference
<Guest74> and I'm still not sure what this gets me over just defining a protocol in a protocol package which wouldn't have things like slots because it's a protocol and not an implementation.
<beach> Guest74: Call it what you want. It is a separate package containing (so to speak) all code.
<jackdaniel> and if you specify, that accessing slots is violating the protocol, then using slot-value disregarding the package should not happen
<beach> Guest74: The concept is used informally in the literature. I formalized it a bit here: http://metamodular.com/protocol.pdf
<beach> jackdaniel: Right.
sloanr has quit [Remote host closed the connection]
<beach> mfiano: Call the package api-code instead of api-implementation then.
<mfiano> I just don't understand the reasoning for having only a package, without defgenerics for the implementation to conform to. It seems odd defining them in the implementation. I could see another parent node in between, but in the implementation? If this is only to avoid things like %-prefixing slots, I think it is quite an odd decision to conflate the API of the implementation with the
sloanr has joined #commonlisp
<mfiano> impleementation.
<beach> Well, I need to get back to work. I am obviously not doing a good job today. Sorry about that.
<mfiano> No worries. I must not be understanding something and my concerns are unfounded.
<mfiano> Maybe write a paper about _this_ when you aren't working.
<beach> jackdaniel: There are no benefits to the client. I think the only benefit I mentioned today is that the -code (I wouldn't dare say -implementation again) package does not have to use any particular naming convention for slots.
<Guest74> Well, I still don't see the benefit of separating the symbols of the protocol from the definition of the protocol, except it would satisfy some deep ocd corner of my brain.
<beach> jackdaniel: So the benefits are only to the module creator.
<jackdaniel> it doesn't have to do that either way (if we agree, that accessing slots directly is against the protocol)
<beach> I give up.
<jackdaniel> I see
<beach> jackdaniel: We have already agreed upon that.
<beach> Anyway, I can't do this anymore.
<beach> Guest74: Don't worry about it. It is not that important.
<mfiano> I think I give up too.
<beach> mfiano: Don't worry about it. It is not that important.
<jackdaniel> I'm not sure what I've already ageed upon, but since we all give up, then I'll make a coffee :)
<mfiano> "I think the only benefit ...": Well then, I don't see much of a benefit.
<Guest74> maybe it will make sense when I make a protocol for a purpose other than uniting objects from different libraries.
<mfiano> And I will defer thinking about it until I read the paper :)
<beach> mfiano: Consider it to have no benefits.
<beach> mfiano: It will save you some work.
<mfiano> Then why go to this much effort to try explaining an architecture that is useful to you?
<beach> Guest74: A protocol is just a generalization of an "interface".
<beach> mfiano: Yeah, big mistake.
<mfiano> I wouldn't say that. I would just say that IRC is not the best medium where code examples and terms need to be cited as in a paper.
<mfiano> I am still interested. I just don't think this forum is doing a good job of helping me understand.
<mfiano> It could also be that I am not smart enough and no fault of yours.
waleee has quit [Ping timeout: 255 seconds]
pranavats has left #commonlisp [Error from remote client]
Guest74 has quit [Quit: Ping timeout (120 seconds)]
Guest74 has joined #commonlisp
<jackdaniel> sometimes it is hard to set apart preferences from convictions; it is related to a set of cognitive biases, i.e anchoring and false consensus; I suppose these two are culpirts that often prevent seeing the other side argument
scymtym has joined #commonlisp
<Guest74> Which makes me wonder about how to store preferences/settings.
lisp123 has joined #commonlisp
frgo has joined #commonlisp
<Guest74> Specifically settings when using a word protocol.
<Guest74> now it's nice if you can just pass an object that contains your favourite dictionary, knows your preferred phonetic alphabet etc..., but what if you just want to change one setting for one call?
<Guest74> Do you just add a bunch of keyword args for the settings?
lisp123 has quit [Ping timeout: 264 seconds]
<Guest74> or for vector graphics &key style (stroke (stroke style))(fill(fill style))(miter...
rodicm has joined #commonlisp
<mfiano> If Uncle Bob is to be taken seriously, anything more than 2 or 3 arguments should be rolled into a "parameter object"
* mfiano ducks
ssafar has quit [Ping timeout: 240 seconds]
ssafar has joined #commonlisp
saura has joined #commonlisp
<Shinmera> Thank god Lisp already does that for us by way of the parameter list :)
<Guest74> how much is too much of a good thing?
Guest74 has quit [Quit: Ping timeout (120 seconds)]
saura has quit [Ping timeout: 256 seconds]
cage has joined #commonlisp
Guest74 has joined #commonlisp
<Guest74> I think there's a bot here that dislikes me asking what it thinks are stupid questions like 'why can't I name my function p(a|b)' and it kicks me.
Brucio-61 has joined #commonlisp
rodicm has quit [Quit: Leaving]
<Bike> Guest74: you're getting ping timeouts. maybe check your client configuration?
<Guest74> but what would be a good name besides probability-of-a-given-b?
sloanr has quit [Remote host closed the connection]
sloanr has joined #commonlisp
<Guest74> bike: it's just some web thing.
saura has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
saura has quit [Ping timeout: 256 seconds]
tibfulv has joined #commonlisp
rotateq has joined #commonlisp
<semz> conditional probability is the canonical name
Guest74 has quit [Quit: Ping timeout (120 seconds)]
<semz> you can name your function p(a|b) for what it's worth: p\(a\|b\)
<semz> but I wouldn't recommend it lol
gxt has quit [Ping timeout: 268 seconds]
<semz> oh he's gone again
rogersm has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 256 seconds]
gxt has joined #commonlisp
orestarod has joined #commonlisp
saura has joined #commonlisp
saura has quit [Ping timeout: 256 seconds]
alejandrozf has joined #commonlisp
lagash has joined #commonlisp
sloanr has quit [Remote host closed the connection]
* mfiano wonders how long it takes to use a real client with a real nick for someone very active on IRC
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
<jackdaniel> years
<rotateq> Hm who has no real nick?
<mfiano> Anyone with a Guest* nick, which are reserved for unregistered users on this network.
<rotateq> ah then I know and remember a previous discussion :/
Andrew is now known as GNU\Andrew
saura has joined #commonlisp
yauhsien_ has joined #commonlisp
yauhsien has quit [Read error: Connection reset by peer]
anticomputer has quit [Remote host closed the connection]
saura has quit [Ping timeout: 268 seconds]
scymtym has quit [Read error: Connection reset by peer]
Brucio-61 has quit [Read error: Connection reset by peer]
anticomputer has joined #commonlisp
scymtym has joined #commonlisp
Brucio-61 has joined #commonlisp
lisp123 has joined #commonlisp
[deleted] has quit [Ping timeout: 244 seconds]
lisp123 has quit [Ping timeout: 268 seconds]
even4void has quit [Quit: fBNC - https://bnc4free.com]
leeb has quit [Ping timeout: 256 seconds]
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
notzmv has quit [Ping timeout: 240 seconds]
brettgilio has quit [Ping timeout: 248 seconds]
Oladon has joined #commonlisp
yauhsien_ has quit [Remote host closed the connection]
even4void has joined #commonlisp
pranavats has joined #commonlisp
azimut has quit [Ping timeout: 268 seconds]
Everything has quit [Quit: leaving]
yauhsien has joined #commonlisp
waleee has joined #commonlisp
ttree has joined #commonlisp
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 248 seconds]
X-Scale` is now known as X-Scale
Dynom has joined #commonlisp
saura has joined #commonlisp
ns12 has quit [Quit: bye]
saura has quit [Ping timeout: 264 seconds]
ns12 has joined #commonlisp
SunClonus has joined #commonlisp
SunClonus has quit [Client Quit]
SunClonus has joined #commonlisp
SunClonus has quit [Read error: Connection reset by peer]
molson has quit [Remote host closed the connection]
SunClonus has joined #commonlisp
molson has joined #commonlisp
molson has quit [Remote host closed the connection]
SunClonus_ has joined #commonlisp
SunClonus_ has quit [Read error: Connection reset by peer]
SunClonus has quit [Ping timeout: 240 seconds]
SunClonus has joined #commonlisp
molson has joined #commonlisp
surabax has joined #commonlisp
SunClonus_ has joined #commonlisp
SunClonus has quit [Ping timeout: 268 seconds]
SunClonus_ has quit []
SunClonus has joined #commonlisp
SunClonus has quit [Client Quit]
Guest74 has joined #commonlisp
<Guest74> mfiano: Patience!  I'm writing the grammar checker right now.
<contrapunctus> Guest74, it takes under 5 minutes to set up any IRC client :\
<contrapunctus> or to register a nick
<Guest74> contrapunctus: How many of those are lisp?
<contrapunctus> Guest74, gotta start somewhere.
<Guest74> Why I think that's exactly what I'm doing.
<Bike> looks like two, beirc and weirdirc. dunno how well they work.
<Bike> given that the web client you're using is presumably also not written in lisp, i don't see the relevance, though.
<Guest74> I only use a browser besides lisp.
<rotateq> I use ERC happily, and patience is an outstanding virtue. :)
<rotateq> Maybe you can also make good use of the Nyxt browser then.
<Guest74> bike: I'm not sure anybody uses those given that cl-irc is inflexible in the way it handles certain responses.  Unless everybody just did what I did and change parts of cl-irc.
<Bike> i don't think they are very common, no.
mrcom has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
<scymtym> Guest74: i'm using an cl-irc based client
<Guest74> and you don't have problems with things like listing all channels?
<scymtym> most problems i had were with the message receive loop, i think
<Guest74> it's not a very nice part of the code.
<scymtym> my issue was that it does too much at a time (blocking) and too much on its own (via pre-registered handlers)
irc_user has joined #commonlisp
<Guest74> but besides it not making space in some destructuring-binds for some extra stuff sent by libera I'm still using it.  Just had to change stuff.
<scymtym> same
<Guest74> maybe I'll work even slower and just write my on gui on top of yours.
<Guest74> s/on/own/
notzmv has joined #commonlisp
<scymtym> i'll keep that in mind. maybe i should move the GUI code into a separate repository
saura has joined #commonlisp
<Guest74> I don't currently use any of the other networks you support, but a more rounded out backend would be nice.
saura has quit [Ping timeout: 256 seconds]
SunClonus has joined #commonlisp
szkl has joined #commonlisp
Guest74 has quit [Ping timeout: 264 seconds]
analogsalad has joined #commonlisp
attila_lendvai has joined #commonlisp
mrcom has quit [Quit: Leaving]
Oddity has joined #commonlisp
analogsalad has quit [Quit: bye]
mrcom has joined #commonlisp
alejandrozf has quit [Remote host closed the connection]
Oladon has quit [Quit: Leaving.]
Guest74 has joined #commonlisp
<phoe> pranavats: but I think that scymtym's work is much more complete
<phoe> (also I see that this was already linked earlier, apologies for a very belated response)
* phoe re-disappears
<scymtym> phoe: specific to dpans, though
<scymtym> and good to see you again
<pranavats> phoe: Thanks. I got it to work. What scymtym's work?
<pranavats> That Latex Parser is for LaTeX 2.0.9, has support for only a handful of LaTeX2e macros, and doesn't support the documentclass macro in particular. These can be fixed though.
<pranavats> scymtym: I'd love to check out what phoe was talking about.
<pranavats> Thank you
jmdaemon has joined #commonlisp
Dynom has quit [Quit: WeeChat 3.5]
morganw has joined #commonlisp
Guest74 has quit [Quit: Ping timeout (120 seconds)]
akoana has joined #commonlisp
ssafar has quit [Ping timeout: 264 seconds]
ssafar has joined #commonlisp
cage has quit [Remote host closed the connection]
mrcom has quit [Remote host closed the connection]
mrcom has joined #commonlisp
Brucio-61 has quit [Ping timeout: 255 seconds]
scymtym has quit [Ping timeout: 264 seconds]
morganw has quit [Remote host closed the connection]
morganw has joined #commonlisp
rendar has quit [Quit: Leaving]
Brucio-61 has joined #commonlisp
scymtym has joined #commonlisp
bilegeek has joined #commonlisp
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
SunClonus has quit [Read error: Connection reset by peer]
yauhsien has joined #commonlisp
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
dra_ has joined #commonlisp
SunClonus has joined #commonlisp
dra_ has quit [Client Quit]
yauhsien has quit [Ping timeout: 240 seconds]
dra has joined #commonlisp
morganw has quit [Remote host closed the connection]
mixotricha has joined #commonlisp
mrcom has quit [Remote host closed the connection]
mrcom has joined #commonlisp
cosimone has joined #commonlisp
Guest74 has joined #commonlisp
orestarod has quit [Ping timeout: 244 seconds]
yauhsien has joined #commonlisp
mon_aaraj has joined #commonlisp
ashln has joined #commonlisp
dra has quit [Ping timeout: 264 seconds]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life_ is now known as Lord_of_Life
mon_aaraj has quit [Ping timeout: 268 seconds]
mon_aaraj has joined #commonlisp
SunClonus_ has joined #commonlisp
igemnace has quit [Ping timeout: 255 seconds]
SunClonus has quit [Ping timeout: 264 seconds]
random-nick has quit [Ping timeout: 240 seconds]
saura has joined #commonlisp
pillton has joined #commonlisp
* pillton is very excited about the sb-simd contrib!
saura has quit [Ping timeout: 240 seconds]
pve has quit [Quit: leaving]