« first day (743 days earlier)      last day (4222 days later) » 

9:00 PM
Sorry there's no point in discussing Haskell with someone who knows nothing about Haskell
So
 
@Zoidberg'-- Or I could just learn them right here.
 
Ell
what programs are functional anyway?
 
@Zoidberg'-- It's gotta kinda sorta type system, but it's even more primitive than C's, which is an accomplishment.
 
Ell
don't most programmes fall into the category of causing side effects
 
9:04 PM
That's why you do I/O glue.
 
@Ell Is their entire purpose, mostly.
 
Ell
yeah that's what I was thinking
 
Which doesn't mean 90% of the code cannot be functional with all benefits
 
Can std::unique_ptr be implicitly converted to int, long long or void *?
 
9:05 PM
@EtiennedeMartel No.
 
That would be extra dumb
 
Then how the hell did my code manage to compile?
 
Especially that void*
 
Safe bool idiom?
 
@CatPlusPlus I don't really see the benefits. I mean, some algorithms, sure, but beyond that?
@EtiennedeMartel MSVC uses safe-bool because they don't have explicit conversions.
 
9:06 PM
I accidentally passed a unique_ptr to a System::IntPtr, which only accepts one of the three above types.
 
IOW your implementation is horribly broken but everyone knew that already
 
Ugh everytime I look up the algorithm for path tracing I always end up with long ass pdfs about integrals... -.-;
 
@EtiennedeMartel Not-quite-as-safe-as-it-should-be-bool, it would seem.
 
Safe-bool status: still terrible.
 
huh
 
9:07 PM
@Borgleader \int_{a}^{b} ?
 
the docs for VS2012 list explicit boolean conversion
 
@CatPlusPlus Bad execution. Safer-bool-idiom uses pointer to member which involves a private type. Nevermind function template argument deduction though!
 
I didn't know VC11 supported that feature
 
@Rapptz What?
 
hm integral in LaTeX
 
9:08 PM
oh, VS2010 has the same page
must just be a placeholder
 
Oh. So my unique_ptr got converted to void *?
Damn, fuck 'em.
 
@Rapptz Oh, no I meant I always run into this particular pdf or similar: cs.brown.edu/courses/cs224/papers/mc_pathtracing.pdf
 
Ahahah
 
@Borgleader that is the integral I meant.
Some people use integral to mean integer
 
Yeah, but what I meant is, I'm looking for the algorithm like "create ray from camera, evaluate x,y,z, recurse" but I always find page long texts with integrals in them and huge sums with 6+ variables and enough greek letters to make my brain explode.
 
9:12 PM
I don't see any greek letters. At least not that many
 
Hmm this one isn't so bad, but I've seen others which had more
 
When they're part of a math equation and I have to understand it, yes.
 
Though honestly, you looked up a 3D concept. Of course you're going to get PDFs full of vector notation.
 
@Borgleader Having Βικιπαίδεια on hand always help to understand.
 
user142019
9:15 PM
I want anchovies pie.
 
Yeah I know, but I was hoping for like... a simple worded version. I don't really need all the math behind it. I mean, I understand that path tracing ends up being an approximation of the integral over the hemisphere but I don't care. I want the simple algorithm so I can write it in code.
 
Ell
anchovy pie?
 
You want pseudocode. It's possible to express algorithms in other forms than pseudocode.
 
Ell
I wouldn't call prose pseudo code
 
Maybe because it's not
 
9:19 PM
@LucDanton "Calculate the reflectance value of the BRDF" isn't quite pseudo-code. But it's a simple and clear step. That's what I'm looking for.
 
Ell
@cat not maybe, definitely
 
Your reading comprehension is bad is what I'm saying
 
@CatPlusPlus @melak47 said I should ping you here!
 
Okay. I have no idea who you are
 
a GD.SE regular
just noted my profile was not updated here :(
 
9:21 PM
Yup that narrows it down considerably
 
user142019
So ask what you wanna ask.
 
and we were talking about the engine melak was about to start.
and then he said I had to create an account in kyrostat and ping you here.
 
Well did you create an account
 
yep, just before pinging you
 
No you didn't
 
user142019
9:26 PM
HE’S A LIAR
 
Also talk to @thecoshman
 
just noted passwords didn't match.
@thecoshman they say I need to talk to you too, how many steps do I have to take before starting to work on a engine?
 
Xeo
Awesome. For the second time now, I forgot to log to a different character in a game before killing a boss, and for the second time, a legendary item with 1.5% dropchance dropped on the wrong character.
 
What game
(It's probably a bad game)
 
user142019
Suicide games.
 
9:29 PM
Diablo clone?
 
@Xeo Are you talking about World bosses in MoP?
 
Xeo
@CatPlusPlus WoW
 
It's a bad game.
 
it really is.
 
Xeo
@Borgleader No, running Black Temple for shit'n'giggles with my Priest and forgot to log to my Rogue before Illidan. :|
 
9:30 PM
People still play WoW?
 
@Xeo Oh you were after the blades of azzinoth?
 
Xeo
Aye
 
Damn... that's some bad luck
 
Xeo
If I didn't forget to switch chars, I'd have both + the blindfold now.
 
user142019
@Rapptz my old English teacher was sick for a week a few weeks ago after the new WoW came out. He did the same two years ago.
 
user142019
9:31 PM
And he plays WoW. :P
 
Play GW2 or EVE seriously
 
Xeo
It's exactly those two times that I forgot to switch when they dropped.
 
I think Blizz is trolling you :P
 
user142019
PLAY EVE IT’S WRITTEN IN PYTHON
 
A priest soloing BT? Let's drop legendary melee loot
 
9:33 PM
WoW is terribly grindy, GW2 is less.
 
Xeo
@Borgleader Well, atleast this time we had a Warrior in our group that needed them. The first legendary drop is rotting in my Priest's bank. :|
 
Heh...
I should run BT on my warrior
 
Get more items to be better at getting more items!
 
Xeo
@CatPlusPlus When did you play WoW the last time? It may have been super grindy in Classic/BC, but after that, nah.
 
They babified WoW during Cataclysm.
 
9:34 PM
I got my Azure Cloud Serpent a few days ago. So happy
 
That expansion with Northrend
But it's still the same formula
 
@Borgleader is that an MS item?
 
Which you just described
You're doing same thing over and over to get an item that will make you better at doing the same thing over and over again to get another item
At this point I'd just kill myself
 
Even EVE is not that terrible in its grindy moments
 
9:35 PM
@ManofOneWay nope
 
But then EVE has way more redeeming features than WoW, too.
 
@Borgleader joke totally went over your head eh?
 
I've only found Eve to be fun in 0.0 zones, but I no longer have access to a "guild" for those. And last time I took up Eve I got both my ships blown out of the sky by pirates.
 
Maybe you shouldn't pirate games.
 
@Rapptz If it was a reference to Microsoft Cloud computing platform called Azure I did consider it.
 
9:37 PM
There's NPC null, you know. Also, shooting people in high-sec where they think they're safe is hilarious
 
Also you cant pirate mmos
 
Oh you can
 
it's called a private server
 
Those generally suck
at least the ones I tried
 
That's another matter
 
9:39 PM
@CatPlusPlus I thought attacking players in high-sec got you shot down by accord (or wtv the name of the "police" in Eve)
 
CONCORD
Yeah, but they die so whatever
 
I kinda like this rooms attitude toward java.
 
@CatPlusPlus So does the offender?
 
You can blow expensive ships with expensive cargo with virtually worthless ships, so.
 
Thats true
Did you hear about that guy who lost the equivalent of 6000$ US in Eve?
 
9:42 PM
Which one.
 
He was carrying blueprints in a fast small ship and got shot out of the sky
 
Ah, that one. It wasn't 6k, because reported blueprint value is skewed as hell.
 
cool i found a way to effectively copy an array like int a[N] into a new array of that type
 
local or namespace scoped.
 
9:45 PM
@CatPlusPlus In any case I laughed my ass off. The guy must have been really pissed though.
 
Hi. How is everyone?
 
@JohannesSchaub-litb slice<>(array)!
 
Ell
tired
 
user142019
 
user142019
What a terrible game.
 
user142019
10:05 PM
@Link insane!
 
@Zoidberg'-- what a terrible player
 
user142019
I want to write software.
 
then do
 
user142019
main :: IO ()
main = putStrLn "Hello, world!"
 
user142019
 
user142019
10:22 PM
Okay I wrote cat command.
 
user142019
main = putStr =<< readFile . head =<< getArgs
 
user142019
PEOPLE Y U SO QUIET
 
Y U SO !QUIET?
 
user142019
Because I’m bored as fuck.
 
You appear to have bought the book "C++ for fools". — DeadMG 2 mins ago
wham bam thank you mam
 
10:33 PM
Was that to OP or the commenter before you?
or just a funnyz?
 
@Zoidberg'-- does it work with binaries
 
user142019
@Cheersandhth.-Alf no.
 
in that respect, same as with standard c++ :-) lol
 
user142019
I just realized that in MVC, I could pass functions rather than values to the view and let the view fetch the values lazily and only when it needs them, through those functions.
 
ah, @Daknok is now Zoidberg
 
user142019
10:37 PM
Which is awesome with e.g. caching.
 
damnit! You cheatin' us
 
-1 for crappy C-style array. — DeadMG 7 mins ago
You do know that's what the question says to use right?
lol all the downvotes are from the puppy.
 
user142019
There is everything wrong with this style. Either use std::vector or std::array. There is no reason ever in C++ to use C-style arrays. Also see codepuppy.co.uk/cpptuts/CClass/CArrays.aspx. — Zoidberg'-- 2 mins ago
 
Consider the fact he's 1) in an intro course 2) probably never even learned that C++11 exists and 3) Unaware of std::vector that answer is perfectly fine
 
user142019
@Rapptz He’s unaware of it, so he should learn it right now.
 
user142019
10:43 PM
I.e. ASAP.
 
user142019
And now he asks a question about it so now is the right time to tell it.
 
It's a class dude. You can't tell your professor to fuck off and do your own thing.
 
user142019
Well then the professor is a moron and I kindly invite him to the Lounge.
 
Sure, it's recommended and good to keep at the back of your mind but his professor isn't going look for that.
 
user142019
Professors who think they always know better than students must be fired. They are terrible.
 
user142019
10:45 PM
Because that is not always the case.
 
You're arguing to the wall again.
 
user142019
IDGAF
 
@Rapptz lolol
 
Xeo
BS. There's no need for either std::vector or std::array here. An array of arrays or a vector of vectors is very suboptimal compared to a compile-time 2D matrix with regard to memory access and memory localization. — David Hammen 5 mins ago
lawl.
 
Also, to whomever said I should play GW2 and not WoW, I have a a lvl 68 Elementalist.
 
Xeo
10:50 PM
An std::array is exactly the same as a C-style array
 
@Xeo It's just a wrapper + iterators or something?
 
user142019
@Xeo except it has a decent interface.
 
user406009
A std::vector does seem unnecessary though. People seem to like throwing them around for no reason nowadays.
 
Xeo
@Borgleader wrapper + container interface
 
@Lalaland Vector gives access to iterators, that good enough a reason to me.
 
10:52 PM
Sometimes I wish SO didn't make the OP seem like a total retard
 
Xeo
@Lalaland Aye.
@Borgleader And std::array does too
In fact, C-style arrays also have iterators.
 
user142019
Use std::array when the size is known at compile-time, std::vector otherwise, no excuses ever unless you’re implementing either of them.
 
Xeo
They're called "pointers"
 
You may want to read some basic C++ book before trying to write a program... — Vlad Lazarenko 2 mins ago
 
user1174868
I hate stds
 
user142019
10:53 PM
Only a fool likes STDs.
 
@Xeo Sure but not everyone is using a C++11 compiler
 
std::tr1::array
 
user406009
Boost::array to the rescue!
 
Xeo
@Borgleader As I sad, C-style arrays have iterators too
 
@Xeo Yes yes and I wasn't responding to that, because I agree with that statement.
Although, can naked pointers be used in all stl algorithms?
 
Xeo
10:55 PM
@Borgleader Erm, sure.
normal raw pointers are just random-access iterators
And the stdlib iterators conceptually are modelled after pointers, and are just more restricted mostly.
 
user142019
Non-pointer iterators behave like pointers.
 
user142019
You can do arithmetic on them and dereference them.
 
Because I knew that RA iterators can do anything "less versatile" iterators (see, bidrection, forward, backward, ...) can do but I wasn't sure you could use them anywhere an iterator was needed.
 
aw lol
 
10:58 PM
loool
 
user142019
I should make slides about C-style arrays similar to tinyurl.com/fuck-pointers.
 
user142019
But a link to the puppy’s tutorial is good enough, I think.
 
To say what? Dont use C-Style arrays use std::array<N, T> ?
 
user142019
Use std::array<T, N>, yes.
 
user142019
Because there is no reason to use C-style arrays in C++.
 
11:00 PM
dont make a pdf, just make a jpg.
 
user142019
I’ll make a tool using libclang that will point out all these stupid flaws in your code.
 
user142019
Like owning raw pointers and C-style arrays and pointer arithmetic.
 
and if(a = b)
 
user142019
No.
 
user142019
That’s the compiler’s job.
 
11:01 PM
the compiler wont bitch about that because it's legal
 
user142019
Clang will.
 
nothing wrong with if (a = b), for some a.
I often have, for example, if (auto p = dynamic_cast<X>(...))
and similar
 
user142019
if (a = b) // clang says use ((a = b)) to hide warning
if ((a == b)) // clang says use (a == b) to hide warning
// and you can disable these warnings if you like.
 
user142019
And in some cases, if (a = b) is just fine.
 
it wont compile if its in yoda notation and b happens to be a number or some other thing you can't assign to.
but otherwise some compilers just dont say anything
 
user142019
11:03 PM
Yoda notation is stupid.
 
user142019
It’s like the imperial system.
 
user142019
Do what all the other people in the world do not and confuse everybody.
 
user142019
@Borgleader they often give a warning.
 
user142019
2 mins ago, by Zoidberg'--
if (a = b) // clang says use ((a = b)) to hide warning
if ((a == b)) // clang says use (a == b) to hide warning
// and you can disable these warnings if you like.
 
user142019
But unlike C-style arrays, owning raw pointers and pointer arithmetic, if (a = b) is not always wrong.
 
11:05 PM
That's why I said some
No need to paste your own post from 2 sec ago
 
user142019
Pointer arithmetic may be right in very very very very very few cases when you’re doing very very very very low-level things.
 
user406009
I just wish C had a distinct boolean type. Then we wouldn't have to deal with this BS.
 
user142019
C99 and C11 have _Bool.
 
Why the underscore...
 
user142019
Because underscore followed by capital letter is reserved.
 
Xeo
11:07 PM
@Borgleader #define bool int in many programs
 
user142019
And they didn’t want to break C89 code.
 
user142019
You can #include <stdbool.h> for bool instead of _Bool.
 
@Xeo I did not think about that...
 
Xeo
Same with _Atomic, _Generic, _Static_assert etc.
 
user142019
_Noreturn
 
user142019
11:08 PM
And #include <stdnoreturn.h> does this:
 
user142019
#define noreturn _Noreturn
 
user142019
:D
 
wtf is noreturn
nvm ill just look it up
 
@Borgleader it doesn't... return :)
 
user142019
It means that you promise the function will never return.
 
user142019
11:09 PM
_Noreturn void exit(int); would make sense, for example.
 
user142019
Or in a kernel you could have _Noreturn void panic();.
 
user142019
In C++ you have [[noreturn]].
 
So that would be useful... if I'm writing a daemon of somekind?
 
user142019
[[noreturn]]
void foo() {
    for (;;) printf("Hello, sehe!\n");
}
 
user142019
@Borgleader exit functions, for example.
 
11:10 PM
@Zoidberg'-- ohai!
 
user142019
daknok% cat foo.cc                                                  ~/Documents
[[noreturn]]
void foo() {}
daknok% clang++ foo.cc -std=c++11 -stdlib=libc++                    ~/Documents
foo.cc:2:13: warning: function declared 'noreturn' should not return
      [-Winvalid-noreturn]
void foo() {}
            ^
1 warning generated.
 
user142019
But if I do [[noreturn]] void foo() { for(;;); } it’s fine (ignoring the UB). Or something like [[noreturn]] void foo() { throw 42; } is also fine; you may throw from a [[noreturn]] function.
 
SO timing out for anyone else?
 
user142019
@Mysticial nope.
 
user406009
It was for a second.
 
11:16 PM
@Mysticial Not here
 
It's back now.
It definitely timed out a few times for me a minute ago.
 
user142019
By the way, is it true that for (;;); is UB? I read that somewhere IIRC.
 
user142019
Unterminated execution without side-effects or something…
 
Yes and yes.
 
That's UB? Why? I thought it was equivalent to while(1) {}
 
user142019
11:18 PM
@Borgleader It is.
 
user142019
But while (1) {} is also UB since it is also unterminated execution without side-effects. :P
 
@Borgleader You're not wrong for that equivalence.
 
user142019
But what if I really want unterminated execution without side-effects? Could I do something like the following?
 
TIL while(1) {} is UB.
 
user142019
bool a = true;
for (;;) a = !!a; // also UB? It has side-effects, not?
 
11:19 PM
No that's probably not fine. Let me check.
 
user142019
It changes state.
 
user142019
But for (;;); also changes state: it sets the PC.
 
Yeah it's not fine.
@Zoidberg'-- It's not observable.
 
user142019
Ah okay.
 
user142019
Hmm.
 
11:21 PM
@Zoidberg'-- The abstract machine has no such thing as a PC.
 
user142019
Didn’t think about the AM.
 
You seem to be mistaking C++ for assembly. That's a grave mistake.
 
I don't know if I previously had this debate here or not but... in a path tracing/ray tracing program. Is it worth it to have classes for both Vector3 and Point3 or is Vector3 sufficient. (I advocate Point3 should exist because it makes no sense to do things like a cross product on a position)
 
user142019
Uhm could I do this? It makes system calls.
 
@Borgleader A position is nothing more than a vector from 0,0,0.
 
11:23 PM
@Borgleader If your language has a feature to easily make new types out of existing ones I would recommend doing that. It's not common enough though.
 
I'm talking C++ here.
 
You're screwed!
 
user142019
auto f = ::open("/dev/null", 0);
for (;;) { // does this count as observable?
    static unsigned const foo = 42;
    ::write(f, &foo, sizeof(foo));
}
 
private inherit shoulddo
 
@DeadMG You mean Point3 privately inherits Vector3 and I block the operations I don't want?
 
user142019
11:24 PM
^ That is also better for the processor since you’re not fucking it up with a spinlock.
 
@Zoidberg'-- Presumably the implementation specifies that write qualifies as 'a library I/O function'.
 
@Borgleader No. Since Vector3's operations are a superset of Point3 and not the other way around, then Vector3 : private Point3
 
user142019
@LucDanton It’s a POSIX function that does I/O, yes.
 
user142019
But I’m writing to /dev/null, so I’m not sure if that counts as “observable”. :P
 
user406009
Why use inheritance rather than composition?
 
user142019
11:25 PM
man write(2) says it does I/O.
 
can't be proved in the general case
 
@DeadMG That would matter for public inheritance. Since private inheritance selects which operations to expose it's fine the other way around.
 
@DeadMG Ah that makes sense :) Thanks for the suggestion. I've actually got a few working classes for Vectors, Points, Rays, ... I'll wework them.
 
@Zoidberg'-- I know what it is lol.
The language of the Standard is formal though so you have to do the motions.
 
Now to follow people on Bitbucket...
 
sbi
11:30 PM
Just thought I'd drop that here.
Now I need to go to bed, though.
Bye.
 
Yet another book I must get...
Should probably finish reading Bjarne's other book first though...
 
Xeo
19 answers... I'm getting there!
 
A book to get and never read most likely.. If you are like me ;P
 
I read Code Complete through and through, I'm sure I'll be able to read this one.
 
user142019
11:46 PM
@Borgleader did you read it completely?
 
@Zoidberg'-- Yes, I completely read Code Complete
 
user142019
The only book I’ve ever completely read in my life was Learn You a Haskell for Great Good.
 
@Borgleader I also read through Code Complete. I only skipped the second half of the lengthy introduction (metaphors for programming etc..). The book was very educative IMO.
 
user142019
What is Code Complete about?
 
Coding techniques and discipline.
 
user142019
11:48 PM
Cool. I want to read it.
 
When to use a switch and when not, for example.
 
user142019
Okay, just got myself a copy of Code Complete.
 
user142019
Second edition.
 
Good job. Kindle edition?
 
user142019
PDF
 
user142019
11:49 PM
Steve McConnell, right?
 
It's a lengthy book. I would read about 30 minutes a day during commute. It took me several months to finish.
@Zoidberg'-- Indeed.
 
user142019
@StackedCrooked I can read four hours on thursdays while I have development class.
 
user142019
Since I know JavaScript already.
 
I've been intending to read SICP for over two years now...
@Zoidberg'-- I wish I also had development class then :P
 
user142019
@StackedCrooked Kindle is DRM’d right?
 
11:51 PM
I don't know actually.
 
user142019
 
user142019
(The first sentence is obsolete though; iTunes content isn’t DRM’ed anymore.)
 
I can sync the books to my home computer, my work computer, and to my phone.
 
user142019
I only use my laptop.
 
And I can also use an online browser-based reader if required.
 
11:53 PM
@Zoidberg'-- I can push several (open) formats to it that it can read. Good enough for me.
 
user142019
 
Ooh, have you seen the amazon homepage. It's a nasty comparison between Kindle Fire and the iPad mini.
 
user142019
lolwat :P
 
user142019
iPad mini looks terrible.
 
user142019
Everything made by Apple looks terrible since Jobs died.
 
user142019
11:54 PM
Stupid Tim Cock Cook is not strict enough.
 
user142019
iOS 6 looks terrible. iPhone 5 looks terrible.
 
iPad mini does seem to suck.
Low resolution?
No movies? Mono speaker? Wtf?
Did Apple join with Aldi or something?
 
user142019
lol ALDI
 
I liked their Kwakies though.
 
user142019
You know what is the problem with my school.
 
11:57 PM
Delinquent students and stds?
 
user142019
Students learn to code rather than to design an architecture and solving problems.
 
Hah, that's exactly like my school.
We were basically taught how to create Visual Studio projects.
 
user142019
The only data structure we got were dictionaries and arrays (and only their interfaces).
 
user142019
Not even binary trees or linked lists or hash tables.
 
What is the title of the program you are taking?
 
user142019
11:59 PM
Informatica op HBO-niveau.
 

« first day (743 days earlier)      last day (4222 days later) »