« first day (738 days earlier)      last day (4211 days later) » 

11:00 PM
@ThePhD It's on the "least worse" side
 
@ThePhD Proof of the contrary is pretty simple: string indexes/iterates in code units. No one should fucking care about code units.
 
@R.MartinhoFernandes Well, what are you comparing against? The point here is that if you compare against C of the past, it clearly doesn't hold.
 
It's an "opinion" that any language is outdated.
 
@Chimera everything is an opinion, you know
 
C is a engine, C++ is a car. At least I can go places with my car even though I am much more likely to die...
 
11:01 PM
@Cicada 2+2=4 isn't really an opinion
 
@Chimera It's a commonly accepted opinion :)
 
There are quite a number of C compilers across all versions of C though. So that speaks for something (but don't ask me what it is).
 
user142019
I’m going to write a new shell. I’m getting sick of shellscript syntax.
 
@Chimera I don't think so. It's clear that B is outdated.
 
@R.MartinhoFernandes But.... the documentation of string tells you explicitly that string indexes in code units. ... Which is kind've important to coders. You can still get the actual non-code units by going through other interfaces, and they have Encoding support from ANSI to Windows Codepage to UTF16/UTF8.
 
11:02 PM
@R.MartinhoFernandes Why?
 
I'm going to write a new world, I'm sick of this one.
 
@WTP'-- and then there were N + 1 shells...
 
@ThePhD Documenting bad designs does not make good designs.
 
@ThePhD Also, it sounds like you have no idea what you mean. If you encode as UTF-8 you're working with code units again. If you encode as some Windows codepage, you're working with code units again. All those things bring you back to working with code units.
 
11:04 PM
@Xeo I have my own version of mem_fn that optionally takes an object as well as the ptm!
 
Xeo
@LucDanton I really wonder why bind doesn't allow that. :|
I mean, it's so easy to do. Just as you said, it's like mem_fn except you bind the object at the same time.
 
Well, because bind isn't mem_fn.
 
Automatic arity detection clashes with nested bind expressions, talking from experience.
In the special case of ptms, I'd rather introduce a new name to be consistent.
 
Xeo
@LucDanton Yeah, but mem_fn isn't bind either and shouldn't bind the object. :P
 
11:07 PM
Come to think of it, I've never tried binding a currified functor.
@Xeo Fine, call it make_delegate then.
 
Xeo
:)
 
@LucDanton This sounds dangerous
 
@R.MartinhoFernandes The ability to know which encoding you're using and use those interfaces to loop over the characters of a string - in as-you-would-see-it-in-the-written-language order - is not working with code units. It's working with the actual language's
character units, which is a huge boon, compared to the nonexistent support for such in all the languages I've used (C++, C, C#, Java). Indexing by code units by default is important in that you know you're indexing directly into memory, not receiving the output of an amalgamation of translating functions. @R.MartinhoFernandes
 
@Cicada I'd try just to spite out but compiler be broken :(
Sure, it could destroy the universe. But it could also compile!
 
@ThePhD Well, if you want to put it that way... A C# character cannot represent all Unicode characters. QED.
@ThePhD And why the fuck is knowing that you're indexing into memory important for internationalization?
 
11:09 PM
By the way nobody is making the point that code units are useless in all situations. Keep in mind the context.
 
@R.MartinhoFernandes You can use UTF32, which AFAIK can represent the entire unicode space
 
@Cicada Yeah, with int[]. Awesome support, I'd say. Especially since everything everywhere uses string.
I'm not saying it's not possible. I'm saying the support is crap.
 
Why are you not using int[]? Looks like a code smell to me
 
@R.MartinhoFernandes It's important for the -language- itself. When you're programming, you're dealing code units; that's what you expect to be handling. By default, people aren't working in an Internationalization mindset: most people don't need to go beyond the ANSI unless working with written text from internal users, therefore defaulting to something that's hardly the use-scenario standard or useful in terms of every-day programming;
 
@ThePhD ARhaygh. WTF are you trying to say? That C# has great support for internationalization because people don't care?
 
11:12 PM
Internalization is its own problem and really not the standard scenario for most programmers, therefore having separate Encoding interfaces (as C# does) is probably the most effective approach to Internationalization that's been done so far.
 
So your position of i18n support is that it's fine because most people don't need i18n?
 
@R.MartinhoFernandes Yes, I think I'm getting at that.
 
I'll just stop arguing and start laughing then.
 
... I think.
What is... i18n?
 
lel
 
11:14 PM
In other news, C++ has awesome support for logic programming.
 
@ThePhD I'll explain it with simple words: in a language like C#, encoding is irrelevant for internationalization. Encoding is important for storage and serialization.
 
@R.MartinhoFernandes I'm not sure I'd say totally bogus. Mostly depends on where you draw the line between easy and hard. C++ is a lot harder. Pascal is a lot easier, and a minimalist Lisp is quite a bit easier still.
 
Isn't the fundamental problem of internationalization programming to be able to handle multiple languages and/or change languages? Isn't that the whole goal of using an encoding other than legacy ANSI C strings?
 
I'm starting to see the fact that some people's minds race to encodings when this topic comes up as a problem.
 
The fundamental problem of internationalization is that we humans can never agree on anything.
 
11:17 PM
@ThePhD Why not view the encoding as an implementation detail then?
 
Internal encoding doesn't matter as long as it works.
 
@ThePhD No. In C#, encodings are only relevant when you're sending stuff to other machines. And, because the design sucks, when iterating over string.
 
"C string" is not an encoding either way
 
The whole goal of using two's complement is to encode integers in a machine-efficient representation. I don't need to do bitwise stuff to add two numbers.
 
@LucDanton Depends on the hardware.
On modern hardware it is machine efficient indeed. This wasn't always the case.
You're not supposed to know how ints are encoded IMO.
 
11:19 PM
Yep.
 
Ya I wasn't sure what term to use to parallel 'encoding' other than well, 'encoding'. Two's complement is here a parallel to e.g. UTF-32.
 
And you should not be supposed to know how characters are encoded. (and with System.String you are)
 
@LucDanton Absolutely
 
The Standard uses 'pure binary number system' or some such but you know.
 
Unless you're dumping it somewhere out of memory
 
11:20 PM
@CatPlusPlus What I'm getting at is C#'s internal encodings - UTF16 by default - work well enough to be able to handle multiple languages and can be translated to those languages, which take a lot fo bite out of the internalization problem, right?
 
Compared to what? That's the only way we've been doing it.
 
UTF16 is terrible, but handling Unicode is just one side of i18n.
 
@ThePhD No, it's not the encoding that allows that. It's the fact that they use the Unicode Character Set.
 
Unicode. Let's pretend UCS doesn't exist.
Because it's ISO being retarded as usual.
 
Ooops.
But, since the encoding leaks through the interface, you end up using UTF-16 code units, and write code praying that surrogates don't exist.
 
11:24 PM
@LucDanton Compared to how C++, C does stuff (or rather, doesn't do anything) about it. ... The original point here was that C# has a bit more grace about internationalization of programs. Or i18n'ing of them. Why did people even pick the term i18n?
 
I-18 letters-n.
 
Makes sense.
 
Internationalization.
 
Wow I was typing that out by hand.
i18n sounds great now.
 
@ThePhD C# has UTF16, C has UTF8. I fail to see why one is better than the other WRT i18n.
 
11:26 PM
C has crap, not UTF8.
 
user142019
UTF-7 FTW
 
@MooingDuck If it were that way :( C has... "whatever", basically.
 
C and C++... just process character streams, I'm pretty sure.
 
@ThePhD String-wise they're the same from what I gathered from the conversion. However the reduced size of the library may mean that it's harder to e.g. transmit such strings for C++.
 
Both stdio and iostreams are absolutely fucking terrible at Unicode.
 
11:26 PM
@R.MartinhoFernandes it can be treated that way, without a whole lot of difficulty. But you're right that it's not "native"
 
s/Unicode/pretty much anything/
 
@MooingDuck Without a whole lot of difficulty? Ask Alf about using UTF-8 on Windows.
 
Neither C nor C++ has Unicode-aware string processing.
 
Much of the problem (IMO) comes back to the fact that Unicode (and ISO 10646) have invented this concept of a 'code point' that usually corresponds to what most people think of as a character, but not always. It's close enough to always that unless you know the details, you can write a lot of tests that will pass with code that's completely broken. UTF-16 takes the same basic problem, and extends it a bit, so things break even more often, but broken code can still pass naive testing.
 
Some dumb people came up with wchar_t for some reason, and decided it's good enough.
 
11:27 PM
Why did I have to bring the internationalization support argument in here? oh god
 
It's not good enough, it's useless.
 
@R.MartinhoFernandes I actually tried to use a StringUTF8 for windows, and it went beserk, because Windows doesn't have any UTF8 processing. It assumes anything that's char* is Legacy ANSI, which is so murderous.
 
But I could go on about C#/.NET: the date and time API is very sketchy and the fact that CultureInfo.CurrentCulture is the default everywhere instead of CultureInfo.InvariantCulture are other examples of lousy support.
 
That's another big problem with i18n: rendering this shit
.
 
Datetime APIs are always sketchy.
 
11:29 PM
Date/time is localisation, not internationalisation.
 
If you want to use anything that's multibyte encoded, it expects you to use C#-like strings with wchar_t to differentiate.
 
Well, partially. There's timezone-aware processing, and presentation.
 
I'm not sure why people don't just always transfer time in UTC.
 
Dates are probably as fucked up as Unicode.
 
And then convert it out when they're ready.
 
11:30 PM
@CatPlusPlus Yes, they are.
 
People are dumb.
 
@ThePhD I believe windows assumes char* is code pages, not ASCII.
 
@ThePhD Because it doesn't work anyway
 
If they weren't, we wouldn't have i18n problems.
 
This is not about being dumb
 
11:30 PM
@R.MartinhoFernandes Is InvariantCulture the equivalent to std::locale("C")?
 
It's just normal human behavior
 
Windows assumes too much things, and that whole Unicode/ANSI thing is so broken that oh my god.
 
@ThePhD I don't understand that comment.
 
@ThePhD For many reasons, but an important one is that that is not enough.
 
@Cicada Which is dumb.
 
11:31 PM
@LucDanton Think so.
 
@Cicada The problem (or one problem) is that even thought it's sketchy, it's standard. Standardizing something tends to freeze it, so it doesn't improve even when improvements are fairly simple and obvious.
 
You can't standardize human behavior
Attempting standardization is always hilarious
 
@MooingDuck For example, CreateWindowExA vs. CreateWindowExW. A expects your LPCSTR to be ANSI, CreateWindowExW expects UTF16, I'm fairly sure.
 
It's not UTF-16.
 
@ThePhD UTC is hardly free of warts itself (e.g., leap seconds).
 
11:32 PM
It's something more close to UCS2.
And broken.
 
@ThePhD ANSI is not an encoding. CreateWindowExA expects codepage-encoded chars.
 
UCS2.... welp. I've created a bogus UTF16 string class then.
 
lol
 
God. >_<
Fuck these APIs. In the mouth.
 
Duct tape everywhere
Duct tape everything
 
11:34 PM
@ThePhD As an example, convert 2012/10/28 01:30 on my timezone to UTC. Good luck.
 
Document that the design doesn't validate what goes in the string!
@R.MartinhoFernandes Omg.
 
@CatPlusPlus I've heard that after Win2000 they made it "support characters outside the BMP", but I'm not certain what that means
 
@R.MartinhoFernandes What happened then?
 
Everything is duct taped at some point. Get over it.
 
Click on computer clock, notice warning.
 
11:34 PM
@CatPlusPlus It's in the future. Twice.
 
Oh, right, DST changes this weekend.
 
It's all held together by spit....
... All of it...
 
DST is retarded.
 
I feel so discouraged now.
 
Yup, don't do computers kids
 
11:35 PM
I was feelin' all great, making StringUTF8 and StringUTF16 and feelin' all col and shit
 
@CatPlusPlus No, it's advanced.
 
It's bad for your brain
 
And now it's UCS2 and some other nonsense and other api siiiigh...
 
@JerryCoffin lol
 
I thought Unicode was the standard by which everyone did strings these days.
 
11:36 PM
I wonder if leap seconds or DST would win "the most stupid thing" award.
 
Something, somewhere, told me that.
 
@ThePhD Unicode is not an encoding.
 
Unicode is hopes and broken dreams.
 
@ThePhD All Unicode-related stuff is a big mess anyway. Stay away from these
 
@ThePhD also, theoretically, Windows has a "utf8" codepage, which could make the A version expect UTF8. I've never heard of anyone trying it however.
 
11:37 PM
@MooingDuck Because it doesn't work haha
What'd you expect.
 
@MooingDuck I heard it's broken or buggy or unfinished.
 
You can't process UTF-8 like 8-bit encoding.
 
I'm still waiting on Boost.Whatever that provides some more codecvt facets.
 
Unicode cannot be shoehorned into codepage-expecting code ever.
 
@ThePhD Not really. When you get down to it, there's still a lot of code that's basically just written for ASCII, and happens to be clean enough for 8-bit characters that it works to some degree with ISO-8859-x, and might sort of work with some other multi-byte codes as well, but is pretty much broken with almost everything else.
 
11:38 PM
It's not something where you process all character the same way, but render them differently when CP is different.
 
Really, who starred an xkcd that is a link to an image hosted on imgur?
 
@R.MartinhoFernandes I can't help but wonder if they fixed it ten years ago, but haven't been able to convince anyone.
 
I like that page where someone defends C++'s std::string as supporting Unicode.
 
@MooingDuck lol
@CatPlusPlus The UTF-8 manifesto or something?
 
Yes, that one.
 
11:40 PM
Welp.
ASCII all the way.
Nothing I can do to win.
 
> There is no way to return Unicode from std::exception::what() other than using UTF-8.
Ahahahahahahahahahahahah :frogout:
This is not a valid reason ever
 
Aw, LWS doesn't link to Boost.Locale.
 
@CatPlusPlus Erm, have they ever heard of bytes?
@LucDanton Ha, yeah, I would not expect linking from it.
 
At least they got a good idea about wchar_t
 
@Stacked should get cracking on his clone, because then we can ask for features.
 
11:42 PM
> Never produce text output files with non-UTF-8 content
Not valid
 
@R.MartinhoFernandes oh. _setmbcp "The codepage argument can be set to any of the following values:.....except UTF-7 and UTF-8, which are not supported."
 
Or maybe it's not that
 
Buahahahaha.
I have no idea
which codepages
 
Somewhere someone said std::string::size() returning amount of bytes is ~correct behaviour~
 
I'm supposed to use now.
 
11:43 PM
And you can totally use it for Unicode.
 
@ThePhD Go read up on unicode.
 
Fuck distinction between encoded and decoded strings.
 
@CatPlusPlus what.
 
int[] all the way.
It can fit everyone's language.
I'll just truncate.
 
@ThePhD pick either utf32 or utf8, and abstract OS calls
 
11:44 PM
@ThePhD int[] s = Console.ReadLine(); yes, ofc
 
@CatPlusPlus Yeah, really annoying.
@MooingDuck Why UTF-8?
 
Or pick entirely different internal representation because it doesn't matter
 
Pick UTF32 srsly. (Don't actually do that)
 
Boost.Locale does provide encoding conversions but no codecvt. It recommends a Boost.Iostreams-based solution instead. Weird?
 
Didn't you just find out it's not supported?
 
11:45 PM
@R.MartinhoFernandes is anything else supported?
 
@Cicada Why not?
 
It's a stupid waste of memory
 
@R.MartinhoFernandes space, because every API has a utf8 conversion to host-native, and because few apps play with strings internals anyway.
 
@Cicada but I want ALL THE CHARACTERS!
 
@Cicada How large is the bible (pick another large book if you want)?
 
11:46 PM
Factor uses/used two vectors, one 8-bit second 21-bit.
 
@R.MartinhoFernandes Too large
 
That's valid representation of Unicode, too.
It's not UTF-anything, and it works.
 
4 017 010 characters in the bible.
 
This is a Unicode string implemented well.
 
with 4 bytes per char, that makes 15MB
 
11:47 PM
@Cicada A whopping 16 megs.
Wow.
 
Doesn't fit on my diskette.
 
That's a lot more than 640k.
 
lol
 
With RAM being cheap as dirt, memory concerns are not valid.
 
They are more than never (or is it ever?)
 
11:48 PM
So, int[] all the way!
String32, here I come.
 
@Cicada Maybe you should trade in that floppy disk for a hard drive ;)
 
UTF-32 is the easiest one to process.
 
Point is: most applications don't need to keep any amount of text as large as the bible in memory.
 
If you can code UTF-8 correctly, props, but if you can't, use 32.
 
16 megs of text should be enough for everyone. (just in case... it's a joke)
 
11:49 PM
Fundamentally, it's a tradeoff between convenience and efficiency. Unless you expect to routinely deal with large amounts, convenience wins: use utf-32 internally and either utf-32 or utf-8 externally. If you really deal with huge text and don't mind jumping through hoops to compress, probably utf-8 with lzHuff (or something like that) internally.
 
Yeah, internal representation doesn't have to be UTF-anything I think I've said that already
 
So basically we tell facebook "hey your utf8 encoding sucks, you should totally move to utf32" and bam, their data suddenly gets multiplied by 2.5 or so? bad idea
 
It's a bad idea but not because the data takes more space.
 
erm
 
11:50 PM
They can afford it.
 
why should they pay 2x the price
 
HDD space is even cheaper than RAM.
 
not a reason to have sucky encodings
 
You can use more than one encoding. Like one for processing, and another one for storing.
 
They already store petabytes of data, couple TB here or there makes no difference whatsoever.
 
11:51 PM
@Cicada First, storage in secondary storage is a separate concern. Then, there are only a couple of Facebook-sized organizations out there.
 
Thinking it over, a 16 megabyte download would be a lot slower than a 640K one.
 
@ThePhD Wow? Would it?
 
Hello, am I allowed to ask fo' C++ help here?
 
@ThePhD Again, storage and transmission are separate concerns.
 
We're talking about internal representations here anyway, NOT external ones.
 
11:52 PM
@Breakthrough Yes.
 
@Cicada Most of what fb stores is things like JPEGs, that would be unaffected. Probably well under 1% of their data would be affected.
 
The point is: "X everywhere" is wrong.
 
So I have no idea why we even talk about FB stores.
 
'Cause I'm trying to build Scintilla on Windows from Notepad++, and I's gettin' linking errors.
 
They can use 32 internally and 8 externally.
 
11:52 PM
There's this saying "Use the right tool for the job". I'm sure you've heard it before. Don't forget it.
 
(note the relaxed, "lounge" style manner in which I speak)
 
@Breakthrough Check your paths
 
No, sorry
 
@Breakthrough Trying too hard is a thing.
 
Multiply defined symbols
 
11:53 PM
@Breakthrough Compiler?
 
@ Link time
 
Hm.
Welp.
 
Cat's bananas.
 
11:53 PM
@Breakthrough what-is-your-compiler
 
My brain fritz'd.
 
Ok
What I mean is.
 
I think I'll stick with a UTF16 string, so I can be compatible with OS API calls that ask for wchar_t
 
Does anyone know anything about Scintilla or Notepad++?
 
11:54 PM
Not to big, not too small.
All my encoding will be done in UTF8.
Er, externally.
 
@Breakthrough I've heard these names before
 
Except wchar_t might be 32-bit because fuck you.
 
@CatPlusPlus ... What? D:
 
Specifically regarding building them, lol...
 
(That's why you never ever use wchar_t for anything, because it was invented by idiots)
 
11:55 PM
Why would anyone want to build Notepad++ on Windows?
 
@ThePhD I think only Windows has 16-bit wchar_t.
 
I'm not
I'm building Scintilla
 
Then wtf
 
..... THE WORLD IS A HORRIBLE CONFUSED PLACE AND I HATE IT.
 
Now you know how I feel
 
11:55 PM
the one From NP++
 
Last time I built Sci it involved running their build system and let it build
 
Uh well you just open the solution and build it?
 
Have you tried that?
 
No solution anymore
Gotta use nmake
 
They use CMake I think
 
11:56 PM
Don't listen to the Cat he's trying to confuse you
 
I built it fine on Linux
 
Then use Linux
 
@CatPlusPlus Actually, wchar_t was done right -- the rest of the world got it wrong. Unfortunately, since the rest of the world did get it wrong, wchar_t is pretty useless in real life.
 
Windows is BS lol
 
11:56 PM
Go get a Gentoo right now
 
@JerryCoffin Haha.
 
I know but I wanna compile it for someone with a patch I made
 
@Breakthrough No, Windows is not Bjarne Stroustrup.
 
@ThePhD Accept C++11 into your heart. (Of course nobody supports yet those features that would make your life easier, but you know.)
 
@LucDanton I recently learned that GCC doesn't ship <cuchar>.
 
11:57 PM
Does it ship <cucumber>
 
@Breakthrough Is it nmake or cmake
 
Not even a non-working one, like they do with <regex>.
 
README suggests nmake
 
@CatPlusPlus I laughed
 
They should be consistent and either ship all the non-working things, or ship none of them.
 
11:58 PM
@Breakthrough Well then use nmake on the makefile right
 
@R.MartinhoFernandes What does that do? Classification?
 
Yes mien fuher, I have
 
@LucDanton Unicode <-> native conversions.
 
Also it's Boost.Serialization that has that utf8_codecvt.
 
It's the glue between the two worlds.
 
11:58 PM
@R.MartinhoFernandes I don't believe you.
 
There appears to be a multiply defined symbol named RegexSearchBase
 
@LucDanton I'm serious. It's the missing link.
 
codecvt is weird.
 
And I just don't know how to approach it.
 
If it doesn't build out of box, file a bug.
Duh.
 
11:59 PM
No
Get your friend on Linux
 
True fucking say
I just realized
This was the most recent commit in my working dir
 
@R.MartinhoFernandes Yeah I've read that bit of the Standard before. I still don't buy it.
 

« first day (738 days earlier)      last day (4211 days later) »