Show HN: Godbolt-in-a-floating-window for Neovim (C, C++, Rust)

103 points by 0xdeadf1sh 23 hours ago on hackernews | 18 comments

shmerl | 22 hours ago

That's interesting. There is also https://codeberg.org/Jorenar/nvim-dap-disasm if you want to get it for actual compiled result + debugger.

evmar | 21 hours ago

https://github.com/pacak/cargo-show-asm is a nice helper for the Rust->asm part of this that has seen a decent amount of work for handling all the edge cases. (I've contributed a bit to it to handle some Windows issues.)

bajard | 21 hours ago

Maybe I should say Compiler Explorer instead of Godbolt.

This should be mandatory for any programming environment, along with a CPU emulator showing how data moves through the ALU, and all the ports, to which registers it goes to, and how everything works clock by clock.

I hope AI makes this possible, at least for VS Code and C++.

Yeah there is so much to do on the visualization side! I know people who still draw these things on paper and count cycles by hand.

0c3ca83 | 18 hours ago

Paper is a medium of thought, and writing without a computer is still one of the best ways to slow down and organize your mind.

I still write code out on paper as I think through algorithms.

bee_rider | 18 hours ago

Modern cores are quite wide, I don’t know if my monitor is big enough to show this info for all the in-flight instructions…

bajard | 16 hours ago

When I program, I imagine the registers and ports. Only the ones I use. I see the sequence of micro-ops moving like in a queue, the stack in a different column, and the L1 cache as neighboring lines. That could be drawn.

The parts not involved could be drawn in miniature, like the AVX2 hardware. More detail could be shown if the user clicks.

It probably isn't as complex to draw.

ceryle | 16 hours ago

i don't think IHVs would give out the RTL required for this to be possible, and it would also require a ton of compute to simulate it. TDA will be the best you can get reasonably.

ivanjermakov | 20 hours ago

I usually want to see assembly during debugging, not development. For which rad debugger is a must (now on Linux!): https://github.com/EpicGames/raddebugger

FirstClassTree | 18 hours ago

genuinely asking, but isn't today the AI writing the code?

FirstClassTree | 18 hours ago

I mean I'm not a nub I know C and has a degree in CS and stuff, worked at Microsoft

FirstClassTree | 18 hours ago

I also use VIM for my Obsidian note taking, which kind of replaces my code writing

[OP] 0xdeadf1sh | 18 hours ago

I've made this for my hobby projects where I still get to write the code manually. If you are using agentic coding then you don't need neovim to begin with.

0c3ca83 | 18 hours ago

It's certainly making the business decisions, at least. It's incredible how many CEOs admit that their decisions came from asking ChatGPT.

swatcoder | 18 hours ago

Some of the code, some of the time, for some of the people.

Yet far from all of the code, all of the time, for all of the people.

People just like to talk it up, especially if they've been able to let it take over they're own coding. And some people work and chat in bubbles where they only know people working similarly to themselves.

waschl | 18 hours ago

+1 only because of the seemingly non-AI README. Such a joy to get the core info in one glimpse

[OP] 0xdeadf1sh | 18 hours ago

The whole reason this extension exists is to help me with my non-AI hobby projects like path tracer in C, and my C++ Vulkan renderer.

I don't think this extension is valuable for people who use agents to code.

RahulMishra315 | 7 hours ago

Tested this on mobile Chrome — loads super fast and the UI is very clean. Nice work!