libera/#commonlisp - IRC Chatlog
Search
13:13:45
froggey
something that does away with the big byte vector for memory would be nice, but gets surprisingly close to the pointer provenance problem
13:14:14
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
13:16:16
Nilby
hayley: There's quite a lot C software that relies on integer size, wrapping, truncation, etc. Maybe more than not.
13:39:57
lisp123
I was speaking to one of my old friends after many years and I mentioned I started using CL
13:40:29
Nilby
dlowe: Vacietis has a fair bit of a libc in CL, iota too has a bit of a Mezzano specific libc
13:43:41
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?
13:46:03
jackdaniel
Guest74: we are a bit smarter, the implementation package "uses" the protocol package
13:47:27
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
13:48:56
Nilby
froggey: Thanks. Now that I'm looking it might help me finish my Mezzano portability layer
13:49:26
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)).
13:50:17
beach
Guest74: Then you write your implementation.lisp file like this (cl:in-package #:api-implementation) (defgeneric api:fun1 (...)).
14:00:14
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.
14:03:03
Guest74
So implementation doesn't mean implementation of the protocol, but definition of it?
14:04:03
Guest74
any code that defines it? or that actually implements it as in has defmethod etc...
14:09:02
Guest74
Ok, I'm getting how you do it. And what are the benefits to this uncluttered namespace?
14:10:14
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.
14:11:08
beach
One where a module contains code, some of which is exported, like functions, classes, etc.
14:12:43
jackdaniel
isn't that rather cosmetic separation? if someone uses "protocol package" in uncanny way, then nothing prevents them from using the "implementation package"
14:13:35
beach
jackdaniel: *sigh* we have already been through this. Nothing prevents anybody from doing anything in Common Lisp. It's all about conventions.
14:14:50
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
14:15:15
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.
14:15:17
beach
Guest74: Call it what you want. It is a separate package containing (so to speak) all code.
14:15:27
jackdaniel
and if you specify, that accessing slots is violating the protocol, then using slot-value disregarding the package should not happen
14:15:55
beach
Guest74: The concept is used informally in the literature. I formalized it a bit here: http://metamodular.com/protocol.pdf
14:19:30
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
14:20:16
beach
Well, I need to get back to work. I am obviously not doing a good job today. Sorry about that.
14:22:56
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.
14:23:09
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.
14:23:26
jackdaniel
it doesn't have to do that either way (if we agree, that accessing slots directly is against the protocol)
14:26:38
jackdaniel
I'm not sure what I've already ageed upon, but since we all give up, then I'll make a coffee :)
14:26:51
Guest74
maybe it will make sense when I make a protocol for a purpose other than uniting objects from different libraries.
14:28:13
mfiano
Then why go to this much effort to try explaining an architecture that is useful to you?
14:29:38
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.
14:30:13
mfiano
I am still interested. I just don't think this forum is doing a good job of helping me understand.
14:45:04
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
14:54:40
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?
14:58:22
Guest74
or for vector graphics &key style (stroke (stroke style))(fill(fill style))(miter...
14:59:42
mfiano
If Uncle Bob is to be taken seriously, anything more than 2 or 3 arguments should be rolled into a "parameter object"
15:15:25
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.
16:07:45
mfiano
ACTION wonders how long it takes to use a real client with a real nick for someone very active on IRC
16:13:11
mfiano
Anyone with a Guest* nick, which are reserved for unregistered users on this network.
18:54:14
Bike
given that the web client you're using is presumably also not written in lisp, i don't see the relevance, though.
18:57:46
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.
19:08:03
scymtym
my issue was that it does too much at a time (blocking) and too much on its own (via pre-registered handlers)
19:08:09
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.
19:14:13
scymtym
i'll keep that in mind. maybe i should move the GUI code into a separate repository
19:16:30
Guest74
I don't currently use any of the other networks you support, but a more rounded out backend would be nice.
20:07:59
phoe
(also I see that this was already linked earlier, apologies for a very belated response)
20:11:56
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.
20:15:06
scymtym
pranavats: https://github.com/scymtym/dpans-conversion/tree/online-lisp-meeting/code/parser (background: https://techfak.de/~jmoringe/presentation-dpans-conversion/slides.html ). but again: that is not a generic TeX parser