pillton has quit [Remote host closed the connection]
pillton has joined #commonlisp
pillton has quit [Client Quit]
pillton has joined #commonlisp
attila_lendvai has quit [Quit: Leaving]
attila_lendvai has joined #commonlisp
rogersm_ has quit [Read error: Connection reset by peer]
rogersm has joined #commonlisp
horar has quit [Quit: Client closed]
waleee has joined #commonlisp
attila_lendvai has quit [Ping timeout: 264 seconds]
Devon has quit [Ping timeout: 260 seconds]
peterhil has quit [Quit: Must not waste too much time here...]
waleee has quit [Quit: WeeChat 3.3]
mrcom_ has joined #commonlisp
Bike has quit [Quit: Connection closed]
defaultxr has quit [Quit: bbiab]
<jcowan>
hayley: Does cl-ppcre use Thompson's algo at all?
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
ArgoLargo[m] has left #commonlisp [#commonlisp]
Bike has joined #commonlisp
<hayley>
I believe it only produces a chain of closures, and it definitely does not correspond to a DFA, but I don't know if the closures correspond to a NFA or just the structure of the RE.
<hayley>
To the best of my knowledge, PCRE2 and the Rust regex library use NFAs and thus probably Thompson (though the latter tries to use a DFA simulator when no ε transitions were encountered). o-m-r-n uses Brzozowski/Owens et al derivatives with a still unpublished technique for submatching by Gilbert Baumann.
<Bike>
is o-m-r-n your code
<hayley>
Yes.
epolanski has quit [Quit: Connection closed for inactivity]
<Bike>
very cool
<hayley>
:)
<Bike>
i'm surprised libc is still so bad after that regexes are fast article
<Bike>
i guess they just don't worry about throughput much
<Bike>
and also have to do backtracking or whatever
<hayley>
For what it's worth, glibc is also broken, as (a|aa)* should produce the same matches, but it does not.
<Bike>
i wonder why rust goes to pot like that
<hayley>
But I think submatching throws a spanner into the works of most engines, too. For example, the Rust regex library only requires backtracking for submatches apparently.
<hayley>
I suspect it overflows some kind of cache at that size, as there is at least a cache for lazily generating a NFA from a regular expression, but I don't know what it would be.
<hayley>
Note that cl-ppcre and PCRE2 without JIT blow the stack, and PCRE2 with JIT aborts for some other reason.
kakuhen has joined #commonlisp
dec0d3r has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 264 seconds]
domovod has joined #commonlisp
dec0d3r has quit [Remote host closed the connection]
Spawns_Carpet has quit [Quit: WeeChat 3.3]
euandreh has quit [Ping timeout: 264 seconds]
domovod has quit [Ping timeout: 260 seconds]
domovod has joined #commonlisp
Oladon has quit [Quit: Leaving.]
Oladon has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
<hayley>
Right, they don't need to. But practically, short of Laurikari's approach (which Gilbert says is wrong on (a|aa)*, hence the test), implementations backtrack or use NFAs.
<jcowan>
you should probably test against re2, which has 3 different NFAs
<jcowan>
for submatching
<Bike>
one possibly irrelevant feature i wonder about is externalization. When you write literal regexes with cl-ppcre it uses load-time-value to compile them at load time, but if your re engine actually generates lisp code you could just compile it in ahead of time with everything else
<Bike>
toplevels stuff might make it kind of annouying though
* jcowan
looooves Brzozowski derivatives
domovod has quit [Ping timeout: 260 seconds]
<hayley>
I use the LOAD-TIME-VALUE trick too.
<Bike>
i see this actually generates code, though not with an exported interface, so it could be set up without an enormous amount of difficulty i suppose
mrcom_ has quit [Read error: Connection reset by peer]
mrcom has quit [Read error: Connection reset by peer]
domovod has joined #commonlisp
<hayley>
It's probably possible, but L-T-V allows for caching compiled code, and having a separate compilation unit means the compiler won't choke too hard on user code and the regular expression (as it often does with moderately sized REs, sadly).
<Bike>
choke as in compilation takes a while?
<hayley>
Yes. And this is the Lisp compiler, rather.
<Bike>
right.
<Bike>
i've been low key wondering for a while if it would be practical to provide a compiler that translates the kind of tagbody heavy code this kind of thing often generates (dunno about this specifically though) without much complicated analysis to save time
<Bike>
prolly more effort than it's worth tho...
<hayley>
I think I know why - SBCL does type inference before copy propagation, and we really need copy propagation first (as derivatives and duplication create a lot of unnecessary variables). And I don't know how to write a copy propagation pass.
<hayley>
The only thing I can think of is that everything is a FIXNUM, and further type inference is going to be pointless.
<beach>
Good morning everyone!
<beach>
Congratulations hayley! Looks like great work!
<hayley>
Thanks!
<beach>
Definitely worth an ELS submission.
raeda has joined #commonlisp
<hayley>
Well, I have to convince gilberth to publish his DFA generation technique first.
<beach>
That would be preferable, but not a requirement.
<beach>
You can summarize his technique in the "previous work" section.
<beach>
And give him due credit of course.
<beach>
I see many papers with entries in the bibliography indicating "unpublished work" and even "private exchange".
<beach>
Though a footnote would be better adapted for that.
<hayley>
Sure, though I don't think my additions to the technique were too significant. I only added an optimisation to avoid duplicating variables in some obvious cases, and figured out how to remove some branches and register spills.
<beach>
Well, then, ask gilberth whether he wants to a co-author, and the paper can be mainly about the technique and somewhat about the implementation.
<beach>
We did this for the "stealth mixin" paper.
<hayley>
He worked out the derivatives of tagged regular expressions, and how to design "lexing" and "grepping" machines, which seem more fundamental.
<hayley>
Okay, I'll mention it to him.
<beach>
He is a co-author because he came up with the technique, but he wasn't interested in the paper writing and paper submission paraphernalia.
semz has quit [Ping timeout: 260 seconds]
mrcom_ has joined #commonlisp
<pillton>
beach: Do you still use the stealth mixin technique?
semz has joined #commonlisp
<beach>
Every day! :)
pranavats has left #commonlisp [#commonlisp]
s-liao has joined #commonlisp
mrcom_ has quit [Read error: Connection reset by peer]
<beach>
There are four occurrences in the SICL code.
s-liao has quit [Client Quit]
<hayley>
I found a use for stealth mixins in my compiler, though it is nothing beach hasn't seen before. I use a stealth mixin to annotate each state with an inferred "minimum match length", so that a large number of bounds checks can be safely elided.
<beach>
Nice!
<pillton>
Nice.
<pillton>
Have you read the "Layering" chapter in the Software Design for Flexibility book by Hanson and Sussman?
<pillton>
I'm trying to decide if it makes sense over mixins. I just read your stealth mixin paper.
<beach>
Not yet.
<beach>
pillton: You will be happy to know that the paper was published at an Australian conference! :)
<pillton>
Yeah I saw that.
<pillton>
14 years too late.. as usual.
<beach>
Heh.
<hayley>
I haven't read SDfF, but "layering" reminds me of a technique in Newspeak, where a module (which is represented as a class) inherits from another module, but changes some bindings (which are represented by methods) in order to extend the latter module. A friend emailed Gilad Bracha about stealth mixins, and Gilad said that stealth mixins would be quite simple to implement with this technique.
<hayley>
Could you summarise what "layering" means in that book?
<pillton>
Well, it allows a programmer to annotate values with other information e.g. a number could have a unit (e.g. metres) or an image could have a timestamp.
kakuhen has quit [Quit: Leaving...]
<beach>
hayley: Stealth mixins don't add any functionality that could be done with hash tables. It's just that they are more efficient.
<hayley>
Right and right.
<beach>
... so if "simple to implement" means using hash tables, then that's not an acceptable implementation, is what I mean.
Bike has quit [Quit: Connection closed]
<White_Flame>
pillton: and an annotated number could be used as a plain number in any interface?
<pillton>
White_Flame: Conceptually yes, but not in the book.
<hayley>
No, we would still add a proper mixin with proper slots to a class.
<beach>
OK.
<White_Flame>
I'll have to give it a peek at some point
lisp123 has quit [Remote host closed the connection]
<pillton>
The part I struggle with involve the operations involving these "layered datums". The layered procedure inspects all of the layers involved in the arguments and invokes layer specific operations after invoking the "base" operation.
<White_Flame>
annotated values are very interesting for compilers & heuristic feedback
<pillton>
For example, multiplying two values annotated with units would produce a new value annotated with the product of the unit information.
<hayley>
I haven't written much Newspeak (heard it was cool in 1984, but now it's 2021...), but we might write a silly module like 'class Module1 = (| "no module slots" |) ( public class A = (| |)() )' then extend it by 'class Module2 from: m = (| m = m. |) ( public class A = m (| annotation |) () )'
<pillton>
White_Flame: FYI The book is written in a scheme (though there a bits I can find no definition of e.g. bundle).
<pillton>
White_Flame: Sorry, the book illustrates its concepts using scheme.
<hayley>
The only semantic difference is that the mixin applies to a new class in a new module, rather than modifying the original module "in place", as the Common Lisp implementation does. But making an application use this new module, rather than the old module, is also not difficult; one simply provides a "global environment" with the new module rather than the old module.
<White_Flame>
pillton: as would be expected for sussman ;) (not familiar with hanson by name)
<hayley>
(There aren't really any global environments, but whatever approach that one uses to provide modules to an application looks like a "global environment" to me.)
<pillton>
hayley: Yeah.
<beach>
hayley: That doesn't sound like it would work the same way then.
<pillton>
The bit I struggle with is I have a lot use cases like (let ((Y (F A B))) ..) where you would like Y to link back to A and/or B but you would also like F to know about Y if it is given A and B again.
domovod has quit [Ping timeout: 260 seconds]
s-liao has joined #commonlisp
<hayley>
Yes, I've probably missed something in my description. There was a presentation where Gilad demonstrated modifying a parser to produce an AST, when the original parser was not configured to produce any useful sort of parse tree, and it looked like stealth mixins.
<hayley>
Somewhere around https://youtu.be/MHndm4BPRlY?t=1356 - though this demonstration doesn't rely on mixins, rather another wrapper object. But the general idea of "change a module by modifying a binding with some other stuff we want" is still there.
<jackdaniel>
jcowan: that's why I'vs used the word factually
<jackdaniel>
afair symbol macro was added to cl so there is no islisp feature missing in cl, but I may remember wrong
<jackdaniel>
and Kent Pitman I think wrote a summary with islisp operators and their one-on-one counterparts in cl
<beach>
hayley: I see. So the main point of stealth mixins is that, just as a library can put auxiliary methods on its base class to intercept operations on subclasses, steal mixin introduces even more basic classes, and forces the library class to be a subclass of those basic classes. Client code can then put auxiliary methods specialized to the even-more-basic class, like on INITIALIZE-INSTANCE, thereby intercepting the operations that t
<beach>
library functions themselves invoke.
<beach>
All this without changing a line of code in the library.
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
<hayley>
I see, yes.
cjb72647 has joined #commonlisp
cjb has quit [Ping timeout: 260 seconds]
cjb72647 has quit []
<aeth>
I can't imagine Common Lisp without symbol macros. I guess you could hardcode WITH-ACCESSORS in an implementation-specific way without relying on SYMBOL-MACROLET
<aeth>
but CL's flavor of OOP relies on this sort of behavior
Jing has joined #commonlisp
<Jing>
Hi, I'm relative new to CL. Is there any mailing lists that CL people tend to subscribe to?
Patternmaster has quit [*.net *.split]
lonjil has quit [*.net *.split]
d_run has quit [*.net *.split]
IUSR has quit [*.net *.split]
jsatk has quit [*.net *.split]
iisi has quit [*.net *.split]
hexology has quit [*.net *.split]
thonkpod has quit [*.net *.split]
fe[nl]ix has quit [*.net *.split]
jackdaniel has quit [*.net *.split]
energizer has quit [*.net *.split]
splittist has quit [*.net *.split]
srji has quit [*.net *.split]
mgxm has quit [*.net *.split]
jaimelm has quit [*.net *.split]
sterni has quit [*.net *.split]
Kabriel has quit [*.net *.split]
jackdaniel has joined #commonlisp
srji has joined #commonlisp
Patternmaster has joined #commonlisp
lonjil has joined #commonlisp
IUSR has joined #commonlisp
d_run has joined #commonlisp
jsatk has joined #commonlisp
thonkpod has joined #commonlisp
iisi has joined #commonlisp
splittist has joined #commonlisp
sterni has joined #commonlisp
thonkpod has quit [Changing host]
thonkpod has joined #commonlisp
mgxm has joined #commonlisp
<beach>
Jing: There is LispPro.
<beach>
Jing: But you are better off hanging out here.
hexology has joined #commonlisp
Kabriel has joined #commonlisp
fe[nl]ix has joined #commonlisp
pranavats has joined #commonlisp
energizer has joined #commonlisp
jaimelm has joined #commonlisp
loke[m] has quit [*.net *.split]
Mrtn[m] has quit [*.net *.split]
hugo has quit [*.net *.split]
gin has quit [*.net *.split]
cpape has quit [*.net *.split]
cpape has joined #commonlisp
gin has joined #commonlisp
gin has joined #commonlisp
gin has quit [Changing host]
mrcom has joined #commonlisp
hugo has joined #commonlisp
<Jing>
Thank you. I will stay here as well :)
mrcom has quit [Read error: Connection reset by peer]
<beach>
Great! What are you planning to do with Common Lisp?
loke[m] has joined #commonlisp
Mrtn[m] has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
<Jing>
Unsure. I read PCL some years ago and recently I'm using it to solve Advent of Code puzzles..
<beach>
That's a start I guess.
pranavats has left #commonlisp [#commonlisp]
<beach>
Feel free to ask questions. If your questions become numerous and truly basic, you may be redirected to #clschool. But #commonlisp is fairly tolerant as long as the questions are on topic.
rgherdt has joined #commonlisp
<Jing>
Thanks. Basically all the questions I have so far can be solved by searching online or reading documentations
<beach>
Wow, you are unusual! :) Not many people read documentation these days it seems.
mrcom has joined #commonlisp
<Jing>
I didn't know that... I find documentations usually helpful if written well
<beach>
I agree, but then, I am old school.
<beach>
I even *write* documentation from time to time. :)
asarch has joined #commonlisp
<Jing>
You are helping a lot of people :)
<beach>
Thank you!
ec has quit [Remote host closed the connection]
mrcom has quit [Read error: Connection reset by peer]
ec has joined #commonlisp
Oladon has quit [Quit: Leaving.]
mrcom has joined #commonlisp
bcasiello has quit [Ping timeout: 260 seconds]
karlosz has quit [Quit: karlosz]
karlosz has joined #commonlisp
Lycurgus has joined #commonlisp
pranavats has joined #commonlisp
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
jackdaniel has quit [Changing host]
jackdaniel has joined #commonlisp
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
<jackdaniel>
beach: isn't this an availability bias? people who read documentation probably rarer ask on irc, so we see more often people who don't
<beach>
Entirely possible.
pve has joined #commonlisp
Inline has joined #commonlisp
Lycurgus has quit [Quit: Exeunt]
gaqwas has joined #commonlisp
s-liao has quit [Quit: Client closed]
domovod has joined #commonlisp
hendursa1 has joined #commonlisp
karlosz has quit [Quit: karlosz]
hendursaga has quit [Ping timeout: 276 seconds]
<pve>
Hi, is the stealth mixin paper available somewhere?
<pve>
(that doesn't require an account)
<beach>
Only illegally for free I think.
<pve>
oh
<pve>
shame
<beach>
Yeah.
<beach>
I don't even have a copy myself.
<pve>
I would have liked to see what it's all about
<beach>
There are plenty of sites that have it I think, if you are willing to do the illegal stuff.
<beach>
I don't encourage illegal activities, but then many publishers behave like crooks, and this one is not an exception.
<hayley>
The problem with pirating computer science papers is that you need to be stealthy to not get caught, and you only get stealth mixins after the act...
<beach>
Heh.
<pve>
beach: Alright, I think I get the picture, thanks.
<Jing>
Maybe just email the author to ask for a (legal) copy...
<beach>
That would be me, and I don't have one.
<jackdaniel>
I'm afraid that author expressed that they don't have the paper :)
Inline has joined #commonlisp
<beach>
Maybe Hamer has one. I believe he is in Glasgow now.
<jackdaniel>
that said, downloading a is not illegal (distributing it is)
<jackdaniel>
s/a/a paper/
<jackdaniel>
well, that depends on the country I suppose (I've just skimmed the web to confirm)
asarch has quit [Quit: Leaving]
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
mrcom_ has joined #commonlisp
mingus_ has joined #commonlisp
cage has joined #commonlisp
mingus has quit [Ping timeout: 264 seconds]
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
mrcom_ has quit [Read error: Connection reset by peer]
mrcom_ has joined #commonlisp
s-liao has joined #commonlisp
cosimone has joined #commonlisp
raeda_ has joined #commonlisp
raeda has quit [Read error: Connection reset by peer]
Jing has quit [Remote host closed the connection]
s-liao has quit [Quit: Client closed]
s-liao has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
mrcom has quit [Read error: Connection reset by peer]
mrcom has joined #commonlisp
mrcom_ has quit [Read error: Connection reset by peer]
mrcom has quit [Read error: Connection reset by peer]
hineios has joined #commonlisp
dec0d3r has joined #commonlisp
Jing has joined #commonlisp
dec0d3r has quit [Remote host closed the connection]
s-liao has quit [Ping timeout: 256 seconds]
s-liao has joined #commonlisp
mrcom has joined #commonlisp
mrcom_ has joined #commonlisp
mrcom has quit [Read error: Connection reset by peer]
mrcom has joined #commonlisp
mrcom_ has quit [Read error: Connection reset by peer]
McParen has joined #commonlisp
lisp123 has joined #commonlisp
mrcom_ has joined #commonlisp
lisp123 has quit [Ping timeout: 260 seconds]
mrcom has quit [Read error: Connection reset by peer]
sernamar has joined #commonlisp
mrcom_ has quit [Read error: Connection reset by peer]
akoana has left #commonlisp [#commonlisp]
sernamar has quit [Remote host closed the connection]
mrcom has joined #commonlisp
tyson2 has joined #commonlisp
attila_lendvai has joined #commonlisp
euandreh has joined #commonlisp
mrcom_ has joined #commonlisp
caret has joined #commonlisp
caret has quit [Client Quit]
caret has joined #commonlisp
yewscion has joined #commonlisp
Jing_ has joined #commonlisp
mrcom_ has quit [Read error: Connection reset by peer]
waleee has joined #commonlisp
attila_lendvai has quit [Ping timeout: 268 seconds]
s-liao has quit [Ping timeout: 256 seconds]
<yewscion>
Hello all. I am compiling my first executable from SBCL, and I've noticed there are many ways to do so (everything from =save-lisp-and-die= to things like =ros= or =buildapp=). I found that I am most comfortable leveraging asdf for this task, though that's from a personal convenience standpoint. Is there a l reason to prefer a specific method over others when compiling to an executable is necessary? Is one way more 'standard' than the o
<yewscion>
than the other?* I've found the documentation on this process to be fairly terse and scattered...
<jackdaniel>
save-lisp-and-die is the implementation-specific utility
<jackdaniel>
buildapp last time I've checked worked only on sbcl and ccl
<jackdaniel>
asdf tries to provide uniform way for multiple applications
<jackdaniel>
net.didierverna.clon tries the same and provides abstraction to define command line arguments
<jackdaniel>
regarding roswell - no idea
<jackdaniel>
if you are satisfied with asdf then that should work just fine
<jackdaniel>
this comment has so much "know-it-all" feel that at some point I've found myself more focused on finding argumentation flaws than actually reading it ,)
<jackdaniel>
but putting aside how it is written it certainly has some useful information
<holycow>
Jing_: that is a great thread. If someone had access to like 10 mil, a lot of the rough edges could be ironed out and the dev environment could see the barrier to entry lowered
<holycow>
the problem is finding the revenue stream that could justify that expense
attila_lendvai has quit [Ping timeout: 260 seconds]
<pjb>
yewscion: there's no standard way to build an executable, because there are way to many combinations.
<pjb>
yewscion: what I do, basically, is that for each application, I write a generate-foo.lisp script (which may load a common generate.lisp script), in which I set up the things, compile, and load in a fresh image the compiled code and everything needed for a specific application. I have an example at: http://github.com/informatimago/hw ; but it's often quite different and more sophisticated. For example, the generate script may have to
<pjb>
copy resource files, etc.
<pjb>
yewscion: I write a makefile to make it easily invokable from the shell or the CI.
<pjb>
yewscion: for example, one thing that makes it different, is when you compile and run tests, vs. when you want to generate a distribution for end users.
shka has quit [Read error: Connection reset by peer]
<Jing>
Out of curiosity, for those who work with Emacs/SLIME/Sly, do you use org-mode for things like documentation, project management, writing/capturing TODOs for the code you are writing, and so on?
patrice has joined #commonlisp
shka has joined #commonlisp
<jackdaniel>
some do some do not. David O'Toole wrote a few posts about literate programming with org mode and common lisp afair
<Jing>
Thank you. Will check out
hendursa1 has quit [Quit: hendursa1]
<holycow>
pjb: thanks for the link.
<pjb>
Still, it's good to know about tools such as buildapp or cl-launch; in simple cases they can help.
sterni has joined #commonlisp
sterni has quit [Changing host]
yewscion has quit [Ping timeout: 268 seconds]
tyson2 has quit [Remote host closed the connection]
<pjb>
But for example, when I tried to use cl-launch for my scripts, I realized that it actually compiled them just like a program, losing the "scripting" aspect. So eventually, I just gathered all my CL script into a single executable image, dispatching to them on argv[0] (with symlinks in ~/bin/).
<pjb>
Each tool has its best application situation, and you're not necessarily in this situation.
hendursaga has joined #commonlisp
<holycow>
the thing about that ycombinator post is that, while true, python is not exactly perfect either. that environment is a kind of 'bare minimum optimum' that just happened to have enough scale to get it to that point
<pjb>
Jing_: note that what this hn comment mentions, being able to write in CL libraries usable by C programs (or other, thru a C API), is not a simple (technically) problem.
<pjb>
For example, try to write a library in python and use it in your C program! (or your CL program!)
<pjb>
Jing_: the problem is that dynamic languages with a garbage collector use a heap and objects that are not stored and managed like C (memory) objects.
<pjb>
There's what we call an impedance mismatch.
<pjb>
Already to call functions from one language, we have to convert the data, from C "types" to CL (or python) objects, and vice-versa.
<Jing>
pjb: Thank you. TIL
<pjb>
Then there's the problem of conditions, or exceptions, or error handling.
<pjb>
And of course, thread handling. The various languages may have different views about how to handle thread, thread data, (unix) signals, etc.
<pjb>
So, yes, implementations could try to make it easier. I'm not sure it is really an essential features, that it would really increase the adoption of CL.
<pjb>
I mean, if that was really needed, we'd see half a dozen libraries deployed with libecl to be used in C programs.
Jing_ has quit []
cage has quit [Ping timeout: 268 seconds]
silasfox has joined #commonlisp
<hexology>
does anyone know of a document that explains what `require` is and what a "module" is? i don't see a glossary entry in the hyperspec for "module". i know that an asdf "module" is more or less how a directory is represented in a system, but it's not clear to me what a "module" is outside of the specific context of asdf systems
yewscion has joined #commonlisp
<holycow>
someone did a noob writeup that includes that
<holycow>
let me see if i can find it
<hexology>
that would be great
<hexology>
also, possibly an easier question: is `import` similar to putting `:use` in `defpackage`?
<jackdaniel>
hexology: module in asdf is not the same thing as require/module in common lisp
<beach>
hexology: USE-PACKAGE is the function version of the :USE option.
<jackdaniel>
the latter is deprecated in the standard and is a precursor of what asdf calls "system". i.e the implementation may package optional libraries for use - in order to load them you must either know where to find it, or use (require :sb-posix)
<jackdaniel>
for imaginary module that is named :sb-posix :)
<holycow>
look for ashoks posts on reddit, he did a bunch of writeups on learning lisp
<jackdaniel>
there is also a provide operator (as something complementary to require)
<fitzsim>
beach: ISTR needing that (cl:require "asdf") line, maybe for CLISP?
<fitzsim>
beach: interesting re host/target
srhm has joined #commonlisp
<beach>
I take your word for it.
<fitzsim>
ASDF/UIOP as packages are unique in that they're designed to be baked into the Lisp implementation, AIUI
<beach>
Maybe so, and I believe I can use ASDF to load ASDF into SICL.
<fitzsim>
yeah, makes sense for ASDF upgrades
<jackdaniel>
actually uiop has a schisofrenia - on one hand asdf depends on it, so it is expected to be on the system, on the other it claims to be a library
<fitzsim>
ASDF has lots of logic to support that
<jackdaniel>
so you need to download the "new" uiop manually if you want to replace the backed version
<jackdaniel>
(because asdf always find it, so i.e quicklisp doesn't feel that it needs to download it)
<fitzsim>
ah, darn
<fitzsim>
I also with that UIOP had more OS features, something like explicit knowledge of symlinks
<fitzsim>
it's an extremely difficult portability problem to add those though
<fitzsim>
I looked at fare's analysis of truename vs symlinks, etc. once, and.. phew, I got lost pretty fast
<fitzsim>
s/also with/also wish/
<jackdaniel>
fitzsim: uiop plays catch with implementation-specific interpretation of the spec vs posix. for a truly portable solution osicat for posix should be used
<fitzsim>
yeah, but I wish implementations would subsume osicat under UIOP
mrcom has quit [Read error: Connection reset by peer]
mrcom_ has quit [Read error: Connection reset by peer]
<fitzsim>
someone here pointed out that osicat pulls in native code, so it can't live standalone portably
<fitzsim>
but within a given implementation native code is usually fine/expected
<fitzsim>
as things stand now, it's not possible to do useful file system traversal with just UIOP, because it doesn't handle symlinks portably
igemnace has joined #commonlisp
<jackdaniel>
sure. there is a catch though: lets imagine that implementers all agree for one interpretation of the spec and change functions like truename, directory etc
<jackdaniel>
voila, uiop (and other portability libararies that stitch these interfaces) break, because they assumes that ecl will behave like ecl, ccl like ccl etc
<fitzsim>
agreed, it's a big co-ordination problem
<fitzsim>
but everything could be migrated there, with co-ordination
<fitzsim>
yeah, sb-posix handles symlinks in a way that makes sense to me
<fitzsim>
I have a bug report about this where I listed many implementations' behaviour
<jackdaniel>
unifying behavior even at a cost of a few portability layers is not a bad idea between major releases; still I doubt that things won't break wonderfully (i.e will never be updated because libs have no maintainers)
<fitzsim>
yeah, agreed; UIOP already has lots of checks, including some implementation-version checks, as I remember
<jackdaniel>
I'm not very amused with uiop -it gave me quite a few headaches, but I'm in minority :)
<fitzsim>
that's a minimal test case, mkdir /tmp/dir; ln -s . /tmp/dir/subdir
<semz>
I suspect more that most people just never had to deal with the nastier parts of ASDF/UIOP so they don't have a strong opinion.
<fitzsim>
jackdaniel: yeah, me too, that's what inspired me to file that ASDF bug report
<mfiano>
I dislike a lot of design choices, such as uiop:argv0 assuming an image was dumped using uiop; if not, it will fail, and one should use the raw-command-line-arguments function.
<fitzsim>
mfiano: for that you can wrap the Lisp invocation with: export __CL_ARGV0="$0"
<mfiano>
as such uiop:command-line-arguments will also fail if uiop:*image-dumped-p* is nil due to dumping with the implementation's interface or another wrapper.
<mfiano>
Right you can do a lot of things, but it's just counter-intuitive and not documented; you're forced to read the code after something is broken.
<fitzsim>
yes, I read the code to discover __CL_ARGV0
<fitzsim>
could be better-documented
Lord_Nightmare has joined #commonlisp
johnjay has quit [Ping timeout: 260 seconds]
s-liao has quit [Quit: Client closed]
mrcom_ has joined #commonlisp
johnjay has joined #commonlisp
<mfiano>
How do I leave a memo for someone with one of the bots again?
<White_Flame>
I usually PM them with "help"
<mfiano>
I dont know which bot it was
mrcom has quit [Read error: Connection reset by peer]
mrcom_ has quit [Read error: Connection reset by peer]
<White_Flame>
and yeah, was just about to mention that :)
<etimmons>
shka: No, one has -file at the end (on my end at least)
<shka>
oh, right
<shka>
what i really need is some video tutorial explaining how to use clpm in the interactive manner, during development
<shka>
i can read up about bundles
<shka>
but what eludes me is what are the contexts
<shka>
and what is the purpose of those
<shka>
also, those (:asd ...) lines are a little bit involved i guess
<shka>
but i guess required
Guest74 has quit [Quit: Connection closed]
<etimmons>
a context is a set of explicit constraints, paired with a complete dependency graph that satisfies those constraints (and all implicit constraints)
rgherdt_ has joined #commonlisp
<etimmons>
So an explicit constraint is a dependency on foo. Then the context will include all of foo's deps (recursively) and pin them to specific versions
<etimmons>
there are global contexts and project-local contexts
<shka>
ok, what about the implicit dependencies, let's say i am using something which uses drakma
rgherdt has quit [Read error: No route to host]
<shka>
and said project also has the clpmfile, specifies version of drakma and so one
<shka>
but one day i decide that i want drakma, and I specify a newer version in my own clpmfile?
<etimmons>
I've been calling the project-local ones bundles. Global contexts are more akin to a global Quicklisp folder
<etimmons>
Ah, your project's clpmfile completely ignores the clpmfile in any of your dependencies
<shka>
so I MUST specify explicit versions of each and every library in the project?
<etimmons>
And relies only on the dependency information that can be extracted from the .asd files
<etimmons>
no
bcasiello has quit [Ping timeout: 268 seconds]
<shka>
ok, so it fallbacks to whatever is in the quicklisp?
<etimmons>
Still some wordsmithing to do, but the main ideas are there
rgherdt has joined #commonlisp
<etimmons>
In a perfect world your clpmfile would only ever contain sources (where you want to get dependencies from) and `:asd` directives
rgherdt_ has quit [Ping timeout: 268 seconds]
<shka>
ok, i get that, but i am trying to figure out if this information is somehow propagated between dependencies
<shka>
and the answer is: "no"
<etimmons>
clpm then would analyze your asd file to find your direct dependencies. It then uses whatever sources you provided (likely QL) to extract their dependencies, and so on
<shka>
yeah, got it
<shka>
it's fine, i wish that there would be mechanism to inherit version requirements
<etimmons>
ASDF provides that
<shka>
and perhaps raise some condition when there is conflicting version requirements
<shka>
oh, asdf allows to specify version required?
<etimmons>
yes
<etimmons>
Currently it only supports >= constraints
euandreh has joined #commonlisp
<etimmons>
But the next release will likely expand upon that (and expand the version string grammar to allow prerelease information)
<shka>
ok, got it
<shka>
what is the difference between "system" and "project"?
<etimmons>
So, at the moment, if you really need to cap the version you can do that in your clpmfile. But any caps from your dependencies won't be inherited
<shka>
i know what system is
<shka>
not sure about the project
rgherdt has quit [Ping timeout: 268 seconds]
<etimmons>
I'd like to add a command, however, that analyzes the clpmfiles of your dependencies and makes recommendations. So it could suggest capping versions or using something straight from a git repo if one of your deps does
<shka>
etimmons: i hoped that it will be possible to specify hash of a commit, or a git tag, but yeah, it does make sense
rgherdt has joined #commonlisp
<etimmons>
Project is a collection of systems that are developed together. In my mental model, a project corresponds to a single repo
<shka>
ok, got it
<shka>
so the thing is, i don't have to specify source of each system, only those that i feel like it
<shka>
because, for instance, i need a specific version or something
<shka>
because i am using deprecated features or the system is absent in the quicklisp repo
ahlk has quit [Ping timeout: 245 seconds]
<etimmons>
You can specify something like a git tag if you're cloning directly from git. Next version of clpm will change how those are expressed in the clpmfile a little bit, but not too much.
<etimmons>
Correct
rgherdt_ has joined #commonlisp
<shka>
yeah, this makes sense to me, though "source" and "version" sure can be mixed up
<etimmons>
In the clpmfiles I linked you'll see a lot of :system directives that really shouldn't be there, but are unfortunately necessary for the moment
<shka>
but not all libraries have a proper versions anyway
<shka>
... not even those i make
<shka>
i probably should fix that
<etimmons>
For some reason, QL's metadata is inaccurate for 40ants-doc-full. I haven't figured out why yet
<etimmons>
Yeah, some projects keep very good version numbers and changelogs, but the vast majority don't
<shka>
i am part of the problem :(
<etimmons>
It's kind of hard to motivate yourself to do it, though, if there's no tool that really depends on it
rgherdt has quit [Ping timeout: 268 seconds]
<shka>
well, now it kinda is
<etimmons>
If you use Gitlab for your development, I've been working on a set of CI scripts that might help a bit.
<shka>
nah, i am using github
<shka>
and i will take care of that in the old fashioned way
<etimmons>
It fails the build if you push a tag without a changelog. And QL can be configured to only pull from tags
<shka>
i will add proper version numbers and tag releases
<lisp123>
shka: Thanks! That would be great. I was going to go down the slime/swank route to get last command and then write to file
<shka>
lisp123: nah, this won't work, sadly
<shka>
you would have to decorate *standard-input* which is a little bit involved
<lisp123>
_death: Thanks, will have a look at Flight Recorder
<shka>
in emacs slime there is slime-scratch
<shka>
which is other way to achieve the same thing
<lisp123>
shka: Yeah its pretty trivial to do in slime, there's a command (need to look it up again)
<lisp123>
I guess I will whip it up (have a global variable *file-to-save* and then do (save-last) to save the last command to that file
<lisp123>
flight recorder seems a bit advanced for my needs
<lisp123>
(it will prove useful later for sure, the idea is very good)
aartaka has quit [Ping timeout: 268 seconds]
<lisp123>
I will report back - have a good idea -> (i) evaluate a function in the REPL, if you like the output you see, then have a command that is like (save-test) which staples the command together with the result into a unit test for the future
sjl has joined #commonlisp
mrcom has joined #commonlisp
cage has quit [Remote host closed the connection]
<shka>
etimmons: how can i make something like local-projects? i have a bunch of repositories clones that i want to develop together
<shka>
should i simply edit context file?
mfiano has quit [Remote host closed the connection]
lisp123 has quit [Remote host closed the connection]
<shka>
etimmons: in terms of documentation or the feature-set itself?
<etimmons>
both
<etimmons>
But the goal is for the next release to have a "hack" command
cleon has joined #commonlisp
<shka>
well, let me think
<etimmons>
that clones the repo for you (if needed) and does whatever behind the scenes stuff necessary to get clpm to use your locally checked out version
cleon has left #commonlisp [#commonlisp]
<shka>
well, from my point of view, something like "local projects" directory in the context would be the simplest way to work with
<shka>
so for instance i could have vellum context, and vellum, vellum-plot, vellum-postmodern, vellum-csv clones in one directory
<etimmons>
I see what you're saying
mrcom has quit [Read error: Connection reset by peer]
<etimmons>
I also plan for the next release to have some sort of "vendoring" support (installing deps directly to the project folder)
<etimmons>
It might be possible to piggy back what you're asking for on top of that
<etimmons>
But it won't be the default for fear of polluting ASDF's search path
<shka>
why is "vendoring" support needed?
<shka>
what is the use case for that?
<etimmons>
For now, though, I believe you could use pjb's central-registry snippet to get something similar
<etimmons>
My primary use case is deployment
<shka>
well, ok
Guest74 has joined #commonlisp
<etimmons>
so you can have everything needed to run your code in one folder that can be plopped on a server, Docker container, etc. and used without needing CLPM present
<shka>
i mean, context knows the origins of all systems, so it seems to be a matter of simply having a cache?
<shka>
and in that case, they don't need to be in one place, but simply a way to have a command to copy everything into directory once in a while
<shka>
i mean, if it is just for deployment
<etimmons>
Yeah, that's basically what it would do. clpm would still cache everything in its own folders. But when you install with a special flag it would copy everything into the same folder as your project