(near-duplicate of Common online compiler blacklisted. This Q was meant to be about posts, where length limits aren't a serious problem and posting full URLs is a valid answer. This has become the go-to question for all discussion, including links in comments (where shortening is also blocked), and of course generalized from http://gcc.godbolt.org/ to include other code-posting sites.)
http://gcc.godbolt.org/ is the only online-compiler site I know of that shows asm output (other than hacks like having your program execl("objdump", argv[0], NULL)
or copying MSVC's asm output to stdout). It even strips out the noise and formats it nicely, so it's great for seeing how something compiles with different gcc/clang versions, or even for ARM. Most of my answers have links to code on godbolt, since I spend a lot of time answering performance or SIMD-vectorization questions.
Godbolt has a "permalink" button which gives a goo.gl-shortened link to be copied-and-pasted. The unshortened links have all the compiler options, and the source code mime-encoded. All of that is urlencoded. I don't mind having links that are 1300 characters long for a 25 lines of code (with long comments), but it seems a bit excessive. It might make some of my answers run into the 30k char limit.
Should we just manually expand these links ourselves? SO could expand them for us. This would be especially convenient when editing old answers that have shortened links, to avoid having to manually go and un-shorten them.
In this particular case, Matt Godbolt (the site owner) can add a non-shortened textbox to copy from, since he still actively maintains/improves it. So long term, the extra step of pasting the URL into a new tab and hitting ctrl-L ctrl-C should go away, leaving us with just the length of the URLs.
The godbolt problem was already identified by a comment when the original proposal was posted, but there were no replies to that comment.
My point is undermined by the fact that the shortened godbolt URL I was going to use as an example (from Fastest way to do horizontal float vector sum on x86) no longer works. That's the first time I've seen a goo.gl-shortened godbolt link go dead.
That example godbolt link is from What is the efficient way to count set bits at a position or lower?, where I have two godbolt links to the same code with different compiler options. That's not uncommon. Sometimes the code is even longer, making the URL that much longer, if I have some extra experimentation in the code on godbolt that I leave out of my answer. (For readability, and because it's only interesting when you're looking at the asm output.)
I've only ever run into the 30k char limit once, on a question that caught my interest and kept me coming back to add more stuff I found (and did only a mediocre job of editing to keep it concise). I usually manage to keep things shorter than that, probably by enough that expanding godbolt links wouldn't have been a problem.
Most of the time I don't actually post separate godbolt links for different compile options, I just mention the effect and leave it up to readers to modify the compile options after following one of the godbolt links I do post. Partly that's for maintainability of the answer: if I change something in the code, I don't want to have to update all the links with different compile options. So again, that's a factor that keeps the amount of godbolt links in check, reducing the chance I'd want to include so many that the 30k char limit would matter.
goo.gl
link on SO, I assume it's to godbolt (from other context). In my answers / comments, I usual say it's a godbolt link, or that it's to "how the code compiles". But I think I understand more clearly the concern that the extra level of indirection disguises the link, so it could be anything (malicious, something the reader has already read, a Rickroll, ...). Ideally godbolt.org would have its own URL-shortening, so the links would still be godbolt links, but then he'd need a persistent database with backups to avoid losing all that state.http://godbolt.org/shortened/XYZABC
tohttp://goo.gl/XYZABC
. Then godbolt doesn't have to worry about backing up the shortening map, and can still leave that to google. However, this doesn't help anyone, because spammers will just start using godbolt! The way godbolt currently works, it doesn't have to save user state at all. Using URLs that don't contain the full information content of the code and options would require storing it persistently, which is a major change.