Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The first code-to-assembly highlighting example here is beautiful. Question to the authors— is that custom just for this article?

Is there an open source CSS library or something that does this?



Hey, author here. Thanks for the kind words! This is a custom pipeline that I designed for the article. It's implemented as a Node.js library using SVG.js and it statically generates the interactive SVGs directly in the static site generator I was using (Eleventy) by calling out to the Go compiler and extracting assembly for any lines you mark as interesting. It turned out very handy for iterating, but it's not particularly reusable I'm afraid!


I came here to ask about the same thing. Very cool! I would be very interested even in a blog post just on how you did the SVG generation.


I agree with the commenter you're replying to; I'd only add that Intel syntax is much more readable than AT&T.


FWIW, I'm fairly sure this is the assembly syntax used by Go - the author may not have made a decision to use this vs another


Possibly, but objdump can disassemble into Intel syntax.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: