Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mark_undoio
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
61.
▲
by
mark_undoio
2y ago
> What happens if the loop executes some non-idempotent calls? I guess printf debug still has some value :) Then they'll do the same thing when you replay. Non-idempotent system calls are tricky because they interact with the outsid
62.
▲
by
mark_undoio
2y ago
> I just wish intellij had a time travel debbuger like Visual Studio Pro. You might find our Java product interesting, it adds Time Travel Debug to IntelliJ - https://undo.io/products/java/ Undo captures everyt
63.
▲
by
mark_undoio
2y ago
I love that DDD has a variety of graphical visualisations built in. I always thought the ability to data structures was particularly cool. A while ago there was a project to port it to GTK3 but I think that went away. I'm glad the ma
64.
▲
by
mark_undoio
2y ago
Out of interest - what sort of objects are hard to print in this way but easy to view in a debugger?
65.
▲
by
mark_undoio
2y ago
> Sure, it doesn't help much for some scenarios (one I've heard people mention is multithreaded code, where logs are better?), but for most people it's not that far from a superpower. Debuggers can be great for understandi
66.
▲
by
mark_undoio
2y ago
You could also use GDB's Dynamic Printf ( https://sourceware.org/gdb/current/onlinedocs/gdb.html/Dynam... ) to do the logging directly from GDB. Essentially you set it like a breakpoint (attaching a p
67.
▲
by
mark_undoio
2y ago
Even indoor bouldering has had an effect for me - my thicker skin just doesn't always register well on my phone screen.
68.
▲
by
mark_undoio
2y ago
Tangential but I keep wishing for an MS Space Simulator revival - I realise there are other games that scratch that itch these days but I did enjoy how very seriously it took accurate simulation (plus occasional silly touches like the vario
69.
▲
by
mark_undoio
2y ago
Yes, this is true. Genuine parallelism will absolutely be a problem there - similarly to how it is for user-level record/replay tech. And serialising is going to have more impact when you're recording a whole OS vs just one appl
70.
▲
by
mark_undoio
2y ago
> Presumably rr, focusing on processes, offers a more constrained environment that's easier to log & replay. As someone who's worked elsewhere on time travel debug, I'm really curious on @roca's take on this - bec
71.
▲
by
mark_undoio
2y ago
> Even then, you still want snapshots to jump to a point in time. The only annoying thing is the case where you want to step back one, meaning a naive implementation would jump back to the last snapshot and play forward. At Undo.io we us
72.
▲
by
mark_undoio
2y ago
I've heard if the company really wants stuff to get done efficiently then they need to put a lawyer on the product team - i.e. change the incentive from "prevent engineering creating risks, even at the cost of them failing" t
73.
▲
by
mark_undoio
2y ago
GDB is happy to deal with separate debug info files from the executable code - and has been approximately "always", as far as I'm aware. But it's not particularly common / well-understood how to actually achieve it
74.
▲
by
mark_undoio
2y ago
I've seen gcc do an enthusiastic job on `static` functions within a C compilation unit - specifically where they only have one call site and so can be fully inlined into the caller. In that case, the code did become pretty hard to debu
75.
▲
by
mark_undoio
2y ago
This one, I believe: https://github.com/libunwind/libunwind ETA: Thinking about it, I'm not really sure what it'd do for C++ - I guess you'd end up with mangled names, so if you want sensible names you m
76.
▲
by
mark_undoio
2y ago
If you're on *NIX have you tried just invoking gstack or similar as an external process? https://linux.die.net/man/1/gstack Or, indeed, getting a core dump and applying GDB to it. GDB seems generally pretty
77.
▲
by
mark_undoio
2y ago
There's `debuginfod` on Linux: https://developers.redhat.com/blog/2019/10/14/introducing-de... It builds a lot on quite a simple conceptual base, benefiting from native support in gcc / clang (
78.
▲
by
mark_undoio
2y ago
The other trick I've found really helpful for "optimized out" values is to find places where they cross boundaries that block optimizations (e.g. procedure calls to another translation unit, so long as you're not doing s
79.
▲
by
mark_undoio
2y ago
> It’s a massive pain to have everything be marked as “optimized out” and reassemble the things you want from other variables or by using a disassembler to manually track which register the value is hiding in. If you've got a time t
80.
▲
by
mark_undoio
2y ago
Good to see this discussed - debuggability is not talked about enough but, done right, it could be a superpower. Setting the build for an old x64 machine ( https://dhashe.com/how-to-build-highly-debuggable-c-binaries... ) for
81.
▲
by
mark_undoio
2y ago
Debuggers, though "one more thing to think about" whilst learning do actually make things easier to understand for a beginner. I try not to introduce them too early because lots of concepts at once gets frustrating - but eventuall
82.
▲
by
mark_undoio
2y ago
> Go was originally pitched as a systems programming language, a better C, like you said. I've always understood this claim as a particular (rather restricted) interpretation of "systems" code - meaning network servers, ba
83.
▲
by
mark_undoio
2y ago
That flashed me back to a vague memory that the film 10,000BC showed mammoths in use building the pyramids, which I thought was incredibly silly (well, it was...). But it's kind of satisfying to know that the building at least overlap
84.
▲
by
mark_undoio
2y ago
One thing that struck me about the Z1 was how closely it paralleled things I'd expect to see in a silicon implementation of a CPU: I recall seeing: different physical blocks for different logic, a big regular blog for the memory and ot
85.
▲
by
mark_undoio
2y ago
A little over 10 years ago I was doing some very resource-constrained embedded programming. We had been using custom chip with an 8051-compatible instruction set (plus some special purpose analogue circuitry) with a few hundred bytes of RA
86.
▲
by
mark_undoio
2y ago
> I think the only scenario where it makes sense is a difficult-to-reproduce bug that you're actively looking for. That's a great use case for time travel debugging - do you have a sense why you've not found an opportunity
87.
▲
by
mark_undoio
2y ago
I think the implementation in C++ put it out of fashion, as later languages (e.g. Java) deliberately restricted it to avoid the complexity. The main criticism I saw was the potential for (variants of) the "diamond" where A is sub
88.
▲
by
mark_undoio
2y ago
I think it's a shame this wasn't highlighted more explicitly in, at least, my computer science degree. We did finite state machines in quite a bit of detail, vaguely referred to pushdown automata but then concentrated on lambda ca
89.
▲
by
mark_undoio
2y ago
Agreed. Very different gameplay, setting, everything really. Just two good games, weirdly sharing a name!
90.
▲
by
mark_undoio
2y ago
On a holiday with friends I once spent some time on a beach trying to demonstrate a computer could be built with sandcastles and tennis balls. IIRC, we managed to get AND, OR, NOT, XOR working and I set about building a half adder. It need
More ›