Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

My WebAssembly debugger lets you time-travel with your scroll wheel. WebAssembly (and Ghostty) are so fast that a step back just reruns from scratch.

113,665 Aufrufe • vor 7 Tagen •via X (Twitter)

44 Kommentare

Profilbild von Patrick Smith
Patrick Smithvor 7 Tagen

GitHub:

Profilbild von Adam Dymitruk
Adam Dymitrukvor 6 Tagen

Everything needs event sourcing by default.

Profilbild von Santiago Pablo Ortiz
Santiago Pablo Ortizvor 5 Tagen

This is awesome man

Profilbild von 👼🏿
👼🏿vor 7 Tagen

so blinkenlights @jartine made but without its aesthetics?

Profilbild von Aarav Dayal
Aarav Dayalvor 5 Tagen

What is the optimization? Keeping the diff of the memory for each instruction stepping? Because how will you unexecute an instruction usually?

Profilbild von Patrick Smith
Patrick Smithvor 5 Tagen

The optimization is to make it fast enough that I just replay everything to “unexecute”.

Profilbild von Aarav Dayal
Aarav Dayalvor 5 Tagen

No I mean how do you capture all of it such that it does not take gigabytes of memory to record a program's execution?

Profilbild von Patrick Smith
Patrick Smithvor 5 Tagen

What do you need gigabytes for? There’s an interpreter. A step forward executes the next instruction. A step back executes all the instructions from the beginning up to the previous step. The speed is what allows that to feel instant. There’s no capturing and no caching.

Profilbild von Aarav Dayal
Aarav Dayalvor 5 Tagen

"A step back executes all the instructions from the beginning up to the previous step." Oh so this is the tradeoff. Thank you lmao. This is what I wanted to know.

Profilbild von RandomYang
RandomYangvor 6 Tagen

It’s fascinating that program execution accumulates state, so stepping back means replaying from the start up to step n-1.

Profilbild von TG
TGvor 6 Tagen

I have wanted this, so very many times. Also video like controls would be good with speed options to debug in real time. Play, Stop, SlowMo, Step.

Profilbild von Patrick Smith
Patrick Smithvor 5 Tagen

I’ve created a free Discord community for everything QIP, the wasm component system behind this:

Profilbild von ibuki
ibukivor 5 Tagen

Wasmは純粋な計算だけだから再実行って手段が実現できるのか

Profilbild von LinuxVersion
LinuxVersionvor 7 Tagen

I assume you will make snapshots periodically to simulate forward from instead of time traveling from the start for long running programs (and diff the snapshots to only store changes)

Profilbild von Patrick Smith
Patrick Smithvor 7 Tagen

No snapshots in this demo. I expect for larger wasm components I’ll have to add some snapshotting but I’ll measure exactly where that line is.

Profilbild von ricochet
ricochetvor 7 Tagen

love this!

Profilbild von Preyforge
Preyforgevor 5 Tagen

time-travel debugging is such a good use of the interface. i keep runs interruptible so the human can take the mouse when the path gets weird; observability should make that handoff easier, not ceremonial.

Profilbild von Shang Yuzu
Shang Yuzuvor 6 Tagen

j’ai pas lu la notice.

Profilbild von Multiple Systems
Multiple Systemsvor 6 Tagen

why is it important how fast ghostty is?

Profilbild von Francois Laberge
Francois Labergevor 7 Tagen

I was surprised how well for shortish recordings of another app just replaying up to playhead sufficed. Wasn't even in webassembly. This looks great.

Profilbild von Mykhailo Kulak 🇺🇦
Mykhailo Kulak 🇺🇦vor 6 Tagen

This is cool!

Profilbild von mfpaintr
mfpaintrvor 6 Tagen

Cool, but why a terminal? Debugging is about visualizing what is happening. A GUI can provide a much better experience.

Profilbild von deus
deusvor 6 Tagen

cool

Profilbild von Nilo Stolte, PhD 🍁⚙️
Nilo Stolte, PhD 🍁⚙️vor 6 Tagen

This is petty cool! My question isn't directly related to WebAssembly, but to Ghostty. How is your overall experience with Ghostty going so far? How long you've been using it?

Profilbild von Patrick Smith
Patrick Smithvor 6 Tagen

Ghostty is really nice! I previously just used the built-in macOS Terminal so I want something simple. It’s the split panes and modern rendering that I really appreciate.

Profilbild von Nilo Stolte, PhD 🍁⚙️
Nilo Stolte, PhD 🍁⚙️vor 6 Tagen

I've seen your demo for qip, a chronometer that uses canvas and fonts to render the numbers. I'm curious about the language that you used for this piece. I suppose you didn't write WebAssembly directly.

Profilbild von Patrick Smith
Patrick Smithvor 6 Tagen

Yes that example is in Zig. I’m using the Codex coding agent, first I’ve made an Inter font lib, then iteratively made this example. I’m sure the code could have many improvements, but it’s pretty vanilla imperative code.

Profilbild von Nilo Stolte, PhD 🍁⚙️
Nilo Stolte, PhD 🍁⚙️vor 5 Tagen

I checked how you rendered the "glyphs" and I saw it's bitmap. I thought your were dealing with real vector glyphs. Also the program is quite long. Check my vector clock in Java. It's simpler:

Profilbild von Hi O'laverly
Hi O'laverlyvor 5 Tagen

Oh, nice. I'm going to have to take a look at that.

Profilbild von Jarno
Jarnovor 6 Tagen

Debugging by rewinding time instead of adding print statements. Perfect.

Profilbild von allOS.dev - Creating Cross-Platform Apps
allOS.dev - Creating Cross-Platform Appsvor 6 Tagen

So cool! Following!

Profilbild von hardikxk
hardikxkvor 7 Tagen

Btw does also it work for WAT files or just anything that compiles to wasm?

Profilbild von Patrick Smith
Patrick Smithvor 6 Tagen

Is wat files something you’d be authoring? I’d suggest using wat2wasm

Profilbild von hardikxk
hardikxkvor 6 Tagen

Had been exploring wat as of late with wat2wasm but yes it is a pain to write wat files over simply using JS or c++ even

Profilbild von ø
øvor 6 Tagen

This is the way...

Profilbild von William Selby
William Selbyvor 6 Tagen

Okay this is so sick? Is it on Github?

Profilbild von Patrick Smith
Patrick Smithvor 6 Tagen

Thanks! Yes it is:

Profilbild von sshpie
sshpievor 5 Tagen

That's cool

Profilbild von Dylanger Daly
Dylanger Dalyvor 6 Tagen

Yummy

Profilbild von Yeab - engg / core was in Palo Alto🌴
Yeab - engg / core was in Palo Alto🌴vor 6 Tagen

cool

Profilbild von Nawid
Nawidvor 7 Tagen

Fantastic

Profilbild von keshen
keshenvor 5 Tagen

what if your program did a side effect

Profilbild von kiby3x
kiby3xvor 6 Tagen

how does that work calling JS functions that aren't pure?

Profilbild von Valentyn Kit 🦀 | Rust · Solana
Valentyn Kit 🦀 | Rust · Solanavor 7 Tagen

"reruns from scratch" being fast enough to feel like a rewind is the whole trick.

Ähnliche Videos