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

12:05 AM
 
user1357851
get adrenaline going = do an hour run before hand
 
Don
C++ - what library do you recommend for a game with 2d graphics?
(For sprites and such)
 
@Don SFML.
 
Don
@ThePhD Thanks!
@ThePhD May I also ask what IDE you're using for developing with C++? (Quite a beginner here ;x)
 
@Don =l
Vim/Notepad + Command Line.
Only way to go.
 
user142019
12:10 AM
> Notepad
 
user142019
:|
 
Fiiine.
 
user142019
Notepad is the worst editor ever.
 
Notepad++ if you want to be a pedant about it.
 
user142019
It doesn't even have undo beyond one action.
 
12:10 AM
Program Carefully.
 
user142019
lol
 
Encourages good practice in your fingers.
 
Don
;3
 
user142019
It has no syntax highlighting or line numbering.
 
user142019
Notepad is -1 because not enough Vim.
 
12:11 AM
Fine then, just use Vim and Command Line.
 
Don
Intype?
 
user142019
@Don Is it Vim? No. So no.
 
user142019
:P
 
Don
Gotcha, alrighty then :3 thanks for the info hehe
 
user142019
@Don DirectX.
 
12:12 AM
Too low-level.
 
I feel sick :(
 
Not enough libraries and abstraction and structs.
 
Don
@Zoidberg What about it?
 
user142019
@TonyTheLion that's not healthy man.
 
user142019
12:15 AM
@Don Record player input to a C++ source file and then use a template metaprogram to produce the final graphical image and sound files. Then output those. Repeat every 60th of a second.
 
user142019
I'd start with buying a few supercomputers.
 
user142019
:P
 
Don
xD Wtf.
Will do, will do.
 
user142019
A compile-time ray tracer has been written.
 
Don
Gimme yours first though, just to test before I go and empty my bank account kthx :3
Wow Actionscript is popular In their crowded chat room ~ Nah not really..
@Zoidberg Visual c++? crap?
 
Ell
12:27 AM
Agh
 
Don
:\? sorry I..
 
Ell
Hah
Nah I suck
 
Don
Oh I thought you meant.. Ugh I thought I was asking too many questions lol~ it's alright
 
@Ell BAM MOTHERFUCK PLINKS
 
Ell
Nah you can ask as many questions as you like don
To me anyway
 
Don
12:33 AM
Alrighty :) thanks
 
@sehe I just had the chance, but I've found another Qt way via binary format (QtDataStream) which is as easy as QtDataStream data(&file); data << myMap;.
 
Ell
But the chances are I won't know the answer xD
 
@Jueecy :) There's also Boost Serialization (binary, xml, text) and Boost PropertyTree (INI, XML, Json)
 
Don
Haha I see, well I might give it a shot once and put your knowledge at a test :3 I'm a beginner though so no worries
 
@sehe, yeah I've made some researches. But I have to work only with Qt and the std library for this project and the professor will be so happy if I use his beloved Qt, the pure way. I think.
 
12:37 AM
@Jueecy Wow. A professor encouraging Qt. that's a first
 
@sehe, I actually like Qt very much. I don't have any other experience though, therefore my judgment doesn't really matter.
 
I haven't used it. Well, not much. I hear it's nice. But "intrusive" like many GUI frameworks
 
user142019
gtkmm ftw.
 
(I know it's not GUI only, which is probably the reason it's so intrusive)
 
user142019
Also, AppKit is best.
 
12:40 AM
@sehe, listening to him, Qt is like the only cross platform framework to be organized the proper way, with the correct class hierarchy and stuff. Seems pretty ok to me.
 
user142019
> Cross platform.
 
user142019
> GUI.
 
user142019
Pick one.
 
@Jueecy Well, it isn't. Wx, Gtk are both Cross Platform GUI frameworks. There are more. Libraries which are cross platform, well there are increasingly many in the last decennium
 
@Zoidberg, can't it be a "Cross platform GUI framework"?
 
12:42 AM
Not truly.
 
user142019
GUIs that are the same on all platforms usually suck.
 
The apple fanboy will always complain (partly rightfully) about "non-native look and feel"
 
user142019
They can only be consistent with one of the supported platforms.
 
Called it
 
user142019
@sehe it's terrible when apps are not consistent. :P
 
user142019
12:43 AM
Qt does a relatively good job, though.
 
user1357851
Window's phones have that nice sleek look & feel. Too bad coz phone's operating system kind of sux
 
@Zoidberg, yeah right. I mean that you write the code once and the look looks native on all supported platforms. I think I've heard Qt draw every GUI widget itself and I think they made a very great job on this.
 
@Zoidberg Meh. You're right. That doesn't make the frameworks not-Cross Platform, though
 
@sehe KDE on windows works pretty good, why not? nevermind
 
@CaptainGiraffe I've never seen it on windows. Though I use windirstat :)
 
user142019
12:46 AM
Swing on OS X is absolutely terrible.
 
@Telkitty Are you ready for some graph porn?
 
user142019
It doesn't even support the damn Emacs bindings that are supported in every single text box in the entire OS.
 
@sehe Okular is my killer app for KDE on windows.
 
user1357851
@sehe wait ... what that question came from?
 
user142019
Same with the search box in Twitter's Mac app.
 
user142019
12:47 AM
Instead of using native control they were moronic and wrote their own one, which is inconsistent as hell and sucks.
 
@CaptainGiraffe Okay, Okular is great. Not sure whether I've used it on windows. I might have as a part of Frescobaldi
@Telkitty :) you'll see
 
This one?
 
user142019
Yes.
 
user142019
Try using the standard control+A and control+E and control+K keybindings in there.
 
What's wrong with it?
 
user142019
12:49 AM
They don't work.
 
user142019
They work literally everywhere else (except in Java Swing crap).
 
 
@sehe that doesn't look like tex, lilypond does ring a bell.
 
user142019
But yeah that's what you get if you're a fucking idiot and use non-standard controls.
 
user1357851
woof is puppy gone wild?
 
12:50 AM
@CaptainGiraffe It's not tex. However, on linux, the PS/PDF preview is Okular
@Telkitty How'd you guess
 
Control - A does work.
 
user142019
Seriously?
 
user142019
It didn't last time I checked.
 
@sehe I just tried to install it, an extra 740 Megs of install space for lilypond =)
 
 
12:51 AM
It select the text in the search box line anywhere else
 
@CaptainGiraffe hehe
 
user142019
@Jueecy control+A, not command+A, you fool.
 
@Zoidberg, ok I'm stupid
 
user142019
:P
 
@Zoidberg, yeah, right after I wrote that message I was like "What the fuck is wrong with myself?".
 
12:52 AM
This one is nice too, because you can tell who was listening/not deafened when.
 
user142019
Control+A moves cursor to begin of line.
 
user142019
Like in Emacs.
 
^ Also, people shouldn't be laughing all that hard because .... bandwidth! :)
 
So, I'm trying to speed up a single threaded std::sort, by partitioning it to 4 parts, and pthread the different partitions to std::sort. The single-threaded is always quicker though from 5000 elements to 15,000,000 elements Any ideas why?
 
@Zoidberg, confirmed. They don't work at all.
 
12:54 AM
I presume the general ridicule mumble incident was around 21:30 CEST (judging from the graph)
 
user142019
I wish every program everywhere used Vim keybindings for text fields.
 
@Zoidberg That would be a good start.
 
user142019
And modal.
 
@CaptainGiraffe Parititioning is not cheap enough, and extra copying
 
The threads are confirmed to run on all 4 cores, by system monitor. The threaded 4-cpu-bound is consistently about 30% slower.
 
user142019
12:55 AM
Just make a little Vim of every text field. :)
 
@CaptainGiraffe Consider just chunking the input and merging the result
 
@sehe std::partition is in place
 
@CaptainGiraffe So what?
 
user142019
Ik ga slapen.
 
The elements surely don't stay in their place, or there would be no partitioning
 
12:56 AM
@sehe merge would be costly in comparison
 
Don't fall asleep now
that would be a waste of time
 
@sehe same memory, no memory overhead
 
@CaptainGiraffe Nope. Not in comparison. Anyways, you haven't compared it. :)
Also, merging can be done 'streaming' / on demand. Depending on the consumer of course
 
user142019
@sehe Jij slaapt ook nooit.
 
@Zoidberg Niet genoeg, nee
 
user142019
12:57 AM
Waarom niet. Ga slapen.
 
@CaptainGiraffe Well, I didn't say there was memory overhead. I said "extra copying"
@Zoidberg :)
 
@sehe This is all done with random iterators, an istream iterator would be horrible for performance. std::sort has std::partition as a favorite sorting method.
 
user142019
Haha I just got a buffer overflow in Haskell due to typo.
 
Wait wat. Were you speaking afrikaans?
 
@Jueecy Nederlands
 
user142019
12:59 AM
@Jueecy Very close.
 
user142019
We speak European.
 
I'm sorry. Google translate is stupid.
 
@CaptainGiraffe Again, it depends on the consumer. And only that.
@CaptainGiraffe Who said istream_iterator?
 
@CaptainGiraffe About sort using partition: interesting.
 
user142019
1:00 AM
I need a simple messaging protocol.
 
user142019
I thought of 32-bit BE integer describing payload length followed by payload.
 
Could it be that sorting is so memory fetch intensive that cpu ops are negligible and memory fetch is dominating; so the extra cpu power is not helpful?
 
user142019
The payload could be in Erlang external term format, which is quite nice.
 
@CaptainGiraffe Could well be - You measured it and it was slower. If you say (and I'll take your word for it) that the initial partioning step(s) is basically what the sort implementation would do anyway, then, yeah.
 
user142019
1:04 AM
Or just a custom format really.
 
What do you need this for, @CaptainGiraffe? How does the end result get consumed? Does it get searched? Does it require random access? Does it get written somewhere? Are the top-n results important?
Ow. I got an upvote from somebody. @Jueecy thx I guess :)
 
@sehe Now, ill flip on the -fopenmp and be blown away. It is a challenge actually, I naively though that I would speed up std::sort by doing four equal chunks and threading them (to different cores).
 
user142019
ok.
 
user142019
Sleeptime.
 
@sehe just a vector<double> with rand()s in it
 
user142019
1:06 AM
See you tomorrow guyz.
 
@CaptainGiraffe Some algorithms aren't easily parallelized
@CaptainGiraffe I was talking about the end result. I defines what you can do with the final steps
 
@sehe, np.
 
@sehe just cpu time for an input set
 
@Zoidberg, cya.
 
@sehe this should have a linear improvement per core
 
1:08 AM
Sleeptime for me too.
Cya lads.
 
@CaptainGiraffe The thing is, with sorts, is to partition them until they fit into the L1 cache. Then sort inplace, then merge.
 
@CaptainGiraffe Darn. You don't answer the question :) I'm going to assume you wanted inplace results, so random access too. This is, in some ways, the worst case
@Jueecy Night
 
@MartinJames Not a bad idea
@sehe My apologies, yes, I start out with a vector, so a minimum of copies would be good =) and yes Random access.
@MartinJames I'm starting to think std::sort does this based on my timing results.
 
@CaptainGiraffe it wasn't about the number of copies. It was about the minimum requirements on output :)
 
Maybe...
 
1:13 AM
@sehe Oh, input is random, output: the vector is sorted.
 
@CaptainGiraffe format, data layout. Nevermind, we're talking different languages here.
Quick benchmark:
#include <cstdlib>
#include <vector>
#include <algorithm>

int main()
{
    std::vector<int> v(1ul<<27);
    std::generate(begin(v), end(v), rand);
    std::sort(begin(v), end(v));
}
 
@sehe exactly
well maybe not <<27 but you are spot on
 
g++ -std=c++0x -g -O3 -I ~/custom/boost/ -fopenmp -march=native test.cpp -o test

real	0m12.046s
user	0m11.881s
sys	0m0.144s

g++ -std=c++0x -g -O3 -I ~/custom/boost/ -fopenmp -D_GLIBCXX_PARALLEL -march=native test.cpp -o test

real	0m34.034s
user	0m30.438s
sys	3m40.062s
 
The std::sort gets timed,
 
You can extrapolate from that.
 
1:16 AM
Not sure I can.
 
@CaptainGiraffe You're not doing it wrong, sorting doesn't scale nicely over cores
02:14 AM/tmp % export OMP_NUM_THREADS=2
02:16 AM/tmp % make -B && time ./test
g++ -std=c++0x -g -O3 -I ~/custom/boost/ -fopenmp -D_GLIBCXX_PARALLEL -march=native test.cpp -o test

real	0m30.168s
user	0m33.502s
sys	0m26.846s
 
@sehe Thats what I have to take from this. Thanks.
The wiki on sorting provides plenty of desinformation here.
 
You can take advantage of multiple cores iff you have some lenience at the final stage. The reintegration is likely what makes this the slowest
02:16 AM/tmp % export OMP_NUM_THREADS=1
02:17 AM/tmp % make -B && time ./test
g++ -std=c++0x -g -O3 -I ~/custom/boost/ -fopenmp -D_GLIBCXX_PARALLEL -march=native test.cpp -o test

real	0m11.423s
user	0m11.273s
sys	0m0.136s
 
Still curious about @MartinJames L1 seeking optimisations though
@sehe not sure what you mean about the final stage: The last thread should finish before we check the vector to be sorted,
 
Some guy from a blog I follow, optimized the crap out of a software occlusion culling demo written by Intel.
13ms down to 4.3ms thats 67% less :)
 
1:21 AM
@CaptainGiraffe If you can somehow basically call "done" when each of the 4 main parts are sorted (preferrably without pre-partitioning) then you can start to see big wins
 
@sehe All of my ideas about basically done involves thread->join()
 
@CaptainGiraffe Oh dear :((
 
@CaptainGiraffe irrelevant. It's not how you end. It's what you end with
 
Pool ALL the sort tasks.
 
@sehe I'm missing something here. Please let me indulge you; Warning nsfw. ideone.com/UCLy9d
 
user1357851
1:36 AM
whenever I see that duck, I imagine some giant fish or snake would come from beneath and swallow the fluffy. Yes I am talking about that duck avatar :x
 
@CaptainGiraffe Ooh. Righty. NSFW indeed
About the part you're missing. Lemme see if I can whip it up
@CaptainGiraffe ideone.com/dcNhPI
02:41 AM/tmp % make -B && time ./test
g++ -std=c++0x -g -O3 -I ~/custom/boost/ -march=native test.cpp -o test -lpthread

real	0m6.679s
user	0m11.381s
sys	0m0.180s
See? That's quicker.
 
Hello, World!
 
user1357851
y such a good mood 2day?
 
y not?
 
@CaptainGiraffe you'll see now, that it doesn't scale: ideone.com/3Jqwpc
02:43 AM/tmp % make -B && time ./test
g++ -std=c++0x -g -O3 -I ~/custom/boost/ -march=native test.cpp -o test -lpthread

real	0m5.191s
user	0m12.601s
sys	0m0.244s
 
1:50 AM
@Telkitty Who's in a good mood?
 
That's with 4 threads, but only marginally quicker. The reason, of course, being the increased steps to merge:
std::inplace_merge(f,f+chunk*1,f+chunk*2);
std::inplace_merge(f+chunk*2,f+chunk*3,l);
std::inplace_merge(f,f+chunk*2,l);
So, that was my point all along: if you don't have to physically merge them, you'd be in a far better position
 
user1357851
@Code-Guru no cruel world 2day?
 
@Telkitty Nah, just World today ;-)
 
user1357851
I wonder I would score 0 on EQ scale ... I occasionally swoop people with my sharp claws without intentionally doing it
 
EQ? EverQuest? Equalizer?
 
user1357851
1:55 AM
emotional quote
 
user1357851
Emotional intelligence (EI) is the ability to identify, assess, and control the emotions of oneself, of others, and of groups. It can be divided into ability EI and trait EI. Ability EI is usually measured using maximum performance tests and has stronger relationships with traditional intelligence, whereas trait EI is usually measured using self-report questionnaires and has stronger relationships with personality. Criticisms have centered on whether EI is a real intelligence and whether it has incremental validity over IQ and the Big Five personality traits. History The earliest ro...
 
@CaptainGiraffe in case you didn't lose interest yet, here's proof that the sorted result is actually equivalent: ideone.com/eLZVdW (the calculated hash of the result is shown in the notes)
 
@Telkitty Im in the negative
 
user1357851
<3
 
user1357851
well quoting the article from wiki:
 
user1357851
2:07 AM
This led researchers Cote and Miners to offer a compensatory model between EI and IQ, that posits that the association between EI and job performance becomes more positive as cognitive intelligence decreases, an idea first proposed in the context of academic performance . The results of the former study supported the compensatory model: employees with low IQ get higher task performance and organizational citizenship behavior directed at the organization, the higher their EI.
 
@CatPlusPlus Cat-Saan, are you awake?
 
apparently not
 
@Telkitty im not sure i get what theyre getting it
 
user1357851
They are basically say what we already know - genius aren't good with social relationships
 
user1357851
Not surprising we all spend too much time with the machines (PC) than with real humans :p
 
2:26 AM
Don't fall asleep now
that would be a waste of time
 
Richard looks awful on this picture
 
mwhahah...close question queue time...
gah...I put up posters on the local university campus to advertise as a math tutor. I get a lot of requests for stats...guess I need to brush up on that sigh
algebra and calc are a piece of cake. Most of the stuff from my stats class is covered in cobwebs in the attic of my mind.
 
Should've specified algebra and calc :P
 
I can tutor stats...just not my preferred subject heh
whoa...I'm dling and installing an upgrade to the Android SDK...and the free space keeps getting bigger...how does that work?
 
2:43 AM
:3c
You're being lied to.
Question: does std have any kind of ptr class?
Just like, raw ptr ?
'Cause if not, I'm going to typedef ubiquitous_ptr ptr.
And then I'm going to typedef shared_ptr copy_ptr.
 
typedef doesn't work on templates
and VC++ doesn't support using type alias
 
using namespace std; is a using directive.
 
I forgot what it's called now :(
 
Alias template presumably.
 
I was essentially renaming the class.
But, there's no ptr type, right?
 
2:50 AM
no
 
I mean, I think the default ptr type should be unique_ptr
So I'm basically going to do that in my engine.
ptr<Sexiness>
 
@ThePhD I guess it was cleaning up some temp files
 
you can do template<typename T> using ptr = T* for raw pointers
 
I'll use T* for raw pointers.
And ptr<T> for reuglar pointers.
and counted_ptr<T> for shared_ptr.
Or maybe not counted.
Probably a better word.
 
how about shared_ptr
 
2:52 AM
Fiiine
I'll leave it shared_ptr.
 
Does VC++ support it?
 
Support wat?
 
I don't remember it working in November CTP
 
Oh, alias tempalteing nonsense?
 
yes
 
2:53 AM
Nope.
 
I got the new CTP but I don't know if that one does either, doubt it
 
It's funny how nobody ever decided to just name their pointer class pointer or ptr.
 
? ptr is pretty common
 
I have never seen it.
 
does anyone here know anything about DFP ads?
 
I meant as a class name.
 
ah.
People make class pointers?
 
You've... lost me now.
 
I've never seen a raw pointer class
 
I have, once.
In a company codebase.
Thankfully I am not working there.
 
2:57 AM
Thinking about it now it doesn't seem so bad
shrug rather than deleting it you can just use RAII to hide the delete calls.
 
That's the whole point.
 
yeah well I only used pointers for hardcoded ones.
looks good
 
Wat.
 
?
 
Oh, web stuff.
Fuck if I understand web stuff.
 
3:05 AM
not hard compared to other stuff imo
 
It's really confusing though.
I'm never sure if I'm making a static page for viewing or a dynamic application or maybe it's a mix of both but not really...?
 
o.o
 
And there's all these little nuances that don't make sense.
I understand things being different between Windows and Linux; they're completely different operating systems.
But things being different between the web browsers on the same computer??
Baffles me.
And some support this, others don't, it's...
Eugh...
Even hardware plays nicer than Web Browsers.
 
gah...I need a bigger thumb drive...
guess I'll have to break down and reformat the 16 gig that has a ext4 file system on it...
 
3:28 AM
@CaptainGiraffe I've lost myself a bit in this. Here's a completely generalized program, that can do stuff in various NUMBEROFCHUNKS that are to be sorted in parallel, then works out a merge-schedule to merge the results in-place. gist.github.com/5131685.git
I've included the benchmarks scripts for each of the three methods (single threaded, using threads and using futures). Here's one of the log-files to give you an idea:
----- N=1
Sorting only took 10.033 seconds
Sorting+merging took 10.033 seconds
Verification hash: 4462128812807805993
----- N=2
Sorting only took 5.402 seconds
0, 1, 2
Sorting+merging took 5.994 seconds
Verification hash: 4462128812807805993
----- N=4
Sorting only took 2.889 seconds
0, 1, 2
2, 3, 4
0, 2, 4
Sorting+merging took 4.019 seconds
Verification hash: 4462128812807805993
----- N=8
Sorting only took 1.622 seconds
0, 1, 2
2, 3, 4
4, 5, 6
6, 7, 8
0, 2, 4
4, 6, 8
0, 4, 8
Sorting+merging took 3.389 seconds
 
Hm.
Almost looks like diminishing returns.
 
As you see, the sorting of 'chunks' scales nearly linearly (not fully though). It's the merging that gets more complex each time
@ThePhD "Almost"? Obviously does
 
Well, for the sorting.
the sorting + merging is definitely diminishing returns.
Looks like 4 cores is the optima?
Hell, just 2 would be good too.
 
@ThePhD Depends on amount of data, obviously.
And on the consumer pattern:
3 hours ago, by sehe
Also, merging can be done 'streaming' / on demand. Depending on the consumer of course
 
user1357851
sehe, I have this awesome idea for this superb app.
 
3:38 AM
Anyways, off to bed here
@Telkitty It'll have to wait :)
 
user1357851
I am going to make an app with which obese, aggressive, older grannies get to stalk young boys ... like the ones on this lounge
 
o_O
 
@Telkitty sweet!
 
@sehe Good night!
 
user1357851
@Code-Guru I know I know ^_^
 
3:40 AM
as long as they have big...ya know
 
@Telkitty awesome, maybe ill get some action
 
user1357851
user image
2
 
I like seeing the code frequency going up. Makes me feel like I'm accomplishing something...
 
4:06 AM
 
@Telkitty young boys?
I think you got something wrong.
 
@EtiennedeMartel Why u always up so late?
 
Why nut?
(see that pun?)
(It sucked)
 
(Harder than I would suck, yeah)
(But it was a good try?)
Also
for ( auto& pass : geometryshader ) {

}
Ahhh, so sexy~
iterating over passes in a shader has never been so simple~~
 
0
A: How to have virtual functions that returns different types based on the class to which it belongs without including dummy implementation in Base?

NirmalGeoI guess there is one problem in your code. If it is a Pure virtual function, you cannot create an object of the class base. But on the other hand to solve your problem you can try out using templates, something like below. #include <iostream> class Base{ public: Base(){} virtual ~...

 
4:16 AM
Huh... I got 2 new badges today
 
user1357851
4:48 AM
 
5:05 AM
user image
4
^^ interesting chat flags...
That said, I'm off to bed early tonight.
 
user1357851
5:15 AM
@ScottW laterz
 
5:37 AM
@DomagojPandĹža I just read a shitload of stuff about LinkedLists and Deferred Rendering and OIT. It sounds diesel, horrible to implement and I want my Mommy. ;~;
Niiight.
 

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