veganism.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Veganism Social is a welcoming space on the internet for vegans to connect and engage with the broader decentralized social media community.

Administered by:

Server stats:

295
active users

#debugging

11 posts11 participants1 post today
Replied to arabiccola

PS: I also discovered you can modify the `lnav` behaviour by only showing new logs at the time of using the SSH command above:

```
#!/usr/bin/env bash

export TZ='Europe/Berlin';
NOW="$(date -Iseconds | sed -e 's/+.*$//')"
LOG_FILE="$(ls -t ~/pgdata/data/logs/*.log | head -n 1)"

if [ "$1" = "now" ]; then
lnav "$LOG_FILE" -c ":hide-lines-before $NOW"
else
lnav "$LOG_FILE"
fi
```

Replied to arabiccola

I ended up adding an SSH user called `postgreslogs` which serves as a way to SSH directly into the logs using:
- A `ForceCommand` SSH daemon config for the user
- A `sudoer.d` config to allow postgreslogs to elevate (i.e. sudo) to postgres (the DB admin account) without a password

Works really nicely! All you need to do to see the logs is to `ssh postgrelogs@postgreshost.proxmox` or similar!

Got up and running with debugging Go code in Emacs in about 2 minutes.

It renders variables inline, as well as when I put my cursor on a variable (eldoc-box).

dape lets me navigate the call stack, it auto expands all local variables, it provides a REPL and more besides.

And all I did was:

# pacman -S delve
M-x dape RET RET

I've yet to try out the more advanced features of delve, like attaching to a running process, but first impressions sure look good!

Ah, the noble quest to tame the wild beast of async Rust with the mystical powers of "deterministic simulation testing" 🤔. Because, naturally, the best way to debug a language that already gives you a headache is to throw more complex simulations at it. 🧠🔍 Surely, this will make everything clear as mud! 🌪️
s2.dev/blog/dst #asyncRust #deterministicTesting #debugging #programming #humor #HackerNews #ngated

S2DST for async RustTaming distributed systems with deterministic simulation testing.