libera/#commonlisp - IRC Chatlog
Search
6:59:39
pjb
beach: Perhaps doing something metalinguistically like in scheme? https://www.youtube.com/watch?v=SrKj4hYic5A
7:02:21
beach
Looks interesting. I'll watch it later. I am not sure how relevant it is to Common Lisp bootstrapping, though. I guess I'll find out. I mean, SICL bootstrapping is already pretty "meta".
7:04:46
beach
The first few phases of SICL bootstrapping can be seen as building a circular graph of classes (MOP classes and other essential classes) and generic functions (again MOP and other essential functions). And we do that by using the standard tools like DEFCLASS, DEFMETHOD, DEFCLASS, DEFUN, DEFMACRO, etc.
7:05:11
pjb
I imagine that a first step to bootstrap an implementation, is being able to implement and run it inside another implementation.
7:05:59
pjb
So in your current system the standard tools are the meta level for the new (bootstrapping) level.
7:07:38
beach
I don't see that as levels, no. Each phase is merely meant to make the object representation different. First, we use host objects, then bridge objects, and finally ersatz objects.
7:08:11
beach
There are no "levels" in the sense of limited functionality or expressiveness in any level.
7:08:23
pjb
But perhaps having those bootstrapping phases is only an artifact of the development process. I mean, what would prevent to use the current implementation to generate everything of the new implementation completely independently of the current environment, in one single phase?
7:10:13
beach
So the problem I solve is the following: If I do something like "make-instance" in the host, it will create an opaque host object. But I need to do that in order to create some SICL classes like T, standard-object, etc.
7:11:35
beach
I then make a new MAKE-INSTANCE etc. that creates instances of those classes that have slots that SICL needs.
7:12:19
beach
Then I define a new MAKE-INSTANCE that take those funny non-host-classshes and create more SICL-like objects called ersatz objects.
7:12:26
pjb
But instead, you could just generate a binary that will have a single make-instance in the new image.
7:13:15
pjb
Yes. I understand the step-by-step approach you use, but as a development/learning/testing process.
7:14:22
beach
The steps are not important as you point out, but I need several different first-class global environments, each one containing objects represented in a different way. And I need three different such representations.
7:15:44
beach
So I naturally divided the bootstrapping procedure into three (plus a few more for initial and final stuff) phases, each phase creating objects with a different representation in a different first-class global environment.
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.