freenode/#lisp - IRC Chatlog
Search
22:31:30
no-defun-allowed
I think SBCL has a function in its socket library which calls poll/epoll and can be used to write a driver loop. But in my opinion the best async Lisp experience would be to implement green threads, use a driver loop to wake threads blocked on IO, and then implement usocket and friends using that.
22:37:36
no-defun-allowed
"Where should I get silver for making cutlery from?" "*answer*" "Never mind, I think I will make a spoon."
22:39:17
no-defun-allowed
You still find yourself with an async library (or entirely straight-line synchronous code) though.
22:41:02
no-defun-allowed
Still, I would find myself either writing code with blocking threads, or implementing enough of do-notation to not go mad with callbacks.
22:50:26
edgar-rft
Josh_2: there's Bordeaux Threads if that's the kind of "async" you're talking about -> https://common-lisp.net/project/bordeaux-threads/
22:53:44
no-defun-allowed
edgar-rft: "async" usually refers to asynchronous IO, which I can only really describe as having an OS thread block on a single connection (unless there are no more connections to block on). Think poll, Unix AIO, io_uring, etc.
22:54:49
edgar-rft
"async" refers to anything asynchronous you can imagine and is a very broad and unprecise term
1:35:26
huonib
can someone help me with this? I am working on a project and I am looking to use a lisp that compiles to a small binary - either ecl, chez, or chicken scheme
1:35:42
huonib
right now I am trying this with ecl but I am getting an error: https://gist.github.com/huonib/9ddddc7998c43681795309233feeeb5c
1:38:21
Bike
wait, sorry, what is make-build? i don't have that function in my asdf and i don't see it in the manual.
1:38:52
huonib
Bike: found it here: https://common-lisp.net/project/ecl/static/manual/System-building.html#Compiling-with-ASDF
1:39:31
Bike
well, my guess is that when the program starts, *package* is something other than helloworld
1:43:01
huonib
when does the package change automatically? I thought slime did that for some reason.
1:48:22
Bike
yeah, no prob. i don't know how to use make-build, but you could probably set it in :prologue-code?
2:08:41
huonib
huh - I didn't have that much faith in ECL, since I heard nobody really uses it, but it generates a binary of 2.1 MB whereas chicken scheme is at 4.6 MB
2:12:11
huonib
Bike: I am a complete idiot, so bear with me, but chicken scheme can compile without the runtime - is that possible with ecl?
2:13:24
huonib
Bike: https://wiki.call-cc.org/generating%20the%20smallest%20possible,%20self-contained%20executable
2:15:09
Bike
the C standard uses the term 'freestanding' to mean implementations that almost entirely lack runtime support
2:17:02
Bike
i think there's an #ecl channel, and also jackdaniel comes around here and is a maintainer
10:00:19
luis
I've just noticed that SLIME's presentations weakly reference their respective object: they don't prevent the object from being GCed and if the object is GCed, the presentation is disabled (it turns into plain text). I'd never noticed this before. Is this how LispM/CLIM presentations work too?
10:01:08
loke[m]1
luis: that's not how they behaved in the past. I'm pretty sure I needed to C-x M-o to lose the references to them.
10:04:58
luis
loke[m]1: I was under that impression too, but *object-to-presentation-id* and *presentation-id-to-object* have been weak hash-tables for well over a decade and I don't think the REPL has ever stored them anywhere but * ** ** / // //. At some point (2006-ish?) SBCL didn't support weak hash-tables.
10:06:41
loke[m]1
luis: Perhaps the reference is held somewhere else. I just tried creating a large array, leaving it in a presentation and did a (gc :full t)
10:08:36
loke[m]1
The 5 evaluations of (gc :full t) should have been enough, but for good measure I did about 10 more evaluations of simple numbers followed by a few more gc's.
10:14:38
loke[m]1
luis: Well, I went to it and typed C-c C-v TAB. But yes, right-clicking also works.