Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Wiki Discussion

0x vs. $ - Page 1

0x vs. $

Posted by: Sherkel
Date: 2019-01-20 21:58:35
The wiki currently doesn't have a consistent way of denoting hexadecimal values. Some pages use 0x, some use $, and some both! I'm not sure what the best solution to this is, or if there necessarily needs to be one.

What do you all think about the symbols? Do we keep tempting our lurkers over at the stock exchange, or opt for its more bovine counterpart? Could one be used specifically for denoting an address, and the other a value?

Re: 0x vs. $

Posted by: Couldntthinkofaname
Date: 2019-01-20 22:06:27
If the reader does not know the meaning of one, they most likely will not know the meaning of the other. The contrary applies - if one knows and comprehends the meaning of one, the other should be under their belt as well.

I'm under the impression that if clarification is needed, it can be provided in brief. They both denote the same thing, so i'm sure it won't be an issue. Consistency between one or the other may even cause minor problems, as there as there as some familiar with 0x and others familiar with $.


That's my 0.02ยข.

Re: 0x vs. $

Posted by: ISSOtm
Date: 2019-01-21 00:20:43
I've voted $ for addresses and 0x for values, loosely following the 6502 spec (where $2A is address 422, and #$2A is value 42)
I believe it's important to differentiate both of those.

Re: 0x vs. $

Posted by: Parzival
Date: 2019-01-21 01:52:09
no one has said shit about the "h" suffix

Re: 0x vs. $

Posted by: Sherkel
Date: 2019-01-21 01:55:28

no one has said shit about the "h" suffix
Don't believe it's ever been used on the wiki, but I added the "Something else" option for things like that, as unlikely as it is we'd consider making it the standard.

Good input so far, guys! I think I'll need to hear more before forming an opinion on this myself.

Re: 0x vs. $

Posted by: ISSOtm
Date: 2019-01-21 03:19:17
The "h" prefix is barely used, and just plain stupid. I'm against it.

Re: 0x vs. $

Posted by: Sherkel
Date: 2019-01-21 11:24:03
To whoever voted 0x for everything, any particular reason?

Re: 0x vs. $

Posted by: Parzival
Date: 2019-01-22 14:50:00

The "h" prefix is barely used, and just plain stupid. I'm against it.
B2A7B4B37FB4AF7F9DE39Dh

see, look. It looks good, better than 0x or $, anyway

Re: 0x vs. $

Posted by: Zowayix
Date: 2019-01-22 18:13:09
Has there ever been a programming language that's used $ for hexadecimal? Where did $ even start?

Of course I can tell $ is hexadecimal if it's in context but I don't see a reason to use a symbol that means other things (e.g. currency, Perl/shell/PHP variables) when 0x doesn't mean anything else as a prefix.

I don't see the point in differentiating addresses and values because you need context anyway.

Re: 0x vs. $

Posted by: Parzival
Date: 2019-01-22 22:55:50

I don't see the point in differentiating addresses and values because you need context anyway.
Fast identification.

Has there ever been a programming language that's used $ for hexadecimal? Where did $ even start?

Assembly.

Of course I can tell $ is hexadecimal if it's in context but I don't see a reason to use a symbol that means other things (e.g. currency, Perl/shell/PHP variables) when 0x doesn't mean anything else as a prefix.
If context matters, this is a moot point.

Re: 0x vs. $

Posted by: ISSOtm
Date: 2019-01-23 05:18:55

B2A7B4B37FB4AF7F9DE39Dh

The letter is even less distinguishable here. Especially if you went with lowercase letters.

b2a7b4b37fb4af7f9de39dh

Re: 0x vs. $

Posted by: Zowayix
Date: 2019-01-23 08:04:31
Yeah, the thing is there is that the h visually blends in with the hex letters. 0 and x have naturally distinct shapes so they'll stand out.

Also I just realised now this is Wiki Discussion and not Debate Wars w h o o p s

Re: 0x vs. $

Posted by: Parzival
Date: 2019-01-23 08:29:22
0 and x have naturally distinct shapes
0 is a valid hex character.

Re: 0x vs. $

Posted by: Zowayix
Date: 2019-01-23 09:05:58
I'm tired and a bit cooked, yeah. Well, the x part holds true.

Re: 0x vs. $

Posted by: ISSOtm
Date: 2019-01-23 10:39:23
And besides, prefixing gives metadata before the number, which facilitates comprehension (you can gather it immediately from CAFEh, but not from 1337h)