« first day (889 days earlier)      last day (4067 days later) » 

5:03 PM
@Pawnguy7 nice
 
@R.MartinhoFernandes Actually, yes, you can.
 
2 years ago nobody complained about this Not even @DeadMG who ended up sandwiched.
 
meh, PNG metadata Y U NO WORK
 
user142019
@StackedCrooked inb4 bin
 
naw
 
5:17 PM
You make games Dead?
 
no
 
@Pawnguy7 Doesn't need to -- his life is already a game. :-)
 
but i have dabbled]
 
Ah.
 
damnit
I'm so close to being able to instantiate class templates.
WAT IT WORKS! yay!
ah, balls, more undefined reference errors :(
 
5:27 PM
@DeadMG Damn -- I didn't quite finish typing "congratulations" before you (mostly) ruined it...
 
yeah
Clang has a really, really nasty habit of not code generating everything I need.
 
user784668
Clang sucks
 
Man you're moving along so quickly...
I haven't even had time to finish my parser...
 
He's been at it for over a year.
So quickly.
 
then again I havent nailed all the syntax details either
 
5:32 PM
Hey @SteveJobs
 
@Pawnguy7 Hello
 
@SteveJobs How goes learning C++?
 
@sbi It is back.
 
@Pawnguy7 I was programming all night and now my eye is twitching
 
You get used to it :D
 
5:34 PM
Experiment! I'm now storing a copy of the archive in the chroot. So you can search it.. You can also use a cpp file from the archive and compile it in your current test. And thus you can have a test with multiple source files.
6
 
@Pawnguy7 lol
 
user784668
Why every time I read something about Wide, I think that Wide is a C++ REPL?
 
hi out there someone here who can give me a kickstart about git?
 
@Pawnguy7 overall, transitioning from python to C++ has been good
 
5:37 PM
@SteveJobs Figure out the ++?
 
no, explain ++n vs n++
 
Well.
++ is basically shorthand for += 1.
As in -- for -=1
If you have it prefixed (i.e ++x)
It incriments x, and returns the incriment.
x++ return what x was before, but also incriments it.
 
user784668
@StackedCrooked whatcha writin it in?
 
That's the sun, right?
 
5:40 PM
@Pawnguy7 ok i think i understand now,x++ will first return x then increment that value the next time the variable is used, as in if x = 2 then 2*(x++) = 4, next time i use x after that it will be x = 3
 
@SteveJobs, hi there wife
 
@Jueecy ?
 
yes
 
@Mysticial ping
@Mysticial just FYI (think you'll find that interesting)
 
@StephenLin It's Mystic-i-al. That won't ping him. Try @Mysticial.
 
5:41 PM
oops
thanks
 
never noticed that :)
 
user784668
@StephenLin so edit
 
will the edit ping him?
 
@Jueecy ok......moving on....
 
5:42 PM
@StephenLin you are like number 67.
 
@Mysticial ping
 
:(
 
@bamboon number 67 for what?
(sorry to spam, I'm done with the ping)
 
@StephenLin for thinking it was mystical first
 
@StephenLin For never noticing that.
 
user784668
5:43 PM
@StephenLin yes, see?
 
hah, ok
 
@R.MartinhoFernandes No that's an airplane.
 
@Fanael thanks
 
C'mon stupid computer. Why would I ever want to open an .mkv file with a converter? You idiot.
 
What does theundefiend behavior associated with ++ again? I forget. Was it twice in the same expression, or?
 
5:46 PM
@Pawnguy7 twice without sequence points
 
Ah.
 
@Pawnguy7 although sequence points don't exist anymore, apparently
 
Oh.
 
@Pawnguy7 basically comma operator is ok, not sure what else is
@Pawnguy7 function call argument evalution is definitely not a sequence point though (that's what gets people)
 
user142019
Why are all PostgreSQL libraries so fucking terrible.
 
user142019
5:47 PM
It's unbelievable.
 
@Pawnguy7 Don't bother with anything other than ++i, i++, or *i++. Even if they are not undefined, they make terrible code.
 
Yes.
I personally only use them.. for their origional purpose. Mostly just loops though.
 
@R.MartinhoFernandes what? who doesn't use ++(*i++) all the time :D? it's so obvious!
 
@StephenLin not that obvious
 
@R.MartinhoFernandes This particular incarnation I only began at about Christmas.
and I spent the entire of January sick.
 
5:51 PM
@SteveJobs yes, it's a joke :D
 
@StephenLin I don't understand jokes, i'm lame like that
I just got a 16GB flash drive :)
 
@SteveJobs you'll fit in just fine at Cornell, if you go there then :D
 
I have a 2GB... hm
 
@SteveJobs (that joke would be better if it were Yale, though)
 
@StephenLin lol
@Pawnguy7 2GB ? you can do better than that
 
5:53 PM
Harvard broke everyone's NCAA brackets :D I'm so proud
 
Well, I never use it, so it works :d
 
@Pawnguy7 then give it to me
 
Nein!
Anyway, unless I planned to stack my whole dev environment in there...
 
@SteveJobs your no longer Amber? with a pic of a girl you found on google?
 
Stuff should fit.
 
5:56 PM
@JustinMeiners ? lol
 
@SteveJobs you're still amber on MetaStackOverflow btw, you should change that
@SteveJobs then it will just be the secret of those that recognize your questions
 
@StephenLin lol
 
@SteveJobs of course, for all we know, you really are a 60 year old guy
 
@StephenLin of course, i'm steve jobs
 
@SteveJobs smiling down on us from Heaven (or maybe the other side), of course
 
5:58 PM
haha
@StephenLin and why would a 60 year old guy be learning C++ at that age ?
 
I doubt it is the first time.
 
@SteveJobs Steve Jobs doesn't know how to program, but you would know that, being Steve Jobs (Bill Gates always made fun of you for that, remember?)
 
@SteveJobs I guess you're taking up extracurriculars up/down there
 
@StephenLin there is not much you can do here, hell is not a problem, i have a firewall
 
6:02 PM
@StephenLin Why do I have so many pings?
:)
 
@Mysticial sorry
@Mysticial you're right about alignment, I'm almost certain
 
no worries :)
 
@Mysticial I assumed numpy was using malloc or something else naturally 128-bit aligned, but it's not
 
oh ic
haha
 
@Mysticial see the github issue and let me know if anything I said sounds wrong...if you have a chance (no worries if you're busy)
 
6:04 PM
alright
 
@Mysticial well, only if this is interesting to you :D
 
It's definitely interesting. But I'm a bit side-tracked atm.
Final episode of Shinsekai Yori.
 
no problem
i can see how that'd be a priority
 
user142019
intptr_t can be safely cast to and from pointers right?
 
@StephenLin :)
 
6:10 PM
as safe as any pointer/integer casting gets
 
Ell
Hi guys
 
Xeo
Woot, back from a game-day with the cow-workers.
 
cow?
 
@Zoidberg, @DeadMG I think round-trip is guaranteed for intptr_t, but the integer might not have any usable relationship to the pointer technically
 
@Zoidberg All I know is that VS and GCC allow enable you to store a pointer object in a long. But that's not standard.
 
user142019
6:15 PM
Oh okay.
 
it's also not required to exist (at least on C99)
 
user142019
Boost.Context uses intptr_t.
 
You can safely static_cast<void*>(&T) and vice versa.
But only from and to the same object, of course.
 
@Zoidberg see comments for the first answer stackoverflow.com/questions/15453252/…
 
@StephenLin C99 is irrelevant.
 
6:17 PM
@Zoidberg All pointer objects have the same size and (I think) the same alignment, so that should be no problem I think. (Apart from type aliasing.)
 
this is C++11.
@StackedCrooked Except function pointers and member pointers.
 
@DeadMG yes, yes, I know
 
user142019
All I do with intptr_ts is that I cast std::unordered_map<int, boost::context::fcontext_t>* to intptr_t and back.
 
@DeadMG I don't think C++11 differs in this case, but I could be wrong
@DeadMG C++11 just imports a lot of C by reference
 
@DeadMG The latter are not pointers.
@StephenLin Nope.
 
Xeo
6:19 PM
@Zoidberg Why to intptr_t and not void*? :P
 
It redefines a lot of C instead of importing it by reference.
 
@R.MartinhoFernandes eh? well, yes, I didn't say that's all it did
@R.MartinhoFernandes but it imports the standard library and such
 
user142019
@Xeo ask the author of Boost.Context.
 
@R.MartinhoFernandes "stdint.h" -> <cstdint>
 
Not quite.
 
user142019
6:20 PM
Fuck.
 
@R.MartinhoFernandes okay, fine, I'm being out lawyer-ed :) that's ok
 
user142019
src/main.cpp:2:10: fatal error: 'sys/epoll.h' file not found
#include <sys/epoll.h>
 
@R.MartinhoFernandes I concede
 
user142019
Didn't notice I'm on OS X. ;_;
 
@R.MartinhoFernandes am I wrong about intptr_t though?
@R.MartinhoFernandes it doesn't guarantee anything from round-trip, iff it exists, right?
 
6:21 PM
Nah, it's also optional.
 
@R.MartinhoFernandes so you're just taking issue with my general statement then? :)
@R.MartinhoFernandes it's ok, I like being pedantic too
 
user784668
@StackedCrooked actually, the guarantee is weaker than that: 3.9.2/3 "Pointers to cv-qualified and cv-unqualified versions (3.9.3) of layout-compatible types shall have the same value representation and alignment requirements (3.11)."
 
I can't read that. Unless I pinch my eyes really heard.
What is cv-qualified and cv-unqualified again?
const volatile something
 
user784668
@StackedCrooked yup, const and volatile
 
@Xeo Watcha played?
 
user784668
6:24 PM
@StackedCrooked const int is cv-qualified, int is cv-unqualified
 
Xeo
@R.MartinhoFernandes Dixit and Munchkin
 
@Fanael So const T* and T* must have same alignment and value. But T* and U* do not need to have same alignment (and not the same value obviously)?
 
Xeo
The munchkin game was long... just a single round in what, 3-4h ?
 
user784668
@StackedCrooked if T and U are not layout-compatible, then yeah, T* and U* don't need to have same repr and align.
 
Xeo
The climax was epic, though
 
6:28 PM
Aarg.
 
hey, so is intptr_t only ok for standard-layout types, or no?
@Fanael I'm not sure if that's what your quote is referring to
 
It's ok for any pointer.
 
pointer to data?
or pointer
 
Xeo
(u)intptr_t and void* are OK for any (data) pointer.
 
user784668
@StackedCrooked IIRC there are weird platforms where char* stores an offset into the machine word; when dereferencing the char is extracted from the word through shifts and masking
 
6:30 PM
apparently ptrdiff_t is not though
on 32-bit it's only 32 bits, rather than 33 :/
it does cause bugs
 
Xeo
And on 64bit it's only 64bit instead of 65
vOv
 
user784668
@StephenLin only pointers to objects and to void are pointers, the rest are silly things and should be called, uh, dunno, bananas instead
 
Xeo
@StephenLin Can't do much about it.
 
@Xeo yes, but you don't have 64 bits of address space in 64-bit
@Xeo on real hardware
 
user784668
@StephenLin the pointers are sign-extended
 
6:31 PM
@Xeo well, on amd64 hardware
 
The only thing ptrdiff_t limits is the size of arrays.
 
@Fanael what do you mean? I just mean you can't tell which address is higher or lower using ptrdiff_t reliably, if you want that for some reason
 
@Fanael So, the value is stored in the pointer object?
 
it's ok if you only care about 2's complement
 
@StephenLin You can only do that reliably within the same array anyway.
 
6:32 PM
@R.MartinhoFernandes what if you have a really big array?
 
user784668
@StackedCrooked no, it's like struct pointer { unsigned word_address: SOME; unsigned byte_offset_in_word: OTHER; };
 
@R.MartinhoFernandes technically I suppose it means you can't have one that big legally, but it doesn't stop an implementation from providing one
 
@StephenLin btw, malloc() does not guarantee 128-bit alignment.
 
@StephenLin You have to write code to work with it.
 
It's only guaranteed to be aligned to the largest primitive type.
 
6:33 PM
@Mysticial no guarantee, but it usually does on my machne
 
@StephenLin Interesting. Because it's half-and-half on my machines.
 
@Mysticial yeah, I know, I'm just saying it usually does, at least for new allocations before anything is freed
 
user784668
Most implementations I've seen only guarantee 8-byte alignment.
 
Which is what I'd expect assuming random.
@StephenLin Oh... in that case I can see why.
If you're allocating large chunks of new memory, it needs to get it fresh from the OS.
 
@R.MartinhoFernandes Yes and no -- you can only use < if they're in the same array -- but you can use std::less<whatever *>, even on pointers that aren't into the same array.
 
6:34 PM
@Mysticial Heh, I thought it simply aligned to the largest builtin type (int64).
 
So the OS is just gonna give you a new page.
 
@Mysticial but you're right, this test could be freeing a lot of stuff in between
 
@JerryCoffin But that tells you nothing about their relative addresses.
 
@Mysticial yeah, but you have a good point, there's no guarantee in this test that it's new pages, so even if they're malloced it doesn't help
 
So assuming your compiler puts a fixed amount of meta-data before the allocation, then all new pages from the OS will have page-aligned + a fixed offset.
 
6:35 PM
@Mysticial I'm not even sure I'm getting 8-byte alignment out of numpy though
 
If that fixed offset is divisible by 16, then you'll almost always get your 16-byte alignment.
 
user784668
@Mysticial s/compiler/malloc/
 
@StackedCrooked That's what I meant.
 
@Mysticial I'm storing 8 byte doubles but my machine only requires 4 byte alignment for them, apparently
@Mysticial at least that's what numpy claims
 
@Fanael where?
@StephenLin lol
 
6:36 PM
(it has a function to query alignment requirements)
 
That's even worse.
 
user784668
@Mysticial there's only one compiler in that message
 
(it might have its own allocator or something)
 
@Fanael But it doesn't need to be plural?
@StephenLin probably.
 
user784668
@Mysticial no, because using multiple mallocs in one program would mean havoc, assuming it'd even link
 
6:38 PM
I know some environments align to 4 bytes despite the 8-byte double. So you get random performance drops in floating-point code.
@Fanael But I don't have the word malloc in that sentence.
 
user784668
2 mins ago, by Fanael
@Mysticial s/compiler/malloc/
 
@Mysticial lol
 
@Fanael Then you're responding to the wrong comment.
 
@Mysticial That's what he said!
 
Xeo
@Mysticial All he wanted to say is that it's not the compiler, but malloc that is responsible for allocation overhead
Also, I should go and buy something to eat, but I'm way too lazy and I don't think I can even stand up right now.
 
6:40 PM
Oh, if you're gonna consider them separate...
 
Xeo
Oh, and something to drink.
 
@Mysticial aligning an 8-byte double array to 4-byte boundaries is retarded
 
I usually think of compilers having their own mallocs.
 
@Mysticial anyone allowing that should be shot
 
@StephenLin yes it is
 
user784668
6:41 PM
@Mysticial I am, because sometimes I do replace the system malloc. Especially on Windows, where something like nedmalloc is much better than HeapAlloc, especially in multithreaded programs
 
@Fanael lots of MSVC code statically links to the CRT in each module: yes, it does cause havoc (not disagreeing with you, just color)
 
@StephenLin No. Not necessarily. The system calls that give fresh pages are usually global to the OS. But the internal malloc() calls (which are wrappers to the kernel calls) are often different depending on the compiler.
 
user142019
156
A: Reasons not to use Django

Wade MealingYeah, I am an honest guy, and the client wanted to charge by the hour. There was no way Django was going to allow me to make enough money.

 
user142019
Haha awesome.
 
6:42 PM
@Mysticial not necessarily what? linking to static CRTs doesn't cause havoc? it would with different versions, right?
@Mysticial or was that something else?
 
My brain needs to be less JIT and more precompiled.
 
user784668
@StephenLin he's replying to a different message of yours, follow the arrows
 
I'm doing everything last minute and I'm starting to piss off my buddies.
Damn social gatherings.
 
Ell
social gatherings are great
I wish I had more xD
 
the previous thing was "anyone allowing that should be shot"? unless he was replying to something even older.. ::confused::
 
6:44 PM
@StephenLin Mouse over the message and you will see what it's responding to.
 
that's what highlights though, so you mean that?
i don't mean the OS, i mean numpy
or the compiler or whatever
 
I don't know what numpy uses.
 
they should align even if the the platform doesn't, it's a library for high performance numerical computing!
the arrays are supposed to be large
internal allocator, I'm guessing, or a Python runtime provided one
you can always overallocate by 4 bytes though
and just adjust the pointer afterwards
 
the python runtime doesn't need to care about alignment
 
"One word" is two words. Interesting.
 
6:46 PM
yeah, other than minimum required system alignment, no
but numpy ought to
 
Everything could be misaligned and there would probably be no noticeable performance impact.
 
@Mysticial of course, python code is not generally vectorizable, everything is indirect
that's what numpy is supposed to solve
 
@StephenLin There are performance hits even for non-vectorized stuff.
Even loading a misaligned 32-bit integer has a hit.
 
yeah, 'cuz of the damn indirection
 
It's better on the newer machines, but it still takes up two memory channels.
 
6:48 PM
i mean, the indirection penalty kills you more than the misalignment, so you don't notice as much
as least, that's what i presume
 
@StephenLin yes
 
@Mysticial branch misprediction is more costly than no prediction, right? but I suppose it's academic since there's always prediction?
 
@StephenLin Correct.
 
@Mysticial to both?
 
yes
 
6:53 PM
@Mysticial makes sense
 
So you have to clean up the mess left behind by going down the wrong track.
There's typically two approaches to do it.
One is to literally keep track of all state changes. And if it turns out to be a misprediction, then you run through and undo everything.
 
user784668
@Mysticial ugh, I didn't expect you to be wrong, i386 has no prediction. And it's not that ancient, its production ceased like five years ago because embedded.
 
The other way is to buffer everything, and commit only when you know you're on the right path.
@Fanael I mean modern desktop processors.
I know the embedded stuff don't usually have prediction.
 
@Fanael that's what I meant, @Mysticial was just psychic
 
user784668
@Mysticial then say so, because "academic" means "not found in real world" to me. And embedded is pretty real, I think.
 
6:56 PM
@Fanael it's like the Second Foundation here
@Fanael yeah, that's fair :D I meant academic for my situation
@Fanael as in, just a theoretical consideration since it won't ever happen for my hardware
@Fanael clearly some processors don't predict at all
 
user784668
Then again, I work in embedded.
 
good point though
 
user784668
When I do work, that is.
 
lol
 
I have changed the default Coliru program. This version gives you iostream, string and vector which most frequently used. And the vector printer is often handy. So it's a good starting point for many tests.
 

« first day (889 days earlier)      last day (4067 days later) »