« first day (770 days earlier)      last day (4186 days later) » 

7:02 PM
also, am I confused, or is the writes being faster than the reads normal?
 
@melak47 For non-sequential, yes.
 
@Mysticial that's a shitload of hardware
 
@mantler Or higher.
 
Has anyone of you written inline assembler code in your c++ program the last 5 years?
@DeadMG Yes, or higher. :)
@DeadMG I have an "old" ssd, 2 years old. It only has something like 300MB/s...
 
350 here, but same principle
 
7:07 PM
I have been thinking of upgrading my laptop harddrive to an ssd. But it has an IDE connector. So I have to get a IDE<->SATA converter I think...?
 
@mantler sort of :p
 
@melak47 Ok :) I'm asking because what I read on the internet is that the compilers are so good nowdays that it is very hard to do a better job in assembler yourself.
 
@mantler Unless you're trying to do specialized tasks which require good throughput, in which case you don't really write assembler, but use Intrinsics (sp?) and other such fun things.
 
@ThePhD ok, I have read about intrinsics and only tried some small examples. Do you know of any books on the subject or is it the cpu vendor material?
 
"To support the use of MMX, SSE, and SSE2 intrinsics, the compiler includes the following features:

Data alignment

Inline assembly"
 
7:14 PM
WELP nevermind inline assembly it is.
 
this is from MSDN
 
ok
 
But inline assembly doesn't work on x64 machines, so maybe you can use those fancy XM* functions?
I think those are only in XNAMath though and only work on certain types and do certaint hings
But if you get inside of XNAMath maybe you can see how they do their compiler magic.
 
It doesn't work on x64 machines? Wow. I didn't know that. MSVC and GCC?
 
@mantler I don't know about GCC, but MSVC doesn't support x64 inline assembly
 
7:17 PM
Ok.
But then you use intrinsics instead?
 
@TonyTheLion I wish :)
 
Except that MSVC intrinsics are very lacking...
 
can't find any info on the number of platters in the drive
 
@Mysticial I remember seeing an article on auto vectorization in msvc. And that it was a big thing for msvc. I guess that the other vendors have had that for some time?
 
@mantler Intel's had it forever, IIRC
... Oh my god, I used IIRC without thinking about it.
Culture++ !
 
7:23 PM
Auto-vectorization is inherently limited in too many aspects.
 
@ThePhD Ok. (I have only tried their memory/thread "debugger"(forget the name).)
@Mysticial How do you mean limited?
 
It's hard without giving any specific examples.
 
Ok. I was just curious :)
 
@sehe oh
 
But think on the lines of aliasing, alignment, boundary conditions, an other mathematical stuff.
Take a simple loop like this:
for (int i = 0; i < n; i++)
    a[i] += b[i];
Nobody can doubt that it's trivially vectorizable.
But even that becomes very ugly with auto-vectorization because the compiler simply doesn't have enough context information.
1. Is there a possibility of aliasing between `a` and `b`? Fine you can use `restrict`
2. Alignment? As a programmer, I may know that `a` and `b` are sufficiently aligned. But the compiler doesn't know that. So it needs to use unaligned moves or other work-arounds. That adds a lot of overhead.
3. Trip counts? As the programmer, I may know that the # of iterations is always a multiple of 4. The compiler doesn't know that. So it must generate clean up code to deal with it. Even more overhead.
Sure you can "help" the compiler with restrict and compiler-specific pragmas to give it this extra information. But at this point, it becomes messier than just manually vectorizing it yourself.
 
7:34 PM
@Mysticial And, as a programmer, you know stuff that the compiler doesn't know and can use intrinsics to unroll the loop?
@Mysticial ok:)
 
intrinsics may not be perfect, but inline assembler is far worse
 
@Mysticial Thanks!
 
In other words, the C and C++ language leave too many loose-ends to make auto-vectorization competitive with manual vectorization.
 
Hey here's a question...
How does MD5 hash encoding handle gifs?
 
It can be done, sure you can add all that overhead and it'll still give a net improvement. That's why they still do it. But it's not gonna beat manual vectorization anytime soon.
 
7:36 PM
Isn't it possible to write generic vectorizing functions though?
 
Very interesting and informative!
 
@Pubby memcpy and family is somewhat in that category.
And even those are far from optimal if the compiler doesn't have any context.
 
@Mysticial Smarter than memcpy though
 
The last thing the compiler wants is to add all this vectorization overhead when loop only runs a small # of iterations.
 
I may never need to do any manual vectorization but I will definitely read up on the subject now.
 
7:39 PM
As the programmer, you know whether a loop will run fewer or more iterations. So you can decided whether you want to vectorize it at all. Furthermore, with programmer context, a lot of loops become zero-overhead vectorized.
In this example from above:
for (int i = 0; i < n; i++)
    a[i] += b[i];
 
hmm
does decltype(a[i]) give T& if a is T*?
 
If I know that both a and b are aligned and not aliased. And I know that n is always divisible by say 4.
Then there is no overhead to vectorizing that loop.
So I can vectorize it regardless.
 
@DeadMG What else would it give? T?
 
maybe
 
@DeadMG Yes.
 
7:41 PM
more importantly, I remember being corrected on this some time recently, and I can't remember what I said before, so I don't remember what I knew after :P
 
@Mysticial That is cool.
 
And then you have the case where a and b aren't aligned. But as the programmer, you can trivially make them aligned by using an aligned malloc or something.
That's something the compiler can't do for you.
In other words, vectorization is one of those "meet-in-the-middle" kind of things. You need both sides (programmer and compiler) to put in some work. Otherwise it won't work (well).
Neither side can get anywhere near optimal performance alone.
 
decltype is confusing
 
well, it is possible for the programmer to reach optimal (without the compiler's help), by going all the way down to assembly and doing everything that the compiler could. But let's face it, few people are capable of that, and it's generally a poor use of time.
 
@Mysticial Do it on a GPU :P
 
7:48 PM
@Borgleader Depends on the task.
 
Yeah but that seems like a trivial sum of two vectors. That's great for GPU.
 
@Borgleader That example is fine for GPU, but add in some branches and a slightly more complicated memory access pattern and it maybe isn't.
 
When will the tag be depreciated? In 2014? :D
 
Sure sure, but I was talking about that example in particular :P
 
@Mysticial This is so interesting. I will read up on this. :)
Going afk.
 
7:51 PM
@mantler This stuff is hard to lookup. Especially when buried within all the exaggerated marketing from compiler makers.
 
@TonyTheLion didn't mean to complain. just - the picture isn't idyllic like that (the wheather is frightful - cold and wet)
@ScottW PIZZA
And hi
 
@Mysticial Vectorization or GPU?
 
@Borgleader Vectorization. I'm not too familiar with GPUs, but I believe part of the reason why GPUs haven't "taken over" is because of the same reasons. Getting the most out of a GPU is another "meet-in-the-middle" task.
 
@sehe oh right, but I thought that was ideal weather for a polar bear?!??
 
But of course it's too costly to get the programmers to do anything...
Not to mention a lot of algorithmic limitations in many apps that don't fit the parallel model of a GPU.
 
7:58 PM
@Mysticial Ah I see. Well imho, the reason GPU programming isn't more popular it's that it doesn't apply to all problems. And people haven't gotten used to thinking about whether or not what they're working on can be easily parallelized or not.
 
Itanium failed for the same reason. Writing good code for the Itanium is a "meet-in-the-middle" task. Of course, you can't get programmers to change anything. So the compiler was expected to do the whole thing - which of course it couldn't.
Not to mention lack of backwards compatibility.
 
@TonyTheLion Not like the picture of 'me' chillin - izda point
 
looks up itanium
 
Not to say that we are lazy and we suck. But that's it's too costly and error-prone to take existing (working) code and optimize it for a new architecture.
 
What was Itanium's goal, exactly?
 
8:01 PM
@sehe ah ok
 
Well tbh writing C++ amp code for gpu isn't so hard. In fact most of the time the code looks nearly the same.
 
The result of this resistance to change, is that x86 lives on and has become such a mess as it is.
@ThePhD It was supposed to replace the PC market. But x64 from AMD beat it.
 
Multiple instructions per clock cycle....
sounds pretty boss.
 
Alright I got a quick mathy question...
Anyone up for it?
 
What's x64 have on Itanium? Is it better, roughly equivalent or was it just that x64 made it to the market faster?
Wowowow 200,000 is the average price for an Itanium computer @___@
 
8:06 PM
@Crowz Don't ask if you can ask questions, just ask them.
 
Granted these are all enterprise-level super-computers, but...
 
Okay, I have a 14 inch by 17 inch board (35.5cm x 43.1cm), I to put 4 boxes in it with a 1cm padding (that is, 1cm away from anything else on the page). All the boxes must be a 16:9 aspect ratio.
How can I make the page such that it will work and keep the board as big as possible in the process?
 
@Crowz Well, either the width or height will be maximized, start from there
 
@Pubby How do I even -apply- a ratio? I am so terrible at math
 
@Crowz I don't understand your question
 
8:16 PM
@Pubby So my page is 14:17 ratio, yes? and I want it to be 16:9. How do I mathematically figure out how to make the ratios work?
 
1 min ago, by Pubby
@Crowz Well, either the width or height will be maximized, start from there
Figure out how to fit 2 lines onto a 17 inch line with 1 cm padding
Then do the same for 14 inch
Understand slightly?
(17in - 3cm) / 2 is maximum width per box
 
I understand, but how do you know that that's 16:9?
 
You get both the maximum width and the maximum height
Then you need to scale it using the ratio and check which one won't fit
Then you go with the one which does fit
You could also compare 16/9 to 14/17
 
Oh I see what you mean... hmmm
This is complicated.
 
No, complex is (16+14i)/(9+17i)
 
Ell
8:30 PM
:3
 
@R.MartinhoFernandes what do you name your computers?
 
I thought that complex numbers was something with more than 3 digits...
 
@sehe I name them after females from Greek mythology.
 
@mantler I thought it was an identifier for complexes.
 
:)
 
8:32 PM
My laptop is Amalthea, and my RPi is Calypso. The desktop at my parents' house is Pasiphae.
 
@R.MartinhoFernandes Okay. Not entirely original, either :) I usually name them after the hardware... Or the vps provider :)
@R.MartinhoFernandes I like how you sidestepped mainstream Europa, Aphrodite, the works
 
Ah this is fucking annoying to work in in centimeters
 
Work in lightyears, then
 
21 x 35 cm for the total size of the page? Can that be optomized?
 
Ell
3ds max 2013, kaching!
am I the only one who names their computers something normal? :l
 
8:37 PM
@Ell define "normal"
 
Ell
@Abyx "ell-laptop", "ell-desktop", "ell-gamer-pc" :P
practical
 
@Ell ell-laptop, huh...
 
Ahem.
 
@Ell apparently not. To date, I think it's a tie. Either you name them 'boring' stuff like you do, or you name them after powerful/fantasy figures
@Ell Also: too many machines
 
Ell
one can never have too many machines :3
 
8:40 PM
To make up for my previous shame, I give to everyone these Super Sweet Tokenless Events. Many thanks to Insilico and StackedCrooked for toughing out my masochism with me to make this work out. I will do my best to make it also have Variadic templates, but until then.
Events, Fuck Yeah!
 
@Ell 10^1000 would be too many imo.
 
Ell
okay turns out I have no use for 3ds max. what a waste of a day :3
 
@ThePhD WUT?! only 29 #include lines? Amateurish
 
Ell
@StackedCrooked nah, you could distribute them and let people publish their own content n stuff
 
@sehe I didn't know what I wanted so I included ALL THE THINGS.
 
8:42 PM
@Crowz What? Blasphemy...
 
@sehe For a second I thought your were really fast at counting.
 
<iostream> <future> <past> <present> <secondcoming> <endoftime>
 
@Borgleader mostly because the page is weird measurements, like 43.1 and stuff
 
@StackedCrooked Rainman, nice to meet you
@ThePhD What compiler presumably compiles this?
 
MSVC++, 2012 and 2012 CTP ('Milan' or whatever)
Didn't bother trying 2010.
 
8:44 PM
I would order includes as C++ includes first, then C includes (if necessary at all), then system includes.
 
@StackedCrooked Is that <cxxabi> include I saw in your code last night / early this morning part of the standard? Or is that a GCC thing?
 
@Ell My oldest computer is called Eenie-meenie-macka-racka-rari-dominica-sickapoppa-dickeywhopper-rom-pom-stick...
 
@ThePhD It's definitely not standard.
It's from libstdc++.
 
Ah.
Apparently Visual C++ has it too.
I don't really think I'd ever compile on anything else except those two.
 
You can never guess what i have named my other 13 :)
 
8:46 PM
Oh, and maybe clang. Dunno if clang provides that.
 
Boost can also do some demangling in its private apis.
 
@ThePhD amazingly. Are you sure it's not all ignored due a prior stdafx.h?
 
All my computers' names start with A (Asguard, Adjutant, Albion, Ajunta-Pall)
xD
 
@sehe I don't know how stdafx.h works, mostly because I always blow it up out of my projects because using it is an ass.
 
@Borgleader Abysmal Absurd Abomination, Absolutely Abiect
 
Ell
8:47 PM
hmm. Not sure whether to start developing on g++ or clang
 
@Borgleader AbsoluteVodka?
 
@ThePhD It's not, but blowing it up is safer than otherwise
 
;)
 
@Ell neither. I'd just pick one to work with
 
Ell
ahh yes :P
 
8:49 PM
@sehe Those are boring, they're just words. Asguard (alien race in Stargate), Adjutant (robot looking AI in Starcraft 2), Albion (Town in Fable), Ajunta-Pall (Dark Lord of the Sith)
 
@ThePhD lines 126 and 157 are giving gcc and clang trouble. Sadly, not so easy to switch to windows just now
@Borgleader Oh, but you are wrong there. Words are never boring
 
Awwwwww. :c
Liens 126 and 157.... let's have a looksee...
 
@Borgleader Allthough your names are nice
 
clang is a funnier name than g++.
 
test.cpp|125 col 76| error: expected expression
||                 TCallback c = DeduceStaticCallback( TFunc ).Bind< TFunc >( );
||                                                                            ^
test.cpp|157 col 81| error: expected expression
||                 TCallback target = DeduceStaticCallback( TFunc ).Bind< TFunc >( );
||                                                                                 ^
|| 2 errors generated.
That's clang ^ @ThePhD
 
8:50 PM
Like if you drop a pot on the floor.
 
@mantler It's called onomatopoeia (also a nice hostname)
 
I guess it takes issue with DeduceStaticCallback. Hm...
 
@mantler then you potwnd the floor
 
g++ is more of a "gee double plus" :)
 
@ThePhD whoa, you are still at this x)
 
8:51 PM
Haha :)
 
@nixeagle YAH DAMN SKIPPY I AM.
 
|| test.cpp: In member function 'void Event<T1>::Add()':
test.cpp|125 col 76| error: expected primary-expression before ')' token
|| test.cpp: In member function 'bool Event<T1>::Remove()':
test.cpp|157 col 81| error: expected primary-expression before ')' token
^ and that's gcc @ThePhD
 
Yeah, so it hates DeduceStaticCallback. Lemme see if I can fire up MinGW and make it throw the same tantrum...
 
+ and - inside a filename sometimes interferes with shell expansion
 
Note how I edited a line away, somehow, so the line numbers are off by 1
 
8:52 PM
Well, how is it going? A quick summary of your status in this lovely turing tarpit!
 
@StackedCrooked ? how so? On windows?
 
cat file | grep -a can be interpreted as an option instead of the search term.
I've run into other issues, but I can't exactly remember how they occurred.
 
@StackedCrooked Oh, so filenames starting with them. In that case, grep ./-a or grep -- -a and some more will do
 
@StackedCrooked anything involving newlines can screw up. For example git if not setup properly can throw up tons of spurious diffs.
 
@StackedCrooked There is often the option to separate the input arguments from the options explicitely using --
 
8:54 PM
@nixeagle But a NL != [-+]
 
@sehe well yea, I was just mentioning linux stuff that breaks randomly on windows. :P
 
@nixeagle linux stuff doesn't come near windows, is the whole point :_)
 
@nixeagle How do you set it up properly? Should you select to always convert to *nix line endings?
 
@nixeagle git that is.
 
Ell
8:57 PM
somebody seed linux mint 14 cinamon!
 
@mantler well if you are working on a cross platform project, usually you have the repo store things with \n (unix file endings) but tell git to convert things to \r\n for windows on checkin and checkout.
But if you screw that up, you can get some quite amusing diffs. x)
 
@nixeagle Ok. I will keep that in mind...
 
@mantler I set it up to leave lineends the hell alone
@Ell why, can't you just download it?
 
@sehe works if your tools can be trusted not to muck with them.
Not really the case if you are using visual studio for example. Create and check in a new file using that and it'll have windows endings. Now your repository has some files with unix and some with windows endings.
Not ideal.
 

« first day (770 days earlier)      last day (4186 days later) »