« first day (778 days earlier)      last day (4172 days later) » 

9:00 AM
By then Intel already had Sandy Bridge out.
And AMD's Bulldozer was a pretty big disappointment.
 
@ThePhD Running fabs and designing processors are entirely different businesses, especially in terms of how you do investment and such. If you try to do both, you end up at one of two extremes, doing extremely well, or extremely badly.
 
@ThePhD I doubt that, PS4 is probably gonna use AMD and AMD is still used in server market
 
Even months before it went retail, people started posting leaked benchmarks of my program on Bulldozer.
I was like... oh god...
this isn't good.
 
@Mysticial How's that not good? Clearly your program is a standard for benchmark now. :-)
 
@Insilico Not good for AMD.
 
9:01 AM
@Mysticial Could it be that your program is just better optimized for Intel?
I mean, I dunno if there's a special way to optimize for an AMD CPU.
 
@ThePhD If Mysticial uses the Intel compilers, of course.
 
@ThePhD I won't deny that. Because not only did I use the Intel compiler, but the AVX binary was specifically tuned for my (Intel) machine.
 
@Mysticial Yeah -- especially selling it as "8 cores" -- they should have called it something like "4 cores with enhanced hyperthreading", or something on that order. Wouldn't have changed the performance, but would have kept expectations more in line with reality.
 
But I didn't intentionally hinder the program on AMD. And the Intel compiler still beats out Visual Studio and GCC on AMD.
So if ICC is hindering AMD speed, it's not that much.
 
Mmm... well, Intel's compiler is known for being the best one for math-based tasks.
 
9:03 AM
@Mysticial Yeah -- at least it's not like early versions that produced executables that just flatly would not run on AMD CPUs.
 
ICC's alleged "slow down on AMD" works differently.
It applies to the MKL and to which instruction set is enabled.
On an AMD machine with AVX, it will only run the SSE2 code-path of MKL.
On an AMD machine, ICC will never auto-select anything higher than SSE2.
This doesn't apply to y-cruncher, since I manually vectorize everything anyway.
 
And we're at like, SSE4 now, aren't we?
 
@ThePhD AVX on Intel, XOP on AMD.
 
@ThePhD Now at AVX (which came after SSE 4.1).
 
So AMD is ahead in the instruction set race.
But Intel is about to push out AVX2.
AMD's FMA4 and XOP are incompatible with Intel's FMA3.
But AMD says they will support FMA3 and AVX2.
And of course Intel is just gonna ignore AMD's FMA4 and XOP.
 
9:10 AM
Well, 2:00 AM -- I think I'd better go get some sleep. Later all.
 
night
 
@JerryCoffin Nite.
 
9:27 AM
morning
 
 
1 hour later…
10:30 AM
Morning, french fries are coming to me!
 
10:41 AM
^^ 7 year suspension...
 
lol
 
Xeo
11:00 AM
@Mysticial o__o
 
11:17 AM
:6http://stackoverflow.com/questions/13665534/getting-desired-binary-data-ranges-from-stdistreambuf-iterator-and-stdifstre/13665582#comment18755813_13665582
Goad Moaning
@Mysticial The suspense... it's killing me!
 
mawning
@Mysticial it says temporarily suspended, I guess my idea of temporary is different to SO's idea of temporary. :P
 
@Tek I'd say in some cases the fread or istream::read are perfect candidates. However, I'm a big proponent of coding intent (what do you want happening) over coding steps (how you think that should be achieved). In particular, Spirit will give you the means to just flip the switch and specify the endianness of the input, should you ever run into such a need. You know, that kind of stuff often becomes important in binary protocols — sehe 10 secs ago
@TonyTheLion 7 years in Tibet, also temporary. Really rather short movie
 
lol
@sehe You know goad has a meaning right?
 
@TonyTheLion Something like "gidsen", "aandringen"?
 
(noun) a cattle prod OR (verb) it's to provoke or annoy someone so as to stimulate action
@sehe yes, you could say that in Dutch.
 
11:30 AM
@Mysticial Can't find anything bad in his posts.
 
11:41 AM
@StackedCrooked Probably moderator-erased.
 
7 years is a lot. I think he must have attempted to hack the site or something.
 
as if suspending him would stop that
 
He must have earned at least 1k rep with those answers? stackoverflow.com/users/710480/?tab=reputation&sort=graph
 
11:57 AM
Hi folks.
What vector methods do I want to use to implement a FIFO queue?
 
@JohanLundberg Didn't know that class existed, thanks. It's for a Data Structures class, so I'm not sure I should be "cheating", but the professor did say we can use any real code, since that's how the real world works.
 
@Moshe vector makes a poor queue. deque would be better.
 
@DeadMG deque?
 
std::deque
 
12:06 PM
@DeadMG Ah, double ended queue.
 
std::vector would make a fine LIFO
 
I can’t help myself, I have to refer you to this hilarious post:
-1
A: Preferred way to remove whitespace from a string

Thomas Edingchar const * rm_ws (char *& string) { int the_string_s_length = strlen(string); char * new_string = malloc(the_string_s_length); int length = 0; while (*string) { if (*string == *" ") { continue; } *new_string++ = *string++; leng...

 
but FIFO, you'll be popping off the front quite a bit, and that's a nasty O(N) for vector
 
… it contains almost more flaws than lines of code
 
@DeadMG Ah, ok. so I want a deque, then. I see.
(@DeadMG) Silly question, how do I add an instance of Class to a dequeue of type Class?
 
12:13 PM
same as vector
they're designed to have a uniform interface
 
I know, but it's not working...
sec, getting code
Widget widget = Widget(numberOfWidgets, price);
widgets.push(widget);
 
your widget is probably uncopyable
 
1 min ago, by DeadMG
same as vector
 
push?
vector doesn't have a push() method either
 
@KonradRudolph *" " - what.
 
12:15 PM
@Griwes creative, right?
 
Kinda.
 
Deleted
 
@DeadMG Oh, right, whoops. :-/
 
Ell
push_back isn't it?
 
indeed
and the reason for that is a matching push_front.
 
12:27 PM
Yup.
 
haskell is horribly slow
even slower than python
and python is very very slow
 
@AlbertoBonsanto Trolling?
 
How do I see how many elements are in my dequeue?
 
..and incorrect - python is very, very, very slow.
 
12:29 PM
15 mins ago, by DeadMG
same as vector
 
Thanks folks, got it. :-D
 
@AlbertoBonsanto FYI, well-written Haskell is almost on par with C++
 
nope
not trolling
i just was reading speed test
 
@AlbertoBonsanto Well, if you say so
@AlbertoBonsanto The speed test sucks, then
 
but wait? why do you say i'm troll? So i can't give my opinion caus ei don't have a golden badge :(
11
Q: GHC Optimization: Collatz conjecture

ClintonI've written code for the Project Euler's Challenge 14, in both Haskell and C++ (ideone links). They both remember any calculations they have previously done in an array. Using ghc -O2 and g++ -O3 respectively, the C++ runs 10-15 times faster than the Haskell version. Whilst I understand the H...

 
12:32 PM
@AlbertoBonsanto Nothing to do with gold badges, the statement was just so patently ridiculous, seeing that Haskell is in fact one of the most efficient languages there is
 
12:49 PM
> What is the const operator and how is it used? — John Somez
Good question, never heard of that … what does he mean?
 
> What is the STL?
heh
 
> I held out for a long time trying to believe that all the investment I had made in C++ was not lost, but it turned out that C# simplified things to such a great degree that the extra power C++ gave me was not worth the extra responsibility.
^ I tend to agree with that, and I'm not even a C# programmer :)
 
eh, the blog post is pretty evenly written, there’s not much to be said against it – except maybe for the somewhat weird catalogue of interview questions, hence my posting it here
 
1:05 PM
@FredOverflow are you saying that C# is better or just easier?
 
I am saying C# programmers are more productive than C++ programmers, because they have to worry less about what's going on under the hood.
 
@FredOverflow Ok, thanks
 
Which is just my opinion, of course. YMMV.
 
@FredOverflow But almost all games FPS are wrote in C++
 
Ell
How does one measure productivity?
 
1:08 PM
How long does it take you to deliver.
@AlbertoBonsanto And why is that?
 
Ell
All the libraries are written for it :P
 
@FredOverflow Speed :)
 
@Ell right
@AlbertoBonsanto I don't think it is possible to say which language is faster in general.
Of course it's easy to write a trivial benchmark that shows C++ is 10% faster, but what does that mean in practice for real applications?
Once you throw memory management and multi-threading into the mix, I wouldn't be surprised if C# was twice as fast as C++, for a realistic application.
 
Ell
pfftt an ouya development kit is $800! :o
how is that friendly to indie developers? what a farce
 
@Ell What is that?
 
Ell
1:14 PM
@FredOverflow is an android based game console which is supposed to allow indie devs to compete with the big names (because developing for xbox is expensive n stuff so indies can't do it apparently)
 
@Ell Most of indie games have problems with graphics they are a bit ugly, i am sure if they made a little more effort in the art they would sell more than twice :)
 
Ell
writing web apps is painfull :(
@AlbertoBonsanto finding people to do art is very difficult imho :o
 
@Ell Then I shouldn't be learning progrmaming, art is the important thing XD
 
@KonradRudolph did you find out by now? I would be interested, too.
 
I don't think people can learn art. It has to be in their blood.
 
1:19 PM
> What is short circuit evaluation? How can it be used? Why can is be dangerous?
can somebody explain that?
 
@FredOverflow thanks for insult my capabilities, and even worse coming from a professor :)
 
@bamboon a && b won't evaluate b if a is false.
@AlbertoBonsanto I'm not a professor, just a lecturer.
 
@FredOverflow oh that, never knew there was a name for that
 
@bamboon It's called shortcircuit
 
@AlbertoBonsanto when talking about shortcircuits, I am thinking of actual circuits
 
1:22 PM
And it only works with built-in types. If you overload operator&&, it won't short-circuit.
 
Ell
@AlbertoBonsanto are you writing a game?
 
@bamboon I'm electrical engineer, but think more as a shortcut
@Ell No no, i am a noob programmer :)
 
Ell
@AlbertoBonsanto me too :P
 
@AlbertoBonsanto I am an EE, too.
 
@bamboon The same thing happens too the OR operator if the first statement is true then you don't need to evalaute the second statement
 
1:24 PM
s/statement/expression/
 
|x|y| out|
 
Shift+Enter is your friend.
 
@AlbertoBonsanto I know, I just didn't know there was yet another name for it
 
a && b is just a shorthand for a ? b : false, and a || b is just a shorthand for a ? true : b.
Now breathe that in and trip, suckers!
;)
 
@FredOverflow couldn't you have told me that a year ago? ;)
 
1:27 PM
I sure could have, but you didn't ask ;)
 
there is a little trick, if you are inside a if with the OR operator and speed is a problem set as first statement the statement which it is commonly true
 
3 mins ago, by FredOverflow
s/statement/expression/
Also, if both expressions are trivial to evaluate, you might be better off combining them with & instead of &&.
 
@AlbertoBonsanto Premature Optimization flames incoming ..
 
@FredOverflow I don't understand what you said, maybe it's because my ignorance
@bamboon It's basic optimization
 
a and b are expressions, not statements. You cannot combine statements with &&.
 
1:29 PM
@FredOverflow thanks for correcting me
 
You're welcome.
 
my teacher is very bad, so what i know is because selflearning
 
What book?
 
I'm currently learning C, not C++, from deitel's and deitel's is the only book i could afford where i live
 
deitel is okayish
 
1:34 PM
Yes, but i have read there are much better, and deitel is very very messy not organized and has a lack about pointers, very incomplete
 
As far as I can tell, there is no great C primer. Maybe I should write one? :)
 
Ell
I need to learn how to do 3d stuff
 
@FredOverflow Go ahead, call pearson editorial
@Ell Me too, OpenGL?
 
Ell
I find it unlike any other area of programming
 
@Ell Don't learn from NeHe tutorials, they are incredibly outdated and use terrible "C++".
 
Ell
1:37 PM
@AlbertoBonsanto I'm using Irrlicht at the moment, but I need to write opengl shaders, and I have no clue :L
 
@Ell You may want to read The OpenGL Shading Language.
 
Ell
I need to write a texture splatting shader for terrain
 
@Ell i hope you get rich selling your game :)
 
Ell
@AlbertoBonsanto Haha so do I ;)
but a more realistic goal is the game ever being finished :L
 
@Ell Logic part is easy, graphic part is hard and the user interface is hard too (if you want a well looking game) not a FREECIV looking game :)
 
Ell
1:40 PM
@AlbertoBonsanto It's all difficult imho, esp keeping committed to it
 
@Ell I couldn't make just a easy optimizer calculator for freeciv, i doubt i can't make a game, so you must be proud of what you have done
 
+1 for authoritative answer (I guess chances are that you may have been involved with the code in question!). but this leaves a remaining question: what is the advantage, why is it done? — Cheers and hth. - Alf 1 min ago
^ I commented on an answer! :-)
 
Ell
@AlbertoBonsanto I have barely started it yet so I have nothing to be proud of :P
 
@Ell start with a minecraft copy, then try with castle miner,
@Ell and end with battlefield 3 :)
 
I find FPS games boring.
 
Ell
1:45 PM
I'm making a strategy game
 
@Ell try freeciv they have traderoutes :) they give trade wich is converted into science and money
 
Ell
based around trade routes
it's about supply & demand really
 
@Ell Or gazillionaire
 
Ell
Well you have settlements which you have to sell commodities too
It's a clone of the game "Trade Empires"
 
Nice :)
 
1:48 PM
I wrote "Guess My Number" several weeks ago :)
 
Freeciv needs a graphic developer, but an Ai developer is needed too
In fact i think the game code must be totally rewrote, it's very chaotic and bad documented, take a look Mr. @FredOverflow
 
Ell
I've written naughts and crosses :P
 
The Dice Man is a novel published in 1971 by George Cockcroft under the pen name Luke Rhinehart and tells the story of a psychiatrist who begins making life decisions based on the casting of dice. Cockcroft wrote the book based on his own experiences of using dice to make decisions while studying psychology. The novel is noted for its subversivity, anti-psychiatry sentiments and for reflecting moods of the early 1970s. Due to its subversive nature and chapters concerned with controversial issues such as rape, murder and sexual experimentation, it was banned in several countries. Upon i...
^ I hadn't even heard about it. Has anyone read it?
 
@Ell It's called "Tic Tac Toe" in Germany.
@AlbertoBonsanto I will look at one page of code if you provide a link :)
 
1:51 PM
I don't want to download the whole thing. I meant a link to pastebin or something.
 
This game is too hard for noobs, too many things to think, so the idea is to make an AI to make the things easier but as always there is a big lack of AI free-opensource developers
ahh
You can a little taste of the game messy code, wait
 
Ell
any of you like RTS?
 
Well, the funtion bodies are a bit long, but I don't see anything terrible from first glance.
 
@Ell , freeciv is RTS and turn based :)
 
Ell
TBS :P
 
1:56 PM
@Ell Nope cause it's real time too
 
Ell
if you want an RTS, try spring
Spring RTS - it's an engine that started out as a clone of Total Annihilation
which was the first truly 3d RTS written IIRC
 
@Ell Starcraft?
 
Ell
@AlbertoBonsanto Don't think so. let me google :L
 
@Ell I have noticed that easy gaemes are much much more popular than games where you have to think
 
Ell
TA: September 30, 1997
Starcraft: March 31, 1998
@AlbertoBonsanto like angry birds :P
 
2:04 PM
@Ell Exactly.... But freeciv which is a very very nice game (in fact it's not a game it's an optimization problem) is very very unpopular, and i know it's because of graphics and it's too hard
 
What about Dwarf Fortress then? ;)
 
hahahahaha you made me laugh
 
Good luck, or hire a pakistan poor engineer to make the hard job for some cents
 
> pakistan poor engineer
- we know one...
 
2:17 PM
Fucking hell it's 3PM
 
3:17PM in your timezone, to be precise.
 
I think I'm still drunk
A little
 
eh, I hate that "still drunk" feeling after you've slept it over
that's one of the reasons I'm not doing much of the drinking thing
can't stand the next day
also headaches
 
I don't drink nor smoke i am a good poor boy :)
 
2:46 PM
the first does not imply the second
 
Ell
I used to not drink or smoke
But I've always been a dick :L
 
wait
drinking is one thing, but smoking?
you've gotta sort that shit out
 
Ell
I don't smoke
yet
Mehh I won't start
it's not really worth it I don't think
 
you'd be killing yourself in an extortionately expensive, extremely painful, and hideously slow fashion
 
Ell
Yeah it's muy expensive
and I don't want to die from lung cancer :O
 
2:51 PM
neither do I
that's probably the most redundant thing I've ever said
 
Ell
heh
Ahh gawd how do you start when you're looking through a massive codebase? :O or at least large
I want to learn how Spring RTS does their terrain rendering, but there are soo many classes and stuff :O
 
well, presumably, they get the terrain vertices, and then they pass them to the GPU and then apply a shader to them
 
Ell
yeah, I think I need to write a texture splatting shader
I'm not sure though o.O
I need to have LOD and stuff, else it just looks aweful when you zoom in
 
make a beta without zoom :D
 
there are mipmapped textures for that
 
Ell
2:57 PM
but what about the vertices themselves?
hmm actually I think Irrlicht might LOD them for me
lemme boot into linux, brb
 
what about them?
 
Ell
back
and they will either look jagged or it will render slow
 
pfft
premature optimization
 
Ell
No, I have tested it, it runs very slowly
which means I'm doing something wrong I guess :P
 
yes
 
Ell
3:04 PM
aww damn turns out it was on windows
 
hi folks
 
Ell
now I'm gonna have to reboot again -.-
 
Quick Q
 
programmed that by accident :)
 
What's an iterator, and how can I use it with a vector?
 
3:04 PM
auto it = myvec.begin();
auto& first_element = *it;
 
@Moshe Depends on what dafuq you want to do with it with regards to the vector.
 
@DeadMG lol, of course.
 
Hi all, I'm making an implementation of a Java-like language using C++ for fun.

Is it OK if I ask conceptual questions about implementational problems before I actually encounter them?
 
@DeadMG I have a vector of Class and I'm trying to sum all values of the Class.Property instances.
 
3:05 PM
@Bane Is it okay to ask about aliens before I actually encounter them?
 
@Moshe std::accumulate.
 
@DeadMG Explain?
 
@Moshe for (auto& x : myvec) sum += x.property;
 
@Bane Why would anyone want to make a Java-like language?
@Moshe No. Go look up the function.
 
@FredOverflow That doesn't seem very relevant though, could you be more precise?
 
3:06 PM
@DeadMG Ok, I should, haha. Thanks.
 
@DeadMG I know, because Java sucks, right?
 
@Bane Rather extensively.
I always say, PHP is the worst language ever, and Java is the worst language ever designed.
 
@DeadMG OK.
 
noobs couldn't even make arrays that worked on 64bit
 
Can anyone tell me why are everyone from Lounge on bitbucket and NOT on github?
 
Ell
3:17 PM
ehhh irrlicht chokes on a 1024 * 1024 heightmap o.O
 
@Ell irrlicht sucks.
 
Ell
okay I'm getting 8/9 FPS
@BartekBanachewicz what do you suggest instead?
 
@Ell my engine ^^. No, JK, it's unstable as hell, and I probably broke the build by last commit. You can fork it, anyway. But if you really want something done, Ogre3D
Or UDK, but I guess you want to code in C++
 
Ell
ogre3d is full of singletons
and the code size is massvie :O
What makes it any better than irrlicht?
be specific :P
 
It has larger community, it's faster and more powerful
there are more tutorials, more plugins for model exporting
it's large, but not that much when compared to modern PCs. I'd say it was large 3 yrs ago
 
3:23 PM
If an iterator is inside of a class, does its function have to be inside of the class's scope too?
 
@Moshe gimme example.
 
void sum(){

}

void Queue::printSales(std::vector<Sale> sales){

int itemsSold = std::accumulate(sales.begin(), sales.end(), 0, sum);


}
 
Ell
Irrlicht is marketed as a super fast engine
 
@Ell Isn't every engine? What you are trying to do, exactly?
 
Ell
Show a terrain, that looks good
Isn't much, mostly flat with a few hills & has rivers/sea
 
3:24 PM
@Moshe what the... pass the vector by reference!
@Ell you can do it in webGL :P Now back to serious, DIY, if it's only terrain imo
 
Ell
that's even more difficult :P
well I mean, it's only terrain at the moment
 
@BartekBanachewicz Whoops?
 
Ell
but I am attempting to write a game
 
@Ell lemme guess, MMO RPG 3D
 
Ell
3:26 PM
it will have buildings/farms/animals on it
haha no, 3d strategy
clone of an existing 2d game
 
@Moshe you are copying the vector in each function call `printSales(std::vector<Sale> const& sales)
anyway, don't pass it as a vector, pass it as such:
 
Ell
To be honest, I don't think performance will be an issue, ease of use is what I'm looking for, and all the singletons in ogre3d annoy me
 
template<class T> void printSales(T const& t) { accumulate (t.begin, t.end, ...
 
@BartekBanachewicz Why's that?
 
@Moshe because then you can use vector, list, anything. You're not tied to a specific container
 
3:28 PM
@BartekBanachewicz Ah, of course. This is for a HW assignment, though, not a personal or professional project.
 
@Moshe does it matter? I tend to write good code even for dumb assignments. Nice exercise, if you ask me
@Ell I'd also say that singletons are easy to use. They're crappy, but can simplify things.
 
If you want to be generic, take a range or pair of iterators, not container.
 
@BartekBanachewicz That's true. I'm gonna change it.
 
yea, Cat's suggestion kind of makes sense. For all stdlib, though, assuming that .begin and .end work is ofc correct.
 
Ell
@BartekBanachewicz see that looks awesome
maybe I could make it browser based webgl, now that would be awesome :3
 
3:34 PM
@Ell Well, we've made an alfa of a game in a weekend (on my github)
 
Ell
really? with opengl?
where is your github?
 
With THREE.js, so I wouldn't call it OpenGL per se.
 
Ell
@BartekBanachewicz the plumbob is a nice addition :P
 
@Ell I've modeled it for fun :)
 
3:54 PM
@BartekBanachewicz No. They're easy to use for the first ten minutes, but after that, they become an epic headach.e
 
@DeadMG I thought he wants to do a simple demo or sthg. It can be done in ten minutes :)
 
every Singleton starts out that way
and then ten years down the line, the original author is cursed
 
Ell
I really just have no idea what I'm doing
 
@Ell seems legit.
 
Ell
3:59 PM
I could write the logical aspect of it entirely separated from the 3d thing
I know separation of concerns is good, but I think it would be very difficult adding the 3d after the logic part
 
@Ell are you driving blind?
 
Well, I was pretty serious about forking my engine, though. I can give you 24/7 support for it :) And I got rid from singletons lately
 

« first day (778 days earlier)      last day (4172 days later) »