Hacker News new | past | comments | ask | show | jobs | submit login
RMSbolt – An implementation of the Godbolt compiler-explorer for Emacs (gitlab.com)
91 points by mepian 5 months ago | hide | past | web | favorite | 9 comments

I like how "god" was substituted by "rms" (Richard Stallman's initials).

Godbolt is pretty useful. It is a good idea to start by turning off compiler optimizations.

Interestingly enough, Godbolt is the full last name of its author, Matt Godbolt.

One of the cool things about god bolt is I get to share some of the (probably edge case) optimizations that llvm employs.

Compare the following two for loops:





Note that clang elides the loop and performs in constant time. Note also that changing the types of some of the variable signatures form long to int removes the optimization.

Not only his initials, but also his password!

Oh, wow - this is really cool.

I'd like to see a programming environment that integrated something like this directly; this seems like it could, if done cleverly, do an enormous amount for the leaky-abstractions problem. Something that was designed such that you could easily work with and analyze your code in the high-level and low-level views. Not to mention, having the machine be right there next to your code, with their correspondences clearly marked, would do an enormous amount to demystify what your code's really doing on the lower levels.

(I think there's a glimmer of an idea in here for what a future programming system might look like, that allows us to use high-level abstractions and other ergonomic programming concepts AND actually think about the metal and how to use it directly at the same time. Something something interactive compilation...)

> No more sending your code to any server


Oh cool; the author also added support for byte code compilation; for languages like python and java.

I used early versions of this before it was in GitHub. Glad to see it is progressing. It worked very well and have been in using it regularly. Can't wait to upgrade!

Funny how I seem to have misused godbolt all the time, only being interesting in the output of a piece of code or comparing some compilers, not really caring for the assembly code :P

As for this I'd have to a) install emacs (shush) and b) install all those compilers I don't have installed

Obligatory xkcd: https://xkcd.com/1172/

Applications are open for YC Summer 2019

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