« first day (370 days earlier)      last day (4571 days later) » 

11:00 AM
really
 
@RMartinhoFernandes Only if it's built to be that way.
 
@SSight3 no, you should use the unicode-aware string class that someone else spent weeks or months coding ;)
 
@SSight3 std::string and/or std::wstring can already do just that, depending on your system.
 
Well, shame on you for spending months writing a class that can only deal with a single value.
 
@jalf Okay, so if I wanted to build basic unicode support for a class that acts like std::string, how would I implement it?
 
11:00 AM
lol
 
@jalf Touche.
 
@DeadMG Then it needs a locale attached to it. Otherwise the only other comparison is binary, which may be useful for programming stuff but isn't an equality of text.
 
@RMartinhoFernandes Well, when it comes to re-using a class, it often needs to be re-written.
 
Look at the timestamps.
This chat sucks.
 
@SSight3 std::string, in a sense, already provide basic unicode support. Where 'basic' means 'I don't care about codepoints', can't get more basic than that.
 
11:02 AM
well
I could just download and use ICU
 
@DeadMG if you can stand the Java-like API :(
 
@SSight3 No really, why did you spend months on it, if it's not reusable?
 
yeah
that's the thing
it really kind of blows
 
@LucDanton Well, I mean in terms of what DeadMG is saying. I don't know. How would one implement what DeadMG is seeking in terms of a std::string like class?
@RMartinhoFernandes Because it always goes awry at the last minute. Seriously. I should name a law after it. Like the... last minute law, or something.
 
@SSight3 well, he's looking for a string class that does everything. If I were you, I'd aim a bit lower. ;)
 
11:04 AM
I'm still dubious about "my Unicode string class would only need to do equality comparisons".
 
but the tricky part is this: in order to write a sane unicode string class, you need to understand unicode
and you won't understand unicode by asking us. It's far too complex for that
 
Does "hoeren" == "hören"?
 
@jalf Which admittedly I don't.
 
You used "sane" and "Unicode" in the same sentence.
 
and btw, that's why C++ doesn't have a unicode-aware string class
 
11:04 AM
@LucDanton The only thing I need to do is compare Unicode identifiers.
 
@LucDanton In a programming language? I'd say no.
 
"Oh hello, I'm your FileProc class"
 
I don't actually need it for anything else.
 
because no one on the committee understood unicode well enough
but in all this discussion of what a string class should do, could I just add one small requirement?
 
@DeadMG What's an identifier? Code point?
 
11:05 AM
"Oh no, I appear to be missing a vital function. And you've had an oversight. And now I'm incompatible with your List class. I appear to be deleting your files."
 
uh, a string
 
@jalf Yeah.
 
of Unicode text
 
Folks, and in particular the @cat who isn't here, I was very happy with the ideas you had about using Boost iostreams for handling UTF-16 filenames in Windows.
 
a string class should be universal. Defining yet another string class jsut means that everyone will spend even more time converting between string classes
 
11:06 AM
However, now that I tried it, it works with Visual C++ where it isn't needed (since MSVC has extensions that deal with it)
 
Then you only need binary comparison and any std::basic_string can already deal with that. Or pick std::vector if you want.
 
if you're going to define a string class, put it in boost, or better still, the standard library. If you can't do that, it most likely isn't worth using in practice
 
but apparently it does not work with g++
 
uh
what about those characters that have two Unicode representations?
 
U:\> g++ listit.boost-filesystem.cpp -D WINVER=0x0500 -lboost_filesystem-mgw44-s-1_47 -lboost_system-mgw44-s-1_47 -o gnu
list

U:\> gnulist kjøttkaker.recipe
Nam! Norwegian meatballs!

U:\> gnulist π.recipe
!Failed to open file '?.recipe'

U:\> _
 
11:06 AM
or more
like that shitty A with an accent
 
@DeadMG that's where you sit down in a corner and weep silently
 
I wouldn't want A and Á to be the same identifier.
 
I can't fail to compare two identifiers as equal when they're rendered as equal by a Unicode-aware rendering API
 
@jalf So maybe a template type array that can perform universal functions? I am assuming, of course, comparing a unicode character with each other would be implemented under the covers by someone else.
 
@RMartinhoFernandes No, Á has multiple Unicode representations.
 
11:07 AM
@DeadMG Pick UTF-32 + a sane-ish normal form then. Assuming you're talking about combining characters (and you shouldn't use 'character' outside of 'combining character'.
 
That program uses boost::filesystem::ifstream, and it just FAILS (with g++, where it's needed).
 
and I obviously cannot allow Á and Á to be not equal identifiers.
but then I'd have to implement my own normal form
 
If, on the other hand, you want to compare the glyphs I think you're out of luck. But I don't think that's entirely desirable tbh.
 
code
 
11:09 AM
Well, all you have to support is pi.
:)
 
There has to be similar glyphs that end up as different codepoints (assuming normalization, no combining characters).
 
std::π looks cool.
 
What if, you had a unicode class, where people could implement
Their own comparison functions?
 
I'd seriously just go back to ASCII if they had two codepoints that rendered as the same
 
Unicode is not about representing glyphs, hence why there's an 'angstrom' and a 'capital latin A with small circle'. Maybe those do get normalized to a unique codepoint but there might be others.
@DeadMG Unicode doesn't attach glyphs to codepoints (and combining characters).
 
11:11 AM
whatever
just gonna dl ICU and let them worry about it, really
 
It's not like ICU has a magical make_it_work() function.
You'll have to worry about it as well, you just don't have to implement it.
 
it has an operator== for UnicodeString
that seems pretty close to me
 
@RMartinhoFernandes but they have all the complicated rules implemented so that strings normally behave Like You Expect
 
Does it do what you want?
 
which, for most people, is good enough
 
11:12 AM
no idea
but I wold expect that in a library whose explicit purpose is to handle Unicode
in a class called UnicodeString
then the equality operator probably is Unicode-aware and does that normalization bullshit
 
Why would you want "ABH" (latin letters) compare equal to "ABH" (Greek letters, except not really, I'm not finding the relevant Unicode codepoints they would look just like that)?
Latin 'H' looks like Greek 'H' but they're not the same letter in any way.
 
Meh, you could have put the effort to use the real letters.
 
@RMartinhoFernandes I suffered through an ancient Greek class to bring you this information.
 
what I want is that if DirectWrite decides to render them as equal, then they are compared as equal
 
That's way beyond Unicode tbh.
 
11:14 AM
and I don't want to have to start rendering them to a texture and comparing the bits of the texture to find out
 
Magic. Got it.
@RMartinhoFernandes Thanks? I'm not even double checking.
 
Your reward is that I tell you those letters are alpha, beta, eta.
 
Er, I know that.
That's what I used to search.
 
11:15 AM
@DeadMG I'd just go with plain binary equality, tbh. Are you likely to have a lot of multilingual text with different locales from different sources?
 
Well you don't get a refund.
 
@jalf It's a programming language for Knuth's sake!
 
no
in programming, I'd say that if your external API isn't English, then tough
 
:)
 
11:16 AM
that would be sweet
 
Yet you want to compare Unicode identifiers at the glyph level?
You're insane.
 
well, what I'd like is that it would work if you make your public API written in Chinese and consumed in Welsh regardless
but I could simply ignore the problem
 
But that's not desirable. "ABH" and "ΑΒΗ" look the same but aren't the same.
 
wow, really?
binary equality it is!
 
@LucDanton that might be desirable. Depends on what problem you're trying to solve
 
11:18 AM
@DeadMG Wouldn't that require language translation, given grammar?
 
or I could do the whole render-to-a-texture thing
but that would take forever
 
Ρ (Greek letter rho) is transliterated to R.
 
say it's a texture cache of prerendered text. Then those two should be treated as the same because they look the same ;)
 
If symbols look really similar
Why aren't they merged?
 
Fuzzy logic.
 
11:19 AM
Why have duplicates?
 
@SSight3 Because they are not the same.
 
Because it's not about the looks. Think of Unicode being blind.
 
A isn't alpha.
(Latin letter "names" are lousy)
 
Alphabet
 
It's a huge repository of all the symbols used in text ever invented.
 
11:20 AM
Including POO, PILE OF.
 
So there's both Greek alpha and Latin a.
 
If they look similar, and similar enough to warrant equality to be true
 
But they are not.
Eta and H do not read the same.
 
Considering that the aspect of glyphs dwelves into the realm of typography at times I think it's actually simpler this way.
 
If they aren't, they why ask for equality to be true?
 
11:21 AM
void ಠ_ಠ(const std::string & message); // logs warning
 
@SSight3 but do they look similar? What if you're not looking at them, but passing them to a screen reader program?
 
Rho and P are completely different.
 
you know
 
It reads the text aloud, and it's going to pronounce them different if they're different, even if, when rendered as text, they look the same
 
it occurs to me that really, it should be DirectWrite that should be telling me if two strings render the same
 
11:22 AM
What is DirectWrite, btw?
 
Microsoft's new text rendering API
 
@DeadMG That does sound reasonable, yes. If the fonts change, then at least it'll be aware of that, too.
 
pop quiz! (really, I want some trivia knowledge), where are return values normally stored on x86 with the Windows ABI
 
I'm going to build an IDE from scratch with Direct2D and DirectWrite
 
You're making your compiler dependent on a text-rendering API?
Wow.
 
11:23 AM
how else am I going to render text?
except to use a text-rendering API?
@jalf Check MSDN, it gives api dox for __stdcall
 
You're deciding about identifiers based on the rendering!
 
@DeadMG but why does text rendering depend on text equality?
 
@RMartinhoFernandes I called it.
6 mins ago, by Luc Danton
You're insane.
 
@DeadMG that's not the answer I wanted to hear! ;)
 
yeah
because it's going to be fucking confusing for a user
oh wait, these two strings appear completely identical but the compiler gives wrong identifier error
how the hell would you even begin to debug that?
 
11:24 AM
Er, that's actually what happens with say, the C# compiler.
It's not a big deal.
And a lot of people use it.
 
it's something I'd really rather not have
 
Or any Unicode aware (at the source level) language+toolchain.
 
@DeadMG if the user types in two strings that look the same but are different, then the user will know about it
 
Only I could trigger a unicode debate by asking about std::string...
 
only if the user typed in both strings, instead of having one, say, downloaded one in a library?
 
11:25 AM
What?
 
@DeadMG again, every sane compiler works like this already. it's not a problem in practice
 
right
 
@RMartinhoFernandes Don't you download your identifiers from the Internet?
 
binary equality and wchar_t it is!
 
makes sense imo
 
11:26 AM
you download identifiers from the Internet every time you download a header
 
Meh, pick UTF-32.
 
nah, UTF-32 would be a waste of space
 
Download more RAM.
 
and since I'm not rendering and only binary equalitying and only searching for ASCII codepoints, I don't even need to care about surrogates
lol
 
@LucDanton Downloading is the way of the future.
 
11:27 AM
I need to download a new CPU fan
 
Oct 13 at 16:03, by Luc Danton
Also, I'm surprised nobody mentioned that but UTF-16 is so passé, UTF-8 is where all the cool languages hang out at.
Feeling robotic.
 
the Windows API, Java and .NET all use UTF-16
my choice is pretty much made there
 
C# allows many encodings for source code.
 
their run-time string is UTF16 though
 
11:28 AM
I don't think that should matter here.
Is the code that handles the source going to be the same as the runtime?
 
no
binary equality hacks would never work as a Standard string class for any language
that would need strict Unicode equality and suchlike
 
Normalize, then binary equality works. (I think?)
32 mins ago, by Luc Danton
@DeadMG You have the right idea. Operating on UTF-32 text with a sane normal form is probably the best way to avoid headaches. (I say probably because this is straining my knowledge of Unicode and I haven't really been in that problem space.) Then store/transmit everything as UTF-8.
 
sure, but I'm going to skip that because Performance Matters!™
 
Fuck.
 
11:31 AM
what I could easily do is just use ICU to back my Standard string class
 
Oh, he's coming back to sanity!
Also, I'm having lunch now. See ya.
 
Remember, the Interwebs are using UTF-8. UTF-16 is for those stuck in the early 90's.
 
the Interwebs are using UTF8 because most of their content is in HTML, which is in the ASCII domain
so UTF8 works just fine for them
 
@LucDanton you need UTF-16 for Windows programming, in particular in order to handle filenames like [π.recipe]. i'm not sure of best way to proceed about that now that Boost filesystem failed to deliver. in fact there is this comment, "on Windows, except for standard libaries known to have wchar_t overloads for file stream I/O, use path::string() to get a narrow character c_str()" which means it doesn't work BY DESIGN. Ugh.
 
and you don't have to interop a HTML file with a Windows API call, the browser has to do it for that
 
11:34 AM
Err, I shouldn't have used the ironic 'Interwebs', I really meant 'Internet'. So it's not just HTML.
@AlfPSteinbach Well okay but that's not relevant to what's at hand. Unless DeadMG needs to put filenames into source code.
 
Yeah, 17KLOC JavaScript hello worlds too.
 
@DeadMG Wait, so do you need to handle filenames in source?
 
@LucDanton i don't know sorry for butting in in ongoing discussion. but the filenames can be arriving as command line arguments. they don' t need to be in source code.
 
It's lose-lose, not all platforms are UTF-16.
 
in literal source code?
 
11:36 AM
#include <π.recipe>
 
probably not
but I will have to handle them in general, because how can you have an IDE that can't deal with files?
 
Then how is interop with an UTF-16 API relevant?
 
because DirectWrite is UTF-16
 
That's not so much interoperability but development convenience.
Me fails English.
 
well I'd sure as hell rather not have to convert
and if I have to fall back to the Windows API for any purpose
then having UTF16 will be easier
 
11:37 AM
But look what you said
3 mins ago, by DeadMG
and you don't have to interop a HTML file with a Windows API call, the browser has to do it for that
 
yeah
 
"You don't have to interop a source file with a Windows API call, the toolchain has to do it for that"
 
Wait, how's HTML relevant? Is this a Web language?
 
the difference is that I'm writing the toolchain
whereas when you author an HTML file, you don't have to.
 
Exactly, convenience for you. I don't want to prevent you from using UTF-16, just shooting down the argument here.
 
11:39 AM
yeah, so what's your point, exactly?
it should be no surprise that I'm designing stuff to be convenient for myself
plus anyone who wants to interop with like, the most major things ever, being Windows, .NET and JVM
 
My point is the arguments you use are specious.
(Double-checked, that's an English word.)
 
I have no idea what specious is
lol
 
Yeah I think that's way more used in French than it is in English, sorry. Plus, it's only used for fun, to sound more pedant.
 
How do you say that in French?
 
11:41 AM
Apparently, someone who has the appearance of being right, but is actually wrong.
 
Pédant?
 
I don't know quite how that works though.
 
Spécieux?
 
Ah.
What's worse is that I have no idea how you say it in Portuguese, but I knew it as an English word.
 
What's a spurious argument by the way?
 
11:43 AM
Something that appears right, but is actually wrong.
 
It seems to mean the same? What the fuck English language?
 
And Google Translate is not trustable.
 
Oh what
 
It commonly gives Brazilian translations.
 
my landlord is coming in fifteen minutes
 
11:43 AM
Spurious? I thought you said specious.
 
I completely forgot to clean up my room
 
Blast youuuu
 
Fuck Brazilians, they ruin the Internet for us.
 
@SSight3 'Spurious' does appear to have a very similar meaning though.
@RMartinhoFernandes HUEHUEHUEHUEHUE GIB MONIES PLOX
 
11:44 AM
@LucDanton I double-checked. Indeed you are right. So basically, two words with only two letter difference had the exact same meaning.
Only English is this pedantic...
 
@LucDanton What just happened? I fail to discern the meaning of that message.
 
at least it's really easy to compare, sort, and order and case change English strings
 
If there is one.
 
Do they have an inverse? Something that appears wrong, but is actually right?
 
unspurious?
 
11:46 AM
Like... unspecious? Unspurious?
 
I ville look.
 
Also, lunch dammit.
 
Uhm
"not genuine, authentic, or true; not from the claimed, pretended, or proper source; counterfeit."
For unspurious
 
the important thing is
 
11:47 AM
Apparently.
 
I propped up the card from my parents
between my screens
 
So hold on
Specious, spurious and unspurious...
All mean the same?
Unspurious - not genuine, authentic, or true; not from the claimed, pretended, or proper source; counterfeit.
Spurious - Not being what it purports to be; false or fake: "spurious claims".
What the heck?
 
I'd like to pretend that I've been jaded by English and am not surprised by this, but it wouldn't be true.
 
@LucDanton How both spurious and simultaneously unspurious of you!
 
11:49 AM
lol
 
Esperanto is clearly the way forward
 
Okay, does that mean
Unspecious means what I think it means?
 
I suppose next time someone calls me out on being spurious, I could retort that I am in all actuality being unspurious.
 
Okay, unspecious is spurious because it doesn't exist.
Only English can name two words that should logically oppose each other the same thing.
 
lol
 
11:51 AM
I would love to write a spurious article: to have the appearance of being unspurious.
 
"unspurious" doesn't exist; it's a bastardisation
 
I can't find a definition of 'unspurious'. I'm seeing some uses, but they seem to use a meaning close to the 'obvious' one.
 
basically, "unspurious" is a typo for "spurious"
 
@SSight3 look closer
the definition is actually under "spurious" (though admittedly the site doesn't make clear what it's doing)
 
11:55 AM
@TomalakGeretkal Oh yessss...
"unspurious [spyoor-ee-uhs]"
Funny way to pronounce it.
 
also, that site isn't actually an English dictionary
 
Shhhhh
 
it only cites sources from some country that uses some offshoot language
 
One translation of some book about Hegel appears to be using 'unspurious' as a construction from German unverfälschten.
 
If we want the inverse, it's non-spurious. Apparently.
I'm confused now.
 
11:57 AM
Next to 'authentic'.
I'd use 'unfalsified' as a literal translation of unverfälschten.
(But authentic is good, too.)
 
"Spurious derives from Latin spurius, meaning "bastard", or "something rejected as false""
You spurious!
 

« first day (370 days earlier)      last day (4571 days later) »