JT Olds

jtolio.com · Personal blog · on HN since 2018

Personal blog by JT Olds on Go, lambda calculus, concurrency, and hobby projects including AI-assisted software ports.

What HN saysHN cites it for its critique of Go channels and a lambda calculus whiteboard post that one commenter found a great read for beginners.
22HN people shared it
12linked it in comments
11stories submitted
420story points
9 months agolast shared
2018people per year2026

Most-shared posts

  1. 1
    Problems with Go channels (2016)
    12 people · 162 points · first shared 2018 · 197 comments on HN
  2. 2
    Whiteboard problems in pure Lambda Calculus (2017)
    3 people · 87 points · first shared 2018 · 26 comments on HN
  3. 3
  4. 4
    Just update rules between neurons
    2 people · 2 points · first shared 2023 · discussion on HN
  5. 5
    Python 3, Pygame, and Debian Bookworm on the Miyoo A30
    1 people · 158 points · first shared 2025 · 29 comments on HN
  6. 6
    Writing advanced web applications with Go
    1 people · 3 points · first shared 2018 · discussion on HN
  7. 7
  8. 8
    I finally figured out Twitter (2009)
    1 people · 2 points · first shared 2022 · discussion on HN

What HN people wrote when they linked it

kinjba11 · 2021-09-22
Channels are not always the best solution (unless you're referring to Rust channels?) https://www.jtolio.com/2016/03/go-channels-are-bad-and-you-should-feel…
bjt · 2021-07-12
I think different people read "Go concurrency model" to mean different things. If we're talking about green threads (goroutines), I'm a huge fan. Having had a lot of success using Gevent in the Python world, it was great coming over to the Go world where that pattern was baked into the language. If we're talking about channels, I'm really not a fan. Not nearly as easy to use as the equivalent Queue library over in Python, despite being baked into the language. My experience aligns with this post: https://www.jtolio.com/2016/03/go-channels-are-bad-and-you-should-feel… Almost every time someone's suggested a Go channel, I've found it simpler to use a mutex or waitgroup.
jedimastert · 2018-07-23
You could take a look at what this guy[1] did. It was a great read for me as a real beginner in lambda calculus. [1]: https://www.jtolio.com/2017/03/whiteboard-problems-in-pure-lambda-calc…
unscaled · 2023-06-05
I'm pretty sure the designers of Rust knows about CSP. Rust has Channels in the standard library after all: https://doc.rust-lang.org/rust-by-example/std_misc/channels.html Rust Channel have the nice additional that they don't panic, and don't have all the weird Go Channel Axioms[1] that you have to wrap your head around to get things to work correctly[2]. For what it's worth, I don't think Java Virtual Threads (a.k.a. project loom) has implemented an explicit concept of channels, although I guess BlockingQueue could work as a channel. There is a big issue with bringing CSP to languages like Java 21 or Go, that use so-called "colorless concurrency" or "stackful coroutines". CSP losses a lot of its modeling power when you combin shared mutable state and pre-emptive (or invisible) parallelism. And this is exactly what both of these languages do. "Colored" abstractions like async/await are more cumbersome (especially in Rust), but they let you know exactly at which points of execution your stackless coroutine may suspend, and you can handle synchronization accordingly. Those functional concepts are cumbersome, but threads ("green", "kernel", "virtual", "goroutines" or otherwise) are not the panacea their proponents claim them to be. I had to debug way too many data races in my life to consider them perfect. Rust still has a lot to improve on its async front (no async traits, async closures or async iterators and the async runtime confusion), it can at least promise me…
brobinson · 2019-11-01
You can easily cause a C/Go program to crash/abort due to runtime type errors. If you've written C, you've miscast something at some point. Go in particular relies extremely heavily on runtime reflection. Both languages have poor type systems. Go's race detector is useful and we've caught bugs using it, but it's nicer when the compiler prevents you from having those bugs in the first place. >quite good concurrency primitives That's gonna be a "yikes" from me, dog: https://www.jtolio.com/2016/03/go-channels-are-bad-and-you-should-feel… I'm not a Rust fanboy, I simply like languages where it's more difficult to represent invalid state (Haskell, Ocaml, Rust, etc.) than in the mainstream languages I suffer with in my job on a daily basis. Rust happens to have great tooling and is the most likely to make inroads on these issues I care about (runtime stability + code correctness via good type system).
dnomad · 2018-05-07
> There is nothing wrong with hiding the nature of the async under the hood of a sync function as long as the abstraction is clean, which in most cases it quite easily can be. This is the question and I would disagree. Hiding the asynchronous nature of any given function is a dangerous illusion. Languages that promote it through stackful coroutines ultimately lead to programs that are difficult to reason about and often don't perform well because developers lack any real control over concurrency and are completely at the mercy of an opaque scheduler. (And frankly, even languages like Go which get this 'right' ... don't. Eventually even people who like Go realize Go channels are bad[1].) The answer here I think is going to be higher kinded types a la Rust. Asynchronous is a "fundamental property of time and space" -- ignore it at your own risk. But if the type system can elegantly capture the difference between present-values and values-to-come then you can realize the best of both words: code that reads like a single-thread-of-control but is actually heavily asynchronous. This is why 'await' style stackless coroutines and Futures prove to be so popular. Though I agree more research is needed here. I was disappointed to see the Rust developers (who apparently convinced people to pay them to research this stuff) converge so quickly on stackless coroutines. [1] https://www.jtolio.com/2016/03/go-channels-are-bad-and-you-should-feel…
oefrha · 2023-09-14
If this is too much research for you, wait until you have to deal with the many problems of Go channels in the real world. (Reasonably well-known though controversial article: [1]) Don't even get me started on Rust. Concurrency and parallelism is hard. Yes, I've written a shit ton of code in all aforementioned languages. [1] https://www.jtolio.com/2016/03/go-channels-are-bad-and-you-should-feel…
tombert · 2021-09-26
This reminds me of a blog post about using pure lambda calculus for whiteboard problems [1]. I'm always fascinated by these "minimum viable language projects", since I think they sort of get into a fundamental concept: what is computing exactly? [1] https://www.jtolio.com/2017/03/whiteboard-problems-in-pure-lambda-calc…
hajile · 2020-01-29
https://www.jtolio.com/2016/03/go-channels-are-bad-and-you-should-feel… I'd add that these aren't just theoretical (EDIT: I forgot that his article linked to this paper). https://songlh.github.io/paper/go-study.pdf Go doesn't actually implement CSP correctly. That would require some changes. This provides a high-level overview. https://stackoverflow.com/questions/32651557/golang-main-difference-fr… Threading is hard and gets a lot harder when you introduce pointers or mutable data. This is even harder when your type system is terrible. I suspect that Go trying to solve this would result in a language that looked a lot like Rust with a Garbage Collector.
silasdavis · 2020-01-07
This share by communicating mantra needs to die. Channel based code in go has a tendency to require nontrivial cleanup. Each time you need to compose a channel you you end up introducing another goroutine (for example just to map a type or merge multiple channels). Now that goroutine needs to be closed, then you end up with an additional close channel, and sometimes you need to drain channels to prevent locks. They are not universally a bad thing, but total avoidance of sync package primitives is a bad idea (and much slower in many circumstances) This gives a good analysis: https://www.jtolio.com/2016/03/go-channels-are-bad-and-you-should-feel…
jstewartmobile · 2019-03-01
The terminology could use some refinement. Not sure "message passing" is the right phrase to describe Go channels. Most encounters I've had with "message passing"--whether it was AJAX, Win32 PostMessage, or grade school--have been non-blocking. Go channels block. edit: Here's a pretty good write-up from 2016 on why channels are an anti-pattern: https://www.jtolio.com/2016/03/go-channels-are-bad-and-you-should-feel…
kragen · 2024-01-29
sorry for the delay i don't know that much about concurrency in general, so take this with a grain of salt i feel like monitors are potentially an improvement over bare locks, but they tend to perform poorly in manycore settings and are still vulnerable to deadlock, perhaps more so due to their implicit nature. (i see that you point this out with respect to java, and also that it doesn't really have monitors.) fundamentally, blocking synchronization of any kind is incompatible with modularity you misspelled brinch (rip) there are lots of versions of actors, and the most influential one effectively didn't have any concurrency at all, so it's important to disambiguate in the text that you're talking about the one in agha's 01985 dissertation, which is also very influential. also your footnote says it's from "1986"; is that a different document by agha with the same title? objects with their own threads (like concurrent actors or like processes in csp or erlang) are not the same thing as monitors, contrary to your assertion in the 'concurrency in oberon' section. there is a well-known duality between message passing between threads and control passing between monitors, but the mechanisms have quite different ergonomics and common failure modes it's surprising that in a discussion that surveys original-modula, modula-2, csp, erlang, active oberon, c, c++, concurrent pascal, object pascal, superpascal, joyce, newsqueak, old squeak, alef, limbo, golang, java, and ada,…

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close