libera/#commonlisp - IRC Chatlog
Search
23:29:49
defaultxr
hi, is there any way i can make slime/sly's M-. jump to a location for a symbol without actually defining a function or variable with that symbol as its name?
23:31:00
Xach
defaultxr: i believe there's a library to do something like that - to record a source location for a thing in a portable way
23:43:31
etimmons
defaultxr: I think mgl-pax has some way of making slime do that. Could be misremembering, though.
23:51:02
defaultxr
pillton, usually they are just instances of classes. the instances can be optionally named and looked up by those names later, without polluting the normal symbol namespace of any packages. for example, one of my libraries is used to load audio files into buffers, and having the buffers referenced by the string of the filename means i can ensure that the user doesn't accidentally load 2 copies
23:51:05
defaultxr
of the same file if they recompile the lisp file where the audio file is loaded in
23:51:35
defaultxr
technically i don't need to have M-. working for the names of the class instances, but it would be nice
0:22:08
pillton
defaultxr: Right. I'm not sure I agree with using M-. for that. I wonder if you can use SLIME presentations to add a menu option when you right click on a symbol or one of your instances?
0:25:18
defaultxr
personally i think M-. makes perfect sense if i'm able to add the instance as a definition in the M-. list without overwriting any variable or function source locations in the process. but to each their own
0:34:02
_death
so if, say, sb-introspect:find-definition-source were a generic function, and you had a nice interface to generate a method like in https://plaster.tymoon.eu/view/2545#2545 ...
0:36:00
defaultxr
yeah, it being a generic function would be ideal (though i'd of course prefer a solution that works on more implementations than just sbcl)
0:52:52
_death
(which, if you apply a small patch to have it return true, can be added to sb-ext:*ed-functions* so you can use cl:ed ;)
0:57:17
defaultxr
true, i could probably use that, though i was hoping for something that would better integrate with M-. since i think that is in more common use than cl:ed
3:39:52
kakuhen
I have stumbled on yet another CCL bootstrapping problem, and it's way beyond my knowledge and understanding
3:40:31
kakuhen
while I was able to successfully bootstrap 1.12.1 from 1.12 on FreeBSD/amd64, Linux is giving me problems (with the same computer) when I attempt loading the bootstrap image
3:41:04
kakuhen
I'm getting dropped into the lisp kernel debugger in the middle of loading some streams fasl -- even though I received no warnings or errors when compiling ccl or the level-0 files
3:52:54
kakuhen
the documentation notes that it should be (in theory) possible to compile ccl from another cl implementation, but such a process is experimental and not officially supported
3:53:36
kakuhen
in any case, i should probably just be happy with the binaries i'm already provided -- the bootstrap attempt was more of an exercise to see if I could do it on linux, since the distribution I'm on does not offer any official packages for CCL, but it does for ECL
3:55:50
beach
kakuhen: rme told me that, while it would be possible to make it so that CCL can bootstrap from other Common Lisp implementations, "it is probably not worth the effort to make it happen" [or something to that effect].
4:01:06
beach
I think some day I need to turn the SICL bootstrapping procedure into an implementation-independent library, so that it can be used by other implementations too. But I currently have absolutely no idea how to do that.
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.