freenode/#sicl - IRC Chatlog
Search
8:44:33
beach
So here is an example of my daily conundrums: I want to create ersatz generic functions in E4. That is done by calling MAKE-INSTANCE in E3. The class that gets instantiated is a bridge class in E2.
8:44:41
beach
Now, where do I put SHARED-INITIALIZE so that it can initialize the ersatz generic function?
8:44:51
beach
On the one hand, SHARED-INITIALIZE must be a bridge generic function, so it belongs in E3 and that's where I know how to execute DEFGENERIC and DEFMETHOD forms to make SHARED-INITIALIZE operational.
8:44:59
beach
But then, SHARED-INITIALIZE is passed the new instance, so it must call CLASS-OF to figure out what class metaobject to use to find the slot-description metaobjects.
8:45:10
beach
Turns out, CLASS-OF for ersatz objects is defined in E4, the destination environment for the new object.
8:45:16
beach
But then, SHARED-INITIALIZE must use the accessors for the class metaobject, and those are defined in E2.
8:45:20
beach
Solution: split SHARED-INITIALIZE between E3 (generic functions, methods) and E2 (functions implementing the default behavior), and maybe use a viaduct (my name for the functions that are called in one environment and that do nothing but call a different function in a different environment) for CLASS-OF.
10:41:15
beach
(of a product) made or used as a substitute, typically an inferior one, for something else.
10:42:10
beach
Yes, because it is not a native SICL object. It is a SICL object represented as a host object.
10:45:08
beach
Right, a real SICL function would require me to have an executable SICL system, and that's not possible until I finish this bootstrapping thing (and a few more things like the code generator).
10:46:28
beach
It has a two-word header (though it is a subclass of a funcallable-standard-instance in the host, but that's beside the point). The first word of the header refers to the class of the object, and the second word refers to the rack.
10:47:06
beach
But that couple header/rack is exactly how a native object is (or will be) represented.
10:48:03
beach
So as long as I have special definitions of STANDARD-INSTANCE-ACCESS and (SETF STANDARD-INSTANCE-ACCESS) the rest of the code works as if it ran in the native system.
10:48:38
beach
The net result is that I have large part of a SICL system running inside a host. In this case SBCL.
10:49:06
beach
And I can test plenty of aspects of SICL without risking any core dumps, and without having to debug x86 assembly code using GDB.
10:51:14
beach
Xof told me a few years back that he had given some thought to "host-only" SBCL bootstrapping, but did not have the energy to pursue it.
10:53:02
beach
I think I am also the first one to consider starting with getting the MOP machinery to work. Most implementations were started before CLOS existed, so they tend to "bolt" it on late in the build process.
10:54:24
beach
But, as I have pointed out in the past, by doing it this way, I hope to save huge amounts of special-purpose code. I can use the same machinery for defining symbols, packages, streams, hash tables, arrays, structs, you name it.
10:54:50
beach
A typical existing implementation must have all those working before CLOS can be added.
10:55:35
no-defun-allowed
That seems very convenient. (I can only offer agreement, I haven't worked with CLOS like that :)
10:58:10
no-defun-allowed
So congratulations, that's Stuff No One Has Done Before Despite People Wanting To In The Past Probably. 🎉
11:00:28
no-defun-allowed
Either way, SICL is quite good at pulling the rug from under old implementation techniques.
11:01:02
beach
There would be no particular point in repeating the techniques of existing implementations.
11:03:48
no-defun-allowed
Maybe expressing it in what it doesn't need is more catchy. For example, serverless is one such trend no one understands, but it's a trend nonetheless.
11:04:55
no-defun-allowed
(It's something to do with making servers run individual components of an application instead of a large application or something.)
11:05:41
Shinmera
no-defun-allowed: serverless just means you don't buy and maintain your own servers, that's all. If you use AWS or what, you're "serverless"
11:05:57
splittist
Full Power Bootstrapping - because the batteries are included from the beginning...
11:07:15
no-defun-allowed
So... you just give them the program and it runs without having to set up a VPS or whatever, it's just there?
11:08:22
Shinmera
that's one way. But even a VPS can be considered "serverless" because you don't own the machine. It's just another hype word like so many before it in tech
11:08:57
no-defun-allowed
How do you handle dependencies and runtimes then? That's a very vague offtopic buzzword.
11:09:49
no-defun-allowed
(Also, how come you can run imperative languages on AWS lambda? More confusion ensues. /S)
12:04:32
heisig
Or "pure bootstrapping", because you do not mutate the global environment of the host (apart from creating packages for the bootstrap machinery).
12:12:19
Shinmera
if you want to go with the hip trend words, "virtualized bootstrapping" or "container bootstrapping"
12:13:39
beach
Paper title: Bootstrapping Common Lisp. Abstract: We describe "pristine bootstrapping", a technique for bootstrapping a Common Lisp system from an existing Common Lisp system. ...
12:14:19
Shinmera
In other news, it appears ELS2020 at ETH is hitting a bit of a roadblock. We need an entity (prof, dept, institute) to act as a patron, and the rooms do cost money. I'm investigating some more possiblitites, but it isn't going smooth so far unfortunately
12:17:07
Shinmera
In order to ensure that the conference is "suitable for ETH and serves a direct or indirect benefit", and this patron also has to "play an active part in the content of the event".
12:18:27
Shinmera
If I can get a department or institute to act as that they might sponsor the costs, but I don't know. I'm not well connected.
12:23:00
Shinmera
I've spoken to Thomas Gross before when I was trying to get a Bsc. thesis going. He worked with CL before at least.
12:23:36
Shinmera
I'm trying to see if my dad can act as the patron, since he's a professor (but retired).
12:29:58
heisig
I mean, it should be in the best interest of each of these groups to host an ELS. I am sure they would learn a thing or two...
12:33:37
Shinmera
I'm pretty sure the secretary I'm communicating with at the moment wouldn't be impressed.
12:34:39
Shinmera
I can start trying to pull tricks like that once it comes to having to find a patron
12:39:14
Shinmera
Another (smaller) snag is that reservations can only be made up to one year in advance, so I could only place a non-binding reservation at the moment.
16:17:38
beach
After a pretty mediocre day (lots of interruptions, and my computer crashed 5 times), I decided to make a small experiment. I took the first few function (for class finalization) invoked in phase 3 and copied them (with small but appropriate adaptations) to a new phase 4. Then I started the bootstrapping.
16:17:48
beach
It failed, of course, but in a surprisingly good way. It got as far as invoking the SICL generic function (SETF INSTANCE-SIZE) which is correctly invoked during class finalization.
16:18:00
beach
However, when I take the CLASS-OF some object, I currently only recognize some of the MOP classes plus CONS and SYMBOL. For other types, I just return the host type. So the host type of the size argument is the host class FIXNUM, which I obviously can't handle, so it failed.
16:18:05
beach
But this is a good sign, because it means that things are generally working. I just have to make sure I assign a SICL class to fixnums, and I have to make sure that class definition is loaded with the mop classes. Not only is that not a problem, it is a good thing, because the more SICL classes I have, the closer to a SICL system I obtain.
16:19:55
beach
In the past few days, I have mostly been doing cleanup work, and that's fine, but the progress is hard to see.
16:20:50
beach
I now have two pairs of files that have the identical structure between phase 2 and phase 3. It won't be possible to make them all identical because there are some additional features that are needed in phase 3 that aren't in phase 2.
16:21:42
beach
For example, class and generic-function initialization is done with :AROUND methods on SHARED-INITIALIZE. In phase 2, it's the host SHARED-INITIALIZE, so I just imported.
16:22:18
beach
And INITIALIZE-INSTANCE is that of the host as well and it is called automatically by the host MAKE-INSTANCE.
16:23:11
beach
I must load SICL definitions of ALLOCATE-INSTANCE, INITIALIZE-INSTANCE and SHARED-INITIALIZE in the form of generic functions.
16:24:12
beach
However, between phase 3 and phase 4, I don't see any differences at all, at least not at the moment. The entire SICL machinery is needed in both phases.
16:33:17
beach
I already mentioned "A key concept in all operating system is the process. [...] Associated with each process is its address space, a list of memory locations from 0 to some maximu, which the process can read and write. The address space contains the executable program, the program's data, and its stack."
16:34:51
beach
"Some things that C does not have include ...., and garbage collection. The last one is a show stopper for operating systems."
16:38:22
scymtym
had they stopped at "A key concept in all operating system is the process.", one could argue that a process is the technical realization of a computation and that multiple simultaneous ones should be supported by an operating system. but mentioning the address space and its particularities make that implausible
16:39:02
beach
Oh, I see how they can weasel out of the Genera thing. They could just declare that Genera is not an operating system. I mean, after all, it has garbage collection, so it can't be an operating system.
16:39:03
scymtym
the second one could be read as C not having gc is a show stopper for writing an os in C :)
16:41:58
beach
"When an interrupt occurs, the operating system may have only a few microseconds to perform some action, or lose critical information. Having the garbage collector kick in at an arbitrary moment is intolerable."
16:43:53
scymtym
and the gc would disable or defer interrupt handlers? why? and how would it "kick in" by itself?
16:46:14
beach
How many reputable OS books are out there? This one and that by Silberschatz et al I know. Any others? I am not counting books for specific systems here.
16:47:33
scymtym
my systems programming course was C, BSD sockets and a bit of Linux kernel dissection