libera/#commonlisp - IRC Chatlog
Search
15:12:37
nij-
Nilby 1M threads? How was that possible? I remember the limit on my local machine is around 9000.
15:12:38
Alfr
nytpu, or what's the difference as beam thread have their own stack and heap etc. I know that beam it also imposes rather draconic restrictions.
15:21:14
Nilby
nij-: it's potentially possible, but in my case practically impossible, hence the crash
15:21:17
Alfr
bike, that's essentially why gilberth hates continuations, especially in combination w/ unwind-protect.
15:21:20
citizenajb
Alfr: don't people generally just use thread pools instead of creating / destroying threads (just addressing your initial comment that thread creation is expensive)? You can use coroutines in Common Lisp by combining something like the cl-cont library with a thread pool pretty straightforwardly, but it has a lot of downsides. Debugging is very
15:21:21
citizenajb
hard, coroutines are contagious (meaning you need to wrap everything with call/cc all the way down, as you have to do with standard async/await usage), exception handling is hard... I understand the appeal of the "seeming single threadedness" of async/await coding, but I've never felt it's quite the silver bullet as everyone now-a-days seems to
15:22:39
hayley
If it seems single threaded, that's because you haven't ever wanted to hold any state consistent across an await. scnr
15:24:49
hayley
Coroutines also waste the other 11 cores (or 23 logical cores); thread pools are good for short-lived tasks, but I couldn't use a pool to manage a large number of long-lived connections, without breaking up the code to manage one connection.
15:25:02
bike
Alfr: i have seen a pretty good attempt at reconciling continuations with unwind-protect, in that it's well-defined, but also like an order of magnitude more complicated than CL's rules
15:25:51
Alfr
citizenajb, hayley said what I'm after nicely, in particular keeping related code in one place.
15:26:31
hayley
Each thread should (in my opinion) do something like (loop (handle-message (read-message))), but that loop would not map to a thread pool nicely.
15:28:14
hayley
And (again in my opinion) cooperative scheduling is very anti-modular, as one misbehaving module which never yields/awaits/etc can deadlock the system, and relying on yields makes for very all-or-nothing concurrency control.
15:28:43
hayley
Alfr: I already did some university work in Erlang. Seemingly I am the only person on the planet who is fine with Erlang syntax (maybe after being exposed to Prolog before).
15:29:53
jackdaniel
scheduler may also use interrupts that respect critical sections, then yield is optional
15:34:20
citizenajb93
nij- on your early question about non local exits: Here's what I would do if I wanted callees to be able to cause a non-locally exit in my function... https://bpa.st/M4BWC (has an example of using #'call-next-method also which isn't non-local, but contains the same idea)
16:37:51
beach
I seem to recall there is a compatibility library for thing that are needed to inspect the call stack, like a backtrace, and frame contents. Maybe by Shinmera?
16:39:38
beach
I was just looking into the CLIM debugger, and it uses SWANK which I am not very happy about.
16:40:39
beach
Maybe if I work on the CLIM debugger, or a replacement of it, that will prompt some updates.
16:41:45
beach
I am in fact working on a portable condition system that is much more complete (in terms of documentation, comments, etc.) than that of phoe, and I just couldn't see myself writing a line-oriented debugger.
18:10:23
beach
Brucio-61: I am about to leave for the day (so I'll read your answer tomorrow). Do you have strong opinions about whether the CLIM debugger uses SWANK or Dissect?
18:17:40
yitzi
If you intended to use SWANK then a portable version such as conium would be better. If it wasn't bit-rotted.
18:33:44
scymtym
beach: if you are asking whether the McCLIM debugger currently uses swank, the answer is yes. regarding the question whether it should use swank or dissect, i'm not sure. one thing to keep in mind is that swank provides things other than analyzing the stack: utilities for conditions, functions for working with restarts and eval in frame
18:34:08
scymtym
swank provides return from frame and restart frame as well but i don't think the McCLIM debugger uses those at the moment
19:20:26
jackdaniel
perhaps people work on their own personal dissects because they don't want to spend time on other people projects ,)
23:02:07
copec
I've been setting up dnsdist loadbalancers at my work, it is mostly written in C++ but with LUA JIT bindings, and the config for it is a LUA source file that ends up creating the live running image, which you can alter in most ways in the live server - add/remove backend servers or front end services or routing mechanisms or blocks.