« first day (1608 days earlier)      last day (3355 days later) » 

3:00 AM
are and and not keywords?
 
@orlp Eh, I'd argue for the use of not because it's unary and 1 char, the other ones are legible enough already IMO
 
this is probably a stupid question
 
I like it ..not!
 
user3010322
I might use it for if, but I never knew it was even a keyword really.
 
Anyway matter of taste
 
3:00 AM
@Blob "alternative tokens".
 
@orlp poor you
 
#define unless(x) if (not x)
 
@orlp I don't mind and/or.
 
#define ununless unless if (not x)
 
real example:
    if(not participating) {
        scaled_rd = std::sqrt(pow2(scaled_rd) + pow2(vol));
        return;
    }
 
3:02 AM
ew sticky if
 
@ParkYoung-Bae that's terrible
 
@orlp Say that to ruby or python or whoever uses that
 
guess what unless (x + y == 10) does
if ((!x) + y == 10)
oops
 
@ParkYoung-Bae a what
 
3:03 AM
@ParkYoung-Bae I'm referring to the fact that you didn't put x in parentheses :)
 
@Rapptz if( instead of if (
 
ew if (
 
ew if(
 
ew if(
 
if( is as ugly to me as is void f(){
 
3:04 AM
ewew
 
this is the most pointless discussion we've had all day
feels good to hit rock bottom
 
user3010322
Only place to go from here is up.
 
And the day is just starting
 
ikr
 
@ParkYoung-Bae Why if ( and not, say, function (calls)?
 
user3010322
3:05 AM
... Oh wait, I have a written exam in Java tomorrow.
 
@LucDanton Why not function calls?
 
user3010322
Haaaaaaaaa hahahahahaha haaaaaaaaaa.
 
I used to prefer if( long time ago. Now I prefer if (. Dunno why.
 
@LucDanton because if is flow control
 
user3010322
TOMORROW is going to be rock bottom.
 
3:05 AM
I don't pad spaces in parentheses for anything.
 
Well namely because you pointed out the if but not the call to std::sqrt.
 
if(if) if ()
 
f(...), if(...), while(...), etc.
 
if (if) then (then) else (else) {{}}
 
foo{bar(x,y),qux,blah}
 
3:06 AM
Don't know. Maybe because if is just two letters.
 
foo(bar(x, y), qux, blah)
 
I have a colleague who doesn't put spaces after commas.
 
@LucDanton Meh. Stylistic preference.
@StackedCrooked Isn't that enough a reason to fire him
 
user3010322
if ( x ) {
    meow( x, y, z );
}

void test ( a, b, c ) {

}
 
@StackedCrooked My brother once preferred not putting spaces besides relationals.
 
3:07 AM
@ParkYoung-Bae Do you do for (…), but for_each(…) as well?
 
MY SCREEN REAL ESTATE
 
@LucDanton I don't for_each
 
@ThePhD Absolutely disgusting.
 
@ParkYoung-Bae Yeah, I should have a talk with the boss.
 
user3010322
The space between the return function_name ( args... )
 
user3010322
3:07 AM
Is to make it easily grep / searchable
 
@ThePhD meow ( x , y , z ); ( a , b , c ) there
 
@ParkYoung-Bae But tuples!
 
std::for_each works with tuples?
 
Either way, I like a space after every keyword
 
user3010322
So definitions have the space between the name and the args list.
 
3:08 AM
do you do if ( or if ( Luc
 
user3010322
@Rapptz Rigged poll!
 
notsure.jpeg
 
@orlp static_cast<int> (f)
 
@Rapptz maybe keyword isn't the right word
 
sizeof... (x)?
 
3:09 AM
I go if(…).
 
syntactic construct?
 
Ya know the C++ compiler parsers just rolls their eyes with this discussion.
 
@orlp Vaguest term award
 
if, class, return, while, struct, try etc
 
Except MSVC's maybe.
 
3:10 AM
5 mins ago, by Rapptz
this is the most pointless discussion we've had all day
five minutes strong
 
Keep it up!
 
Speaking of, I’m also of that (relatively) rare breed that goes sizeof expr.
 
this is the ultimate bikeshedding
 
@Rapptz I'm pretty satisfied with myself
 
I'm sure we can at least all agree GNU coding style is bad right?
 
3:11 AM
I prefer function-y sizeof.
 
@Rapptz yep
 
I've yet to see a <big-organization> coding style I can agree with
 
@Rapptz Let’s see, is this the 80s? Nope, doesn’t look like it.
 
@Rapptz s/ coding style//
 
user3010322
What's GNU?
 
user3010322
3:11 AM
Also, do people put braces on the same line, or one below it?
 
@LucDanton lol
 
user3010322
I've done both in my life, but so far I prefer the same-line {
 
@ThePhD See here
 
It depends on the language
 
user3010322
Mostly because
 
user3010322
3:12 AM
void my_empty_function ()
{}
 
user3010322
Just scares me.
 
@ThePhD } // sorry OCD
 
Whenever I can I put on the same line because vertical space is PRECIOUS, but C# I put on a new line because VS insists on formatting
 
lol this reminds me of "Style Nazi"
 
user3010322
@ParkYoung-Bae StyleCop wouldn't shut up until I did.
 
3:13 AM
good times
 
About vertical space, maybe we should mount our second monitor vertical for more space
 
Just turn it sideways
 
user3010322
There's people that code with their monitors sideways.
 
user3010322
Never been able to get behind that.
 
user3010322
My eyes can go side to side easier than they can go top to bottom.
 
3:14 AM
@ParkYoung-Bae s/it //
 
user3010322
But once you get a certain amount of horizontal screenspace, you kinda need more vertical than horizontal after that.
 
it gives more context, and you shouldn't have long lines anyway
 
Dammit VR already!
 
ctrl+alt+direction arrow
 
@ParkYoung-Bae why would you want to switch desktops?
 
3:15 AM
@ParkYoung-Bae I'm so glad I don't have to deal with that shortcut anymore.
@orlp XFCE shortcut spotted.
 
@orlp On Windows with some intel chipsets it changes the screen orientation which is particularly annoying
 
:D
@ParkYoung-Bae why would I want a shortcut for that >.<
 
you don't
it still gives me PTSD
 
seriously
 
3:17 AM
consider that people at intel actually devoted precious developer time on it
 
@ParkYoung-Bae Particularly known by all clever CS students.
 
It has existed for years
 
that feature must've cost quite a bit
 
it's been on every integrated chip I've used.
 
3:17 AM
@Rapptz so any modern intel CPU?
 
Solution is to uninstall the driver.
 
It's a really old shortcut.
I hate it.
 
@orlp Uuuh it dates far back to 2000 or something
 
On my old PC the orientation switch would take so long it'd freeze my PC for a couple seconds.
 
I remember it worked in 2005-6 already!
 
3:18 AM
@ParkYoung-Bae no, I was referring to the fact that any modern intel CPU (barring some models) comes with integrated graphics
 
Then your sentence is misleading as fuck
 
"it's been on every integrated chip I've used." -> "so any modern intel CPU?"
doesn't seem misleading to me
but then I'm not a native speaker...
 
hence
 
That shortcut is old. Like early 2000s old.
 
I wonder if you don't read my messages or have me plonked
 
3:20 AM
Me?
 
2 mins ago, by Park Young-Bae
@orlp Uuuh it dates far back to 2000 or something
lol
 
I know I'm just repeating.
cause I'm cool
 
I know I'm just repeating.
 
but you're not cool
 
3:22 AM
:(
tail -f /usr/ParkYoung-Bae | lounge-echo
 
user3010322
itoa takes a char*, how do you specify the max size of that char*?
 
It is bounded
 
by praying it ends with a null character?
 
user3010322
Lel.
 
by not using itoa.
 
user3010322
3:24 AM
Time to use that itoa_s version.
 
Use to_string
 
probably using C
 
Then get out
 
user3010322
Well, when I say use I mean my shitty homework assignment is asking us to write xtoa, where x stands for hex integer.
 
snprintf otherwise
 
user3010322
3:25 AM
I was wondering what the convetion was for getting / returning the number of characters used / available was.
 
user3010322
So I could enchance these shitty function calls.
 
printf("xtoa, where x stands for hex integer.") done
 
@ThePhD There's a convention that goes like int would_use = to_str(value, null);
 
user3010322
@ParkYoung-Bae I'll take it!
 
3:27 AM
Then you allocate the storage for would use and pass it instead of null
My god euro is falling so fast
 
user3010322
@ParkYoung-Bae Oh, I was just gonna return "what we used" regardless of whether they passed null or not.
 
@ThePhD Yes, that works too.
What I meant was when you don't know in advance the actual needed storage, pass null as storage and let the function compute how much it would actually need
Then allocate, pass storage, and the function returns how much it actually used (same as before)
Another i've seen is bool did_it_work = to_str(input, size_of_output*, output*)
 
Again it works in two stages.
 
3:31 AM
@ParkYoung-Bae is that good or bad?
 
Man.
Imagine someone donating a kidney to a complete stranger.
So.. selfless and strange.
 
@orlp It depends if you're in the Eurozone or not
 
@ParkYoung-Bae I am
 
For you as an individual it's not good if you want to go abroad or purchase stuff from abroad
For your economy it's good
 
guess it's good then
 
3:33 AM
Improves the trade balance, right?
 
why is it good for the economy?
doesn't it mean that we get less money for our export products?
 
It makes your goods cheaper to exportation and therefore more competitive
Companies get richer and create more jobs (hopefully)
Also since the money is devaluating it will recreate inflation which is good
 
@ParkYoung-Bae Depends.
 
yes it depends but controlled inflation is better than deflation for an economy
 
I'm not always 100% sold on the idea that inflation is good
 
user3010322
3:36 AM
"You can't use structs"
 
it's supposed to incentivise spending
 
user3010322
-> can no longer return regular arrays
 
Inflation is bad for integers. Might overflow someday.
 
user3010322
"You can't use anything we havne't covered in class"
 
user3010322
-> can't malloc a char* array
 
3:36 AM
@orlp Yes
 
user3010322
Fuck C and the people who teach it
 
but it usually reduces buying power for the common people
 
The salaries have to follow
 
they always trail though
and I think the economy would invest regardless, your currency must be pretty intensely deflating for it to pay off to hold on to it
but then again, I'm not an economist
 
If you are in a deflation you have no reason to invest
 
3:38 AM
if your currency deflates at 0.1% per year, and investment returns 2%, it's a no-brainer, no?
 
Buying power increases by sitting on your ass.
 
I've heard that the Euro could potentially fall to 1:0.85 USD.
 
I wanted to be an economist.
 
@MarkGarcia I’m glad to gear you got better.
 
@LucDanton I don't know. Maybe I realized I wanted instant results for manipulating things, hence programming. :)
 
3:41 AM
then it turned out it wasn’t the results you wanted
 
Dunno if you guys like Conan. He can be pretty funny at times.
 
@orlp Maybe. You have to be sure of your investment. It's difficult to find good returns in a deflating economy.
@MarkGarcia Manipulating things? You should be a politician!
 
user3010322
> You are not allowed to use any integer to string manipulation library functions
 
user3010322
... So I can't use strchr
 
user3010322
or strstr
 
user3010322
3:43 AM
Fuck these classes
 
@LucDanton Yeah, but catastrophic failures are just a bug ticket away from saving my ass. :P
 
'boost::log::v2_mt_nt5::aux::record_pump<boost::log::v2_mt_nt5::sources::severity_logger_mt<log_severity_level>>[...]' marked as __forceinline not inlined
Nice try boost
 
That warning sounds really helpful.
 
It also warns me about how it failed generating default constructors and such
Why would I care
 
3
Q: In C++, What does "access" mean in the strict aliasing rule?

Matt McNabb3.10/10 says: If a program attempts to access the stored value of an object through a glvalue of other than one of the following types the behavior is undefined: However, the term "access" is not defined anywhere. In this context does it mean read, or read or modify ? In the C standard i...

 
user3010322
3:46 AM
I'm going to insert so many goddamn snarky comments in my program.
 
user3010322
Long, annoying ones
 
user3010322
Just to make him have to read it.
 
@LucDanton Is that sarcasm?!
 
Noooooooooooooooooooooooooooooo
 
I could have sworn it was!
 
3:47 AM
I'm shocked!
 
@ThePhD When you have a solution whose projects depend on some other projects (in submodules) for building, do you add those to the solution?
Why is windows dev so complicated
 
user3010322
@ParkYoung-Bae Yes.
 
Thanks <3
 
user3010322
The unfortunate bit is that you have to add that project to every solution which also has the other project built in.
 
user3010322
4:02 AM
(If you're building from source every time, which I do for all my projects that use my frameworks.)
 
Nice. Yes I'm building from source all the time.
 
user3010322
If you're just doing the usual header / libs, then you just do... uh. Whatever you do for that.
 
user3010322
4:20 AM
Fuck these classes.
 
user3010322
They never teach you "Here's how to use the language you have and its facilities to the maximum."
 
user3010322
It's always "here, reimplement pieces of the standard library in the shittiest fashion possible, and here's some optional bullshit about why its a good idea to do so."
 
user3010322
Would rather hack my fingers off.
 
user3010322
I CAN'T EVEN USE A FUNCTION POINTER TO PASS A VALIDATION FUNCTION TO THIS GETLINE
 
user3010322
BECAUSE WE HAVEN'T LEARNED ABOUT THOSE IN CLASS
 
user3010322
4:23 AM
dhajkDHWAJKDhdhjadhk
 
So why don't you use a lambda instead?
 
user3010322
> C
 
Mean grin :P
 
user3010322
I hate you. :(
 
4:32 AM
The standard is notoriously bad at this sort of thing. Even a rabid language lawyer like myself avoids such questions like the plague. You're on your own ;) — Lightness Races in Orbit 19 secs ago
user image
2
ah fuck it just scroll through these
 
vim just segfaulted
 
user3010322
Kinky.
 
4:47 AM
@ThePhD Classes with C?
2
 
user3010322
Who the hell do I have to kill to get the HLSL Specification.
 
@ThePhD Language or bytecode?
 
user3010322
@MarkGarcia Language.
 
user3010322
Could care less about the bytecode.
 
4:55 AM
I haven't read a spec IIRC through my DX mongering days.
They should make DX cross platform if they want to compete with Vulkan.
Do something like "Feature level Vulkan/OpenGL X.X".
 
5:31 AM
Alright I compiled this thing
Got some errors.
 
5:54 AM
what am I doing wrong here?
 
the hell are you doing
 
trying to get my format function to work with char32_t
 
bad idea
 
but why does calling widen cause a bad_cast?
 
facet probably unsupported
I can't imagine std::ctype being defined for those two char types.
and I just checked and I'm right
only char and wchar_t.
The reason why I said it's a bad idea is cause the stdlib itself barely supports char16_t and char32_t.
There's no std::cout32 etc.
 
5:58 AM
=/
 
if you want to honestly do this you're going to have to provide your own facets
But it's going to be ugly
Instead of calling out.widen(...) you'd have to do std::use_facet<my_facet<char16_t>>(out.getloc()).widen(...).
and for proper error checking you'll need to call std::has_facet.
 
why is all this stuff so fucking useless
 
What do you expect them to do?
This is part of the reason why the iostream design is pretty poor though.
 
I'd at least expect widen to work if they bother to make char32_t
 
It's tightly coupled to the locale.
widen is a lie
widen just pages the locale to convert between characters
which is pretty stupid
 
6:02 AM
I really like how python3 handles strings and io
io only works with bytes
string are unicode
 
iostreams is just a sad mess
 
if you want to convert you'll have to explicitly encode/decode
fucking done
 
it's too tightly coupled to things like locale, formatting, etc.
 
Wasn't there a proposal to nuke the whole thing from orbit
 
It's like a fucking god class.
 
6:03 AM
@Rapptz what do you think of Pythons model in this?
 
I'm indifferent for Python's I/O.
I don't really care much about it.
The bytes and string differentiation is fine though.
 
@Rapptz How could it not be?
 
I don't see other I/O libraries mixing this stuff in.
 
@Rapptz do you happen to know if it's possible to concat UTF-8 encoded strings?
my gut instinct says yes, but I'm not 100% certain
 
I don't see why not?
Do you have "BOM" or something?
 
6:07 AM
nah
then I'll keep internal formatting in ASCII, and just concat it with the user input which is kept in unicode
 
@Rapptz Yeah for byte stuff it’s useless. For text though most languages I know do as C does.
 
How do I ECMAScript regex
 
@LucDanton the problem is that there is no clear distinction between the "byte" stuff and the string stuff in C++
 
Gonna just pray this is valid ECMAScript regex
@LucDanton Do you know if std::regex is still horrible in the libstdc++ provided in GCC 5.0?
horrible as in slow to compile and bad performance
just #include <regex> adds +4s to my compile times on my machine.
 
@Rapptz precompile standard headers
 
6:19 AM
@orlp Still a QoI issue. e.g. libstdc++ vs libc++.
 
@Rapptz And with VC++:
Real 0.969055
User 1.48201
Sys 0.0780005
 
@Rapptz No clue. I don’t really regex often, and when I do it’s not in C++.
 
user3010322
@JerryCoffin P.J. Plauger \o/
 
user3010322
@orlp Wouldn't that NOT help since <regex> is templated?
 
@LucDanton :(
@JerryCoffin I wish.
How's the runtime performance?
 
6:32 AM
@Rapptz I'm honestly not sure--I haven't noticed any real problem when I've used them, so I've never had much reason to test it.
 
Is GCC 5.0 even out yet?
 
I am looking to compile native android code. The executables produced by the arm-gcc toolchain for windows just doesn't seem to work for my device.
 
@Mysticial nope
 
I didn't think so either...
Normally I don't keep track of GCC releases, but I need GCC 5.0 for Cilk Plus and AVX512. Not in a hurry though.
 
user3010322
strpbrk
 
6:36 AM
Still a lot of regressions on the bug tracker btw
 
user3010322
Man, whoever thought of these function names needs to seriously never design libraries ever again...
 
I wanted to see the effects of precompiling, but run into size limit of coliru =/
 
@StackedCrooked What's the limit you set on the binary sizes? I can't even link statically without exceeding the limit.
Not that it matters, but I ran into this while trying to test out the static-linking bug on coliru.
 
what about keeping the limit on the "main.cpp" file the same, raising the limits on all other files generated, but not storing the other files after the command has ran?
 

« first day (1608 days earlier)      last day (3355 days later) »