News for hackers. Stuff that matters.
Re:Compiler Explorer by jokh on Friday December 14, 2018 @11:30AM (#18682011)
This would be really useful if it can be run offline. Much easier to use than writing code, compiling it with -S to produce assembly, then trawling through the assembly to look for the code you're interested in.
Re:Compiler Explorer by mshockwave on Friday December 14, 2018 @11:52AM (#18682238)
It's open source, so you can just clone the source code and run the server locally on your computer. I've been running it like this for a long time :-)
Re:Compiler Explorer by ufo on Friday December 14, 2018 @01:48PM (#18683402)
How hard was it to set up for you? Is it a small standalone thing or a beast with complex dependencies? Did you configure it to run everything locally or is it still requesting a web service to compile the programs?
Re:Compiler Explorer by je42 on Friday December 14, 2018 @06:22PM (#18685842)
i got it up and running within 30min or so.
Re:Compiler Explorer by jokh on Friday December 14, 2018 @12:20PM (#18682532)
Oh, I had no idea it was open source. Thanks!
Re:Compiler Explorer by kazinator on Friday December 14, 2018 @05:05PM (#18685281)
> Much easier to use than writing code compiling it with -S to produce assembly

In any real-world, production use cases, I will vastly prefer to "objdump -d" or "objdump -S" the executable image (which is formed from dozens, hundreds or thousands of source files, with specific compiler flags and so on). I'm not going to be feeding these source inputs into some dialog box on a website.

What you might benefit from would be a browser which can parse the output of "objdump --line-number -S <yourexecutable>" and present it in a nicer way.

E.g. all the implicated source files could be identified and loaded into multiple views/tabs, with two-way navigation between those and the disassembly tab.

Re:Compiler Explorer by kazinator on Friday December 14, 2018 @05:15PM (#18685365)
Idea: massage the "objdump --line-number -S <executable>" output into a vim quickfix list (errors.err file).

Then run vim -q.

The idea would be that all those file:line entries become navigable quickfix items: we can navigate through the quickfix items (thereby browsing the source code), and the assembly is in the quickfix window as context.

Re:Compiler Explorer by unhammer on Friday December 14, 2018 @02:58PM (#18684078)
Try https://gitlab.com/jgkamat/rmsbolt – highlights the assembly of the code-at-point: https://i.imgur.com/fAQQMJe.gif
Re:Compiler Explorer by Const-me on Friday December 14, 2018 @11:56AM (#18682272)
If you're interested in the code, put a breakpoint and launch with a debugger. In Visual C++ that literally two keypresses, F9 and F5. As a nice side effect, you can step over the assembly instructions observing how they change registers and memory.
Re:Compiler Explorer by rasjani on Friday December 14, 2018 @11:34AM (#18682062)
I haven’t really tried it but from all the exposure godbolt gets in cppcast, I think there is a way to run it locally.