« first day (877 days earlier)      last day (4070 days later) » 

user142019
10:00 AM
Oh you have a job?
 
user142019
TIL.
 
I have done for a week
 
user142019
ohlol cool
 
user142019
At Google?
 
np
no
I contract for a company called PathScale
 
user142019
10:04 AM
Chill.
 
user142019
Compiler development? :P
 
yuppers
quite a fit don'tcha think
 
user142019
Have you read the dragon book?
 
no
 
is there only one book with dragons?
 
user142019
10:08 AM
lol
 
float f = 2.0f;
f /= 2; // <--- will this be optimized to f *= 0.5f ?
 
user142019
Ask your compiler, nub.
 
user142019
$ clang++ foo.cpp -S
 
I would, but I can't read assembly. D:
 
@ThePhD Unlikely.
floating-point doesn't really work that way.
 
10:09 AM
Damn.
 
user142019
@ThePhD you can read div and mul, right?
 
@Zoidberg div, mul, mov.
But that's about it.
 
user142019
@DeadMG Maybe with -ffast-math?
 
Xeo
Guys, we need a "what is a non-deducible context" :s
 
Write one!
And put it on Robot's blog.
 
Xeo
10:09 AM
lol
 
(Takeover!)
 
user142019
It's a context that cannot be deduced!
 
@Xeo Hasn't Luc got one? I sort of remember him pointing to somewhere for that
@Zoidberg Wrong
 
user142019
@sehe then the name makes no sense!
 
Xeo
@Zoidberg Yeah, but there are so many questions that have template<class T> void f(typename X<T>::bar) and wonder why the fuck the compiler can't deduce T.
 
user142019
10:11 AM
lolwot how could that ever work.
 
@Zoidberg Maybe, but even then, I doubt the compiler will be interested in changing a div to a mul.
 
Xeo
Don't ask me, here's the newest one: stackoverflow.com/questions/15335640/iterator-equality
 
@Zoidberg Nope. Non-deducible context, is a context in which types aren't deducible. No nonsense, just another interpretation of role of the adjective (semantics!)
 
> my own linked list
 
@Xeo that would be good.
 
user1357851
10:12 AM
this is wrong on so many levels:
 
user1357851
 
user142019
lol
 
user1357851
robot penguin infiltrates penguin kingdom
 
your content is improving slowly
that's something
 
very slowly and not much
 
10:14 AM
nonzero epsilon
 
user1357851
and you guys are still repeating each other :x
 
go back to robot penguins
> def draw_loading_messagey(stringy): # Draw loading message
thank god the comment was there
 
Xeo
The fuck is with the 'y's?
 
y not?
(zoidberg)
 
it's fucking cold in here
 
10:23 AM
@Xeo it's @nigthcracker's code
 
Xeo
oO
 
i had it open in some leftover tab
and man.
does he code terribly. Or rather did, perhaps
 
....
What
What the fuck.
 
I don't even want to know ^
 
If I have const static data on my class, that class is no longer PoD ?!
 
10:25 AM
use const static functons duh
 
=l
const static declarations should not affect the PoDness of a type.
That's just fucking asinine.
 
I'm pretty sure you are doing something wrong.
I.e. you are being asinine and overreacting in blaming something else.
 
as every time
 
@ThePhD No static stuff affects PODNess.
 
I broke my pendrive linux, so I am reading SCons vs others comparison atm
whilst dling another iso
 
10:28 AM
Why don't you just steal a simple SConstruct from some existing project and shape yours from there?
That's how I got started with it.
 
That should be on their wiki page!
Or I don't know, in some tutorial :/
 
No, I'm pretty sure it's const static data, blowing my shit up.
 
I'm pretty sure it's not.
 
Because I tried compiling a class with and without it, and it became un-unionable.
(Un-unionable when it had the const static data members on it).
 
OAHWG GAWASH WAHT IS TIT WIHT YOU AND ONIONS
 
10:29 AM
IT'S NECESSARY HERE
 
> To sum up, my very subjective opinion is that scons is a better idea, but CMake has a stronger implementation
 
I SWEAR IT IS!
 
@ThePhD dude
for fucks sake. How many times robot told you to NOT use unions
 
Look. This time, it's okay.
 
I doubt it.
 
10:30 AM
It's a legitimate use, it's for SSE vectors man.
 
what.
@ThePhD cough are you optimizing something?
 
@ThePhD Anyway, I'm pretty sure you are missing something.
 
@BartekBanachewicz No, it's been like that since the start.
 
What does MBCS mean on Windows?
 
@ThePhD what has been like that
 
10:32 AM
actually
SSE vectors already contain a union, you don't have to union them yourself.
 
("Multi Byte Character Set", I know; but what does that mean?)
@DeadMG He has to everything himself.
 
@R.MartinhoFernandes I would stay as far away as possible
 
@R.MartinhoFernandes I think it's UCS-2 or UTF-16.
 
@BartekBanachewicz I want to know what it is. I am not dealing with it.
 
@R.MartinhoFernandes remember to wear goggles
 
10:33 AM
@BartekBanachewicz but ze goggles...they do nothing!
 
@R.MartinhoFernandes he should write his own language then
 
what is it with you scrubs and writing your own languages
 
Aaaaaand of course, the Firefox built-in PDF reader suxorz and cannot open some PDFs.
 
I can't even send you guys an example because g++ throws a goddamn fit on anonymous unions. ._.
 
> you are doing it wrong
 
10:36 AM
who cares about that, we'll at least see the code
 
"Hey, now you can see PDFs in the browser! Here, have a look at this 80-page PDF that will render as 80 blank pages just for you!"
 
give us teh codez!
 
I'm killing it now.
 
use Chrome
 
10:37 AM
its PDF reader is decent. I don't have anything other installed
 
@R.MartinhoFernandes ugh, my friend was using..idk some stupid browser with a built in javascript pdf viewer thing
it was so terrible, it ate whole symbols due to crappy sampling/zooming
 
^ When I un-comment the lines there, RMatrix3's union catastrophically explodes, as well as RMatrix4's union (which contain RVector3/4s).
 
@ThePhD oh my god
 
which wasn't very helpful with our math assignments :p
 
@BartekBanachewicz Does it support bookmarks these days? It didn't when I switched to FF.
 
10:38 AM
@R.MartinhoFernandes I don't know, actually.
 
@R.MartinhoFernandes wut? o.O
pdf bookmarks? or what do you mean?
 
@ThePhD that's very cool you are reimplementing GLSL vectors
... NOT :/
 
@melak47 Yes.
 
@R.MartinhoFernandes I have no idea. I hate built in pdf viewers :p
 
@BartekBanachewicz GLM does something fairly similar.
 
10:40 AM
@DeadMG the swizzling? or what
 
@DeadMG With functions. I didn't want to use functions.
 
@melak47 Yeah, me too, but mostly because they tend to be lowest common denominator pieces of crap.
 
@DeadMG which is why you should use GLM, right.
 
no, the epic union.
 
I decided to give FF's a try, but nope, it sucks.
Doesn't even support embedded fonts...
 
10:41 AM
@DeadMG what epic union?
 
user142019
Firefox is meh.
 
		union {

			struct {
				T x, y, z;
			};

			struct {
				T r, g, b;
			};

			struct {
				T cell[3];
			};
 
user142019
It was good before there was Chrome. :P
 
^hardly epic
 
it was the best browser when chrome was still bad. H5 @Zoidberg
 
10:41 AM
@melak47 In glm::vec3
 
Urrglegelgeglegel.
It says it has a copy constructor, but where?
WHERE?! Id idn't WRITE ONE DAMNIT
 
user142019
@melak47 not enough struct { T u, v, w; };.
 
@ThePhD default one?
 
@Zoidberg my vectors have that :3
 
@Zoidberg Had that but Vector4's terminology clashed with that.
 
10:42 AM
@BartekBanachewicz That's curious. I actually liked Chrome more than FF when it was starting.
 
user142019
@ThePhD well do it up to vec3.
 
user142019
@melak47 mine too.
 
:c
But I'll have to like
produce swizzlers for all those.
And lines of code and warghablagblebelbe.
 
no
you can just use GLM
 
@ThePhD You didn't declare them static.
 
10:43 AM
@ThePhD yes you lazy punk, everyone else already has :D
 
user142019
I have template<typename T, std::size_t N> struct vector { std::array<T, N> elements; } and then I have specializations for N = 1, N = 2, N = 3 and N = 4 with unions.
 
Oh, you guys are trying to convince ThePhD to use GLM? haha, good luck.
 
@R.MartinhoFernandes Let's convince him to write TMP swizzle permutations
 
I use DIrectXMath on the inside.
 
10:44 AM
I'll use glm on the inside when it gets to that point.
 
THEN WHY ARE YOU EVEN DOING ALL THIS BLARGH
 
(E.g. I'm working with OpenGL)
 
so just use fucking GLM
 
GLM is not attached to OpenGL.
 
I used GLM and I only worked with DX.
 
10:45 AM
> something something row-major nonsense something something OpenGL something something
 
@BartekBanachewicz Inferior swizzling capabilities.
 
@ThePhD YOU SHOULDNT DO IT ON CPU GOD DAMMIT
 
@R.MartinhoFernandes No, I learned my lesson the last time you told me, thank you.
 
swizzling is irrelevant.
 
MY GOD DUDE
<collapses>
 
10:45 AM
holy fuck! I found fileName = new char[MAX_PATH]; in my 2yo code o_O
 
I swizzle in a lot of places in my code. It's convenient.
 
s/convenient/retarded/g
that's something GPU is supposed to do
 
ACTIVATE SYMMETRIC SWAPPING
 
Too bad I can just union with DirectXMath / GLM and retain all my features.
 
@Abyx good job.
 
10:46 AM
So I lose nothing and gain plenty.
@DeadMG ... Um. What?
 
nothing.
 
union ALL the things!
 
@ThePhD Apparently you lose a bunch of time wondering why something isn't a POD.
 
10:48 AM
@ThePhD you should write vector class factory instead.
 
Hm....
 
This way, when you shall want another vector class, it will create code for you
because, y'know, writing own vector isn't that generic
Note however, that this factory could produce only vectors
 
just compose your vector as a linked list of scalars :3
 
user142019
What the fuck.
 
so maybe it should be written as a factory that can create factories that can create code
 
user142019
10:50 AM
Why don't my classmates know what logarithm is.
 
"is that like an algorithm, with logic?"
 
user142019
lol
 
because they are classmates, which implies stupidity by definition?
 
user142019
@melak47 I doubt most know what an algorithm is.
 
today I noticed logarithm is an anagram of algorithm
@Zoidberg what class? oh wait you're still in school
 
user142019
10:51 AM
@melak47 Lecture about statistics. :|
 
Anyway @ThePhD stacked-crooked.com/…
Also, I think I have a SSCCE that reproduces your problem: stacked-crooked.com/…
 
@R.MartinhoFernandes he can't use your code anyway, because he haven't written it himself
 
user142019
@R.MartinhoFernandes not compilable!
 
@Zoidberg The second C stands for "Correct".
 
user142019
@melak47 isn’t class always in school?
 
10:54 AM
As in, correctly reproduces the issue.
 
user142019
Ah. :P
 
@Zoidberg not if you don't go :3
 
user142019
lol
 
Oh look! DNS failed. What a surprise. Can hardly wait for Thurs - new ISP.
 
Xeo
Oh my fucking gawd. I'm such an idiot.
2
When you write tests, you should also add them to the compilation, right? Right?
Man, fuck the old makefiles we had. Good thing I'm rewriting them to automatically pick up new .cpps >_>
 
11:07 AM
@Xeo lol
Also, that reminds me that this week a full ogonek test run tripled in runtime. It now takes close to three minutes. :'(
 
Xeo
I also only noticed that I missed this thanks to testing the rewritten makefile
 
If I build with full optimisations, it runs in 1 second. But the build itself takes five minutes.
 
Xeo
And now I noticed that one of those missing tests actually segfaults for whatever reason
@R.MartinhoFernandes Haha
 
I guess that's because of extensive template use?
 
11:09 AM
No fucking idea.
I doubt it's related to templates.
 
Xeo
@R.MartinhoFernandes GCC has iterator debugging too, right?
Can't you disable that?
 
It's fairly tame in terms of templates.
@Xeo The optimised build has that disabled.
 
Xeo
And that's also the one that runs in 3mins?
 
No, that one runs in 1 second.
 
Xeo
See what I'm getting at?
 
11:11 AM
But I want debug iterators in the debug build.
 
Xeo
Oh, I thought all you wanted was a faster execution while keeping the buildtime down
Maybe make a third type of build? :P
 
Nah, now I added an extra build parameter.
I can do scons test=foo and it only tests foo.
 
Xeo
mhm
hm.... now I just need to find out why the test segfaults.
 
Oh my god
Lecture, first slide
Title in Comic Sans
#killme
 
Xeo
ahaha
Still better than a test that was supposedly being executed on a buildbot for roughly 1 month not being executed after all. :<
 
11:20 AM
Upside: SCons is looking much better than Waf
At least judging by the few first glances
 
Xeo
Btw, don't you need to tell SCons the exact dependencies too?
 
This is a bad use of macros and you should feel bad. — Konrad Rudolph 6 secs ago
 
@Xeo Nope.
It has dependency tracking for C++ builtin.
 
Xeo
Oh, ok
 
@KonradRudolph Hey, that's the guy that said Windows still runs on UCS-2.
 
11:22 AM
@R.MartinhoFernandes To be honest, I can’t blame him. Microsoft fucked that one up good.
 
@Xeo I just give it a list of source files, and magic.
 
Xeo
Does that one also work across macros? :D
And logical source lines?
(not that I use any of those, except for emulating variadic templates)
 
I think so. It has the compiler command-line at its disposal to know what is and isn't defined.
 
Xeo
mhm
@R.MartinhoFernandes Eh, what about defines from other inclusions?
 
Oi! It is Monday!
 
11:25 AM
@R.MartinhoFernandes I have to read that up
 
@Xeo I expect it to implement a preprocessor (or at least a subset of one).
 
Xeo
Would make sense
Preprocess the shit yourself, and hand that to the actual compiler.
 
No.
The compiler does everything.
But it needs to preprocess the source to find the dependencies.
 
Xeo
It would be an optimization! :D If you could easily hook into the compiler for preprocessor hooks. Clang should allow that, I think.
 
Then those are cached, and only rechecked if there are changes.
 
11:27 AM
So, I need some design advice wrt/ error handling in a library code.
 
Xeo
@R.MartinhoFernandes Hm, true, you can easily cache the dependencies.
 
@BartekBanachewicz There isn't much to read about it: it just happens without intervention. Define a Program or Library target, feed it the sources, and that's it.
 
There seem to be people who prefer it to throw on any error. Then there are people who prefer it to log the error to say std::cerr and continue somehow.
 
"somehow"
It depends a lot on the operation.
 
Then there are people who want some error hooks/callbacks to handle the decision making themselves.
 
Xeo
11:28 AM
@wilx Never do the logging in a library itself, I say.
 
Let's SEGFAULT, log to cerr and continue somehow
 
@wilx IMO the answer is "it depends"
 
Called it!
 
:)
 
@Xeo yes, that
 
11:29 AM
This is for log4cplus library.
It is itself a logging library, thus I have to handle the logging in it :)
 
Xeo
Grblasdasdea, the unittest segfaults under GCC/Clang but not MSVC :|
 
@wilx ok, then I would make an exception from the never do logging in a library" rule. You can reasonably assume that you know where log messages should be logged to
And for logging, I'd prefer a fairly "quiet" form of error handling. Don't throw exceptions, because I don't want my entire application to come crashing down if it failed to write a log message
 
Yeah, if a logging operation fails, just drop it.
 
Ok, in this instance of user complaint, I am using iconv() to do wchar_t to char conversion and throw if it fails. Now the complaint is that the library code should not throw on conversion failure (iconv_open() failure) because it is bad for client code.
 
I'd say logging should be a "best effort" thing. I pass it the message to be logged, and it either gets logged or it doesn't. I don't want to handle errors for that
 
11:31 AM
Hmm, best effort, sounds good :)
 
You may attempt to log the droppage, but you must be aware that if something broke it might mean logging the droppage will fail too (so make sure you don't get into an infinite loop of logging logging errors)
 
I see.
 
Would be a pain in the ass if I had to wrap an exception handler around every log statement. Returning error codes is a bit better, but even then, I'd just want to ignore it in the client code
 
@jalf What would you do with an error from a failed log message, anyway?
 
@jalf: Well, you would not do the wrapping. Why would you do it?
 
11:33 AM
@R.MartinhoFernandes Log it :haw:
 
@wilx Because I don't want log(ftr, "entering f()") to bring down my application... I expect it to be able to proceed even if the logging subsystem is completely FUBAR.
 
@wilx I would have to, if the log operation may throw an exception
 
Silly me using traditional boring log levels.
 
Ok, I will think about this.
 
@R.MartinhoFernandes yeah, exactly. If an error occurs during logging, there's nothing I can do about it, so I don't even want to know about it.
 
11:36 AM
I can silence some of the exceptions but I feel that if say pthread_mutex_lock() etc. fails I should still throw.
I mean, some situations are more fatal than others, right?
 
0
A: Minimum size implementation for bool array

Tony The LionMaybe if you did something like this: #include<vector> #include <iostream> template<int N> struct array { char bits : N; }; //Specialize for N > 8 int main() { std::cout << sizeof(array<8>); } If you look at the Live Example, you'll see when N == 8 it r...

 
You could always have some kind of logger.is_bad() function so I can periodically check whether the logger has encountered any errors. When I request messages to be logged, it's fire and forget
 
is this insane or sensible?
 
@wilx no
How is it ever fatal that my logger couldn't write a message to the log?
if it couldn't lock a mutex, then I expect it to handle that, for example by just dropping the message
the client code doesn't care, doesn't need to know, and can't fix the problem anyway
 
@jalf: That's the high level view. But from lower level, if your one mutex is foobar'd then your whole application could be fsck'd.
 
11:37 AM
The only thing I would take into considering would be, in an environment like .NET or Java where you can get exceptions for things like OOM, stack overflow, or AVs/segfaults, to make sure you do let those pass transparently. I think most apps don't want to proceed in the face of those.
 
IMHO
 
Of course that doesn't apply to C++ because most of those are UBs.
 
@wilx not if no one outside the logger know about, or use, that mutex
If your log library fails to lock a mutex that it needs to lock, then it'll have to abort the operation and get on with its life
 
@wilx Sanely, only the logging subsystem uses that mutex, so it can just limp along.
 
Hmm...
 
11:39 AM
I'd say a logger is fundamentally unusable if logging a message can ever take down my application
so do not let exceptions escape. Ever
 
Well, I am still not entirely convinced that covering up the errors is correct.
Bah. Not what I expected. :)
 
@wilx then I'm not entirely convinced your library will be usable. ;)
 
Logging is supposed to be entirely optional: no application needs logging to provide its functionality.
 
@jalf: It is in use and usable. The exceptions pretty much never happend (like for the mutex case).
 
@wilx Convince us, though. Give us an example of a logging error which the client code actually needs to react to (either by fixing the problem or by terminating)
 
11:42 AM
@R.MartinhoFernandes: Some people would disagree with you. I have had "clients" that the opposite.
 
@wilx Your user pointed out that it is not usable. That's why you're looking at this problem now. ;)
 
@jalf: Yes, different one. Conflicting views/requirements of two clients.
 
@wilx You have literally heard from a user of the library that "if the logger is unable to convert a character to the output encoding, it should throw an exception" for the client code to handle?
Was the person living at a mental institution at the time?
 
No, there seems to be some miscommunication.
I have had a user who said that the logs were extremely important. He went to the lengths that he removed buffering from the stream and set it up to flush after each logged event.
 
and what would have done if the logger failed to log a message?
 
11:48 AM
Dunno.
I was reacting on the idea that logging was optional. It was not for this one user.
 
provide an optional callback hook for "failed to log message"? Then he can call exit() or whatever
 
@wilx So his application would just stop if it could not log?
 
Hm. I was thinking about creating some callbacks but I am not sure how to design that so that it is reasonable.
@R.MartinhoFernandes: He/she did not share such details.
 
Well, that's the important bit, IMO.
 
Most applications write to the log from thousands of different places in their code. You don't ever want to do any kind of error handling in so many places. So allow it to be centralized. Either as a callback hook, or a function I can call to query the status of teh logger
@wilx log_failed(const std::string& message) ?
If logging fails, you basically have two options: terminate the application, or ignore the problem. Don't pretend that anyone is going to do per-log-message error handling
 
11:52 AM
Ok. Thank you for input, guys.
 
it's -5 here and the heating is the brokens
 
(also, 99.98% of your users will choose the "ignore" option)
 
@jalf I guess you could trigger some alarm ("HEY LE APP IZ RUNIN WIT NO LOGARZ!!twelve!!! GEROUTA BED AND COME FIX IT!!!") and then proceed, but that's similar to ignoring.
 
Xeo
What kind of alarm? :P
output \a in a loop?
 
@Xeo Some e-mail or something.
Basically proceed without logging, but make sure the people responsible are aware of that.
 
11:56 AM
@Xeo how about calling beep
that might be annoying enough for someone to fix it? :3
 
Xeo
1 min ago, by Xeo
output \a in a loop?
 
Call HR. Ask if you're allowed pets at work. If they say no, say "Sorry Rex" and play the sound of a gun firing. 4 points.
 
Xeo
@R.MartinhoFernandes Omg, bwahaha
 
I think that living in Germany one would deserve bonus points for this one: twitter.com/OfficeDaring/status/310848214511271937
 
Xeo
11:59 AM
@R.MartinhoFernandes I wouldn't dare that, for sure.
 
Yeah, and 1 point isn't enticing at all.
 

« first day (877 days earlier)      last day (4070 days later) »