Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Munkeymon posted:

Having a unit symbol that uppercases is going beyond difficult into just plain obtuse, but then it's a big, international standard designed by a committee, so I'm not really surprised that bizarre poo poo like that comes out of it.

I'm don't want to start a big argument about this because I would probably embarass myself, but I think the identical looking glyphs behave the same since they are essentially the same letter, even if one means "micro" and one means a literal "mu".

This sounds like one of those decisions that to truly understand, you'd need to read multiple 700-page documents.

Adbot
ADBOT LOVES YOU

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

Wheany posted:

I'm don't want to start a big argument about this because I would probably embarass myself, but I think the identical looking glyphs behave the same since they are essentially the same letter, even if one means "micro" and one means a literal "mu".

This sounds like one of those decisions that to truly understand, you'd need to read multiple 700-page documents.

Or or it could be that greek lowercase letters have uppercase equivalents. So if you want uniform toupper, it has to work with greek letters as well. It's just unfortunate that the letter looks like uppercase M

pseudorandom name
May 6, 2007

Munkeymon posted:

Having a unit symbol that uppercases is going beyond difficult into just plain obtuse, but then it's a big, international standard designed by a committee, so I'm not really surprised that bizarre poo poo like that comes out of it.

I think the original problem was that they were using the Greek letter µ, not the unit symbol. And of course µ has an uppercase mapping, it is just a letter.

Catalyst-proof
May 11, 2011

better waste some time with you

Munkeymon posted:

Having a unit symbol that uppercases is going beyond difficult into just plain obtuse, but then it's a big, international standard designed by a committee, so I'm not really surprised that bizarre poo poo like that comes out of it.

It's not a 'unit symbol'. I know you want it to be, but it's not. As I said earlier, U+00B5 is decomposed from U+03BC, which has a very specific meaning, namely that while the character is essentially the same basic 'thing' in meatspace, it can be made to mean different things in different contexts. U+00B5 is in the Latin-1 Supplement, which, as you could probably guess, is a mapping of ISO 8859-1 to Unicode code points. In other words, U+00B5 is the Greek letter Mu when translating from a Latin-1 corpus, and U+03BC is the Greek letter Mu the rest of the time. There is no code point for "mu as a mathematical symbol or as a representation of 'micro' in a scientific context", as far as I know, just people who mistake the two code points above for being part of those two realms.

None of this is really that difficult and I'd expect that if you're accepting or outputting Unicode in your program that this is prerequisite knowledge.

Catalyst-proof fucked around with this message at 21:01 on Mar 18, 2013

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



horse mans posted:

It's not a 'unit symbol'. I know you want it to be, but it's not. As I said earlier, U+00B5 is decomposed from U+03BC, which has a very specific meaning, namely that while the character is essentially the same basic 'thing' in meatspace, it can be made to mean different things in different contexts. U+00B5 is in the Latin-1 Supplement, which, as you could probably guess, is a mapping of ISO 8859-1 to Unicode code points. In other words, U+00B5 is the Greek letter Mu when translating from a Latin-1 corpus, and U+03BC is the Greek letter Mu the rest of the time. There is no code point for "mu as a mathematical symbol or as a representation of 'micro' in a scientific context", as far as I know, just people who mistake the two code points above for being part of those two realms.

None of this is really that difficult and I'd expect that if you're accepting or outputting Unicode in your program that this is prerequisite knowledge.

It's called "MICRO SIGN" so I expect it to behave like a micro sign and not have to read an entire man page to understand that it's either incorrectly named or not really a 'micro sign' at all. It's as if I saw a function on a library called Math.add3(toThis) and when I dug into the docs I found that, when given a negative number, it subtracts 3 instead of adding, so I'm feeling a just little put off. Yes, I know it's documented and I can find and understand that documentation, but that doesn't mean I have to like the system.

Catalyst-proof
May 11, 2011

better waste some time with you
It's called 'MICRO SIGN' because that's what the designation in Latin-1 is. http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-094.pdf Section 8.2, Bit Combination 11/05. So it's not incorrectly named, whatsoever. It's named exactly what it's supposed to be named. And it's fine that you don't 'like' it but trying to levy false accusations against it is a really dumb way to indicate your dislike.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
No. A micro sign cannot be capitalized (any more than a plus sign can); a Greek lowercase mu can. Since U+00B5 can be capitalized, calling it a micro sign is a misnomer. The excuse of consistency with the corresponding Latin-1 character is about as valid as the excuse that PHP gives for the existence of mysql_escape_string()/mysql_real_escape_string() ("consistency with the C API").

JawnV6
Jul 4, 2004

So hot ...
I didn't think we had any further depths to sink to after roll-your-own crypto.

Catalyst-proof
May 11, 2011

better waste some time with you

Otto Skorzeny posted:

No. A micro sign cannot be capitalized (any more than a plus sign can); a Greek lowercase mu can. Since U+00B5 can be capitalized, calling it a micro sign is a misnomer. The excuse of consistency with the corresponding Latin-1 character is about as valid as the excuse that PHP gives for the existence of mysql_escape_string()/mysql_real_escape_string() ("consistency with the C API").

Okay well that's great, you should write them a letter.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

JawnV6 posted:

I didn't think we had any further depths to sink to after roll-your-own crypto.

This is why you should always second guess yourself.

Doctor w-rw-rw-
Jun 24, 2008
The sign has different semantics in different contexts and frankly there's a good argument to be made that a character set shouldn't have to care about the semantics of a glyph, just the glyph itself. This does mean, among other things, that the programmer is responsible for not making semantic fuckups and is responsible for the overhead of ensuring that you don't capitalize the micro glyph, or that the target font renders capital Mu differently from M. Depending on where your opinion falls on how much of the semantics of a glyph's usage should be handled by Unicode, your conclusion will differ. I think it's a compelling argument to say that Unicode should not duplicate glyphs for different meanings, but on the other hand they have a loving pile of poo glyph, along with a hotel glyph and love hotel glyph, so why not something useful?

I think we should move on from this horror, though.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
Don't forget the best glyph



:3:

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
FWIW I don't think anyone is particularly happy about having things like PILE OF POO in Unicode, but a universal character set that supports everything is sort of forced to include every retarded thing someone has decided to encode as characters.

McGlockenshire
Dec 16, 2005

GOLLOCKS!
Someone implemented XKCD's StackSort (hover over the comic).

Molog
Mar 4, 2004
Title text

Otto Skorzeny posted:

Don't forget the best glyph



:3:

I used the snowman in a unit test for unicode :)

ymgve
Jan 2, 2004


:dukedog:
Offensive Clock
The real horror is that the International Bureau of Weights and Measures not only decided to make a system where case decides what unit you want, but also for some goddamn reason decided to include one Greek symbol in their otherwise all-Latin prefix system.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

McGlockenshire posted:

Someone implemented XKCD's StackSort (hover over the comic).

This is magnificent

ephphatha
Dec 18, 2009




So you're writing an SQR report that needs to print some data sorted by one of a few different conditions determined at runtime. Do you:

A) Use dynamic queries to add an ORDER BY clause to the select statement
B) Call a sort function defined in a linked C library
C) Write the data to a text file, call the OS sort command, read the data back from the file

And of course only one condition is used at runtime, so just to be safe you need to create and open a file for every possible condition just in case it somehow changes.

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

Plorkyeran posted:

FWIW I don't think anyone is particularly happy about having things like PILE OF POO in Unicode, but a universal character set that supports everything is sort of forced to include every retarded thing someone has decided to encode as characters.

Like everything else in Unicode, once you know the history it makes a ton of sense and you can't imagine it any other way.

When Apple was designing the iPhone, it turned out that Japanese Emoji were non-standard and unique to different carriers, so sending an Emoji to someone on another network was impossible. They proposed making their Emoji glyphs part of the Unicode standard (and to my knowledge donated them for public use). I believe Google also helped out. Thus we now have 722 carrier-agnostic, platform-agnostic standardized glyphs, including a pile of poop. (Some were explicitly included to map to the old carrier-specific symbols.)

This is precisely what Unicode is for, otherwise you end up with incompatible nation/vendor/carrier/whatever-specific character sets.


edit: On Unicode in general, it nearly broke some of my coworker's brains when I explained to them that 0x82 is not the latin accented "é"; ASCII files were being read as UTF-8 and coming into Unicode with the missing glyph symbol everywhere and I pointed out that, by definition, UTF-8 only specifies 0-127, and to read the files properly you had to make the user give you the Latin-1 ASCII codepage so that 0x82 "é" could be mapped to the appropriate Unicode code point. They literally could not understand how 0x41 isn't "A", it's just a number that happens to accidentally* map to the same code point in ASCII and UTF-8.

I decided that explaining Unicode is just an abstract list of code points, you need fonts with glyphs to draw and encodings to process strings was a bridge too far.

*purposefully, I know

Simulated fucked around with this message at 03:57 on Mar 19, 2013

comedyblissoption
Mar 15, 2006

You just defended a pile of poo poo being in unicode.

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

comedyblissoption posted:

You just defended a pile of poo poo being in unicode.

Well... that's my point. It seems stupid at first but when you realize it enabled Emoji to be cross-carrier and cross-platform, it makes total sense. The real horror is whatever Japanese carrier that included a pile of poop in their original implementation.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

comedyblissoption posted:

You just defended a pile of poo poo being in unicode.
The choice between having some dumb things in Unicode and the utter nightmare that is dealing with non-Unicode encoding is a pretty loving easy one.

kitten smoothie
Dec 29, 2001

Germane to the discussion of funky unicode (and sorry for the HN link)

hobbesmaster
Jan 28, 2008

McGlockenshire posted:

Someone implemented XKCD's StackSort (hover over the comic).

I can't believe it works.

dis astranagant
Dec 14, 2006

It doesn't check for sortedness so it reports all kinds of bullshit as sorted if you go past the first result

Opinion Haver
Apr 9, 2007

comedyblissoption posted:

You just defended a pile of poo poo being in unicode.

I mean, your posting's already in it.

Also, I wonder if you could write stacksort for other things, like fizzbuzz.

hobbesmaster
Jan 28, 2008

dis astranagant posted:

It doesn't check for sortedness so it reports all kinds of bullshit as sorted if you go past the first result

I got 3 correct answers in row with different numbers for stack overflow threads. I was probably just lucky.

Or actually in the spirit of this thread: WONTFIX:WORKSFORME

Zombywuf
Mar 29, 2008

BRB posting "sort a list" exploits to Stack Overflow.

leterip
Aug 25, 2004

Zombywuf posted:

BRB posting "sort a list" exploits to Stack Overflow.

It doesn't consider anything posted after the xkcd comic.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

dis astranagant posted:

It doesn't check for sortedness so it reports all kinds of bullshit as sorted if you go past the first result

That's part of the joke :ssh:

NtotheTC
Dec 31, 2007


yaoi prophet posted:

I mean, your posting's already in it.

Also, I wonder if you could write stacksort for other things, like fizzbuzz.

I think the next step is "stacklang" a new programming language where you string google search questions together and have it compile the result.

code:
"How do I make a loop from 1 to 100?";

"How do I check if a number is divisible by 3 and 5?";
"How do I print 'FizzBuzz'?";

"How do I check if a number is divisible by 3?";
"How do I print 'Fizz'?";

"How do I else?";
"How do I print 'buzz'?";

NtotheTC fucked around with this message at 15:10 on Mar 19, 2013

My Rhythmic Crotch
Jan 13, 2011

how!! posted:

why would you need to look through commit history to fix a bug? Just fix the bug. I've fixed many bugs, and can't tell you of a single time where I had to look through the history in order to fix it.

When I first started out, I used to do the long, thorough commit message every time. Until I realized its just wasted effort.

how!! posted:

What makes you think nothing is broken. A bit of undocumented code that seems to subtract %0.13 from all transactions seems to be broken to me. Maybe it was added by a programmer many years ago for debugging purposes and was left in by accident. Maybe it was put there to solve a problem that has since been solved some other way. You could be throwing money down the drain for no reason. This is why lovely, complex, undocumented code is bad and should be eliminated at all costs.

Sorry to drag up something from many pages back, but this was just fascinating to me. He was so close to grasping it...

bewilderment
Nov 22, 2007
man what



My workplace running their own programming language to be backwards-compatible with their old UniBasic and UniData is bad enough. "We don't run any third-party code in our solutions," says the CTO proudly.

An internal properties page being labelled 'Propertires' is just the icing on the cake, really. It's not actually named Propertires as a variable, it's not that much of a horror, but it adds that extra layer of the surreal.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

bewilderment posted:

My workplace running their own programming language to be backwards-compatible with their old UniBasic and UniData is bad enough. "We don't run any third-party code in our solutions," says the CTO proudly.

You wrote your own OS? Yikes.

Sereri
Sep 30, 2008

awwwrigami

hobbesmaster posted:

I can't believe it works.

Doesn't work for me in FF, only in Chrome and IE10.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Suspicious Dish posted:

You wrote your own OS? Yikes.

Not just that but their own firmware on their own hardware?

You should probably :getout: if that guy isn't on the way out.

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

bewilderment posted:

My workplace running their own programming language to be backwards-compatible with their old UniBasic and UniData is bad enough. "We don't run any third-party code in our solutions," says the CTO proudly.

An internal properties page being labelled 'Propertires' is just the icing on the cake, really. It's not actually named Propertires as a variable, it's not that much of a horror, but it adds that extra layer of the surreal.

I'm just calling properties ProperTires from now on just to mess with people.

Presto
Nov 22, 2002

Keep calm and Harry on.
code:
retflag = (retflag == 2) ? 2 : 0;
If it's two, put in a fresh two, because the original two might be getting stale.

baquerd
Jul 2, 2007

by FactsAreUseless

Presto posted:

code:
retflag = (retflag == 2) ? 2 : 0;
If it's two, put in a fresh two, because the original two might be getting stale.

Other than readability, I just don't see a huge problem here.

code:
retflag = (retflag == 2) ? 2 : 0;
if (retflag != 2) retflag = 0;

Adbot
ADBOT LOVES YOU

b0lt
Apr 29, 2005

baquerd posted:

Other than readability, I just don't see a huge problem here.

code:
retflag = (retflag == 2) ? 2 : 0;
if (retflag != 2) retflag = 0;

code:
retflag = (retflag == 2) * 2;

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply