« first day (2097 days earlier)      last day (2852 days later) » 

12:06 PM
@BartekBanachewicz The distance would always be 0, unless he's trying to somehow detect aliasing issues or something, even that seems sketchy at best.
 
ugh
supporting multibyte winapi is such a pain
Can't use .c_str() in multibyte, and if I don't want to change my types everywhere
I need to allocate memory beforehand just to produce that goddamn pointer
PURFORMANCE
"The clean way to use mbstowcs is to call it twice to find the length of the result:"
...
I don't even
 
Ven
:D
 
maybe I can just construct a wstring
 
@StackedCrooked I find myself enjoying Shokugeki no Souma for some reason
 
LPCTSTR winapiTitle;
#ifdef _UNICODE
std::wstring wideTitle(title.begin(), title.end());
winapiTitle = wideTitle.c_str();
#else
winapiTitle = title.c_str();
#endif
@Ven kill me
that's what I get for trying to fix old terrible code I wrote when drunk
I remember once writing all the macroed classes
tstring, tostream, etc.
 
12:19 PM
@BartekBanachewicz Reminds me of Vulkan's API. A lot of them need to be called twice (first time to get the count, then I resize a vector and call it again). With ThePhD's help I ended up with this neat helper.
 
that behaved like _T and LPCTSTR
 
don't use narrow functions in WinAPI
why would you anyway
just wstring/WCHAR/XxxxxYyyyyW all the way
 
it's a shitty library for noobles on unis
I wrote it 3 years ago
it's supposed to be as dumb as possible
hence I don't want wstrings on the iface
 
terrible
 
pff, widestrings are terrible
it's better to assume UTF8 anyway
 
12:22 PM
My current approach is to have std::basic_string<native_char> strongly typedef'd in the interface, so the functions aren't accidentally passed a string, and
 
but why
why not just use UTF8
you can store it in std::string just fine
 
because your native functions return wide chars
 
We need @R.MartinhoFernandes here
@milleniumbug so? their shitty APIs shouldn't impact your shitty apis
 
nwp
@BartekBanachewicz not on windows
 
native_string make_utf8(std::string) and native_string make_native(std::basic_string<native_char>)
 
12:24 PM
stop overcomplicating things
C++ is bad enough without your help
 
the rest of the world uses native paths unless wrapped
so you'll have constant wrapping and unwrapping anyway
 
I am able to use the 2D position of the fragment to sample a texture representing a heightmap that gives me a 3D position of the fragment. Thinking about it, getting the 2D perpendicular distance of the fragment to the line that creates it would be enough to derive the 3D distance from it. — user5024425 11 mins ago
I dont know what he's on about.
 
nwp
should a function get_some_percentage() return int or char?
 
lol char
 
@milleniumbug byte plz
 
12:25 PM
should return a foreign-born string
 
and if you use frameworks, you use what the framework provides anyway
don't assume encodings
you of all people should appreciate strong typing
 
@milleniumbug that's what you need to do to keep sane interface
@milleniumbug fuck what winapi provides
 
nwp
@BartekBanachewicz "I'm gonna use the winapi, but not use the winapi"
 
but you aren't converting from utf-8 anyway
you just assume ascii
 
I'm gonna use WinAPI but I'm not gonna change my API to accomodate for their silly storage standards
@milleniumbug which is good enough for that thing anyway
oh amazing
and the _T macro doesn't seem to work anyay
 
12:30 PM
10 mins ago, by milleniumbug
don't use narrow functions in WinAPI
 
at least in the SUBSYSTEM:CONSOLE
@milleniumbug I'm not calling them directly ugh
 
you're just dispatching from narrow or wide depending on _UNICODE
 
so don't
these have different semantics often enough
 
what are you on about again
I just want to support both unicode and nonunicode build
 
12:31 PM
lol
 
and expose std::string on my outer interface
 
well then, do
 
1 min ago, by Bartek Banachewicz
and the _T macro doesn't seem to work anyay
 
@BartekBanachewicz what is this, 2000
 
11 mins ago, by Bartek Banachewicz
it's a shitty library for noobles on unis
 
nwp
12:31 PM
@BartekBanachewicz why would you want to support a non-unicode build after 1980?
 
for all intents and purposes, yes
 
@BartekBanachewicz Really, don't use the narrow API.
 
so should I directly call them with W
is that what you're saying
 
that's what I was trying to tell you for 10 minutes
 
Yes.
Call the W versions of all functions.
Convert at the boundaries.
 
12:32 PM
you're so bad at conveying information it's not even funny @milleniumbug
even ThePhD seems to be better
sure it makes sense
 
lolno, you're just furiously responding before I finish my sentences
 
I'll change all of my code now
 
There are a few functions that only exist in narrow versions, and a few whose W versions are wrappers around the A versions, but for the vast majority, using the A versions is bad.
 
43 secs ago, by ThePhD
Call the W versions of all functions.
 
13 mins ago, by milleniumbug
just wstring/WCHAR/XxxxxYyyyyW all the way
 
12:33 PM
Unless you're writing for Win 9x, don't bother with the ANSI API.
 
LOOK AT IT
 
oh I missed that
my bad
so all my literals should be L"" then
 
yeah
 
lol, is the process of making fish jerky expression "jerk 'em out." :D
 
since you don't plan on exposing these it's not a problem anyway
 
12:35 PM
Also, newer APIs don't even have narrow versions.
 
ok ok
I absolutely agree with everything you said
 
now I have a shitty lib noone uses but it uses wide api so it's better
ueh you can't have an abstract class with nonvirtual functions in C++ right
 
@BartekBanachewicz Sure you can. Abstract class is one with unimplemented virtual functions.
 
12:48 PM
@wilx I meant "without using virtual functions at all"
IOW I want an interface
 
@BartekBanachewicz Such class is not abstract by definition.
 
by C++ definition yes
 
I think this is also true in C# and Java
 
@BartekBanachewicz Well, we are talking about C++. What it your point?
 
I asked whether it's possible and it's not, duh
@milleniumbug C# and Java have runtime polymorphism by default so dunno
okay followup question
there's no override for nonvirtual functions right
 
12:50 PM
no
 
somehow I'm not surprised
 
i.e. you can hide them, but everyone'll say this is a bad idea so yeah
 
@BartekBanachewicz If you want an abstract class without functions then you can just declare pure virtual dtor. (Do not forget to actually implement it though.)
 
@wilx no, I want to check interface between two interchangeable implementations without introducing virtual dispatch
 
@BartekBanachewicz Well, rely on devirtualization capability of todays compilers? :)
 
12:52 PM
really
 
Or! use concepts lite? :)
 
okay that could be the first thing mentioned
 
and the answer is no
 
that's a great answer
 
12:52 PM
@milleniumbug Yeah. XY problem.
 
(as in, no, not without introducing TMP)
 
ok if I needed a reminder of why I stopped using this language it didn't take long
 
good for you
 
it's so horrendously bad lol
it's like a parody of itself
 
Aren't we all?
 
12:54 PM
vOv
I just can't believe it took me so long to figure that out
 
we do
 
You just suck at thinking in the box.
 
thankfully you realised
 
With C++ as well as with Haskell, apparently.
 
@wilx When I want to solve a puzzle I build things in minecraft. I don't need a language to be an obstacle course.
@wilx Wut. What can you really tell about my Haskell code?
 
12:56 PM
@BartekBanachewicz Nothing. I can say a lot about your complaints here, though.
 
@wilx What, that they exist? If you don't know if they're valid or not, I'm pretty sure you can't really say anything
 
@BartekBanachewicz I can and I just did. Duh.
 
Accepting shitty technology is not a virtue
it's a necessity
Observing and mentioning bad design choices is the way progress is made
 
Sure.
 
which is why most of the programmers don't really impact the development of the languages they use
that's especially true if your standards are low
 
1:03 PM
lol, OK.
 
but that's very much true
if you don't care about the code you write, you're less likely to complain about the tools you have to use
 
It's funny how similar our views on this are, and how at the same time they are drastically different. :P
 
but are they (different)?
real life requires a balance of code quality vs dealing with the language/tool flaws
 
Yes, they are, because I can (to a degree) accept people deciding they want to do the wrong thing, while in your case, only your world view is correct :P
 
but is it
I mean, I'm talking from my perspective right
 
1:06 PM
I like to think that my world view is correct and that in 20 years when I finally develop Vapor it'll be the best language ever, but I admit that I might be wrong.
 
for the code I want to write, C++ is in the vast majority of cases not enough
 
You just assume that you are right and that you can't be wrong.
Oh, we agree there.
It's just a question of humility. :P
 
oh perhaps
it's hard to deny that millions of C++ lines of code are written each month
 
But it's also completely irrelevant to the discussion. :P
 
for a lot of people the features it offers are enough to write code they deem acceptable
 
1:07 PM
It's easy when you don't even know what C++ is.
 
By "our views on this" I meant our views on language design in general.
Not our views on some specific example of language design.
 
@Griwes not really. If you wanted to accuse me of bullshit ranting when I talk shit about C++, now there's your chance
@Griwes Hence I'm not sure why you'd say that we disagree
 
I talk shit about C++ too.
Heck, no-one actually likes C++.
 
No, that's not true.
Some people that only use basic features like it a lot
 
Not even Bjarne (but for different reasons than everybody else; he dislikes it because the committee doesn't let it have his favorite broken toys).
 
1:09 PM
I'd agree with Morwenn; the less you know it, the more you like it
I loved C++ when I started learning it
 
@BartekBanachewicz I'm talking about people who actually matter, not entry level C++ programmers.
 
Ven
haha
 
I think entry level programmers do matter
 
Like, get anyone who goes to C++ meetings (short of Bjarne and his minions) and ask them about what default C++ got right.
 
oh sure that if you're on that level you can't possibly like it
 
1:10 PM
@Griwes Dtors!
 
I'm pretty sure dtors are fucked up somewhere. Not sure yet where, but somewhere :P
 
I went to dinner with Dietmar Kuhl and Chandler Carruth and few other people and we failed to find 5 relevant defaults the language got right. :P
 
@Griwes using way better than typedef.
I haven't heard anyone complain about type aliases yet.
 
@Morwenn ...how's that a default C++ got?
 
Ven
@BartekBanachewicz who cares about subhumans?
 
1:12 PM
@Morwenn You haven't heard me then.
You can't forward-declare them!
 
Maybe I don't understand what you mean by « default ».
 
are pre-born people forward-declared
 
Like, default behavior when you don't explicitly specify one.
 
Well, it sort of makes sense you can't forward-declare usings.
 
Ven
...yes it does
 
1:13 PM
Say, int i; <- the default is wrong there, there clearly should be explicit syntax for uninited variables and not for inited variables, right?
 
You'd have to get your VC++ on and not parse any templates until they're used to make that work out, no?
 
@ThePhD No.
 
@Griwes That's a bit vague.
 
While we are at that, it doesn't make any sense to care about declaration order.
@Morwenn It is - and we still failed to find 5 that were right!
like
The limerick in the standard isn't a WTF by itself.
 
Ben
1:14 PM
@Griwes the 'wrong thing' being what?
 
The fact that it makes sense is a WTF (and an artifact from an age long gone).
@Ben For example, in Java, "object oriented patterns make sense everywhere" is a wrong thing.
In Haskell, "functional patterns make sense everywhere" is a wrong thing.
 
@Griwes D has this
int a; /* default initialized */ int b = void; /* uninitialized */
 
In Rust, "code that the compiler magically inserts is going to make your program slower so it's bad, let's make it explicit" is a wrong thing.
 
@Griwes Namespaces maybe? In the grand scheme of things they don't feel broken.
 
@Morwenn They don't feel broken now that you can write namespace a::b::c {}.
 
1:17 PM
No, now they're cool, but that wasn't utterly broken either.
 
But there's no "default" there!
They either are or they aren't. You have no choice there.
 
Oh. One pet peeve of mine is that I can't specialize a class from inside another namespace.
 
Open your namespace, put shit in it, it's in the namespace. Good default.
 
You can argue that inline not being the default is the default C++ got right.
 
That makes me sad sometimes.
 
1:17 PM
But inline namespace is still C++11.
We were talking about C++ at its roots. :P
 
C++ got C wrong.
For C got itself wrong to start with.
 
@Morwenn That's not a default, because there's no choice! inline is a choice. C++11 added that. Could not have been screwed up because there was no such behavior before.
 
3
A: Linker error using VS 2015 RC, can't find symbol related to std::codecvt

Gaspard PetitTo clarify the issue and the solution: Microsoft acknowledged that std::codecvt is not built against the char32_t in std library provided with Microsoft Visual Studio 2015 RC. The workaround is to use the unsigned int or the __int32 types: std::wstring_convert< std::codecvt_utf8<unsigned int>...

god
 
Hence inline being explicit there is a default that's right.
 
@Griwes See, your notion of « default » is vague enough for me not to understand it ._.
 
1:19 PM
But it's a forced default; it couldn't've been made wrong by accident because there was prior behavior.
@Morwenn ...the default thing the language does when the user doesn't explicitly specify it.
How's that so vague you can't understand it?
 
Because it is.
 
It isn't.
 
Ben
so I'm an entry level developer then.
 
imo ints shouldn't be default constructible in general
because you can't have a sensible default for ints that's sensible for every use case
 
Ben
hi @Telkitty
 
1:23 PM
warning C4566: character represented by universal-character-name '\u1F02' cannot be represented in the current code page (1250)
1>  OGLWindow.vcxproj -> C:\projects\OGLWindow\x64\Debug\OGLWindow.exe
use unicode they said
it will be fun they said
 
why i find this on many people's profile
#SOreadytohelp
 
@BartekBanachewicz I know that guy!
 
thanks Visual Studio
 
What do you know about long-standing bugs? https://bugzilla.mozilla.org/show_bug.cgi?id=373621 https://t.co/aok3xnkgkB
 
I'm tempted to write a project in assembly
with OpenGL
I never used OpenGL from assembly
 
Ben
1:25 PM
@BartekBanachewicz do you like the syntax?
 
could be fun
@Ben it's ok but meh
 
@milleniumbug int foo = very_long_name_for_uninitialized_value_of_int_expr;.
(expr since that's supposed to be appended to everythingexpr)
 
1:38 PM
in Discussion between Arun kumar Kalaiarasan and dE fENDER, 4 hours ago, by dE fENDER
Boost Log is a really bad logging library, but I'm sure it is not the main reason of crashing your application. To find out where the problem is you have to get memory crash dump and look at it in a debugger.
interesting
 
Word of the day: SOPHOMANIA – a person's delusional belief in their own superior intelligence.
2
cc @BartekBanachewicz
 
lol
"delusional"
not me
anyway, I locked myself out of teamviewer :/
it's the last 2FA I didn't reset after changing my phone I think
and of course I idiotically logged out of my PC here
I am still logged in on my laptop though
> Caution: The two-factor authentication can not be deactivated by TeamViewer. If you lose your recovery key, you will also lose access to all TeamViewer features where your account is needed. Therefore, it must be kept in a secure place.
ugh
that's dumb af
 
@Ben hello
 
@Rapptz btw it looks like with the RTD theme table cells grow to the right without ever introducing a line break inside. doesn’t happen with e.g. the default theme and if you have a CSS hack to fix that or something I’d be happy.
 
I'm wondering about simply making a new account now
I'm gonna try pulling the secret out of my old phone
security sucks
 
2:22 PM
Hi all
 
@Griwes Does it count if I think I'm an idiot, but everybody else thinks I'm an even bigger idiot than I do?
 
Ven
user image
7
 
A Wartortle just showed up on Santa Monica Pier and HUNDREDS of people ran for it. Absolutely insane #PokemonGO https://t.co/ySfjWMaNYh
Who would have thought this was gonna be how humanity ends
 
At least humanity will end having fun.
Also it's your everyday crowd in Bangladesh.
 
@sehe I've been predicting that Twitter was the end of humanity (or at least civilization) since I first heard about it.
 
2:34 PM
@BartekBanachewicz lol.
5 hours ago, by Bartek Banachewicz
I'd rather they supported 2FA when logging in
@JerryCoffin So we know who to blame :)
 
@BartekBanachewicz Secure place = YubiKey.
 
@R.MartinhoFernandes YubiKey first, then it’s my turn
 
user1804599
2:57 PM
A nice thing with UUIDs is that you can fearlessly pick arbitrary sentinel values.
 
user1804599
Because there are about 340 undecillion 282 decillion 366 nonillion 920 octillion 938 septillion 463 sextillion 463 quintillion 374 quadrillion 607 trillion 431 billion 768 million 211 thousand 456 UUIDs.
 
Are UUIDs guaranteed to be different across applications?
Or do you, like, just expect them to be different for your own personal stack?
 
if you duplicate them, they're not unique anymore
with 128bits, it's unlikely you'll hit a collision even when you generate 1 billion of them on 1 billion of computers during 1 billion seconds
 
Good enough for me. vOv
 
nwp
@milleniumbug /during/per second for/s/whatever/vim/is/intuitive?
 
3:12 PM
yep
per second during 1 billion seconds
 
what is command for cleaning cin buffer
 
@R.MartinhoFernandes I didn't have my yubikey when I was setting that thing up :(
I am gonna try to extract my secret
and maybe just maybe I had written it down
if not I suppose I'll just make another account
I have physical access to all machines I need to access
the only problem is that I'll need to use another email
 
Holy shit. TIL: static_cast isn't free.
4
Q: Why does static_cast still work with null pointers in spite of slicing?

bitmaskIf we use multiple inheritance, slicing will make the addresses to parent objects differ from the address to leaf objects: struct X {int x}; struct Y {int y}; struct Z : X, Y {int z}; So if we have a Z object z, its address &z will not coincide with the address of its Y parent: static_cast<Y*>(&...

 
3:27 PM
yeah but this only applies in multiple inheritance
 
I watched another vid of "inappropriate force" used by police
frankly when I think about it from the policemen view
 
I'm wondering if careful placement of a vtable can also do that.
Like if the child class is polymorphic but the parent isn't. Maybe not...
 
hell I'd probably also use whatever force I'm authorized to
they have to deal with such fuckers on a daily basis
if they risked any injury to them they'd be a wreck after a month
 
@BartekBanachewicz It's not actually a particularly dangerous job though. time.com/4326676/dangerous-jobs-america
 
oh that's fatalities
I didn't mean just deaths really
 
3:35 PM
It looks to me like most of the danger in being a policeman basically comes down to the fact that it involves quite a bit of driving, so it's about the same level of danger as other driving jobs (truck driver, taxi cab driver, etc.) Both those jobs show up as more dangerous, but I'd guess it comes down to the fact that policemen don't drive quite a much as they do.
 
#DriversLivesMatter
 
@BartekBanachewicz That's just deaths, but I'd guess injuries follow similar patterns.
 
I wonder if it's statistically more likely for a black person to die in a car accident rather than be killed by a police officer.
Probably yes
 
If anything, quite a few of the others are probably weighted even more heavily toward people being injured more compared to frequency of death.
 
@milleniumbug Come to think of it, this could explain why I noticed that ICC does some stupid null-checking logic in some of my code.
 
3:39 PM
there's been around 4.5k deaths of african-americans in 2006 in traffic accidents
 
I pass in a reference of derived type. The function takes a reference to the parent type. Whenever I try to access a member in the function, it null-checks the reference first.
IOW, ICC doesn't distinguish between pointers and references. So it doesn't use the fact that it's a reference to know that it can never be null.
The implicit upcast upon calling the function adds the null-check which the compiler fails to remove later. (there is multiple inheritance involved)
 
in 2015 police killed 258 black people
 
@BartekBanachewicz In other words, the number killed by police is basically lost in the rounding when dealing with the number killed in traffic accidents.
 
Which makes you wonder
 
@Mysticial Interesting. Removing null checks sounds simple, but isn't that obvious of an optimization
 
3:42 PM
There are so many protests of black people saying they are "afraid for their lives"
shouldn't they basically be afraid of driving way more?
 
Probably they're focusing more on processor-specific optimizations
 
like, even if the amounts of people killed by police doubled, it would still be a minuscule percentile of deaths
 
@milleniumbug Exactly... I intentionally use references to indicate that they can never be null. I would've expected every compiler to be able to use that info to remove null checks. I guess not.
 
@BartekBanachewicz Actually everybody should be afraid of driving. Death-wise it's probably the most lethal technology we ever used.
 
yeah but I mean the protests specifically
like they feel it's very important to focus on deaths by police now
and I'm not denying it's a problem or anything
but frankly it's hardly the biggest problem even for black people
 
3:44 PM
Granted, ICC also does a branch on every virtual call where the base is pure. It branches and explicitly calls __purecall rather than adding __purecall to the vtable. So it's definitely not unheard of for ICC to so stupid things for stuff that isn't a tight numerical loop.
 
so it looks like they are only focusing on it because white people are less likely to be killed by the police
 
The intent is judged.
 
and it would make me think that the problem they are painting now could be a bit out of proportion
 
@Morwenn For a fair number of groups of people it is. For example, crashstats.nhtsa.dot.gov/Api/Public/ViewPublication/809956, page 5 lists it as the leading cause of death among no fewer than 25 demographic groups.
 
like the article about "Pokemon GO could get me killed" (so I won't play it)
I don't see you not driving though?
where's the logic in that?
 
3:46 PM
@Mysticial Meaning ICC is very good for Fortran but not C++? :P
 
@Mysticial yeah sounds lame
 
...and fuck you too. Said this man was trash a looong time ago. https://twitter.com/Snowden/status/753233266665201664
look at those double standards
like in the death by ethnicity there's no such thing as getting killed by a cop
it's statistically insignificant
sure some of those are just illnesses, but even if you only look at accidents and the like
 
@BartekBanachewicz There is none (or very little anyway). People generally do a lousy job of evaluating risk, and spend huge amounts of time and effort on entirely the wrong things. My wife still worries about carefully scrubbing every fruit the kids eat because of insecticides, even though the total deaths ever from insecticides on fruit is something like 5 or 6 (and if memory serves, not even all of those are really certain).
 
@BartekBanachewicz cancer and heart disease biggest killer of them all...
 
hmm altough one thing in the article is true, is that the game is causing you to behave erratically
> There is a statistically disproportionate chance that someone could call the police to investigate me for walking around in circles in the complex.
 
3:57 PM
I posted this (NSFW) earlier but I could not watch it. Now I could. It is some fucked up shit. :)
 
but frankly I am pretty damn sure that out of those 258 police kills
 
A music video.
Sort of.
 
at least a good half was actual criminals
 
@BartekBanachewicz No, because traffic deaths are equalizing.
 
like, actual, armed, robbers, rapists, violent assaulters, stuff like that
13 mins ago, by Bartek Banachewicz
so it looks like they are only focusing on it because white people are less likely to be killed by the police
What I don't get is why the "equalizing" factor should impact fear for your life?
Does other people dying make you feel better about your own death?
 

« first day (2097 days earlier)      last day (2852 days later) »