32

Comment Post Error

As suggested, I tried <br><b>replacing</b> the short URL with the URL it redirects to!<br>.

Sadly the short URL redirects to:

https://play.rust-lang.org/?code=%23!%5Bfeature(raw)%5D%0A%0Ause%20std%3A%3Araw%3A%3ATraitObject%3B%0Ause%20std%3A%3Amem%3B%0A%0Atrait%20Foo%20%7B%0A%20%20%20%20fn%20f(%26self)%3B%0A%7D%0A%0Astruct%20Bar%3B%0A%0Aimpl%20Foo%20for%20Bar%20%7B%0A%20%20%20%20fn%20f(%26self)%20%7B%20println!(%22ok%22)%20%7D%0A%7D%0A%0Afn%20erase%3C%27a%2C%20T%3A%20%3FSized%3E(r%3A%20%26%27a%20T)%20-%3E%20TraitObject%20%7B%20unsafe%20%7B%20mem%3A%3Atransmute_copy(%26r)%20%7D%20%7D%0Afn%20recover%3C%27a%2C%20T%3A%20%3FSized%3E(r%3A%20TraitObject)%20-%3E%20%26%27a%20T%20%7B%20unsafe%20%7B%20mem%3A%3Atransmute_copy(%26r)%20%7D%20%7D%20%0A%0Afn%20erase_foo%3C%27a%3E(r%3A%20%26%27a%20Foo)%20-%3E%20TraitObject%20%7B%20unsafe%20%7B%20mem%3A%3Atransmute(r)%20%7D%20%7D%0Afn%20recover_foo%3C%27a%3E(r%3A%20TraitObject)%20-%3E%20%26%27a%20Foo%20%7B%20unsafe%20%7B%20mem%3A%3Atransmute(r)%20%7D%20%7D%20%0A%0Afn%20main()%20%7B%0A%20%20%20%20let%20r%3A%20%26Foo%20%3D%20%26Bar%3B%0A%20%20%20%20let%20x%20%3D%20erase(r)%3B%0A%20%20%20%20let%20xf%20%3D%20erase_foo(r)%3B%0A%20%20%20%20println!(%22%7B%3A%3F%7D%20%7B%3A%3F%7D%22%2C%20x.data%2C%20x.vtable)%3B%0A%20%20%20%20println!(%22%7B%3A%3F%7D%20%7B%3A%3F%7D%22%2C%20xf.data%2C%20xf.vtable)%3B%0A%20%20%20%20let%20y%3A%20%26Foo%20%3D%20recover(x)%3B%0A%20%20%20%20let%20yf%20%3D%20recover_foo(xf)%3B%0A%20%20%20%20y.f()%3B%0A%20%20%20%20yf.f()%3B%0A%7D&version=nightly&backtrace=0

... which does not fit in a comment.

How do we handle situations like this?

17
  • 9
    Context: have 100k+ imaginary Internet dollar points, 700+ badgers, ~6.7m imaginary Internet dollar people reached, and 7 Reddit cake days. Oct 7, 2016 at 17:09
  • 29
    I don't see what exactly we can do about this, though. URL shorteners are horrible and we don't want to allow them, but that also doesn't mean we need to support a website that doesn't know how to use URLs properly and wants to paste the entire block of code you typed into the URL like that. I would suggest using one of the shorter URLs as identified in the answer below.
    – animuson StaffMod
    Oct 7, 2016 at 17:15
  • 8
    @animuson: You could start by trusting people that have been here for a loooong time and have a lot of reputation. It's kinda ridiculous that I can still get rate-limited by SO chat for posting a few quick messages in a conversation.
    – Xeo
    Oct 7, 2016 at 17:54
  • 15
    @Xeo: problem is they know there are also people like me who've been around forever, but still can only be trusted with the plastic scissors... :-) Oct 7, 2016 at 17:57
  • 4
    @Xeo: Even mods get rate-limited for that. And some of our mod tools are rate-limited too... thankfully not deleting things, though.
    – BoltClock
    Oct 7, 2016 at 18:17
  • You could post that comment as an answer starting with "Assuming you want to use this sort of memory trick," with the code and a link to the example on rust-lang.org. You can always delete the answer if it turns out to not be useful and you are worried about downvotes. Oct 7, 2016 at 18:21
  • @AndrewMorton or make it a Community Wiki answer.
    – JAL
    Oct 7, 2016 at 18:39
  • 2
    @BoltClock: given that mods, effectively, represent a tier of 'most-trusted-users' is that not an argument for removing, or reducing, rate-limits, whether according to rep or role of the user? Especially when the most destructive, though admittedly also possibly the most useful, tool available to you isn't rate-limited? Oct 8, 2016 at 11:20
  • 5
    @animuson One solution would be to do what Twitter does: treat URLs as a single fixed length (URLs on Twitter are treated as 23 characters no matter how long they are). Another option, if the link is presented with display text (e.g. [Display this](http://.....), is to only count the display text and not the URL.
    – JLRishe
    Oct 8, 2016 at 11:40
  • 2
    Not all link shorteners are banned. This one (that was the topic of a recent HNQ) still works http://🐟🍌🐤🐢🐒🐈🍋🍱.🍕💩.ws Oct 8, 2016 at 18:05
  • 5
    This bug should be directed at the Rust Lang Play maintainers, not MSO. That URL is absurd. Oct 9, 2016 at 12:12
  • 2
    @LightnessRacesinOrbit They have a "Shorten" button which generates a shorter URL that you presumably would not consider absurd. That shorter URL is then blocked by SO. That's what this whole question is about.
    – user743382
    Oct 9, 2016 at 13:03
  • 1
    Why people are against such URLs? They have all the state contained within and thus are less suspectible to link rot
    – mike3996
    Oct 9, 2016 at 13:03
  • 1
    @hvd: Yes, I read the question. There is a middle ground between "URL that requires a terabyte hard drive to store" and "URL shortened off-site by arbitrary third-party service" Oct 9, 2016 at 13:53

1 Answer 1

20

While not ideal, play.rust-lang.org also allows you to link to a GitHub Gist or Playground URL. Have you considered using either of those?

Playground URL: https://play.rust-lang.org/?gist=02a3ef9987b9c3a8dca1d5283122ef7a&version=nightly&backtrace=0

Gist URL: https://gist.github.com/02a3ef9987b9c3a8dca1d5283122ef7a

4
  • 20
    Been there, done that. Pretend the question says "a 1.4kB link" instead of the actual link. This specific link is only there for artistic reasons. Oct 7, 2016 at 17:16
  • 3
    Artists can be programmers, too. I don't see an issue. Oct 7, 2016 at 18:56
  • 6
    @R.MartinhoFernandes if you draw a Mona Lisa on the base code of any project I'm working in, either you stop or I do...
    – Braiam
    Oct 7, 2016 at 23:48
  • 1
    @R.MartinhoFernandes Put the 1.4kB link in a Gist or Pastebin paste and link to that. It's an extra click but it seems that would still be the simplest solution in this case.
    – Hack-R
    Oct 8, 2016 at 15:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .