Re: [OSM-dev] [Talk-GB] OSM shortlinks problem
On Mon, Mar 29, 2010 at 23:28, Matt Amos zerebub...@gmail.com wrote: On Mon, Mar 29, 2010 at 11:34 PM, Gregory nomoregra...@googlemail.com wrote: On 29 March 2010 15:15, Matt Amos zerebub...@gmail.com wrote: http://trac.openstreetmap.org/changeset/16271 yeah, it was originally =, but changed to - to work with twitter. given that the characters A-Z, a-z, 0-9, _, @, - and = have already been used, what's the next best character? ~? +? Well I suggested that you remove problematic symbols, and just use A-Z, a-z, 0-9 if need be. we're already using those symbols in a way that makes it difficult to reuse them for trailing characters without breaking existing links. if anyone can find a character which isn't in the list above, and doesn't break at least one URL-detector out there, then that's the best way to fix this. the alternative is to use some other scheme, for example appending .1/.2 instead of -/-- which makes some zoom levels a char longer. or possibly pre-pending the dashes, since they're usually picked up in the middle of an URL - but this makes char deletion from the end work slightly differently. it's also worth noting that, in the current scheme, shortlinks can end in @ or _ - do these also break the URL detectors? Yes, and not just if they end in @, e.g. if I paste http://osm.org/go/e...@3k9-- into Twitter that yields a link to http://osm.org/go/e0z followed by a reply to the user 3K9 followed by two trailing -- I think you could get maximum comparability with the most amount of silly URL extractors this way: ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] [Talk-GB] OSM shortlinks problem
On Tue, Mar 30, 2010 at 08:32, Ævar Arnfjörð Bjarmason ava...@gmail.com wrote: I think you could get maximum comparability with the most amount of silly URL extractors this way: Eek, accidentally hit send, continued: * Replace @ with ~. I haven't seen anything that fails on ~ in the middle or end of a URL. * End the link with .$zoom as you suggest. This would also have the added advantage of it being easy to tweak the zoom level after you've generated the shortlink. ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] [Talk-GB] OSM shortlinks problem
With most (but not all) e-mail clients you can surround a url with angle brackets to get it to include the full url. Shaun On 29 Mar 2010, at 23:15, Matt Amos wrote: http://trac.openstreetmap.org/changeset/16271 yeah, it was originally =, but changed to - to work with twitter. given that the characters A-Z, a-z, 0-9, _, @, - and = have already been used, what's the next best character? ~? +? cheers, matt On Mon, Mar 29, 2010 at 10:52 AM, Gregory nomoregra...@googlemail.com wrote: Forwarding to dev as requested. I think it has been noticed already, it can also break in applications such as twitter. But is anything going to be changed? I understand avoiding the ending character from being non-alphanumeric(not letters or numbers) would mean a serious rewrite of how the shortlinks are made/decoded. How much longer would short links be if all digits were alphanumeric only? Also the code is public so people can create these themselves or decode them, has anyone actually done that? On 29 March 2010 02:34, Tom Chance t...@acrewoods.net wrote: One for devs really but I'm not on the list. Perhaps someone could pass this on? I've noticed that the osm.org shortlinks ending with a dash - often don't work in emails. The dash gets missed off from the link. In my area, at least, this seems to move the centre slightly and switch from zoom level 17 to 18. For example this: http://osm.org/go/euut_VcMR- Gets interpreted as this: http://osm.org/go/euut_VcMR Is there any chance the shortlinks could avoid ending in a punctuation mark? Regards, Tom -- http://tom.acrewoods.net http://twitter.com/tom_chance ___ Talk-GB mailing list talk...@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk-gb -- Gregory o...@livingwithdragons.com http://www.livingwithdragons.com ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] [Talk-GB] OSM shortlinks problem
Forwarding to dev as requested. I think it has been noticed already, it can also break in applications such as twitter. But is anything going to be changed? I understand avoiding the ending character from being non-alphanumeric(not letters or numbers) would mean a serious rewrite of how the shortlinks are made/decoded. How much longer would short links be if all digits were alphanumeric only? Also the code is public so people can create these themselves or decode them, has anyone actually done that? On 29 March 2010 02:34, Tom Chance t...@acrewoods.net wrote: One for devs really but I'm not on the list. Perhaps someone could pass this on? I've noticed that the osm.org shortlinks ending with a dash - often don't work in emails. The dash gets missed off from the link. In my area, at least, this seems to move the centre slightly and switch from zoom level 17 to 18. For example this: http://osm.org/go/euut_VcMR- Gets interpreted as this: http://osm.org/go/euut_VcMR Is there any chance the shortlinks could avoid ending in a punctuation mark? Regards, Tom -- http://tom.acrewoods.net http://twitter.com/tom_chance ___ Talk-GB mailing list talk...@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk-gb -- Gregory o...@livingwithdragons.com http://www.livingwithdragons.com ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] [Talk-GB] OSM shortlinks problem
On 29/03/2010 10:52, Gregory wrote: I understand avoiding the ending character from being non-alphanumeric(not letters or numbers) would mean a serious rewrite of how the shortlinks are made/decoded. How much longer would short links be if all digits were alphanumeric only? It's also allowed behaviour. '-' is a valid URI character, so any user agent that chops them off the end of a URI is broken. I realise that doesn't help the people using them, but it would be better to fix the problem in the correct place. Having said that, it looks like geohashes use [a-z0-9] which would avoid these problems. -- Jonathan (Jonobennett) ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] [Talk-GB] OSM shortlinks problem
http://trac.openstreetmap.org/changeset/16271 yeah, it was originally =, but changed to - to work with twitter. given that the characters A-Z, a-z, 0-9, _, @, - and = have already been used, what's the next best character? ~? +? cheers, matt On Mon, Mar 29, 2010 at 10:52 AM, Gregory nomoregra...@googlemail.com wrote: Forwarding to dev as requested. I think it has been noticed already, it can also break in applications such as twitter. But is anything going to be changed? I understand avoiding the ending character from being non-alphanumeric(not letters or numbers) would mean a serious rewrite of how the shortlinks are made/decoded. How much longer would short links be if all digits were alphanumeric only? Also the code is public so people can create these themselves or decode them, has anyone actually done that? On 29 March 2010 02:34, Tom Chance t...@acrewoods.net wrote: One for devs really but I'm not on the list. Perhaps someone could pass this on? I've noticed that the osm.org shortlinks ending with a dash - often don't work in emails. The dash gets missed off from the link. In my area, at least, this seems to move the centre slightly and switch from zoom level 17 to 18. For example this: http://osm.org/go/euut_VcMR- Gets interpreted as this: http://osm.org/go/euut_VcMR Is there any chance the shortlinks could avoid ending in a punctuation mark? Regards, Tom -- http://tom.acrewoods.net http://twitter.com/tom_chance ___ Talk-GB mailing list talk...@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk-gb -- Gregory o...@livingwithdragons.com http://www.livingwithdragons.com ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] [Talk-GB] OSM shortlinks problem
On 29 March 2010 15:15, Matt Amos zerebub...@gmail.com wrote: http://trac.openstreetmap.org/changeset/16271 yeah, it was originally =, but changed to - to work with twitter. given that the characters A-Z, a-z, 0-9, _, @, - and = have already been used, what's the next best character? ~? +? Well I suggested that you remove problematic symbols, and just use A-Z, a-z, 0-9 if need be. Hmm, sorry Matt I see you only sent to Dev so might have missed the discussion on Talk-GB. It was said (if we have powers over Google, Microsoft, and other big e-mail applications) we tell them to change... It's also allowed behaviour. '-' is a valid URI character, so any user agent that chops them off the end of a URI is broken. I realise that doesn't help the people using them, but it would be better to fix the problem in the correct place. Robert Scott referenced RFC4648 base32 and said we could change it to = perhaps (changing it back and breaking twitter again!). Steve Doerr wondered if replacing it with %2D would solve it. I'm not sure at what point it would be best to do this (in the link or manually). It sounds like there will always be problems so I'm probably going to step out of the discussion. -- Gregory o...@livingwithdragons.com http://www.livingwithdragons.com ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] [Talk-GB] OSM shortlinks problem
On 30 March 2010 08:34, Gregory nomoregra...@googlemail.com wrote: Well I suggested that you remove problematic symbols, and just use A-Z, a-z, 0-9 if need be. The problem is you need 64bits, a-zA-Z0-9 gives you 62 characters, you need another 2 for 64 bits... Steve Doerr wondered if replacing it with %2D would solve it. I'm not sure 3 chars to represent 1 bit... that's a bad trade off... ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] [Talk-GB] OSM shortlinks problem
On 30 March 2010 00:15, Matt Amos zerebub...@gmail.com wrote: http://trac.openstreetmap.org/changeset/16271 yeah, it was originally =, but changed to - to work with twitter. given that the characters A-Z, a-z, 0-9, _, @, - and = have already been used, what's the next best character? ~? +? Taking gnome-terminal as example (that's where I normally connect to IRC and want to click links posted there), it will not treat any trailing special chars at the end of a URL as part of the URL. This leaves two possibilities: * move the last two digits to the beginning, - in the middle of the url is fine. * replace - with /, which apparently is an exception and can appear at the end. Cheers ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] [Talk-GB] OSM shortlinks problem
On Mon, Mar 29, 2010 at 11:34 PM, Gregory nomoregra...@googlemail.com wrote: On 29 March 2010 15:15, Matt Amos zerebub...@gmail.com wrote: http://trac.openstreetmap.org/changeset/16271 yeah, it was originally =, but changed to - to work with twitter. given that the characters A-Z, a-z, 0-9, _, @, - and = have already been used, what's the next best character? ~? +? Well I suggested that you remove problematic symbols, and just use A-Z, a-z, 0-9 if need be. we're already using those symbols in a way that makes it difficult to reuse them for trailing characters without breaking existing links. if anyone can find a character which isn't in the list above, and doesn't break at least one URL-detector out there, then that's the best way to fix this. the alternative is to use some other scheme, for example appending .1/.2 instead of -/-- which makes some zoom levels a char longer. or possibly pre-pending the dashes, since they're usually picked up in the middle of an URL - but this makes char deletion from the end work slightly differently. it's also worth noting that, in the current scheme, shortlinks can end in @ or _ - do these also break the URL detectors? Hmm, sorry Matt I see you only sent to Dev so might have missed the discussion on Talk-GB. gmail seems to be clever enough to bring it into the thread. but i figured this was a development discussion, so better to keep it here. It was said (if we have powers over Google, Microsoft, and other big e-mail applications) we tell them to change... It's also allowed behaviour. '-' is a valid URI character, so any user agent that chops them off the end of a URI is broken. I realise that doesn't help the people using them, but it would be better to fix the problem in the correct place. sure, and if someone can find a char which works in more clients than -, it's an easy fix. Robert Scott referenced RFC4648 base32 and said we could change it to = perhaps (changing it back and breaking twitter again!). using = still works, so if that's working better then i guess a quick fix is to edit it manually... Steve Doerr wondered if replacing it with %2D would solve it. I'm not sure at what point it would be best to do this (in the link or manually). it might do, but the idea of shortlinks is that they're short and, if possible, easy to type on an ascii keyboard. but it seems like a difficult brief to fill. ;-) cheers, matt ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev