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/>
corinroyal has joined #commonlisp
NotThatRPG has joined #commonlisp
pfdietz has quit [Ping timeout: 250 seconds]
unl0ckd has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oak has left #commonlisp [WeeChat 3.0]
tiskaan has quit [Ping timeout: 245 seconds]
unl0ckd has quit [Ping timeout: 268 seconds]
tiskaan has joined #commonlisp
unl0ckd has joined #commonlisp
jmdaemon has joined #commonlisp
green_ has joined #commonlisp
rogersm has joined #commonlisp
rogersm has quit [Ping timeout: 256 seconds]
tiskaan has quit [Ping timeout: 264 seconds]
NotThatRPG has joined #commonlisp
green_ has quit [Ping timeout: 252 seconds]
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life has joined #commonlisp
bilegeek has joined #commonlisp
random-nick has quit [Ping timeout: 268 seconds]
green_ has joined #commonlisp
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
skyl4rk has quit [Ping timeout: 256 seconds]
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
unl0ckd has quit [Ping timeout: 268 seconds]
akoana has joined #commonlisp
akoana has quit [Client Quit]
akoana has joined #commonlisp
pfdietz has joined #commonlisp
gjvc has joined #commonlisp
grawlinson has quit [Ping timeout: 240 seconds]
rgherdt has quit [Remote host closed the connection]
araujo has joined #commonlisp
Lycurgus has joined #commonlisp
grawlinson has joined #commonlisp
araujo has quit [Remote host closed the connection]
torbo has joined #commonlisp
torbo has quit [Remote host closed the connection]
meritamen has joined #commonlisp
josrr has quit [Remote host closed the connection]
scymtym has quit [Remote host closed the connection]
azimut_ has quit [Ping timeout: 240 seconds]
qhong has quit [Quit: ZNC 1.8.2 - https://znc.in]
qhong has joined #commonlisp
scymtym has joined #commonlisp
chomwitt has quit [Ping timeout: 246 seconds]
edr has quit [Quit: Leaving]
zaymington has joined #commonlisp
Inline has quit [Quit: Leaving]
waleee has quit [Ping timeout: 252 seconds]
moon-child is now known as Mondenkind
akoana has quit [Quit: leaving]
pfdietz has quit [Ping timeout: 250 seconds]
meritamen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
decweb has quit [Ping timeout: 276 seconds]
rogersm has joined #commonlisp
rogersm has quit [Ping timeout: 256 seconds]
dcb has quit [Quit: Connection closed for inactivity]
Aesth has joined #commonlisp
tertek has quit [Quit: %quit%]
Kyuvi has quit [Ping timeout: 250 seconds]
LispTyro has joined #commonlisp
dinomug has joined #commonlisp
igemnace has joined #commonlisp
meritamen has joined #commonlisp
Pixel_Outlaw has quit [Remote host closed the connection]
notzmv has quit [Ping timeout: 256 seconds]
rogersm has joined #commonlisp
elderK has joined #commonlisp
Kyuvi has joined #commonlisp
rtypo has quit [Ping timeout: 256 seconds]
ym has joined #commonlisp
meritamen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zaymington has quit [Ping timeout: 245 seconds]
dinomug has quit [Remote host closed the connection]
meritamen has joined #commonlisp
traidare has joined #commonlisp
oneeyedalien has joined #commonlisp
rogersm has quit [Remote host closed the connection]
rogersm has joined #commonlisp
rogersm has quit [Remote host closed the connection]
rogersm has joined #commonlisp
rogersm has quit [Ping timeout: 252 seconds]
varjag has joined #commonlisp
epony has quit [Remote host closed the connection]
epony has joined #commonlisp
oneeyedalien has quit [Quit: Leaving]
Aesth has quit [Read error: Connection reset by peer]
luis5 has joined #commonlisp
rogersm has joined #commonlisp
rogersm has quit [Remote host closed the connection]
shka has joined #commonlisp
notzmv has joined #commonlisp
bilegeek has quit [Quit: Leaving]
rainthree has joined #commonlisp
ebrasca has joined #commonlisp
dcb has joined #commonlisp
attila_lendvai has joined #commonlisp
dino_tutter has joined #commonlisp
Aesth has joined #commonlisp
meritamen has quit [Quit: I gotta go.]
rogersm has joined #commonlisp
rainthree has quit [Read error: Connection reset by peer]
seok has quit [Quit: Client closed]
rogersm has quit [Ping timeout: 245 seconds]
elderK has quit [Quit: Connection closed for inactivity]
rgherdt has joined #commonlisp
wheatengineer has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
<beach> gilberth: Maybe you said this already, but do you have plans to include more stuff into the Nova Spec? Like MOP stuff?
<beach> ... and if so, would the work I did to HTML-ize the free AMOP chapters be obsolete?
Jach has quit [Ping timeout: 260 seconds]
zaymington has joined #commonlisp
Jach has joined #commonlisp
daox has joined #commonlisp
PaleRabbi has joined #commonlisp
khrbtxyz has quit [Ping timeout: 240 seconds]
pfdietz has joined #commonlisp
_cymew_ has joined #commonlisp
zeka_ has quit [Ping timeout: 268 seconds]
zeka__ has joined #commonlisp
yitzi has joined #commonlisp
igemnace has quit [Read error: Connection reset by peer]
dajole has quit [Quit: Connection closed for inactivity]
khrbtxyz has joined #commonlisp
donleo has joined #commonlisp
igemnace has joined #commonlisp
notzmv has quit [Ping timeout: 256 seconds]
traidare has quit [Ping timeout: 246 seconds]
rogersm has joined #commonlisp
attila_lendvai has quit [Ping timeout: 256 seconds]
pve has joined #commonlisp
corinroyal has quit [Ping timeout: 264 seconds]
corinroyal has joined #commonlisp
decweb has joined #commonlisp
rogersm has quit [Remote host closed the connection]
Aesth has quit [Read error: Connection reset by peer]
rogersm has joined #commonlisp
rogersm has quit [Ping timeout: 252 seconds]
Kyuvi has quit [Quit: Client closed]
azimut has joined #commonlisp
traidare has joined #commonlisp
dcb has quit [Quit: Connection closed for inactivity]
random-nick has joined #commonlisp
rogersm has joined #commonlisp
nathanb has quit [Read error: Connection reset by peer]
sirufer has quit [Read error: Connection reset by peer]
nytpu has quit [Read error: Connection reset by peer]
chiheisen has quit [Read error: Connection reset by peer]
jonlevin has quit [Read error: Connection reset by peer]
sm2n has quit [Read error: Connection reset by peer]
arpunk has quit [Read error: Connection reset by peer]
cpli has quit [Write error: Connection reset by peer]
rselim has quit [Read error: Connection reset by peer]
srhm has quit [Read error: Connection reset by peer]
migalmoreno has quit [Read error: Connection reset by peer]
skin has quit [Read error: Connection reset by peer]
theothornhill has quit [Write error: Connection reset by peer]
mhcat has quit [Write error: Connection reset by peer]
\f has quit [Read error: Connection reset by peer]
jasom has quit [Read error: Connection reset by peer]
payphone has quit [Read error: Connection reset by peer]
retropikzel has quit [Write error: Connection reset by peer]
zyd has quit [Write error: Connection reset by peer]
ggb has quit [Read error: Connection reset by peer]
Schnouki has quit [Write error: Connection reset by peer]
jmbr has quit [Write error: Connection reset by peer]
slondr has quit [Write error: Connection reset by peer]
brettgilio has quit [Write error: Connection reset by peer]
pvac has quit [Write error: Connection reset by peer]
artyn has quit [Write error: Connection reset by peer]
mcoll has quit [Write error: Connection reset by peer]
morganw has quit [Read error: Connection reset by peer]
shunter has quit [Read error: Connection reset by peer]
paulapatience has quit [Read error: Connection reset by peer]
alethkit has quit [Write error: Connection reset by peer]
theesm has quit [Write error: Connection reset by peer]
sherbert has quit [Write error: Connection reset by peer]
whereiseveryone has quit [Write error: Connection reset by peer]
sirufer has joined #commonlisp
Schnouki has joined #commonlisp
nathanb has joined #commonlisp
zyd has joined #commonlisp
mhcat has joined #commonlisp
shunter has joined #commonlisp
arpunk has joined #commonlisp
pvac has joined #commonlisp
morganw has joined #commonlisp
paulapatience has joined #commonlisp
ggb has joined #commonlisp
brettgilio has joined #commonlisp
jonlevin has joined #commonlisp
sherbert has joined #commonlisp
theesm has joined #commonlisp
artyn has joined #commonlisp
theothornhill has joined #commonlisp
whereiseveryone has joined #commonlisp
mcoll has joined #commonlisp
payphone has joined #commonlisp
nytpu has joined #commonlisp
migalmoreno has joined #commonlisp
jmbr has joined #commonlisp
jasom has joined #commonlisp
slondr has joined #commonlisp
retropikzel has joined #commonlisp
sm2n has joined #commonlisp
chiheisen has joined #commonlisp
skin has joined #commonlisp
cpli has joined #commonlisp
\f has joined #commonlisp
srhm has joined #commonlisp
rselim has joined #commonlisp
alethkit has joined #commonlisp
rogersm has quit [Remote host closed the connection]
rogersm has joined #commonlisp
rogersm has quit [Remote host closed the connection]
meritamen has joined #commonlisp
rogersm has joined #commonlisp
rogersm has quit [Remote host closed the connection]
Equill has quit [Quit: Gone offline]
rogersm has joined #commonlisp
kurfen has quit [Read error: Connection reset by peer]
_cymew_ has quit [Ping timeout: 264 seconds]
rogersm has quit [Remote host closed the connection]
kurfen has joined #commonlisp
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
lucasta has joined #commonlisp
edr has joined #commonlisp
dnhester26 has joined #commonlisp
<dnhester26> does anyone here use package-inferred-system to avoid having to specify every file in .asd?
<ixelp> The package-inferred-system extension (ASDF Manual)
<dnhester26> it uses :use-reexport in the all.lisp examples. Wouldn't it make more sense to use :import-from to avoid collusions?
<beach> Some people do, but I don't. I forget exactly why. Is it that each file must be in its own package?
tyson2 has joined #commonlisp
dcb has joined #commonlisp
daox has quit [Quit: WeeChat 4.0.4]
daox has joined #commonlisp
josrr has joined #commonlisp
<beach> I just remember that there was some ridiculous (to me) limitation that I couldn't accept.
rogersm has joined #commonlisp
<yitzi> The idea of putting an entire package in one file is absurd. As is the idea that there is a one-to-one correspondance between packages and systems. Its just a terrible idea, imho.
<beach> I totally agree.
<pfdietz> I've used p-i-s.  Sticking everything in a single file is a downside.  It would be nice if there were a way to have the best of both worlds.  Maybe associate packages with directories, not files?
<yitzi> Yeah, I don't even like Lisp files that more then a couple hundred lines long. That is what separate files and hierarchical files systems are for.
<pfdietz> The problem then would be describing the dependencies of files in that directory.
<yitzi> That is what the ASD is for. I am missing something?
zaymington has quit [Remote host closed the connection]
zaymington has joined #commonlisp
Aesth has joined #commonlisp
jmdaemon has quit [Ping timeout: 264 seconds]
loocser has joined #commonlisp
notzmv has joined #commonlisp
daox has quit [Quit: WeeChat 4.0.4]
loocser has quit [Quit: Leaving]
dino_tutter has quit [Ping timeout: 268 seconds]
rogersm has quit [Remote host closed the connection]
waleee has joined #commonlisp
tiskaan has joined #commonlisp
rogersm has joined #commonlisp
rogersm has quit [Ping timeout: 268 seconds]
unl0ckd has joined #commonlisp
PaleRabbi has quit [Quit: Leaving]
monospod has joined #commonlisp
corinroyal has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
meritamen has quit [Quit: I gotta go.]
kenanb has joined #commonlisp
yewscion has joined #commonlisp
rogersm has joined #commonlisp
rogersm has quit [Ping timeout: 260 seconds]
meritamen has joined #commonlisp
meritamen has quit [Remote host closed the connection]
<dnhester26> yitzi: can you please explain why not use a package per file? why is it absurd? Sorry if it seems dumb, I'm just coming from a java python background where every file pretty much is it's own package. lisp packages have nothing to do with that because they are ways of bringing symbols together, but java to the extreme every file is pretty much just a class, and you import based on the directory path to get the class. it's pretty stra
<dnhester26> ightforward and removes the need to write a build file like .asd, which is what's bothering me a lot
<dnhester26> How can I sensibly build .asd files? I would like a simple tutorial. I was going through https://github.com/robert-strandh/Cluffer/blob/master/cluffer.asd
<paulapatience> Does LDB treat integers in two's complement notation? E.g., is (ldb (byte 8 0) -1) guaranteed to be #xFF?
<paulapatience> Section 12.1.1.3.1 says the logical operations do, but makes no mention of it in 12.1.1.3.2 for byte operations.
<dnhester26> asdf just finds it because it's a .asd file even though it's not on the same directory it doesn't matter, it just traverses searching so I don't have to worry about it. Correct?
<dnhester26> Is that the best way, to make a .asd file generally for every foler
<dnhester26> to avoid making a big bloated .asd file in the top directory?
yewscion has quit [Ping timeout: 260 seconds]
Inline has joined #commonlisp
<dnhester26> are system names and package names completely independent from each other?
<yitzi> dnhester26: Putting a single package into a single file is only appropriate if the package is very small in terms of the lines of code. For anything else more than ~500 lines of code it can be confusing (at least to me) to have it all in the same file. Instead break it up into logical groups of functionalitity for each file. common-lisp is a single package, can you can imagine the entire code-case of a CL implementation being in a single file?
<dnhester26> beach: here https://github.com/robert-strandh/Cluffer/blob/master/Base/cluffer-base.asd you load packages.lisp first, and here https://github.com/robert-strandh/Cluffer/blob/master/Base/packages.lisp you export the symbols that are not yet defined. I think doing that in sbcl for me gave me warnings (is that correct?) is that normal programming style? will it not lead to an error?
rendar has quit [Quit: Leaving]
<yitzi> You can have multiple packages per folder...thats up to you, btw.
<dnhester26> yizti: what is the meaning of a package beyond a grouping of symbols? when I think of a package I think of a group of symbols that provide certain functionality, but according to that each file you are describing should be in it's own package. Why keep them all in one package?
<yitzi> I think having larger packages versus lots of smaller ones is pretty subjective. I just try to group them by the logical functionality groups that help me visualize the problem.
rendar has joined #commonlisp
rendar has quit [Changing host]
rendar has joined #commonlisp
<beach> dnhester26: When you :EXPORT something, you give it a string designator, so that will create the symbol in the package you are defining, or export an existing symbol otherwise available in the package.
<beach> dnhester26: You can think of the package as the unit of encapsulation. It says what symbols are available to client code.
<beach> dnhester26: But most of the time, the definitions named by those symbols, like functions, classes, types, etc., represent a lot of code, and it makes sense to put them in separate files.
attila_lendvai has joined #commonlisp
<beach> dnhester26: For example, you might want one file with definitions of generic functions without associated methods, and another file with class definitions, and a perhaps several files with method definitions for the generic functions.
<beach> dnhester26: In other words, the Common Lisp package system plays the "encapsulation" role of classes in most object-oriented languages, whereas Common Lisp classes play the role of the "representation" role of the classes in those languages.
<dnhester26> beach: thanks for the explanations
<beach> dnhester26: It is a dumb idea to have both encapsulation and representation represented by the same language element. That's probably why code in traditional object-oriented languages get very complex.
<beach> dnhester26: Sure. I hope it was somewhat clear.
<dnhester26> is there a way around having to define the .asd build files with serial or depends-on? In a lot of other languages, the build is just implied by the way the code is written without having to explicitly state it
<dnhester26> why is it a dumb idea? because encapsulation is not for all other classes, just the ones outside of that particular functionality?
<beach> It is not a great burden. You add a line each time you add a file.
<beach> dnhester26: Because it gives you less flexibility.
<beach> In Common Lisp, you typically have several classes defined in a single package, because all those classes are logically part of the same "module".
<dnhester26> I get errors all the time from defining circular dependencies or forgetting to add the line and I just find the whole managing of a massive file of dependencies a pain. But I can see that I may have been structuring my code in the wrong way, I just don't see any explanation on the correct way. I'm reading your cluffer to try to understand how. Making a system per folder seems more sensible and I guess forces that all those files be
<dnhester26> either completely independent of another folder, or if dependent, the other folder cannot depend on it...
<beach> dnhester26: Yes, the way I organize my code is that a directory contains the code of one "module" and that "module" is defined by an ASDF system definition and a package definition.
<beach> There are other ways of course.
<dnhester26> flexibility in terms of what? having another class within the same module access the first classes slots yet at the same time not export the slot accessors from the package so that classes outside the package should not access it as a first measure?
<beach> Stuff like that.
<beach> So in my code, the dependencies are either between modules, as stated in the ASDF system definition, or between files in a module, which I usually turn into a :SERIAL T dependency for simplicity.
Inline has quit [Quit: Leaving]
lucasta has quit [Quit: Leaving]
<yitzi> dnhester26: You don't have to put the asd in the same directory. Its just my preference, but I put all of the asd files in the root directory and use `:pathname` to map to subdirectories. I like this because I can look in the root directory and see all the systems that are defined. https://github.com/s-expressionists/Inravina/blob/1d4439fe3cf982a6a2a542b4a17abc985a61d4ee/inravina-extrinsic.asd#L11
<dnhester26> so module is really a whole working component of a project. In a web app with a model view controller type design, it doesn't make sense then to have those 3 folders mvc, it would be more like a module for authentication with a folder for it and it's mvc files inside that folder, and then each part of the code that can be broken up would get it's own module. right?
<beach> dnhester26: Classes in Common Lisp are very lightweight. It is common to define a bunch of "mixin" classes, for instance, and they often play not important role to client code.
<beach> dnhester26: I know nothing about web applications.
epony has quit [Remote host closed the connection]
<dnhester26> thanks, I'm just trying to understand how to structure my code, break up the 40 files in the asd file I have into multiple systems so that it's easier to manage. it's just a model view controller, it's not particular to web apps, desktop apps and anything that wants to separate concerns for displaying data (views), doing business logic (controllers), and data representation (models) has it..
epony has joined #commonlisp
<beach> dnhester26: Right, I would then have a module for each independent model.
<dnhester26> ok, thanks, this was instructive. I wish there was a tutorial or explanation at length of this somewhere. Even if it's an opinionated tutorial, it's better than no tutorial. it's just that the approach is so different from say java python and other languages I've programmed in, that I find it hard to guess the concepts
<beach> Yes, it is different because the Common Lisp object system is very different from that of most languages.
<dnhester26> beach: a module for each model you mean the whole class, logic for processing that data in the class instances, and the code for displaying it, all in one package and system. Is that what you meant?
<beach> No.
<beach> And I don't know why you talk about "class" here. The module contains what we call a "protocol definition", which is a generalization of an interface.
<dnhester26> This difference between encapsulation and representation, once you mentioned it in regard to the packages, I understood what you meant, but without thinking about it, I was not aware. I should really read the Keene book you recommended. It's the tradeoff of trying to be productive and code vs taking the time to read that is hard
<dnhester26> beach: I've no idea what this means in our context: "The module contains what we call a "protocol definition", which is a generalization of an interface."
<beach> So a protocol contains classes, functions, types, method combinations, variables, etc. that client code can use in a coherent way.
varjag has quit [Ping timeout: 260 seconds]
<beach> The documentation of a protocol explains the relationship between those elements, like how to create instances of the classes, what class instances can be passed to what functions, what objects those functions return, etc.
<beach> It also explains what kind of subclasses client code can create and what methods it must then supply.
<beach> dnhester26: I have an idea. Eclector is a program that implements the Common Lisp READ function. It is highly configurable. It is also well documented. Perhaps you could look at the documentation to get an idea of the concept of a protocol.
<dnhester26> yitzi: trying to make sense of https://github.com/s-expressionists/Inravina/blob/1d4439fe3cf982a6a2a542b4a17abc985a61d4ee/code/extrinsic/packages.lisp you are exporting a bunch of symbols, only a few were shadowed and very few defined in print.lisp. Does that mean you are then just exporting a bunch of common-lisp symbols you are "use"ing?
Inline has joined #commonlisp
<dnhester26> beach: thanks, I will take a look. I was reading cluffer for an idea of how to structure the code. eclector shows how the code comes together in a protocol. Is this way of using a common lisp way of using it or is it your personal definition?
<beach> The term "protocol" is used in the CLOS literature.
monospod has quit [Remote host closed the connection]
<beach> dnhester26: Oh, another important document is the CLIM II specification. That's how I learned about how to use CLOS and CLOS protocols.
<ixelp> CLIM 2 Specification — Common Lisp Interface Manager CLIM II Specification
<yitzi> dnhester26: I was only using that as an example of `:pathname`. That is system is implementing part of the CL spec inside a host implementation so it is a bit unusual in the export list. The actual functions are created by a macro, so its not immediately obvious on first glance.
NotThatRPG has joined #commonlisp
<beach> dnhester26: Speaking about dependencies, I don't see a general way of inferring the dependencies between the components (files) of an ASDF system.
traidare has quit [Ping timeout: 264 seconds]
<scymtym> dnhester26: eclector mostly shows my preferred style. for example, the ASDF system definitions are in the project root directory. but beach, yitzi and i all use one directory per module and often but not always one file per aspect within such directories like "conditions.lisp", "generic-functions.lisp", "classes.lisp"
<beach> scymtym: I was pointing to Eclector mainly for the documentation, but that's a good point.
azimut_ has quit [Ping timeout: 240 seconds]
NicknameJohn has joined #commonlisp
<yitzi> I second that. Part of understanding how a system functions is building a mental map of where that functionallity is located and good names like scymtym suggested are really key to that for me.
rogersm has joined #commonlisp
azimut has joined #commonlisp
rogersm has quit [Remote host closed the connection]
<dnhester26> beach: yuo learned from reading the specification or from coding in the project?
<dnhester26> yitzi: yeah, ok, I was just reading it to understand what the defpackage was doing in general. That was a different file from the one you sent me. thanks
dino_tutter has joined #commonlisp
Jach has quit [Ping timeout: 245 seconds]
rogersm has joined #commonlisp
yewscion has joined #commonlisp
<dnhester26> scymtym beach: ok thanks, so read both the docs of eclector the the code to understand what a protocol is and how to break up the code in modules. CLOS and CLOS Protocol: read the CLIM II specification for the docs or the code?
<dnhester26> yitzi: ok thanks
<dnhester26> so there is no way in common lisp unless we modify somehow how we program to avoid writing a build file?
beach` has joined #commonlisp
<scymtym> dnhester26: the CLIM II specification doesn't have any code besides examples. i just describes how a CLIM implementation is supposed to work and be used. the described functionality is broken down into named protocols like here: http://bauhh.dyndns.org:8000/clim-spec/8.html#_294
<ixelp> CLIM 2 Specification — 8 Sheet Protocols
<scymtym> *it just describes
<dnhester26> scymtym: thanks. so reading that document is the task
beach has quit [Ping timeout: 255 seconds]
rogersm has quit [Remote host closed the connection]
rogersm has joined #commonlisp
Jach has joined #commonlisp
yewscion has quit [Remote host closed the connection]
yewscion has joined #commonlisp
rogersm has quit [Ping timeout: 260 seconds]
beach` is now known as beach
<beach> dnhester26: Mainly from reading the specification.
Aesth has quit [Read error: Connection reset by peer]
<dnhester26> beach: by the specification you mean that CLIM II document you sent?
yewscion has quit [Remote host closed the connection]
yewscion has joined #commonlisp
<beach> Yes.
<beach> In particular, I learned from it that slots are implementation details and that classes are defined by a name, the initargs, and the functions that can take its instances as arguments.
<dnhester26> thanks
<beach> That way, whether some datum is stored in a slot or computed, is of no importance to client code, and the module can change between the two without informing the client.
<dnhester26> what do you mean by slots are implementation details?
<beach> An "implementation detail" is something that is private to a module and not part of the protocol.
skyl4rk has joined #commonlisp
<beach> So, for example, if you have a class PERSON, you may have two functions DATE-OF-BIRTH and AGE, but you have no business knowing whether one of them is computed, nor which one in that case.
<dnhester26> oh wow, even public fields in say another language, here in CL we are saying there's really no such thing? it's only relevant to export a function from a class for accessing and setting the slots
<dnhester26> got it
lispmacs[work] has quit [Remote host closed the connection]
<dnhester26> interesting. i guess in java the practice was to make getters and setters instead of public fields, which seemed to accomplish the same thing, but it basically allows for changing the internal representation of the data as long as the public function interfaces stay the same, so here too
<dnhester26> interesting
NicknameJohn has quit [Ping timeout: 240 seconds]
<beach> Yes, but we don't call them SET-* and GET-*, and they don't have to access a slot.
<beach> For example, if a PERSON has an ADDRESS, you might have a function named ADDRESS that takes a PERSON object, and a function named (SETF ADDRESS) that updates the address. The latter would be used with SETF like: (SETF (ADDRESS JANE) <new-address>)
<beach> And since packages are all about symbols, both those functions can be used by client code if the symbol ADDRESS is exported.
<beach> But whether the address is stored in a slot of the PERSON object or in a hash table, or somewhere else, is irrelevant to client code.
<aeth> yes, set-foo is (SETF FOO), get-foo is FOO, and the API is ideally the same except the SETF function (it doesn't have to be a function, though, since you can define your own in one of 3 ways) just takes in one extra argument, but the syntax of calling a SETF function puts that later
<beach> And I have the impression that get-foo and set-foo are used only to access fields, in which case it is again blatantly obvious what is stored in a field and what is not.
<beach> Otherwise, all Java functions would have one of the two prefixes.
<aeth> Since there's no separate dot notation, either, the syntax is entirely uniform and (foo bar) and (setf (foo bar) 42) could be anything.
<reb> Regarding the uniform access principle page wikipedia page. It's sad there's no Eiffel example. With Eiffel foo.bar can either mean "access the bar field of object foo" or "call the bar method of object foo", which allows refactoring fields into zero-parameter methods and vice versa.
<aeth> You can even obscure the constructor with MAKE-FOO in which case it's not clear to the user any implementation details at all
<aeth> reb: You can fix it!
<beach> reb: But Common Lisp is even better, because slot accessors are just functions that can be mapped over stuff like lists.
traidare has joined #commonlisp
<beach> reb: That's why initial attempts at Common Lisp object systems were rejected, because they had a different syntax for slot access.
<beach> And as a bonus, with CLOS we get multiple dispatch.
<reb> The only thing I really miss about Eiffel is design by contract.
rogersm has joined #commonlisp
<aeth> Seems to be an issue with the Wikipedia article that it's missing Eiffel and CLOS examples.
rogersm has quit [Ping timeout: 252 seconds]
mrcom has quit [Remote host closed the connection]
mrcom has joined #commonlisp
Krystof has quit [Ping timeout: 246 seconds]
dnhester26 has quit [Read error: Connection reset by peer]
unl0ckd has quit [Ping timeout: 268 seconds]
unl0ckd has joined #commonlisp
yewscion has quit [Remote host closed the connection]
yewscion has joined #commonlisp
rogersm has joined #commonlisp
rogersm has quit [Ping timeout: 246 seconds]
rogersm has joined #commonlisp
rogersm has quit [Remote host closed the connection]
random-jellyfish has joined #commonlisp
random-jellyfish has quit [Changing host]
random-jellyfish has joined #commonlisp
rogersm has joined #commonlisp
dnhester26 has joined #commonlisp
rogersm has quit [Remote host closed the connection]
mgl has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
unl0ckd has quit [Ping timeout: 268 seconds]
<dnhester26> beach: aeth: thanks for your explanations. sorry for the late reply, I had to jump to a meeting
<beach> Sure, hope it made things a bit more clear.
yewscion_ has joined #commonlisp
kevingal has joined #commonlisp
mgl has quit [Ping timeout: 252 seconds]
yewscion has quit [Ping timeout: 260 seconds]
Demosthenex has quit [Ping timeout: 252 seconds]
Pixel_Outlaw has joined #commonlisp
Demosthenex has joined #commonlisp
rogersm has joined #commonlisp
unl0ckd has joined #commonlisp
wheatengineer has quit [Quit: Leaving]
rogersm has quit [Ping timeout: 256 seconds]
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
tyson2 has joined #commonlisp
random-jellyfish has quit [Remote host closed the connection]
_cymew_ has joined #commonlisp
Colleen has quit [Quit: Colleen]
Colleen has joined #commonlisp
random-jellyfish has joined #commonlisp
random-jellyfish has quit [Changing host]
random-jellyfish has joined #commonlisp
NicknameJohn has joined #commonlisp
unl0ckd has quit [Ping timeout: 268 seconds]
dnhester26 has quit [Remote host closed the connection]
mgl has joined #commonlisp
kenanb has quit [Read error: Connection reset by peer]
kenanb has joined #commonlisp
rtypo has joined #commonlisp
Lycurgus has quit [Quit: leaving]
tyson2 has quit [Remote host closed the connection]
reb has quit [Remote host closed the connection]
yewscion_ has quit [Ping timeout: 245 seconds]
yewscion_ has joined #commonlisp
dnhester26 has joined #commonlisp
<yottabyte> in my function I see an underline in emacs saying undefined variable and undefined function in my package, but they're not, indeed the function works as expected. it seems like it's just lost or not keeping track of things correctly. has anyone experienced this before?
<yottabyte> oh, I just compiled it and now the lines went away
mgl has quit [Ping timeout: 256 seconds]
chomwitt has joined #commonlisp
dajole has joined #commonlisp
jonatack has quit [Quit: WeeChat 4.1.2]
attila_lendvai has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
unl0ckd has joined #commonlisp
Aesth has joined #commonlisp
mgl has joined #commonlisp
<bike> yeah it just keeps those from previous compilations.
tibfulv has quit [Remote host closed the connection]
<pfdietz> Something like design by contract should be achievable with method combination.   For example, preconditions/postconditions/invariants in :around methods.
tibfulv has joined #commonlisp
zxcvz has joined #commonlisp
<aeth> preconditions can be enforced entirely by the type system if you force type checking (which sadly needs to be done via the MOP) because e.g. SATISFIES types
zxcvz has quit [Client Quit]
<aeth> or at least, around anything contained by an object
tiskaan has quit [Ping timeout: 268 seconds]
<aeth> that gets rid of 90% of the :before or :around methods you'd want, for constructors and accessors
pfdietz has quit [Quit: Client closed]
igemnace has quit [Quit: WeeChat 4.1.2]
pfdietz has joined #commonlisp
cage has joined #commonlisp
kevingal has quit [Ping timeout: 245 seconds]
varjagg has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
Perflosopher has joined #commonlisp
kurfen has quit [Ping timeout: 260 seconds]
tiskaan has joined #commonlisp
unl0ckd has quit [Ping timeout: 268 seconds]
kurfen has joined #commonlisp
tiskaan has quit [Ping timeout: 245 seconds]
_cymew_ has quit [Ping timeout: 264 seconds]
kenanb has quit [Remote host closed the connection]
kevingal has joined #commonlisp
rogersm has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 29.1]
zaymington has quit [Remote host closed the connection]
zaymington has joined #commonlisp
bilegeek has joined #commonlisp
yewscion_ has quit [Remote host closed the connection]
tiskaan has joined #commonlisp
yewscion_ has joined #commonlisp
_cymew_ has joined #commonlisp
yitzi has quit [Remote host closed the connection]
rogersm has quit [Quit: Leaving...]
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
Kyuvi has joined #commonlisp
lispmacs[work] has joined #commonlisp
<lispmacs[work]> hi, for various nefarious calculation purposes, I was wanting to get the J2000 epoch in universal time. But am a little unclear how I should go about this
<lispmacs[work]> WP lists the the J2000 epoch in UTC time
NicknameJohn has quit [Ping timeout: 260 seconds]
<lispmacs[work]> Does CL have a way to convert a UTC datetime to UT?
<Fade> not built in.
ym has quit [Ping timeout: 252 seconds]
<Fade> there are several date libraries
<ixelp> GitHub - CodyReichert/awesome-cl: A curated list of awesome Common Lisp frameworks, libraries and other shiny stuff.
<lispmacs[work]> I'm using local-time library, but I need to get J2000 converted to UT first to work with it
<Fade> I don't know the details of this conversion
_cymew_ has quit [Ping timeout: 260 seconds]
<lispmacs[work]> okay, thanks. I'm thinking the #astronomy folks might be able to help me out with that
<Fade> the relation between time and astronomical relations is a little loose. the astronomy crowd would likely be the way. :)
yewscion_ has quit [Ping timeout: 268 seconds]
Aesth has quit [Read error: Connection reset by peer]
tiskaan has quit [Ping timeout: 268 seconds]
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
traidare has quit [Ping timeout: 260 seconds]
cosimone has joined #commonlisp
kevingal has quit [Remote host closed the connection]
attila_lendvai has quit [Ping timeout: 268 seconds]
NicknameJohn has joined #commonlisp
mgl has quit [Ping timeout: 268 seconds]
pfdietz has quit [Quit: Client closed]
<edgar-rft> lispmacs[work]: do you want Common Lisp's universal-time or astronomical universal-time? For the year 2000 this makes a difference of 22 leap seconds.
<lispmacs[work]> sorry, have to rush away from keyboard, boss calls
<edgar-rft> no worries, I'm still here for a while...
jonatack has joined #commonlisp
elderK has joined #commonlisp
khrbtxyz has quit [Ping timeout: 260 seconds]
khrbtxyz has joined #commonlisp
pve has quit [Quit: leaving]
Spawns_Carpeting has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
skyl4rk has quit [Ping timeout: 256 seconds]
a51 has quit [Quit: WeeChat 4.1.2]
Spawns_Carpeting has joined #commonlisp
a51 has joined #commonlisp
Jach has quit [Ping timeout: 245 seconds]
amb007 has quit [Ping timeout: 246 seconds]
dra has joined #commonlisp
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
Lord_Nightmare has joined #commonlisp
chomwitt has quit [Ping timeout: 268 seconds]
donleo has quit [Quit: Leaving]
yitzi has joined #commonlisp
Jach has joined #commonlisp
tiskaan has joined #commonlisp