Jonah Weiss
@jonahw
Member · Member since Oct 2013
Writes Go for money and Haskell for fun.
0 followers · 0 following
Badges and trust level are earned across the whole community.
- Topics created
- 2
- Posts created
- 7
- Likes given
- 23
- Likes received
- 56
- Days visited
- 0
- Solutions
- 5
Days visited count across the whole community, not just this forum.
Most active topics
- Go: all goroutines are asleep — deadlock! with an unbuffered channel
1 replies · 11 votes
- C#: async void vs async Task
1 replies · 0 votes
Most liked posts
- Why does iterating a sorted list run faster than an unsorted one in this C++ loop?
You are seeing branch prediction. The CPU does not wait to find out whether x >= 128 is true before it starts executing what comes next. It guesses, based on th
12 likes
- Go: all goroutines are asleep — deadlock! with an unbuffered channel
func main() { ch := make(chan int) ch <- 1 fmt.Println(<-ch) } Why does this deadlock?
11 likes
- Java: concurrent modification exception when removing from a list in a for-each loop
Use removeIf: names.removeIf(String::isBlank); or an explicit Iterator and it.remove().
10 likes
- Why does iterating a sorted list run faster than an unsorted one in this C++ loop?
No — sorting is O(n log n) and costs far more than the mispredictions unless you loop over the same data many times. Prefer the branchless form.
9 likes
- TypeScript: type an object whose keys come from a union
Use Record: type Theme = 'light' | 'dark'; const bg: Record<Theme, string> = { light: '#fff', dark: '#0d1117' }; Missing a key is a compile error. Use Partial<R
5 likes
Top categories
Top tags
- #async-await 1
- #c# 1
- #channels 1
- #concurrency 1
- #go 1
Recent badges
- Is it possible to style the scrollbar in Firefox?
::-webkit-scrollbar does nothing in Firefox. Is there an alternative?
Likes given · 10/12/2026
- React: useEffect runs twice in development
My useEffect with an empty dependency array fires twice on mount, so my analytics event is sent twice. Is my component mounting twice?
Likes given · 10/12/2026
- Go: all goroutines are asleep — deadlock! with an unbuffered channel
Liked by Mateus Brandão
func main() { ch := make(chan int) ch <- 1 fmt.Println(<-ch) } Why does this deadlock?
Likes received · 10/12/2026
- Rust: "borrowed value does not live long enough" when returning a &str from a function
fn first_word(s: String) -> &str { s.split(' ').next().unwrap() } The compiler says the borrowed value does not live long enough. I just want the first word
Likes given · 10/12/2026
- CSS grid: make the last row items stretch to fill the width
I have a grid with grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)). When the last row has fewer items they keep their column width. I want them to
Likes given · 10/12/2026
- How do I select rows from a pandas DataFrame based on column values?
I have a DataFrame of orders and want only the rows where status is "shipped" and total is above 100. In SQL: SELECT * FROM orders WHERE status = 'shipped' AND
Likes given · 10/12/2026
- Why does iterating a sorted list run faster than an unsorted one in this C++ loop?
I have a loop that sums every element of a large std::vector<int> that is at least 128. If I sort the vector first (outside the timed region), the loop runs abo
Likes given · 10/12/2026
- Floating point: why is 0.1 + 0.2 != 0.3?
No — 0.1 and 0.2 have no exact binary representation, so the sum is 0.30000000000000004. Compare with a tolerance: Math.abs(a - b) < Number.EPSILON and use inte
Likes given · 10/12/2026
- Floating point: why is 0.1 + 0.2 != 0.3?
0.1 + 0.2 === 0.3 is false in JavaScript. Is the language broken?
Likes given · 10/12/2026
- Vim: how do I exit without saving?
Liked by Priya Raghunathan
ZQ in normal mode does the same with fewer keystrokes.
Likes received · 10/12/2026
- Vim: how do I exit without saving?
Liked by user3307719
ZQ in normal mode does the same with fewer keystrokes.
Likes received · 10/12/2026
- Vim: how do I exit without saving?
Liked by Oskar Lindqvist
ZQ in normal mode does the same with fewer keystrokes.
Likes received · 10/12/2026
- Java: concurrent modification exception when removing from a list in a for-each loop
Liked by Oskar Lindqvist
Use removeIf: names.removeIf(String::isBlank); or an explicit Iterator and it.remove().
Likes received · 10/12/2026
- Java: concurrent modification exception when removing from a list in a for-each loop
Liked by Svetlana Orlova
Use removeIf: names.removeIf(String::isBlank); or an explicit Iterator and it.remove().
Likes received · 10/12/2026
- Java: concurrent modification exception when removing from a list in a for-each loop
Liked by Priya Raghunathan
Use removeIf: names.removeIf(String::isBlank); or an explicit Iterator and it.remove().
Likes received · 10/12/2026
- Java: concurrent modification exception when removing from a list in a for-each loop
Liked by Keiko Arai
Use removeIf: names.removeIf(String::isBlank); or an explicit Iterator and it.remove().
Likes received · 10/12/2026
- Java: concurrent modification exception when removing from a list in a for-each loop
Liked by Lin Mei
Use removeIf: names.removeIf(String::isBlank); or an explicit Iterator and it.remove().
Likes received · 10/12/2026
- Java: concurrent modification exception when removing from a list in a for-each loop
Liked by Hollis Grant
Use removeIf: names.removeIf(String::isBlank); or an explicit Iterator and it.remove().
Likes received · 10/12/2026
- Java: concurrent modification exception when removing from a list in a for-each loop
Liked by Tomás Ferreira
Use removeIf: names.removeIf(String::isBlank); or an explicit Iterator and it.remove().
Likes received · 10/12/2026