freenode/#mezzano - IRC Chatlog
Search
16:13:12
froggey
johnjay: I've added implementation-specific primitives for accessing the machine directly from common lisp, the rest of the system is built using them
16:13:19
froggey
it's the same for operating systems written in C. there's no portable way to directly access memory or devices in C, so systems have to rely on implementation specific behaviour
16:14:04
froggey
everything gets compiled to machine code, there's no interpreter. SBCL and a few other implementations also compile to machine code
16:16:33
johnjay
that screenshot looked pretty cool. have you got to the point where emacs is in there, or something like it?
16:17:07
johnjay
i was looking at the hardware manual for the intel hd audio bus and it looked pretty intimidating!
16:17:57
froggey
there is a mediocre emacs clone. it's usable, but I wouldn't use it for day to day use. eventually I'll port one of the McCLIM-based editors
16:19:08
johnjay
hrm ok. i don't know much about mcclim, does it have a lot of stuff written for it/in it already?
16:21:07
housel
McCLIM itself needed to be ported, and there are occasionally small portability changes that need to be made to other programs
16:23:23
johnjay
anyway this whole thing looks pretty cool, can't wait to load up my text editor and start changing programs while they are running! :-D
16:28:03
froggey
leo_song: I don't have any objections, except that boot-secondary-cpus is a very internal function. it's supposed to be called automatically during the boot process, not by users
16:35:05
froggey
ebrasca: a few issues: wait-for-input seems like a bad name to me, something along the lines of accept seems like it would be better
16:35:25
froggey
why does wait-for-input call (car *tcp-listeners*), shouldn't it use the supplied listener?
16:36:53
froggey
finally, it shouldn't busy wait (ie, spinning in a loop). use a condition variable to signal that new connections have been added
17:53:03
ebrasca
froggey: wait-for-input is for whaiting for connections to accept or deny. I don't undestand how to make it use conditional variables or someting like this.
18:02:13
froggey
ok, something like wait-for-connections then. "input" on it's own is missing context, it doesn't say what kind of input
18:03:08
johnjay
but i wonder if there's anything in those old genera type systems that's interesting
18:07:05
froggey
I've never used a real lisp machine, but I've tried the CADR & Genera emulators briefly
18:07:22
froggey
but mezzano follows a similar model: everything in lisp, single address space, code has full access to the machine, no hardware-enforced protection mechanism, etc
18:09:24
froggey
ebrasca: wikipedia has a good description of them: https://en.wikipedia.org/wiki/Monitor_(synchronization)
18:32:14
housel
You need to be holding the mutex (mezzano.supervisor:with-mutex) when you call condition-wait
18:38:20
johnjay
i don't think just knowing cl would let me work on mezzano but figured id' ask anyway
18:43:20
froggey
Practical Common Lisp is quite good, but people in #lisp will probably have better recommendations
19:01:52
froggey
leo_song: sorry, I wasn't clear. please don't include boot-secondary-cpus at all. smp support is not ready for public consumption at all
19:06:55
froggey
ebrasca: the call to condition-notify is in the wrong place. it should be inside the with-mutex for the listener lock
19:07:59
froggey
think about what would happen if the thread waiting on the cvar ran between the call to condition-notify and pushing the connection on the listener connection list
19:11:16
froggey
tcp4-decline-connection seems to be calling close on a tcp-connection object, which is not a stream
20:05:28
froggey
condition-wait drops the mutex and puts the thread to sleep. when the thread wakes back up again condition-wait will reacquire the mutex before returning, which would be held by the thread that called condition-wake
20:18:57
ebrasca
Now thinking , probably tcp4-decline-connection don't need to close connection because it have never start.
20:44:59
froggey
I'll look at it tomorrow. try updating the http-demo to use it, make sure you have the public interface exported from the tcp package
21:16:25
housel
varjag: At some point there were interrupt conflicts between hdaudio and the VirtualBox mouse integration; I don't know if those showed up in demo 3 or not
21:20:45
froggey
I was also having problems with popping when starting/stopping audio, which is why I didn't include any in the image
21:21:34
froggey
doom/quake won't play any audio at all because I couldn't make sense of SDL's audio code, so that's not implemented at all
21:22:55
housel
You have to enable amplifiers in the right order, with a bit of a delay before the final stage, to prevent pops
23:46:42
leo_song
froggey: Another thing i want to ask is, every time I do (mezzano.supervisor:snapshot), there will be extra "Virtio-Net NIC worker" and "Sound worker for xxx"
23:48:54
leo_song
Looks like some memory leaking(only a metaphor). Are there anyways to destroy those threads at boot process?