libera/#commonlisp - IRC Chatlog
Search
10:05:21
contrapunctus
Devon: someone also suggested Delta, once - https://github.com/dandavison/delta
10:12:14
Devon
contrapunctus: Delta is merely "A viewer for git and diff output" like emacs diff-mode.
10:17:57
Devon
contrapunctus: Emacs ediff is merely "a comprehensive visual interface to diff & patch" so neither of them actually differs from unix diff.
10:55:11
splittist
Devon: smarter by having knowledge of the underlying semantics of the string? Absolutely. The trick would be to make a tractable way to specify the various edit operations and their costs. I do sometimes wonder if speed is all that important for actual human-readable texts.
11:47:12
jmercouris
I would have thought that any stream other than t would result in it not printing
11:48:37
jmercouris
also with regards to the previous discussion, there is a diff tool that works with SEXP
11:52:43
polygon-op
I suppose that it could be written differently, i.e (defun write (object &key (stream-p nil stream) …) ) and act based on the fact whether stream-p is true
11:55:43
scymtym
what you expected (write … :string nil) to do is basically the function WRITE-TO-STRING
11:59:06
scymtym
i'm confused. shouldn't the comparison be with (with-output-to-string (stream) (write 'tomato :stream stream))? i thought that was the intended behavior
11:59:41
polygon-op
it should, that's just lack of understanding the difference between the return value and the stream output ,) /me carries with his day
12:01:34
scymtym
but what is the desired behavior if it is neither returning a string nor writing to a stream?
12:32:21
polygon-op
ACTION http://turtleware.eu/static/paste/0de83150-triangles.webm - "tracing" the triangulation algorithm in CLIM
15:42:20
beach
It seems like someone could write a PDF viewer in Common Lisp as a nice project. My evince has crashed four times today from a segmentation fault.
15:46:00
beach
I can't for my life understand why someone would write something like Evince in C/C++, which is apparently what it is written in.
15:46:48
polygon-op
beach: if I may suggest - you could use atril which is evince fork (from before gnome 3)
15:48:03
beach
But I would like to see applications like this written in Common Lisp to avoid problems like this.
15:48:50
beach
Since such applications are already fairly large, it is no problem if the executable contains a full Common Lisp system.
15:49:27
beach
And these applications are generally useful, not only as part of a Lisp OS, so people can just go ahead and write them.
15:50:53
beach
shka: Let me say this again, even though I have said it several times. I think with Common Lisp, there is no need to create a "complete web browser". We could create library modules for the different tasks that a web browser does, like render HTML, render OGG/vorbis, render different video formats, etc.
15:51:44
beach
shka: So we can go ahead an create a "web browser" that makes use of the modules we already have, and that uses existing C or C++ modules where we don't have any.
15:52:41
shka
on the other, i really with that there was a way to control the damn JS using restarts for instance
15:53:33
shka
or be able to hook into the html rendering by injecting mixins into the object representation of the html structure
15:54:10
beach
Either way, I don't think the need for a "complete web browser" eliminates a need for a document viewer, an editor for music scores, a layout program for printed circuit boards, a movie player, a music player, a figure editor, etc.
15:55:01
shka
no, my remark is that i don't really need hackable document viewer, i just need it view documents and not be a pain in the ass ;-)
15:55:08
beach
So, let me again urge people to start writing such application in Common Lisp so that we can avoid these crashes and other nasty behavior. No need to wait for a Lisp OS to get started.
16:00:03
shka
since it is also used in the context of the call site optimization, i think it would be a good idea to use fully qualified names when mentioning it
16:59:30
contrapunctus
Would there be any value in making an implementation-independent static analyzer for Common Lisp code?
17:37:03
jcowan
Is it supposed to do one job, like type checking, or a whole bunch of jobs, like `lint`?
17:37:23
Bike
judging by the readme for the emacs lisp static analyzer, it's a pickier compiler without the code generation part, so more like the latter
17:43:06
jcowan
Classic lint would look for known bugs, generate style warnings, warn about easily abused constructions (like fallthrough between clauses without a /*fallthrough*/ comment, etc.
17:44:56
aeth
not really popular because compilers tend to catch that, although they're hidden in the most common build process unless you :verbose t your QUICKLOAD
17:45:46
jcowan
DO 120 J=1,256 is a beginning-of-loop statement, where the body extends to the line numbered 120 and J is iterated between the given values.
17:46:16
Bike
it could be nice to have such things on-line in an editor, and without the additional complications of actual code generation
17:46:52
aeth
yeah, but C-c C-k compilation is typically so fast that I can see why that's not a priority
17:47:08
jcowan
But if you type a period for the comma, an easy mistake, the compiler sees this as DO120J = 1.256 and makes no complaint.
17:48:57
jcowan
Lint for Fortran, on the other hand, will warn if it sees something like this because it does not ignore spaces, unlike the compiler which is required to do so.
18:53:23
aeth
contrapunctus: In context, it's more about SBCL's STYLE-WARNING/NOTE functionality rather than its (fairly limited) type checking
20:25:41
White_Flame
and then there's ((a . 1) (a . 2)) vs ((a . 1) (a . 3)) which both return the same value for key A
20:26:38
gin
I don't need to deal with associations being in different order right now. I will use "equal" for now.
20:31:35
pve
etimmons: I'm playing around with making a very simple asdf extension that just loads files in alphabetical order. It works fine, except it can't detect when a file has been added or deleted (unless I use :force t).
20:31:57
pve
etimmons: I have written the code that scans the directory for changes, but it's not clear to me how I should hook it up to asdf.
20:32:35
pve
etimmons: My first thought was to run the code in operation-done-p for compile-op, but then I thought maybe I should define a new operation scan-components-op and have compile-op depend on it.
20:33:05
pve
etimmons: Do you happen to have any thoughts on when/where this directory scan should take place?
20:33:29
pve
etimmons: I ask because you mentioned wanting to do this yourself for you own extension.
20:34:48
pve
the code is here: https://github.com/pve1/alphabetical-asdf/blob/main/alphabetical-asdf.lisp
20:39:57
etimmons
pve: I haven't looked at it yet, but I think the place to hook in would be the define-op for the system
20:40:43
etimmons
maybe an operation-done-p method that checks the current list of files against a cached list in the system?
20:45:49
pve
I understand ASDF has some kind of cache where it stores the results of operations. I was wondering if I get caching for "free" if I define a new op
20:46:24
etimmons
Since that scan-op would need to be performed before the plan for the load-op is computed
20:47:32
etimmons
yeah, that's why I was going to see if I could get away with hacking operation-done-p first.
21:04:23
jeosol
etimmons I just got out of a rabit hold chasing bazel, bazelisp for parallel compilation of my project. Not sure you remember, we had a discussion over from reddit chat (that you said you weren't initiaally aware it had a chat option)
21:06:18
jeosol
I haven't looked at it personally, but now that I fully understand the requirements of bazel and bazelisp (for large orgs, 200+, need lots of machines, etc), and so many issues (from others that used it for non C++ or non Java projects),
21:07:09
jeosol
I plan to start taking a look again at the repo I cloned a while back, may be get it to work for current SBCL
21:08:20
etimmons
I'm pretty sure bazelisp is used internally by Google, so hopefully it wouldn't have tooooo many issues
21:09:20
etimmons
I haven't looked at it myself in a very long time, but I also imagine it may not be the most portable thing if that's important to you.
21:11:10
jeosol
ok, but I thought you have to use bazel and bazelisp together. I could not get the former to install. I admit I don't understand how these systems are integrated. I was trying to download bazel to test the C++ tutorial
21:11:51
jeosol
I have dome some research, and I am mistaken, to think it was something simple, I could just drop in to do my parallel builds. But that is not the case
21:12:12
jeosol
It also requires huge amount of memory to run and you often need many machines to really get the benefits
21:15:22
etimmons
I forget if it had happened yet when we last talked, but SBCL has gotten rid of the lock around compile-file.
21:15:59
etimmons
would be interesting to see if just using plain old threads to compile things would work
21:18:09
jeosol
I have been in touch with Fare, the author, on possibly resurrecting this in some fashion, but I'd have to spend time to study the internals
21:18:53
etimmons
Hmmm, I think it got released in 2.1.4, but I see no mention of it in the release notes
21:23:13
etimmons
It's super nifty since it creates a new process that's ~identical to the first. Some application servers use it to, for example, load all the code, do any other expensive startup things, and then be able to spawn workers with nearly zero cost
21:23:41
etimmons
but it takes great care to use correctly and can easily lead to dead locks or other unforeseen complications
21:25:17
etimmons
ECL had an issue on MacOS where spawning a new process (nominally fork() then exec()) caused streams to get corrupted in the parent process if the exec() failed (e.g., the executable didn't exist)