libera/#commonlisp - IRC Chatlog
Search
11:12:54
rainthree
it was not unpleasant, in lisp . I am shocked I can't find the code, I am sure I have it saved somewhere . give me a link to that buildnode thing
12:00:29
pjb
beach: IMO, we should format docstrings so they're readable in the REPL. Light markup such as org-mode is OK.
12:01:05
pjb
beach: eventually, with a documentation framework allowing amongst other features localisation, we may have different formats, and tools to convert between them.
12:01:51
pjb
note that all markup languages differentiate between newlines and paragraph, so we may cater to usual terminal widths without losing any formating power using those markup languages.
12:02:39
pjb
beach: now, if you have some tooling, you could write your docstrings in a different format, and generate ascii 72-column docstrings for the REPL.
12:03:45
pjb
beach: I use the package or class docstrings to give wider scope documentation, about concepts, etc.
12:05:29
pjb
beach: anyways, it's very similar to the localisation problem; you want to keep the docstrings separate from the source code (a good idea of yours), so you may have different versions, possibly generated automatically from a single (or a set of) source docstrings.
12:28:11
Helmholtz
I think string-equal is a poor choice of word for case-insesitive string equality test
12:30:04
beach
Helmholtz: If you start getting upset about the names given in the standard, you will find yourself upset most of the time. My advice is to get over it.
12:30:39
beach
Helmholtz: I mean, there is not much you or anyone else can do about it. And it is often not obvious why a particular name was chosen.
12:31:01
jackdaniel
you may create a package better-cl and (setf (fdefinition 'string-boom) (function string-equal)) etc
12:32:28
Helmholtz
Does anyone here use LEM and prefers it to vim/emacs? The v2 added a SDL GUI backend
12:57:30
Helmholtz
beach, no specific questions, just wondering whether the community things it's worth it to delve into it instead of emacs
12:58:48
jackdaniel
the fact that lem is developed for quite some time proves that the team is motivated to push forward
12:59:05
jackdaniel
I wouldn't be too anxious about lack of community (that said I have not used lem myself so far)
12:59:11
beach
Helmholtz: Not for me at least. Both Emacs and LEM use a very primitive technique for parsing the Common Lisp code in a buffer, and we are working on a much better way of doing it, so I am not going to convert to LEM as an intermediate solution.
13:00:56
beach
Helmholtz: In Second Climacs, we use the Common Lisp READ function (in the form of Eclector) to parse the Common Lisp code. READ is the only thing that can parse Common Lisp code in a conforming way.
13:01:30
pjb
Helmholtz: you need to learn the history of those names. eq eql equal equalp the longer the name, the laxer the test. so string= vs. string-equal is obvious…
13:03:34
beach
Helmholtz: For example, if your buffer contains some strange syntax defined by a reader macro, then the primitive parsing technique will fail. But it fails for simpler things too like (LET ((PROG1 234))... where it (at least Emacs) parses PROG1 as a Common Lisp operator.
13:04:54
jackdaniel
ACTION anticipates that the tension will peak when Helmholtz will ask where to get this editor from
13:05:29
beach
Helmholtz: There is no need to ask where you can get Second Climacs from, because it is not ready for general use.
13:06:09
beach
Helmholtz: I was just explaining why I don't think it is worth my time to invest in an alternative to Emacs that I am going to abandon soon anyway.
13:08:59
Helmholtz
yeah thanks...from what I got, it seems you want to design an editor that tries to exploit CL specific features (like reader macro) to provide better integrity...and you can do these sort of things only in Lisps
13:10:01
jackdaniel
modern integrated IDE solutions do similar things. i.e they run the compilation process until the certain phase where they can decide what individual things mean
13:10:09
Helmholtz
that was what I wondering...since Lisp people emphasize REPL-driven development, I thought the workflow should have been more integrated (more alien from what we usually do) than just having a REPL window open side by side
13:11:19
beach
Helmholtz: Maybe the commercial Common Lisp implementations do it better, but the people who work on free Common Lisp stuff either haven't had the time to do better, or perhaps they are happy with what we have.
13:12:39
Helmholtz
I'm just learning it and I've tried Doom before and slimv now to test the waters.
13:13:22
jackdaniel
if you use uiop:create-image (or whatever it is called) then yes. I think that it is implicitly called by asdf:make
13:13:40
pjb
Helmholtz: as jackdaniel says, language server (LSP), clang LLVM libraries, etc, are used to parse the language. This is required because even without reader macros, syntaxes of lots of languages are not entirely context-free. There are some parts that are context dependent. In C, C++ notably, you need to have parsed the program and analyzed it to a certain point to know if an identifier is a mere variable identifier, or if it's a type
13:13:44
Helmholtz
For these trivial programming problems, I code the function, then add a test invocation just below it. Then I do `,b` and `,d` (in test expression) to test the function. Then delete the test line.
13:13:47
jackdaniel
also, the best way to check is to mark it immutable, dump the image, and then check whether it is stil immutable
13:14:37
Josh_2
I added (defmethod asdf:perform :before ((o asdf:image-op) (c asdf:system)) (asdf:register-immutable-system (asdf:locate-system "slynk"))) to my .asd file
13:15:34
Josh_2
so when I compile the system its registered as immutable. I ran my image, connected with slynk and checked the value of asdf/system-registry:*immutable-systems* and slynk is not around
13:18:04
Josh_2
If the system is marked as immutable, any attempt to rebuild the system with asdf or quicklisp will stop asdf from actually looking for the .fasls?
13:18:38
Josh_2
In this case I have slynk listed as as dependency so it shouldn't need to go hunting for .fasls... :thinking:
13:20:10
jackdaniel
a "preloaded" system is somewhat complementary - it will mark the system as loaded, but if it can find the source code, it will allow reloading
13:21:12
Josh_2
asdf:*user-cache* is remaining what it was when the image was built (my fault) and then connecting to slynk using sly-connect in emacs is causing asdf to go looking and rebuilding slynk
13:26:07
Helmholtz
jackdaniel, found your channel too :D https://www.youtube.com/watch?v=kfBmRsPRdGg
13:26:49
jackdaniel
you may see my posts at turtleware.eu if you are interested (and on ECL and McCLIM blogs)
13:29:22
Helmholtz
you are active on ECL too right? I think I have watched some (ECL new versions) or something from you
13:30:04
jackdaniel
Josh_2: there was, but the bounty program is no more. I'm working on SDL2 backend, should be shipped later this year
13:32:49
jackdaniel
ecl build system assumes that ecl is linked dynamically against libc, so that would require some changes to the compilation flags
13:33:05
jackdaniel
but ecl does work with musl libc, so in principle that's doable (given the above)
13:33:48
jackdaniel
other dependencies (libgc, gmp and libffi) are statically linked if you specify a flag --disable-shared
13:34:04
Helmholtz
why it's not, like, the normal way of distributing software in CL (when performance is not important). It would be similar to Go
13:35:28
jackdaniel
but ECL by default is built as libecl.so, so programs may be very small and link against it
13:36:12
jackdaniel
I'm not saying that 4MB is much, but I think that go static executables are smaller
13:37:23
Helmholtz
This is a question that comes up often in hackernews and such...how to statically link against musl
13:38:39
jackdaniel
that's certainly a valid feature request (and as I've said it should not be hard to achieve). that said there is only so many things one person do at the same time
13:56:24
Josh_2
I eval (asdf:operate (asdf:make-operation) <my system>) but this returns the plan, how do I actually execute the plan?
13:59:28
NotThatRPG
Josh_2: Why do you want to do that? `(asdf:operate-on-system 'my-op "system-name")` should do the job, I think (have to look -- I really only ever use `asdf:load-system` and `asdf:test-system` myself)
13:59:37
pjb
Josh_2: (asdf:make-operation '<some-operation-class>) and implement a method on asdf:operate for <some-operation-class>
13:59:53
pjb
Josh_2: note that the default method call (perform-plan plan) and returns (values operation plan).
14:00:38
pjb
Josh_2: perhaps you need a make-plan method for your operation class to produce an effective plan? (one which does something when (perform-plan <plan>) is called?
14:01:04
NotThatRPG
Josh_2: Sometimes it's of interest to look at a plan, but I don't think ASDF provides any guarantees about its structure or an API for external uses of it.
14:02:01
NotThatRPG
I have to head out, but will be back on in an hour or so if you have more questions. It's been a while since I looked deep in here, and the bundled stuff is something I stay away from (since I don't use a C-based CL implementation myself)
14:02:54
NotThatRPG
I think there's a specific operation for that bundle fasl, and it gets written into the cache like other output files (see controlling where ASDF writes files in the manual)
14:03:30
jackdaniel
NotThatRPG: I don't think that Josh_2 uses ECL if that's what you are hinting;; Josh_2: do you?
14:04:42
NotThatRPG
A challenge with operations that weren't in the original design is that some seem to need arguments, and arguments are unsupported. Originally it was possible to stick attributes on operations, but Fare removed that because there was never any clear story about how those properties should be propagated. And then, of course, the operation objects got interned...
14:41:44
Josh_2
Huh, asdf:find-component does not look inside the children of children in base :sob:
14:44:13
Josh_2
Perhaps there is some performance penalty. Would be nice to have a flag to search through all children
15:46:44
jcowan
The Google style guide says 100 characters, which I think is a mistake. There should either be no limit or a 72 to 80 character limit
15:49:18
jcowan
jackdaniel: Unless the name is longer than 80 characters, I don't think it's a problem. You just use vertical alignment.
15:52:05
gilberth
My default Emacs buffer width is 120 characters. What is important is the net line width. When indention already is at column 60 and 40 characters follow until end of line, that's no issue to readability. Squeezing everything then to just 12 characters which would be line break after every atom, is not readable to me.
15:52:09
jackdaniel
jcowan: I'm not arguing with what is sufficient or not, I'm only telling what people often do
15:52:40
gilberth
Prose should not run wider than 72 characters, also for readability. There is a reason newspapers are typeset in narrow columns.
15:52:47
jcowan
Okay. I'm not arguing either. "I never argue: I just tell people what I think or what I know, depending." --me
15:53:12
jackdaniel
no, I'm telling you that there is no point in proving to me that the practice is wrong
15:54:32
gilberth
Pointing to printers is silly these days. First, printer used to be 96 columns, not 80. Second, when was the last time you printed your code? With a dot matrix printer?
15:55:46
gilberth
jcowan: A newspaper don't run the line over the whole width. That would slow down reading. That was my point.
15:58:00
jcowan
Funny. In the U.S. they measure your baby in metric and convert to U.S. Customary, leaving you convert back. This is especially annoying for immigrants, I'm sure.
16:03:16
gilberth
And with Lisp you easily end up indented at column say 30 and beyond. Some nesting like DEFUN > LABELS > MACROLET > LET > WITH-SLOTS > MULTIPLE-VALUE-BIND > COND > LOOP > DO > COND arises before you notice. I personally tend to write large functions and believe in structured programming.
16:34:54
pve
Josh_2: I made this a while back when I wanted to get *all* fasls required to load a system, are you trying to do something similar?
16:36:30
Josh_2
Well when I connect so slynk server with sly-connect asdf goes off trying to compile files
16:39:05
pve
that thing in my link gathers up the fasls recursively and creates a lisp file that loads them, without asdf being loaded at all
16:59:38
NotThatRPG
Josh_2: So what are the nonexistent files that ASDF is trying to compile? And what are the reasons for it trying to do this? What's the top-level call into ASDF that has kicked this off
17:01:30
Josh_2
I set it to immutable and then instead an attempt is made to read the files from quicklisp
17:37:29
NotThatRPG
Josh_2: I guess I don't see why ASDF isn't finding the slynk fasls. Isn't that the bug -- that you are running sly, and so slynk should be loaded and ASDF can't find it? Or is there something I'm missing
17:52:23
NotThatRPG
Josh_2: Interesting -- I just checked my *sly-inferior-lisp for alisp* emacs buffer and indeed I see that at least some slynk files are getting recompiled. No idea why.
17:58:58
NotThatRPG
No -- that was just because of an update to the lisp beta release. I started sly a second time and it just loaded the preexisting fasls.
18:01:21
NotThatRPG
Josh_2: OK, maybe I'm starting to get the context -- you are running from inside a container, but are you bugged because the lisp is inside the container and the emacs is outside? I guess I don't see why you wouldn't have to put your fasl cache into the container. But... I don't know as much about interacting with a remote slynk server as I should. Never got it to work reliably myself.
18:01:47
NotThatRPG
I assume that running in a container is basically the same as running on a different machine (which, as I said, I never got to work satisfactorily)
18:05:13
Josh_2
I could bundle the cached fasls with my image, and then when the image is deployed set the user cache
18:06:37
NotThatRPG
So the problem is not that these are being compiled, but that you don't know why your image is loading the slynk server?
18:08:01
Josh_2
I suppose I can go ask on the sly github what the purpose of reloading these fasls is
19:20:47
NotThatRPG
Josh_2: So what you are saying is that the image has the slynk server library preloaded, but when it gets a remote connection, it reloads them anyway?
19:21:33
NotThatRPG
I can't say for sure, but it's equally possible this is a sly/slynk issue and not ASDF.
19:24:27
NotThatRPG
Josh_2: I think it is slynk doing this. If you look at "start-slynk.lisp" (unless this has changed since my last pull), you will see an invocation of `slynk-loader:init` with the comment "reload SLYNK, even if the SLYNK package already exists".
19:27:39
pve
perhaps it's related to the recompile-on-update mechanism that at least slime has (which doesn't use asdf)
20:10:30
NotThatRPG
Josh_2: The other thing you could do is change the fasl output mapping for the slynk libraries, and put only those fasls into your container. If I recall correctly there's a mapping that's sort of logical-pathname-like, and you can definitely carve out special places for particular fasls.
20:11:37
NotThatRPG
Josh_2: See this section of the manual: https://asdf.common-lisp.dev/asdf/Controlling-where-ASDF-saves-compiled-files.html
20:13:18
NotThatRPG
I have to go now, but I hope that will put you on the right track. Ping me later if you need help.