libera/#commonlisp - IRC Chatlog
Search
17:45:53
jeosol
In the abbreviation of different CL implementations, is SCL an abbreviation for Scieneer CL?
19:20:41
McParen
Hello, normally I can refer from package a to symbols in package b like b:bar, and to a:foo from b. But it doesnt seem to be possible to do that when I want to use local nicknames. You basically can not have a local nickname in A to package B if B is defined after A.
19:21:05
McParen
this seems weird, because you cant do with local nicknames what you can do with full package names.
19:24:14
Bike
you can't put it in the defpackage form, but you can add local nicknames after the fact
19:30:12
McParen
okay, that seems to be the solution to my problem, but that means that the defpackage interface is kind of useless. i've never used that till today, and in my absolutely firt use i immediately reach its limits.
19:30:53
McParen
I cant imagine how they agreed upon that interface if you cant use it in its most basic use case.
19:36:50
McParen
the "new" local nicknames interface in defpackage is useless if you cant actually use it in a very basic case.
19:39:28
Bike
the obvious (to me, anyway) would be to make local nicknames resolve to a package _name_ instead of a package itself, but that would be more complicated in a couple ways
19:41:28
yitzi
McParen: Here is an actual usage of local-nicknames that isn't just a "I don't wanna type a long name" usage. https://github.com/yitzchak/Inravina/blob/cd97004f49057d5fbc5745a09e28427e8f7b5524/code/packages.lisp#L18
19:42:20
yitzi
Aside from that, I wish I understood why people care about it...but that is just my opinion.
19:43:14
McParen
I've come to like not :use-ing packages, but refering to symbols with package prefixes, and for that, they need to be short.
19:46:18
yitzi
But, I don't see why you care about the length of the package names. I mean, there are some ridiculously long package names out there, but most are pretty reasonable. What is too long for you? ... Just curious.
19:47:23
Bike
a problem with USEing packages is that as soon as one of them adds or removes external symbols it can cause surprising and possibly silent conflicts. using package local nicknames lets you avoid that.
19:47:34
McParen
the reason i can tell is that once people :use a package, you cant add more symbols to the package and then you have to make up something like alexandria+.
19:49:17
masinter
I thought packages might be like XML namespaces (or the other way around), but use a URL a the "true name" of the package, with local short prefixes
19:50:27
McParen
yitzi: I dont know, a package name should not be longer that the symbol, i guess, that seems to be a matter of aesthetics. I seems "wrong" to deal with foo-bar-baz:a.
19:52:21
McParen
in python they shorten even shorten short names like numpy in code, you regularly see np.this np.that.
19:52:29
yitzi
McParen: That isn't bad logic, but you are right it is aesthetics. My argument against LPN's is that aliasing a = alexandria makes the code a lot less readable.
19:53:52
McParen
yitzi, this is right, but when you have 5 times the name alexandria in a 10-lines function, that creates a kind of annoying noise.
19:54:40
McParen
I do not want some name, that does absolutely add no functionality, to be repeated over and over and over a function.
19:57:16
contrapunctus
2. Using PLNs means freedom from switching to the `defpackage` and fiddling with the `:import-from` each time you need a new symbol and each time you're no longer using a symbol.
19:58:10
McParen
Even outside programming languages, you do not want to repeat long, multi-syllable names like Joseph, Gabriel, etc, so people make up Gabe, Joe, etc, to avoid going mad.
20:04:22
McParen
I mentioned that earlier because I thought this was a thing, and that thing is not compatible with local nicknames if you refer from A to B and from B to A.
20:06:58
contrapunctus
Recursive dependencies between packages might be a sign of code requiring restructuring...I've managed to avoid them in my CL projects so far, but perhaps that's due to inexperience 😀
20:09:17
Bike
i have also wanted mutual PLNs in the past, which is why i've thought about this stuff. it's not that weird, it just means you have subsystems using each other's APIs
20:15:29
McParen
contrapunctus, that might be correct, but what irks me is that this is not a problem with packages, but just with local nicknames. I dont know about the internals, but it seems weird that people who worked on this api for years let such a "obvious" flaw sli through.
20:16:28
McParen
maybe it was not possible any other way, i dont know. but as I said, today was actually the first time i used PLNs, and i immediately stumbled upon the bug.
20:18:14
McParen
like in: "ok, lets try using local nicknames for a change. *googles sbcl manual* *copy pasta* oh, it doesnt work."
20:25:51
pjb
On the other hand, a function foo remains a function foo, whatever the package she's implemented in.
20:26:29
pjb
alexandria:foo or com.informatimago.common-lisp.cesarum.foos:foo should do the same thing. So using the package and calling (foo …) should be a no-brainer.
20:47:08
jeosol
jcowan Bike: Thanks for your response regarding the Scieneer CL abbreviation. I don't recall seeing any SCL lisp but thought Scieneer CL is abbreviated that way.
22:33:46
brandflake11
Hello, does anyone know of a way, or a package, to get a file's last modified date in common lisp?
22:34:13
brandflake11
Right now, my program is using inferior shell with date -r, but I figured there may be a faster solution
23:46:14
aeth
not actually checking type unless the right implementation/optimization combination is present is so weird
23:46:33
aeth
another thing that's common is not exporting class/type names so you have to check-type on foo::bar
1:40:04
mathrick
Bike: huh! New development. I was looking at the SBCL manual to see if it would help me make sense of of the LDB backtrace, and it mentioned looking at all threads, which I did, and there was a surprising number of them. So I went and disabled loading Verbose, which spawns background threads, and sure enough, the crash is gone
1:40:31
mathrick
I still have no idea why it somehow persists between runs, but at least that's a clue
1:41:38
mathrick
the test code that's crashing isn't even using Verbose for anything, so merely loading it is enough to mess with things