Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Twisol
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
69 ms
·
361.
▲
by
Twisol
5y ago
> You can break a window open or just find an unlocked door if you are looking to do some bad shit. > A higher security lock on your home isn’t going to make your flimsy door harder to kick down, or your window harder to break From th
362.
▲
by
Twisol
5y ago
Very intentional. He's also quite self-aware -- later in the same keynote, he says something about using a hole for something it wasn't designed for, then notes how wrong that sounded.
363.
▲
by
Twisol
5y ago
> I've seen a similar technique used two prove the product rule in analysis. I always find ways of avoiding such tricks because I see them as Deus Ex Machina s. I don't think of mathematics as an exercise in ill-motivated tric
364.
▲
by
Twisol
5y ago
But that would leave one lonely person with an answer, and rob us all of a scintillating discussion on a (gasp) discussion forum. The post made me reflect on the fact that I have a toaster at all; I've used it vanishingly few times, an
365.
▲
by
Twisol
5y ago
Despite all that, I still find it absolutely necessary to get in the same headspace with someone on the other "side". We can and should always float any outcomes to the primary points of contact on either side, but a POC is a pri
366.
▲
by
Twisol
5y ago
That paper's introduction really lays things out very nicely. Thanks for the refs!
367.
▲
by
Twisol
5y ago
Oh, that's great to hear -- and thanks for the terminology! Do you have any pointers for where shallow vs. deep handlers can be compared in the Multicore OCaml literature? I've seen the non-syntactic support via `try_with`; I'
368.
▲
by
Twisol
5y ago
The :: syntax minimizes the pain, but the fact you have to do it at all is still irritating, and IIUC it incurs a small runtime cost due to the intermediate object that's generated to convert between the two interfaces. I recently clea
369.
▲
by
Twisol
5y ago
> algebraic effect handlers probably have the most ergonomic implementation of async I have ever seen (looking at the OCaml multicore previews) Just dropping in to say strong agree . The biggest stumbling block for me has been that the
370.
▲
by
Twisol
5y ago
Right, for sure. I think Turing reductions tend to be in terms of a concrete Turing machine, anyway; I don't think there's any claim being made here of a universal multistack machine, which is what you might be touching on.
371.
▲
by
Twisol
5y ago
> There's really no main stack Excellent! > It should ultimately be possible to compile Dawn to concurrent nets and therefore to evaluate concurrent sections concurrently I'm thinking more along the lines of Multicore OCaml&
372.
▲
by
Twisol
5y ago
> The value multistack is flat and is modeled by a map from stack name to value stack. Makes sense for a real implementation, of course. It's nice to have a theoretical reduction, though, so we know there's no semantic differen
373.
▲
by
Twisol
5y ago
This looks really awesome. A few questions: 1. Is the "main stack" (the unnamed one, the one your program begins with focus on) specially identifiable in some way? I note further down this comment tree that, if the "main sta
374.
▲
by
Twisol
5y ago
I'm guessing we'll see a reduction much like those for multi-head or multi-tape Turing machines to single-tape, single-head, classical Turing machines. First, let's suppose the main ("unnamed") virtual stack has ind
375.
▲
by
Twisol
5y ago
> I am also not clear what the advantage of multistacks is for side effect control. If you only ever push "effects" onto a stack, you're just building up a trace. The CALM theorem (Consistency as Logical Monotonicity) tell
376.
▲
by
Twisol
5y ago
Yes, it's definitely possible that a spinning virtual thread will effectively pin the current OS thread. The Loom folks could keep, say, a count of how many instructions the virtual thread has executed, and pre-empt it itself if it nee
377.
▲
by
Twisol
5y ago
> One thing I say to people using "it's" is that by analogy, you also need to say: "He got he's skills. She missed she's ride. They have they's meeting." This is a great distillation of the intuiti
378.
▲
by
Twisol
5y ago
Traditional wisdom says that you shouldn't use `instanceof`, because downcasting is bad and you should work with an interface uniformly implemented by any particular subclass. The Visitor pattern accomplishes this by giving the shared
379.
▲
by
Twisol
5y ago
I also think of "color" fundamentally as different types; it's just painful to have two kinds of functions that you can't combine. I, personally, really feel that async/await is just adding a second kind of continua
380.
▲
by
Twisol
5y ago
> Especially from VsCode where it uses the Eclipse language server. Sure, but my particular complaint isn't with the functionality; it's with the UI. Yes, VS Code absolutely improves the experience.
381.
▲
by
Twisol
5y ago
> You know, the kind of code where you have to communicate with some outside device and it is easy to do blockingly but devolves to state machine madness if you need to do other things concurrently. Speaking personally, I've found L
382.
▲
by
Twisol
5y ago
That's a good question. It's not very easy to do that with regular Java threads either, though [0], and I think everybody considers those "fully preemptively scheduled". Preemptive scheduling is more about whether the sc
383.
▲
by
Twisol
5y ago
Eclipse and NetBeans do exist, and... ehhhhh. I used NetBeans for a long time; couldn't stand Eclipse; and these days I only use IntelliJ. But the others absolutely exist, and it'd be hard to say that Apache and the Eclipse Founda
384.
▲
by
Twisol
5y ago
Thanks for responding! For what it's worth, Ron Pressler (lead guy on the virtual threads work in the original article) has opinions on LTS: https://old.reddit.com/r/programming/comments/lsuojl/jdk_1
385.
▲
by
Twisol
5y ago
Coroutines are usually cooperatively scheduled (that's what the `co-` is for); these are pre-emptively scheduled, first by assignment to a pool of OS threads, and secondly by the OS' own thread scheduler. "Thread" is com
386.
▲
by
Twisol
5y ago
`Optional.of`, `List.of`, `Set.of`, `Map.of` (and `Map.ofEntries`), ...; this language is actually pretty settled into the JDK.
387.
▲
by
Twisol
5y ago
> What if I e.g. want to call a library that is known to be non-blocking, or make a syscall that is non-blocking which is not pre-wrapped by the Java standard library? My understanding is that pinning only enters the equation if you need
388.
▲
by
Twisol
5y ago
> It is not a goal to change the existing implementation of platform threads, that represent Operating System (OS) threads. > It is not a goal to automatically convert existing thread construction to virtual threads. Key word: automat
389.
▲
by
Twisol
5y ago
I definitely prefer CPS, especially in functional languages (where the noise I complain about below often fades away entirely). On the other hand, CPS usually is a bit noisier from the developer's perspective; either your continuations
390.
▲
by
Twisol
5y ago
Right; Java's virtual threads are (*adjusts glasses*) preemptively-scheduled stackful continuations , meaning (1) that they execute in parallel and in cooperation with the OS' scheduler (*) (which automatically timeslices the CPU
More ›