freenode/#lisp - IRC Chatlog
Search
18:54:18
Xach
You can do as alexandria did and version your names, and for a given version, the set of external symbols is fixed.
18:55:31
Xach
Joe Marshall wrote a thing about never ever putting package prefixes in code and that was kind of interesting
18:58:09
Xach
the thing I was thinking of is using a package prefix for a versioned package with a "nice" local name
18:59:09
_death
personally I :use only cl or packages I control.. for the rest I :import-from.. if the symbols are generic, I tend to :import-from with no symbols (so that it depends on the library; package-inferred-systems) and use the FQLN
18:59:38
Shinmera
Xach: while using versions in packages is great in concept, in practise asdf can't deal with it at all so it would be a kludge at best.
19:01:05
Xach
Shinmera: ??? it's nothing to do with asdf and all about the interfaces supported by a project. the project offers multiple versions of the external symbols.
19:01:33
Shinmera
yes, but you won't be able to load the same project at different versions, so what's the poitn?
19:02:57
Shinmera
Because it should be the job of the build system to determine the versions required and only load those.
19:03:35
jackdaniel
*that* would be impractical, because two different libraries may depend on different versions
19:03:48
Xach
I don't think alexandria should provide every version, but as a mechanism to ease the transition from one version to another (at possibly multiple levels of supporting older interfaces) I think it is practical.
19:04:24
Xach
If versions are additive, especially, a v2 package with a few more symbols is not, I think burdensome.
19:05:27
jackdaniel
Shinmera: having build system determine versions -- you could have two incompatible versions as dependencies of different libraries, and without global environments you wouldn't be able to depend on both
19:05:51
jackdaniel
having different packages for different sets of exported symb0ols makes more sense
19:06:11
Shinmera
I'm saying package versioning is a good idea /if/ the build system can determine which of those versioned packages to provide.
19:06:39
jmercouris
people like to imagine that such functionality would be super useful, and it really wouldn't be
19:07:03
jmercouris
I'm not saying that, I'm just saying that your versions should be backwards compatible
19:07:16
jackdaniel
Shinmera: if library provides mutliple packages with different sets of symbols it makes sense and it is already solved then, do I misunderstand what you are picking at then?
19:08:38
jackdaniel
and if there are multiple packages, then depending on alexandria is good enough and I don't see a purpose of special handling by a build system
19:09:07
Shinmera
jackdaniel: I'd like to be able to publish a library at version 1 and 2, and have those versions in the package name. Each release ships one of those versions. Now the build system should determine which of those to load (or both) as needed, and people can then safely rely on their versioned package always being available.
19:09:38
Shinmera
currently I would have to roll my own version management system because ASDF cannot do it.
19:10:37
jackdaniel
so you suggest essentially loading two different systems (potentialy with the same name), so you have a version-per-system?
19:11:50
jackdaniel
OK, now I understand you better and it makes sense (however I think that having multiple packages for single project is better, having incompatible versions of the system (imo) would justify naming it differently)
19:12:32
jackdaniel
you may only specify, that version older than "FOO" is not good enough, and asdf will refuse to load your system
19:12:59
Shinmera
you can't even have multiple versions of the same system in your asdf system registry.
19:13:47
jmercouris
I agree that should your API change significantly enough, perhaps a new packkage name is in order
19:14:46
jackdaniel
the discussion is about multiple-packages-in-single-system vs different-packages-in-different-system-versions
19:15:52
jackdaniel
asdf is a) constrained with backward-compatibility, b) nightmare to work with due to non-obvious class hierachies and gf specializations
19:18:02
_death
even if this feature is desired, this macro just translates defun/defgeneric to defun*/defgeneric*
19:20:41
_death
jackdaniel: I'm not sure why it wasn't the first idea popped.. maybe there's a reason that I'm not aware?
19:22:52
jackdaniel
I would be fine with uiop if it weren't such a pita to deal with (independent from asdf my ass; as preloaded system it is hard to deal with - you must acquire newer version manually)
19:24:36
jackdaniel
well, I'm actively opposing propositions to put uiop in dependencies for systems I maintain
19:27:35
_death
one issue about versions in package names is that you need to inform the user when the version is "finalized", i.e. when the set of names will no longer change
19:29:09
_death
maybe it could be something like alexandria.2020.. so users should not use it before 2020
19:43:23
_death
names are only one facet of the versioning problem.. I don't know that there exists a satisfactory solution, other than designing perfect software..
19:45:06
_death
and why does alexandria have to grow new functionality? put things in your personal library.. but alexandria could definitely be improved in what it already does
19:47:23
pfdietz
The reason to stick things in a de facto standardized library is to enable others to more easily understand your code.
19:54:34
_death
pfdietz: ok, but how do good standards come about? I think the way is you have a bunch of approaches and then one prevails and becomes a defacto standard.. CL got lucky with innovation (when they unified a bunch of things)
19:55:52
pfdietz
The benefit arises regardless of how the standardization comes about, so that's a separate issue.
20:05:03
_death
pfdietz: maybe for understanding a good specification/manual is more useful for understanding
20:05:35
phoe
_death: yet another solution for CLtL4 would be to deprecate :USE in DEFPACKAGE now that PLNs are ubiquitous
20:05:54
_death
jackdaniel: well, here I'm talking about a CDR for a new version of a library, not an implementation
20:06:45
_death
jackdaniel: it could in principle have different implementations, but you don't need to convince multiple vendors, just the authors of the single library
20:07:21
galdor
Xach: the whole :use thing feels silly to me, it's a death sentence if libraries cannot be extended because they might break someone
20:08:17
galdor
I do not like :use anyway, I wish the standard could be updated so that package local nicknames become universal
20:08:18
_death
phoe: personally I've no experience with PLNs, and I'm not sure about others.. also I remember criticizing it on theoretical grounds..
20:08:55
phoe
galdor: they are universal enough already. From the alive FLOSS implementations, only CLISP needs to implement them, and someday I may do that myself.
20:09:39
phoe
_death: I know a few lispers who are using them commonly now that they are available mostly everywhere
20:09:51
jackdaniel
one could argue, that packages are not very flexible and all that use pln and stuff are just workaround over their quirks
20:16:25
jackdaniel
ACTION wishes jmercouris enlightenment to understand, in a meantime he goes to rest
20:17:01
phoe
pjb: that chapter is funny, it is named System Construction but it doesn't define what a system is or how to construct it
20:17:16
jmercouris
I assume that UIOP cannot be loaded as a normal system since ASDF needs it to load systems
20:18:44
jmercouris
I don't kknow if that is good, but I'm not particularly interested in cl systems as a computer scientist
20:21:04
_death
phoe: is this the spec for PLN? https://github.com/3b/package-local-nicknames/blob/master/docs.org
20:22:46
_death
phoe: I suppose sbcl's manual can serve as a useful document on how to start using them
20:23:25
jackdaniel
jmercouris: plesae do not confuse concepts. they are called package-inferred-systems
20:24:18
copec
jmercouris: https://davazp.net/2014/11/26/modern-library-with-asdf-and-package-inferred-system.html
20:24:19
_death
so that's a good candidate for a CDR, and it will be a success - vendors already adopted it :)
20:25:17
jackdaniel
jmercouris: one strategy to deal with inner confusion is not to make statements to avoid risk of sarcasm ,-)
20:25:48
jmercouris
every truck driver from my village knows how to make 'clever' sarcastic comments
20:26:09
jackdaniel
but you may be worried with spreading misinformation due to lack of knowledge (or confusion)
20:27:30
copec
Is there any sort of a shim library/de-facto-standard in between loading packages and build systems?
20:32:54
jackdaniel
I suspect taht some pre-common-lisp implementations could have defsystem builtin
20:33:12
_death
asdf used to be a simple, portable library that solved deficiencies in previous solutions
20:33:20
jackdaniel
it is a de facto standard because almost all libraries 2000+ use asdf to define their systems
20:34:12
phoe
_death: now it is a complex, somehow portable library that has invented its own deficiencies to make up for all the deficiencies of older systems that got forgotten
20:34:31
jmercouris
jackdaniel: well yeah, that which is used extensively is be definition a de-facto standard, my question is *why* is it a de-facto standard? why was it so heavily adopted?
20:35:12
jmercouris
_death: can you name some things it grew which in your opinion were not necessary?
20:37:00
jmercouris
_death: given your power of hindsight, which features are, in your opinion, a bad idea
20:37:42
copec
It seems to have been the first defsystem tool that solved most of the major problems and was usable
20:38:26
jackdaniel
since many people do uneducated decisions mere veolcity gives you a big bonus for popularity
20:38:37
jmercouris
I'm just wondering if some other tool could usurp ASDF by perhaps providing compatibility but with a new codebase
20:39:15
phoe
or rather, without something that will abstract away some of the filesystem and OS details
20:39:19
_death
jmercouris: personally I'm avoiding complex use of asdf, so I don't have much trouble with it.. when it annoys me, it's small things
20:39:26
|3b|
_death: sbcl package-local-nicknames was based on my spec, but i'd say sbcl's docs/implementation is the current 'official' definition
20:40:15
_death
jmercouris: but I remember reading the old asdf and feeling that I understand most of it.. nowadays I wouldn't bother reading asdf to understand it, just the parts I need to understand
20:40:28
jmercouris
my biggest complaint with ASDF is the M-. we had talked about, and the very cryptic error messages when things don't load
20:41:47
jmercouris
I'm not incapable of humor, I just don't see how that would be funny in any circumstance
20:42:10
jmercouris
still, I've never laughed at reading the draft of an essay 'lol! this document in progress!'
20:42:13
mfiano
The biggest issue with a CL build system is in a modern internet-connected age, is no missing feature of ASDF - it's packages loaded into a flat, global namespace. RENAME-PACKAGE hacks can only get you so far. If we ever moved beyond Quicklisp to support features such as multiple versioned transitive dependencies, maybe even some files LOAD'ed at runtime, we have some issues that can only really be
20:42:15
mfiano
solved by another convention like PLN that needs to be widely adopted by implementors.
20:42:19
_death
jmercouris: yes, dbus uses package-inferred-systems... I think that's a good feature of asdf for many kinds of projects
20:43:17
jmercouris
_death: why do you think so? I was under the exact opposite feeling, I would be interested in your rationale
20:43:18
jackdaniel
mfiano: beach wrote a specification for global environments which may be different for different code
20:43:47
jackdaniel
I find it very appealing from the perspective of creating multi-versioned systems in a single image
20:45:25
mfiano
jmercouris: Not every implementation ever will. Some are abandoned, or aren't even conformant yet (GCL)
20:45:55
|3b|
and lower memory usage/executable size still matters for some things, also possibly supports some more platforms than the others
20:47:21
phoe
see your favorite modern Intel CPU for an example of hardware that runs minix by default
20:49:13
jmercouris
every CL has some unique feature and reason for existing, in my opinion, the ones for CLISP are not there
20:49:42
|3b|
jmercouris: regarding humor of that pln spec, if nothing else, the ratio of "how should this work" to "it should work this way" is amusingly high now that i look at it again :p
20:50:25
mfiano
CLISP supports arbitrary floating point reprentations. You can calculate pi to the Nth digit if you want just by printing PI with some arbitrary precision. It also has very nice memory profiling support for #'room, and a bunch of other niceties.
20:51:03
phoe
what the fuck, seriously, today I learn that software needs to be justified in order to exist
20:51:04
Xach
jmercouris: things exist because people who want to work on it continue to work on it, and effort and enthusiasm go a long way (and are not easily conjured up or transferred around)
20:51:25
_death
jmercouris: basically each file defines its own package, so you don't feel like you may be stepping on some other module's toes when defining names.. with principled use of :use and :import-from you know exactly the symbols available.. you export just the names you want to export, and it's easy to import them in another file.. factoring a project to use package-inferred-systems sometimes leads you to discover issues of modularity, e.g.,
20:51:26
_death
you didn't expect this piece of code to use that functionality from the other piece of code, but it happened because it's too convenient when they define symbols in the same package.. also each file becomes a system you can load, and loads just the stuff it needs.. also, some modules may only use :cl and not import any other stuff.. those are now self-contained modules, where in ordinary use they would start with in-package and the
20:51:34
jackdaniel
I find it silly to think that worthwile endavours are directed by reasons for existing -- I wouldn't use CL if I weren't taking the fun factor into account :)
20:51:36
copec
clisp compiles on every architecture, it is in every netbsd pkgsrc tree, for instance
20:52:40
mfiano
Above all, it is a nice addition to CI for testing conformance for a particular project (or finding implementation bugs to report)
20:53:18
jmercouris
_death: I guess it could be a very effective way of debugging your own code :-D converting to them and back! I do find it however very unnatural, maybe if I give it a try for 3 months or something I would change my mind though, I have half a mind to try to do so after what you wrote
20:53:46
jmercouris
phoe: firstly, I think that is a bit too aggressive, secondly I did not say software needs justification to exist, I simply said that CLISP has no justification to exist
20:53:46
phoe
jackdaniel: I kinda agree, a surprising lot of free software exists because someone wanted to write it for no particular reason
20:54:42
phoe
jackdaniel: this, plus software that scratched someone's itch and then grew, plus some happy accidents, plus someone's personal frustrations
20:55:23
_death
jmercouris: it also makes it easier to thing about interfaces explicitly, since you have to decide what to export and from where
20:56:13
jmercouris
phoe: so what, why does that make you so angry? it is my belief that software *should* have a purpose for existing, even if that purpose is the amusement of the authors. When we are talking about CLISP as an implementation though, if it has no greater purpose beyond the author's amusement, why should the community care if it implements PLN or not?
20:56:47
jackdaniel
jmercouris: the one who is agitated is you. clisp has multiple unique featues, one is that it is the most portable
20:57:00
jmercouris
_death: CL has made me very lax with that regard, I used to consider that a lot more back in high school when programming in basic :-D
20:57:01
jackdaniel
second is that it is the only one I'm aware of which implements JIT (not ahead of time compilation)
20:57:49
_death
I think clisp is a cool implementation.. it has a good manual, quite portable, the code is not hard to understand.. was the first implementation I used
20:57:52
jackdaniel
note that you've brought the topic that "you don't understand why people do use clisp"
20:58:33
phoe
it's trivial to neglect the upsides of any piece of software and, from that point on, proceed about how it has no right to exist
20:59:36
phoe
I could do a low kick and start rambling about how nextbrowser is pointless purely for the purpose of demonstrating what I just said, but that's as pointless as rambling about clisp
21:00:10
jmercouris
phoe: well, saying you could do a low kick and then not doing it is effectively the same thing :-D
3:17:49
joinr
Is it expected behavior that using varargs within a recursive labels form will cause an infinite loop?
3:18:03
joinr
(defun f (&rest args) (LABELS ((aux (X &REST XS) (PROGN (IF (not (null xs)) (PROGN (PPRINT X) (aux (FIRST XS) (rest XS))))))) (apply #'aux args)))
3:19:24
joinr
expectation is that the null condition will be met eventually and computation stops. Instead, you get Nil printing out
3:21:21
joinr
this is a small reproducible case for a larger metprogramming deal. I thought labels would work fine (and it does) seemingly as long as you don't go into &rest arg territory and try to apply.
3:23:32
no-defun-allowed
I'm not sure if you intend for this to happen, but (f 0) will print nothing.
3:24:28
joinr
the non-terminating phenomena was what got me. totally forgot I'd have to apply on recurse.
3:34:24
lottaquestions
Hi all, is there a way of listing all the global variables in a running instance in slime?
3:38:21
Bike
technically there could also be variables named by inaccessible symbols, but that doesn't happen much
3:39:41
no-defun-allowed
(do-symbols (s) (when (and (boundp s) (eql (symbol-package s) package)) (print s))) will print all the symbols that are bound in the current package, which isn't all of them, but might be what you want.
6:24:07
beach
jackdaniel: Thanks for the link to Graham's article. He seems to put his finger on something important.