« first day (1599 days earlier)      last day (3349 days later) » 

10:03 PM
@Rapptz Isn't JSON specified to be UTF8?
 
yeah that's my excuse
 
I also use UTF8 only. I'm not ashamed of that.
 
I thought about it because I'm already writing utf conversion functions
 
If ever I find a need for something else I'll convert when needed. UTF8 is my default anywhere.
I don't see why a JSON library would ever consider UNICODE conversions, seeing that the JSON is utf8 by definition (and the unicode escapes are relatively straightforward)
 
I return UTF-8 encoded strings but the unicode escapes are UTF-16.
so I have to convert the UTF-16 escapes to UTF-8 and then...
when I dump the strings I need to write an option to ensure ASCII so I can turn the UTF-8 into UTF-16 escapes.
 
10:07 PM
ASCII? :s
 
that's just the python name for the option
ensure_ascii = True presumably because all the characters fall under ASCII
 
> labtop
 
That is, in fact, not using UTF-8 for the source, but ASCII
 
'UTF-8, so long as it’s ASCII'
 
@Rapptz so python calls ANSI ASCII?
lol
 
10:09 PM
No, it's 7-bit ASCII
 
I don't actually use ASCII internally
 
No 8-bit characters will be writte
 
char x = get_the_char() & 127;   // problem solved
 
You don't. Good to know
 
I've triggered the circlejerk :(
my fault honestly
 
10:10 PM
@AlexM. Do you use the new Unity GUI thing
Why does grid layout group use absolute values aaaaaa
 
I dunno. What's the use of python mandating ASCII for output? That seems to be very counterproductive with UNICODE aware terminals
 
That's an option for json.dump
 
The name is a misnomer.
 
7 bit is ASCII.
 
Well, no, it does exactly what it says
 
10:12 PM
I guess.
 
Or were people just saying that to mess with me?
 
L.
 
It's actually UTF-7
 
nevertheless the option just turns the characters to their escaped versions afaik
which is what I'm trying to do
like \xe3\x82\xaf -> \u30af
pls no bully on the word 'character'.
too lazy to change
 
10:15 PM
I thought we were talking about your c++ library anyways. Not sure when python got implied.
 
I like their libraries.
 
Yeah. Well. It's still a different thing
 
I mentioned it as a point of comparison.
 
@Rapptz That's the second time you insinuate trolling (circle jerking/bullying even) now
@Rapptz Ah
@Rapptz Oh, I don't do that, because I care about proper JSON only. So, if a client can't handle the UTF8, well, they can fix it :)
I use JSON for transport only, not presentation
 
@sehe ...or EBCDIC. :-)
 
10:18 PM
I asked if it was a good idea 11 hours ago or so to have the option and Robot and Jalf said it wouldn't hurt
 
@JerryCoffin yeah, I knew that :)
 
I do wish I had codecvt_utf8_utf16 and what not.
Seems fancy
 
@Rapptz Of course :) I'm pragmatic. I don't have the ambition to write the "killer JSON lib" (that's a mighty fashionable rage these days). It just needs to be general purpose, fast, correct for me
 
@Rapptz They were just teasing you. It's really a terrible idea. Either that or I'm full of shit right now. Hmm...what are the odds...
 
@Rapptz all you need is iconv it has been around for ages
 
10:21 PM
Nothing I make will ever be a killer lib.
 
so what is the reaon you crave the extra "output encoding option"?
 
I tried libXml2 last week, It damned near killed me.
 
Do you know an application area where it matters?
 
@Rapptz I see no need not to stick with UTF-8 everywhere and let clients do conversions themselves when they need it.
 
It made me write gotos though.
 
10:24 PM
So, you summoned the raptor to fight off the demons of libxml2?
 
@sehe Even if no one uses my things I like providing convenience.
 
> convenience
 
I felt Edgsr taunting me =)
 
That's a very weird notion of convenience right there
 
Bad choice of words maybe.
Well it's more convenient than clients converting it themselves.
I guess that's what I was going for.
 
10:25 PM
That's utility, and that exactly covers what it should be: a separate utility
3 mins ago, by sehe
Do you know an application area where it matters?
What clients would that be
 
@Rapptz Yeah you can provide convenience (de)serialization for std::u32string etc.
 
Considering the chances of someone else using this is pretty nil I assume that'd be me.
 
I wouldn’t bother since I’m using GCC and I don’t have <codecvt> but if I had I could see the point.
 
if you really want to be making something useful, make some pattern recognizing apps
 
@Rapptz When would it be convenient for you to encode non-ASCII7 code points as escapes?
 
10:29 PM
Not sure.
 
Hello.
How do you guys solve [this](http://www.stackoverflow.com/questions/26650863/type-for-array-indices-signed-unsigned-integer-avantages#comment45954857_26651105) problem?
 
Use auto.
 
So. return out << 'x'; is not exactly 'generic' friendly for ostream types.
 
yup
 
10:30 PM
good to know
 
And why does the link thing not work? 0.o
 
(just got the error)
 
and widen is… special
 
@BaummitAugen Usually a range-based for loop or an algorithm.
 
I use return out << stuff; so much
I should have tested this better
 
10:32 PM
@LucDanton ...and in case anybody's wondering, that would be "short-bus special".
 
And you use std::basic_ostream<CharT>& os?
 
No I use template<typename OStream> OStream& stuff(OStream& out, ...)
 
@BaummitAugen use size_t, auto, and 0ul or similar
 
@Rapptz Yeah that doesn’t really work out.
 
you mean in terms of return out << stuff or in other ways?
 
10:33 PM
In the end I use std::ostream& os.
 
@JerryCoffin Thanks. I guess I will try even harder to avoid loops with indices and static_cast the rest?
 
@Rapptz Yeah, writing a would-be generic return os << "thing { " << t.foo << ", " << t.bar << " }";
 
@sehe At least the standard committee seems to dislike unsigned types for anything but bit-fiddling. But I guess this is quite opinion based.
 
@BaummitAugen If you can't avoid using an index, yeah, static_cast is usually about as good as you can do.
 
I mean I could just do os << stuff << stuff and then return os in another line.
 
10:35 PM
Yeah that depends on your stream concepts. I bypass that by using std::basic_ostream.
 
@BaummitAugen huh. the container library and algorithms are littered with unsigned sizes
 
I just really require operator<< and the flags/width member functions.
 
@Rapptz What's wrong with it?
 
not too strict I guess
 
@sehe Yep. But here (I think) they say that that was a mistake.
I can look up the exact relevant times if you want to.
 
10:36 PM
@sehe For the function signature above it doesn't work because it returns std::basic_ostream&. If you pass std::basic_ofstream then you get an error because you can't convert.
 
@BaummitAugen If that’s true that’s amazing.
 
@BaummitAugen any particular time?
 
Give me a minute, I will look it up.
 
Oh I thought you guys knew that they consider using unsigned types a mistake.
 
@BaummitAugen At least IMO, they should avoid unsigned a lot more than they do (it should really be primarily when you need a "bag of bits"), but they're kind of stuck with it, because a lot of stuff from C (e.g., sizeof) started to use unsigned types before they got involved at all. At the time, it was even fairly reasonable (on 16-bit machines, you really needed unsigned types for sizes a lot), but that time is long past.
 
user1804599
10:37 PM
If dishwashers had windows, there would be less people thinking it fills to the top with water when operated. — Virtlink Jan 15 '14 at 16:18
 
user1804599
lol
 
@Rapptz Ah, what Luc said. Take/return std::basic_ostream<charT, ... > indeed. The return statement is hardly the issue.
 
@sehe I remember it being towards the middle / end ish.
 
@Rapptz I have never seen the particular session. Would be interesting
 
@sehe @LucDanton 1:02
ish
 
10:39 PM
When asked why they did it, they said "We were young and dumb--don't repeat our mistakes"
 
@BaummitAugen thanks
 
1:02:40 is more precise.
 
Yeah, it was short but clear and uncontested.
 
Scott's later comment about how to take "don't do blah blah blah" was really helpful for me.
 
I'm a bit surprised. I can signed being "clearly" generally good enough and much more robust/convenient in a 64 bit world.
 
10:44 PM
At 9:50 they talk a little bit longer about "Why signed?".
 
But back when 32bit ints were the norm, I do think using unsigned for counting does make a lot of sense - especially in general purpose library code
 
I don't really think unsigned is a mistake.
Personally.
 
There was one more comment on this, but I do not find it right now.
 
@Rapptz unsigned+implicit conversions together?
 
@Rapptz I basically agree, for the reasons stated ^^
 
10:46 PM
16 mins ago, by Rapptz
Use auto.
 
@Rapptz doesn't alter the implicit conversions case.
Unsignedness is "contagious"
 
I know, that’s why I’m asking.
@Rapptz I thought you knew about the perils of implicit conversions?
 
I practically never use unsigned types
 
@LucDanton I do.
 
10:47 PM
Then you’d know auto cannot possibly help.
 
@LucDanton The implicit conversions are an unfortunate complicating factor, but I do think that it would have been dumb for C++ to specify signed "size_t" when the bulkd of platforms were 32 bit and some still used/required 16 bit integers
 
signed size_t is std::ptrdiff_t.
 
@LucDanton Misreply. Sorry
 
user1804599
ssize_t
 
@Rapptz yes?
 
10:49 PM
@sehe That’s something else altogether.
 
@sehe no?
 
I know. It's my argument :)
 
@sehe Well, I’m not contesting it.
 
@Rapptz Good. What does it matter that ptrdiff_t is basically "signed size_t"?
 
@LucDanton I'm mainly being in jest.
 
10:50 PM
@BaummitAugen Thanks. I don't know how you find these so fast. Saved me a lot of time
@Rapptz ...
 
...
 
@Rapptz JOKE’S ON US HUH?
 
@sehe I watched this around christmas, I kind of remembered where to look.
 
@LucDanton Payback.
 
for what :(
 
10:51 PM
> but I do think that it would have been dumb for C++ to specify signed "size_t"
 
Geez
I know I used words that are topically related. But I was trying to make sense.
 
Did I misread that?
 
Yes. Apparently
 
I don't know how to read it any other way.
 
> It seems GitHub saw the irony of the situation and decided to fix it. Today, GitHub debuted the microsite choosealicense.com that offers a greatly simplified view of open source licenses and helps explain their effects.
nice
 
10:53 PM
@Rapptz (size_t is not signed. The fact that other types exist that are signed, doesn't make that different; My point is, I think I understand why specifying size_t to be signed didn't make a lot of sense when it was done)
 
"Today"?
 
user3010322
Shitdamnfucks.
 
Where "today" is like 6 months ago
 
user3010322
This class is kicking my ass.
 
change size_t from unsigned to signed would probably produce a lot of warnings when you try to compile old code using the new signed size_t
 
user3010322
10:53 PM
I'm glad I'm Auditing it or I'd be considering dropping. ;~;
 
@CatPlusPlus more like 2 years, the way I remember it
 
Yeah it's really really old.
 
My sense of time beyond a week is non-existent
 
@chmod711telkitty gosh, don't confuse things even more. We're not talking about changing the specs now
 
but you are complaining about it?
 
10:55 PM
Hi kitty. Feel free to read up a bit.
 
@sehe Oh I see. You meant specifying size_t to be signed.
 
:)
 
Could you at least see how it could be misread? I don't wanna seem like a moron.
 
@chmod711telkitty No, it would be a breaking change
 
user3010322
MFW there was no ssize_t.
 
10:55 PM
@ThePhD What class?
 
@Rapptz Yes of course. (I don't see how that could make sense though, so the response still baffles me :))
 
@FredOverflow This
 
user3010322
@FredOverflow Applied Machine Learning.
 
user3010322
The order of difficulty so far is (from easy to WHAT THE HELL): Intro to Programming Java; Programming in C; Introduction to Statistics; Computer Science Theory; Applied Machine Learning
 
@ThePhD MFW? My face when? (There is, afaik; even more rarely used)
 
10:57 PM
"WHAT THE HELL" as in "wtf this is so easy" or "wtf this is so hard"?
 
user3010322
@Blob "What Hell did I wake up to deserve this. ;~;"
 
user3010322
@sehe I think it's only in C, but not C++?
 
user3010322
... Or maybe it's just in POSIX only.
 
personally, I think that having to learn Java is just generally WHAT THE HELL
 
@ThePhD could be. There's overlap so that'd explain my occasional encounters
 
10:58 PM
grr java
 
user3010322
@sehe Yeah, it's <sys/types.h> for POSIX that has ssize_t
 
Ahh. C++ hath std::streamsize
 
user3010322
:O
 
user3010322
Whoa.
 
O:
:O
 
10:59 PM
This is what I learned and already forgot
 
TIL 0.o
 
@Rapptz using a = unsigned; signed a i = 0; doesn’t work, so…
 

« first day (1599 days earlier)      last day (3349 days later) »