Oskar Lindqvist
@oskarl
Member · Member since Oct 2013
Embedded systems, Rust, the occasional oscilloscope.
0 followers · 0 following
Badges and trust level are earned across the whole community.
- Topics created
- 3
- Posts created
- 6
- Likes given
- 24
- Likes received
- 62
- Days visited
- 0
- Solutions
- 4
Days visited count across the whole community, not just this forum.
Most active topics
- Kubernetes pod stuck in CrashLoopBackOff, no logs
2 replies · 2 votes
- Rust: "borrowed value does not live long enough" when returning a &str from a function
1 replies · 10 votes
- Embedded C: volatile still needed for memory-mapped registers?
1 replies · 3 votes
Most liked posts
- Vim: how do I exit without saving?
Press Esc, then type :q! and Enter.
13 likes
- 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
10 likes
- Bash: loop over files with spaces in their names
Do not parse ls. Let the shell glob, and quote the variable: for f in *.txt; do printf '%s\n' "$f" done For recursive search use find … -print0 | while IFS= r
10 likes
- Go: all goroutines are asleep — deadlock! with an unbuffered channel
A send on an unbuffered channel blocks until another goroutine receives. main is the only goroutine, so it blocks on the send forever. Either receive in another
9 likes
- CSS grid: make the last row items stretch to fill the width
Not with grid alone — grid tracks are shared by every row, so a row cannot have its own column sizes. Use flexbox for that layout: .cards { display: flex; flex-
6 likes
Top categories
Top tags
- #borrow-checker 1
- #c 1
- #debugging 1
- #embedded 1
- #kubernetes 1
Recent badges
- Embedded C: volatile still needed for memory-mapped registers?
Liked by user8841203
With modern compilers and -O2, is volatile still required for hardware registers, or are memory barriers enough?
Likes received · 10/12/2026
- Kubernetes pod stuck in CrashLoopBackOff, no logs
Liked by Priya Raghunathan
kubectl logs for my pod returns nothing and the pod restarts every few seconds. How can I see why it crashes?
Likes received · 10/12/2026
- Bash: loop over files with spaces in their names
for f in $(ls *.txt) breaks on file names with spaces. What is the right way?
Likes given · 10/12/2026
- Rust: "borrowed value does not live long enough" when returning a &str from a function
Liked by Jonah Weiss
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 received · 10/12/2026
- Embedded C: volatile still needed for memory-mapped registers?
Liked by Keiko Arai
With modern compilers and -O2, is volatile still required for hardware registers, or are memory barriers enough?
Likes received · 10/12/2026
- Embedded C: volatile still needed for memory-mapped registers?
Liked by user3307719
With modern compilers and -O2, is volatile still required for hardware registers, or are memory barriers enough?
Likes received · 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
- Async Python: run blocking code without freezing the event loop
Push it to a thread: result = await asyncio.to_thread(blocking_fn, arg) For CPU-heavy work use a process pool with loop.run_in_executor(ProcessPoolExecutor(), f
Likes given · 10/12/2026
- Vim: how do I exit without saving?
ZQ in normal mode does the same with fewer keystrokes.
Likes given · 10/12/2026
- Vim: how do I exit without saving?
Liked by Dmitri Vasko
Press Esc, then type :q! and Enter.
Likes received · 10/12/2026
- Vim: how do I exit without saving?
Liked by Mateus Brandão
Press Esc, then type :q! and Enter.
Likes received · 10/12/2026
- Vim: how do I exit without saving?
Liked by Jonah Weiss
Press Esc, then type :q! and Enter.
Likes received · 10/12/2026
- Vim: how do I exit without saving?
Liked by Amara Nwosu
Press Esc, then type :q! and Enter.
Likes received · 10/12/2026
- Vim: how do I exit without saving?
Liked by Svetlana Orlova
Press Esc, then type :q! and Enter.
Likes received · 10/12/2026
- Vim: how do I exit without saving?
Liked by Ben Achterberg
Press Esc, then type :q! and Enter.
Likes received · 10/12/2026
- Vim: how do I exit without saving?
Liked by Priya Raghunathan
Press Esc, then type :q! and Enter.
Likes received · 10/12/2026
- Vim: how do I exit without saving?
Liked by Hollis Grant
Press Esc, then type :q! and Enter.
Likes received · 10/12/2026
- Vim: how do I exit without saving?
Liked by Keiko Arai
Press Esc, then type :q! and Enter.
Likes received · 10/12/2026
- Vim: how do I exit without saving?
Liked by Tomás Ferreira
Press Esc, then type :q! and Enter.
Likes received · 10/12/2026