« first day (2041 days earlier)      last day (2909 days later) » 

10:01 PM
@sehe Isn't std::isalpha only handling a single char? If so it can hardly handle many locales.
 
standard character/string/text handling? not being utter shite? pick one
 
@Morwenn it takes int
 
My bad.
 
this implies that you can test a char32_t (charT) against a UTF-8 locale
if you can't test char32_t then the interface is nonsense, it takes a single parameter
 
...
What
What the FUCK is wrong with these numbers?!
static const char32_t utf32str[] = U"🍌晥";
array size: 7
????????????
 
10:15 PM
Do you have any guarantee that your source file uses the correct encoding?
 
It uses a UTF8 source encoding but that doesn't matter?
 
includes null terminator
 
Dunno. Maybe your compiler read something that doesn't belong.
 
Right, but a null char32_t included, that's a size of 3.
 
count of 3
 
10:17 PM
Right, I'm talking about the array count when I say size.
 
thought so, but it might have clicked why it is wrong
 
Okay, so VC++ is stupid broken.
Absolute fucking horseshit...
I'll deal with this GARBAGE later.
 
lol, like I said earlier, have fun with windows unicode
 
Windows = Bwdawhdawhdwa
> Maximum execution time exceeded
5
uwotm8
 
@ThePhD wat
@ThePhD Can you get the link, please?
 
@ThePhD cross-compilation to windows from a linux OS with g++ works quite well
 
Are there any other, uh.
VC++ cloud compiler services?
 
CXX=x86_64-w64-mingw32-g++ ... done
or if cmake, a toolchain file with a few find_program
then cmake -D CMAKE_TOOLCHAIN_FILE=~/Toolchain-win64.cmake ../myproject
and suffer less with VS
 
Whoever is on the compiler team has no business working with strings. .-.
Now I need to explicitly construct my U and u strings using fucking hexadecimal.
Fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuck this compiler.
 
I wonder if the bug repros with char32_t x[] = { 'E', 'a', 'c', 'h' };
 
10:34 PM
@ThePhD hey~ <3
 
🍌晥 <-- your test characters (they work for me in linux, here in chat I mean)
are they squares for you in windows?
 
good
 
The fucking awful thing?
Visual Studio's tooltips report sizes of 8/4/3
So it's literally just the compiler being STUPID as FUCK.
And for once Intellisense has its shit right.
 
@набиячлэвэлиь wait do you play hearstone?
 
10:37 PM
what encoding is the source file? make it be utf-8
 
@ThePhD Calm your evolutionary redundant bodily assets
 
might be some windows codepage
 
nwp
I used some Ẓ̝̮͉͉̗̲ͭ́͒ͭ͊̿a̹̩̰̻̥̫ͬ̓̽l̤͚̦̳̫͙͗̎̊́͗̽̿g̘͎̱͈̑ͤ̋̑ͭ̑o̼̠̘͍͉̮̣ͬͤ̚ text to test my unicode, it broke clang-format
 
It's utf8, I checked that already.
 
checked, how?
 
Ell
10:38 PM
@sehe heh, I like this one
 
coliru is not loading. :(
 
I force-saved it, and opened up the text in a hex editor. The values check out for a utf8-encoded, no-bom file.
 
lol
 
someone used the word "lounge" outside SE?
 
I've been talking and playing with this guy for a while now. Always though it was nab. Only now I'm realizing he might not be our nab.
 
10:40 PM
It also displays fine in notepad++
 
Wooops.
 
@Shoe lolwut
 
It could be that without the BOM, VC++ is interpreting it as ANSI.
Which really is going to make me flip my shit.
 
@ThePhD What else. It's MSVC
 
@sehe Yeah, I friended him on Hearstone a while ago because he was a friend of a friend of a lounger.
I was sure it was nab.
 
10:41 PM
@sehe Most Seriously Vexing Compiler
 
But I've heard him talking and he speaks good english.
 
@Nican Hm, ssh doesn't work either. Weird.
 
P0wned
 
@StackedCrooked Oh boy-
 
> #pragma execution_character_set("utf-8")
 
10:42 PM
Getting DoS'ed by PhD's code.
 
Lmao.
I hope g++ doesn't -Werror me over "unknown pragma"
 
@ThePhD wth is that contraption
 
@sehe The "workaround"
 
stumped
 
@ThePhD throw in a comment saying you did that for VS
answers the wtf while browsing the source
 
10:45 PM
As if that weren't bleedingly obvious
If you you are going to add a comment, make it like // vim: fenc=utf8 :
 
I know that python unicode guy's advice is "if there's no bom or anything just assume it's ANSI",
but it would not kill any developer at all to detect utf8 patterns in the file and change encoding. Especially for something like a compiler.
utf16 surrogates too etc. etc.
.... Never fucking mind
Even if that pragma, my shitty utf32str is still has "characters" chopped across 4 "bytes".
I think I'm done for the day.
 
changing encoding complicates everything and basically assumes your standard library does that /everywhere/. C++ is a pay-for-what-you-need language, so stdlibraries doing redundant stuff /everywhere/ are a no-flier
@ThePhD Only makes sense on windows, really
 
So today I fixed a nasty bug.
ReleaseMutex(&m_mutex);
See if you can find it.
 
What is the type of m_mutex - and check the return code?
 
@EtiennedeMartel Releasing ownership vs unlocking?
 
10:59 PM
I suppose the & might be redundant or the operation fails for some other reason
 
@sehe HANDLE.
 
dunno the api really
 
@EtiennedeMartel So, that's the error then :)
 
lol HANDLE is void*
 
11:01 PM
If HANDLE had been a sensible type and not a typedef for void* the compiler would have caught it.
 
But then again, the program would not have run on Windows
 
If anything, I think the #googacle debacle is reinforcing Microsoft is probably legally bound to stick to crappy WINAPI
 
I think you accidentally a word there.
 
I think he did that on purpose.
Also std::wstring_convert is shit and the compiler writers are shit.
It literally takes my utf16 string
serializes it DIRECTLY into bytes
performs NO conversions
and then dumps it out
All because Microsoft's std::wstring_convert<char16_t> provides a hard linker error because they forgot a definition.
But it's "low on their things to fix", and has gone ignored for Update 1 and Update 2.
So I either have to implement my own utf8/utf16/utf32/widestr conversions, or just tell the user to go fuck themselves.
 
11:14 PM
> they forgot a definition
 
@milleniumbug I'm not kidding.
They forgot a definition for char16_t and char32_t locales.
 
@ThePhD you can leave that to their temas
 
@EtiennedeMartel MS was really caught between a rock and a hard spot. What they really wanted was an object oriented API, with some base class, and various derived classes (and what you passed would be a pointer/reference to the appropriate type, checked by the compiler). Unfortunately, they also really wanted compatibility with C, so what we ended up with was "void *" throughout, so (for example) CloseHandle could be passed a handle of (nearly) any type.
 
Many library implementations have spotty locales
 
Guess I'm gutting codecvt stuff and finding a small header-only utf8/16/32 conversion lib.
There's utf8-cpp but this shit's gotta be header only...
I could just use what I've got in Furrovine, but I still haven't figured out the overlong utf8 whatever issue the utf8 encoder I wrote has.
 
11:23 PM
codecvt is a shitty interface to transcoding
 
I wouldn't mind its shittiness if it actually worked.
 
If your encoder produces overlong sequences then your encoder is broken
You fix it by actually implementing UTF-8
 
Sounds like w-o-o-ooork.
... Work that I'll end up doing, but work nonetheless.
 
(And in the decoder you simply discard or throw if you encounter them)
That should be a switch
Or I guess replace them with replacement character
 
I can't throw in this API
So I'll probably just return garbage or crash.
 
11:26 PM
Both terrible ideas
 
@ThePhD why not both, return garbage and then crash
 
Ell
Can't you use ICU or some such?
 
dis car <3 /cc @jaggedSpire
 
@Ell Requires compilation.
This is a header-only library.
 
rather an ordinary car
 
11:38 PM
@Borgleader pretty sure that's a (bad?) render
 
also low car + bumpy road = -$
 
Possible, but I would tend to blame filter overdose
 
@ThePhD What's "UTF-8 patterns" and how do you detect them
 
@CatPlusPlus Chapter 5 of the GoF book
 
All encoding detection is shitty heuristics that fail more often than not
Even BOM isn't 100% certain
 
11:46 PM
Well, shit.
CppCon wants to accept my submission!
... But they don't like that I call myself "ThePhD"
Or "The Phantom Derpstorm"
:<
 
Hahahaha
Eric Niebler
Chandler Carruth
The Phantom Derpstorm
Bjarne Stroustrup
3
11/10 would watch
 
@ThePhD Of course. Professionalism kinda implies you go with your real name.
 
lol
That is his real name, he's using it all the time
 
May 29 '14 at 16:29, by Jefffrey
I will fight this "professionalism" disease as fiercely as I can till the day I die. — Cat Plus Plus May 16 at 23:37
 

« first day (2041 days earlier)      last day (2909 days later) »