« first day (919 days earlier)      last day (4023 days later) » 

7:00 PM
@EvgenyPanasyuk Eh.
 
@rubenvb As far as naming convention goes I have e.g. RemovePointer and so on.
 
@EvgenyPanasyuk That's not a function object. It's just using a struct as a namespace.
 
Ell
@EvgenyPanasyuk should the del be operator()?
 
Any news on X720 or whatever it's called?
 
@EtiennedeMartel yes, I showed two usages : chat.stackoverflow.com/transcript/message/8999407#8999407 , one of them is function object
 
7:01 PM
@EvgenyPanasyuk Yeah, but why not operator()?
 
@EtiennedeMartel I used operator in second example. it can't be static
 
Alright, then, why not a free standing function?
 
@EtiennedeMartel because we need type
 
What type?
 
user142019
int2Addr# :: Int# -> Addr#Source Coerce directly from int to address. Strongly deprecated.
 
user142019
7:03 PM
lolwot what does strongly deprecated mean?
 
template type parameter to his GlId class template
 
Hmmm.
The whole design is so fucking weird.
It's like a poor man's unique_ptr.
 
Smart pointers are for disabled people who don't understand the goodness of PHP, Java and singletons.
4
 
user142019
Oh wait I should use IntPtr døh.
 
@Zoidberg At least it's not weakly deprecated...
 
Ell
7:05 PM
I think I'll go with GlId, GlIds and bind. Its fastest, right?
 
@LucDanton So CamelCase for the aliases and snake_case for the structs IIUYC?
 
@rubenvb Ya. In the same namespace.
 
hmm, that looks shabby IMO.
 
@EtiennedeMartel I don't like solving every problem with unique_ptr or shared_ptr. it is silly to use shared_ptr<FILE>(fp, fclose) (like some people do)
 
Maybe something like namespace alias. Then you could using namespace kiss::alias
 
7:08 PM
PascalCase appears a lot in TMP. I think that's the inspiration, although I got the idea from Bjarne & associate.
 
@EvgenyPanasyuk Yeah, but not unique_ptr.
 
or kiss::types::alias
I've not decided on subnamespaces yet.
 
shared_ptr is a highly specialized tool. unique_ptr is not.
 
They seem like overkill.
 
It's what you should always use unless you're implementing some low level data structure, or you really need shared ownership..
 
7:10 PM
@EtiennedeMartel My point is that sometime you should write your own RAII wrappers, even if it is possible to do something with unique_ptr instead.
 
Oh, and by the way, this question is not too localized IMHO, but a common problem:
-1
Q: Installing Haskell Platform overrides gcc location in system PATH

Games BrainiacI am running the latest version of MinGW GCC 4.7.2, and it was working fine with -std=c++11 before I installed Haskell using Haskell Platform. Please take a look at this: For some reason, the GCC went back to 4.5.2, after installing Haskell, I re-installed it, with version 4.7.2, but its still...

 
Would you fclose with unique_ptr?
 
@EvgenyPanasyuk Yes.
 
unique_ptr<thread, void(*)(thread*)> p(new thread(...), [](thread* t){ unique_ptr<thread> p(t); t->join(); }); -- ftw.
 
@EvgenyPanasyuk Behold, the Rule of Zero.
 
7:10 PM
@LucDanton Why not just normal File wrapper?
 
@EvgenyPanasyuk Because reinventing the wheel sucks?
 
You're seriously asking me why I won't just use the one-liner make_unique(raw = f, deleter = std::fclose) when I need it?
 
@LucDanton Eh, C++ has named parameters?
 
@LucDanton for a class member?
 
@EtiennedeMartel No.
 
7:12 PM
Ah.
@Abyx And....?
 
@EtiennedeMartel and you can't write struct X { auto m = make_unique(...); };
 
I hate these damn pills
 
@Abyx Why would you do that?
 
@EtiennedeMartel to use make_unique, instead of unique_ptr<FILE, void(*)(FILE*)>
 
7:14 PM
@Abyx you're not specifying any type there whatsoever. C++ is strongly typed. You need a type somewhere deducible or visible.
 
@Abyx Yeah, but I mean, why not use a constructor?
Oh, right.
I missed your point.
 
@LucDanton I am asking why you would scatter that make_unique(fopen(filename,openmode),fclose) across code base instead of having RAII wrapper which would allow to write File(filename,openmode)?
 
Oh hey, that's a different question.
Ask the right question the first time around.
 
@EvgenyPanasyuk Then make a function that returns a std::unique_ptr.
 
The answer to that question is see link to RO0 above.
 
7:16 PM
@EvgenyPanasyuk Or, if you really want a File class, make it wrap a std::unique_ptr. Bam bam.
 
@EtiennedeMartel ok, and how function which would need to accept file would look like?
 
file& presumably.
 
@EvgenyPanasyuk Typedef it.
 
structs and classes are soooooo 2000
 
I still don't get what your point is, and why you are so keen on reinventing the wheel.
 
7:18 PM
@EtiennedeMartel ok, now add one small method to that "type".
 
Damn, The Final Bosman is only every 2 weeks. :(
 
2 mins ago, by Etienne de Martel
@EvgenyPanasyuk Or, if you really want a File class, make it wrap a std::unique_ptr. Bam bam.
 
@EvgenyPanasyuk Alright, alright. But your File class should still use unique_ptr underneath.
 
It's a class. It has operations on it.
 
yay
my ipad just got 20% cooler with octocat and razer stickers
 
@EvgenyPanasyuk I apologise for my tone. I have noticed it is unwarranted.
I need coffee.
 
So it's 4 bytes more..
Amazing.
 
When going RO0 with std::unique_ptr I tend to have a deleter nested class.
 
oh noes 4 bytes. A kitten just died.
 
@EvgenyPanasyuk Your original suggestion with static member functions will need to be expanded so as to explain how it will not suffer from the same.
 
7:29 PM
37 mins ago, by Evgeny Panasyuk
@Ell and, I think you don't need to store and pass deleter to constructor - just use template type parameter ( like deleter_t::del(glHandle) or deleter_t()(glHandle) ).
 
Can't pass functions as type parameters.
 
@LucDanton what do you want to say?
 
How does your solution work?
 
he had template <typename deleter_t> class GlId
 
Xeo
Btw, imma write a proposal to synonymize operator(T) with operator()(T) >_>"
 
7:32 PM
@Xeo yes, I thought about it
 
@EvgenyPanasyuk So, it's a micro optimization issue now?
 
@EtiennedeMartel no, additional space for deleter is just one of aspects
 
I still don't see how your solution is superior in any way.
 
Xeo
What's being discussed here anyways?
Is it something I wont to join in on?
 
@Xeo I have no idea.
 
7:34 PM
@EvgenyPanasyuk Stuffing all the deleter as static members and passing the type to that is a non-solution.
 
@Xeo you may join to
26 mins ago, by Evgeny Panasyuk
@EtiennedeMartel I don't like solving every problem with unique_ptr or shared_ptr. it is silly to use shared_ptr<FILE>(fp, fclose) (like some people do)
 
This is a silly discussion. unique_ptr ftw!
 
Xeo
Okay, but... the case with FILE is exactly one of the things those smart pointers suppert deleters for...
 
auto f = annex::make_unique(annex::raw = std::fopen("main.cpp", "r")
        , annex::deleter = [](FILE* p) { std::fclose(p); } );
static_assert( sizeof f == sizeof(FILE*), "!" );
Not triggered.
 
Xeo
shoo, lambdas.
 
7:37 PM
lambda's yay!
 
user142019
lol sizeof without parentheses.
 
I actually don't do that though, can't be bothered, in part because I don't want to name the pointer, and I don't care for the additional size. OTOH I'd gladly do []std::fclose.
 
Xeo
<3
 
9 mins ago, by Luc Danton
When going RO0 with std::unique_ptr I tend to have a deleter nested class.
 
@Xeo My point is that having stand-alone type File (which may use anything under the hood) would be much better, than scattering unique_ptr'ed file across project's code base.
 
7:38 PM
That point has been addressed already of course. Etienne providing the mandatory link to RO0.
 
user142019
using file = std::unique_ptr<FILE, file_deleter>;
 
user142019
:>
 
Xeo
Much better how? Also, std::fstream?
 
@Zoidberg type is still unique_ptr<somthing>
 
@EvgenyPanasyuk You completely ignored my point about the rule of zero.
 
Xeo
7:39 PM
And the problem is exactly where?
 
OK unique_ptr is bad. Please go use C with classes.
Or C without classes, as classes imply RAII.
please go use C
 
Xeo
Was he discussing this whole time without actual arguments or is that just now?
 
@rubenvb I haven't said that it is bad
@rubenvb what you are sayng is stuipid
 
@Xeo It's been like that the whole time.
 
Oh look, someone took me seriously
 
Xeo
7:40 PM
Okay, I don't want to join in anymore.
 
@rubenvb if you don't have anything valuable to say, just gtfo
 
@EvgenyPanasyuk lol you're funny.
 
Xeo
You have fun alone, I'll go watch some animu.
 
@EvgenyPanasyuk Read that, then we'll talk.
 
and we've come full circle
 
7:41 PM
@Xeo Neither.
 
Otherwise, I can't be bothered to talk with you.
 
It's a discussion that is appropriate for ca. 1998 though.
 
Xeo
Y'know, from his answers and input on some discussions, he seemed like a nice guy.
 
@rubenvb FTR, I've yet to use unique_ptr in real code. Do you honestly believe that means I'm strictly a C with classes coder?
 
@Xeo Yes. I'm cranky this morning :(
 
7:42 PM
@Xeo His profile says he's specialized in, amongst other things, "optimization".
 
Xeo
Well same goes for @Mysticial :P
 
Xeo
BE SUMMONED!
I'm a wizard, yeah!
 
@JerryCoffin no one forces you to use unique_ptr... but still, that's weird IMHO. You call new/delete all by yourself?
 
@JerryCoffin You're old, though.
 
7:42 PM
For what have thy summon me for?
 
speak of the devil
 
Xeo
59 secs ago, by Etienne de Martel
@Xeo His profile says he's specialized in, amongst other things, "optimization".
 
@EtiennedeMartel And you say that CatPlusPlus is mean? >:(
 
@Xeo Response chain drops after that. Who are we talking about?
 
@LucDanton J'assume entièrement mon hypocrisie.
@Mysticial That Evgeny guy.
 
7:44 PM
there are non Canadians here that can understand basic French you know.
 
Xeo
@rubenvb Jerry's above memory.
 
@rubenvb Call new and delete? Not often enough to notice, anyway.
 
@EtiennedeMartel ah
 
Woo, almost spilled my coffee all over my desk.
That was a close call.
 
@EtiennedeMartel get a waterproof laptop
 
7:45 PM
Ergh, laptops.
 
those with that cool coating so you can use it in the pool.
those that unfortunately do not exist yet :(
 
@EtiennedeMartel I am -- but does that say anything about my code?
 
@JerryCoffin It must be aaaaancient
 
@EtiennedeMartel He uses unique_ptr within class module, not as using module = unqiue_ptr<foo>. And that is exactly I am talking about:
9 mins ago, by Evgeny Panasyuk
@Xeo My point is that having stand-alone type File (which may use anything under the hood) would be much better, than scattering unique_ptr'ed file across project's code base.
"which may use anything under the hood"
 
Is it just me or are the C and C++ tags the ones with the most downvotes on SO?
 
7:49 PM
They are full of crap, and we don't like crap.
Hi.
 
Soup.
 
True enough.
 
@FredOverflow What do you mean by "value" then? (just in case it was unclear somehow, std::equal(std::begin(first_expression), std::end(first_expression), std::begin(second_expression)) is false)
 
@EvgenyPanasyuk Then your point switched somewhere along the line with no acknowledgement of that.
40 mins ago, by Evgeny Panasyuk
@EtiennedeMartel My point is that sometime you should write your own RAII wrappers, even if it is possible to do something with unique_ptr instead.
 
@rubenvb You think? Not meaning to be nasty, but I'd be curious to hear where I should be using unique_ptr. Feel free to start with any of these: stackoverflow.com/…
 
7:50 PM
Because at one point it was that.
 
@EtiennedeMartel I meant that class File (which is RAII wrapper) is better then using File = unique_ptr<foo>
 
@JerryCoffin you only really need pointers when storing a set of Base*s.
 
@EvgenyPanasyuk You were talking about "RAII wrappers", i.e. objects that manage a resource.
 
short hello world programs aren't gonna need any pointers at all, obviously.
 
Which means you probably don't use the same terminology as everyone else.
 
7:52 PM
Just thinking about it: would global std::rbegin and std::rend functions have any actual use?
 
@EtiennedeMartel Perhaps I was not clear enough, sorry.
 
@Morwenn For reverse range-based for, sure.
 
Xeo
@EtiennedeMartel heh
rof(auto e : c)?
 
@EtiennedeMartel Well, I mean besides that one :p
 
@JerryCoffin but this one definitely needs more unique_ptr
4
A: variable 'fstream grabpass' has initializer but incomplete type

Jerry CoffinYou need to add #include <fstream>. At a guess, <iostream> is probably including a declaration of fstream (most like via <iosfwd>), but not a definition, so it has incomplete type when you try to define an object of that type.

 
7:53 PM
@rubenvb Ah, so the fact that I rarely use inheritance makes my code ancient? Seems strange, given that my ancient code actually used inheritance a lot more.
 
@JerryCoffin I never implied anything of the kind.
 
Xeo
@Morwenn Well, the same actual use as std::begin and std::end - being generic.
 
for (auto i: reversed({1, 2, 3}) )... would be lamost pythonic.
 
@Morwenn Yes. Same as cbegin/cend: you could provide a default behaviour (in terms of std::reverse_iterator in that case. Makes it more convenient for classes that have begin/end members, writing the others is noisy boilerplate.
 
You're deducing stuff I would be thinking if I knew as much about your code as you do, which I don't.
 
Xeo
7:54 PM
Anybody can provide an rbegin and rend overload in their namespace
And what Luc says
 
And did anyone bother to make that a proposal yet?
 
@Morwenn That is, however, a whole different world.
 
Having to provide begin and end in detail namespaces as well is annoying.
 
Inheritance is a paradigm you can use. Just like unique_ptr is a class template you could use.
 
@R.MartinhoFernandes I don't do that if I can get away with partial ordering.
 
Xeo
7:55 PM
Btw robot, about Puppy's issue with fwdit3 = fwdit1++; being its own kind of range, how would you do that for RTL?
 
(I have noticed you can't do that in one Taussig header, yeah.)
 
@Xeo I'm not sure I understand the problem.
 
@rubenvb I have to admit, at this point I'm a little uncertain of what you're saying then. On one hand I inferred that you were saying my code must be ancient because I find little or no use for unique_ptr, but then you say unique_ptr applies primarily to what I'd generally think of as ancient code. Where exactly does it fit?
 
Xeo
@R.MartinhoFernandes If you have [fwdit1, fwdit2) and do fwdit3 = fwdit1++;, then [fwdit3, fwdit1) is also a valid range, and it grows as fwdit1 is advanced.
 
7:57 PM
@JerryCoffin I was making fun of your supposed age. Note the extra a's in aaaaancient.
 
@Morwenn On the off chance you're not familiar with Boost.Range, there's that. On the off chance that you are, it sucks and we here have strong opinions against it. There is also a reflector group(?) of the SC working on ranges -- but any result is a long way away. In any case this is very topical in this chat these days.
 
Lounge<C++> Breaking sarcasm since 2010-10-15
^that should be a tagline
 
@rubenvb Yeah right it definitively should be.
I'm sooooooo going to put it up in a sec.
 
lol
 
@LucDanton I already knew about Boost.Range but I'm not at ease with the adaptors syntax. It does not always seem as natural as I would it to be.
 
7:59 PM
@rubenvb Ah, I guess my subtle humor detector must be on the blink today. Oh, but it's still almost Monday morning for me. That would explain it.
 
Xeo
room topic changed to Lounge<C++>: We lost our sarcasm detectors. If you find them, please contact us. [c++] [c++11] [coliru] [no-helpdesk]
 
Guys, have you heard about scope(failure)/scope(success) features for MSVC/GCC/Clang?
 
I hope not.
 
@Xeo hmm, I though mine was more subtle/funny.
 
@Morwenn Aight. But syntax aside, foo | reversed is the exact functionality of reversed(foo).
 
8:00 PM
XD
 
@LucDanton It works in function call syntax as well.
 
@JerryCoffin Dude, what's the time in your area? 15:00?
 
@LucDanton That's true.
 
@EtiennedeMartel 14:00 -- but I figure morning doesn't really start until at least 10:00. :-)
 
@Xeo I'm trying to think of a scenario where you need to do it like that.
 
Xeo
8:01 PM
Ugh, 10pm already.
 
@JerryCoffin Yeah, 10:00 is the time I usually come in at work.
 
I can troll, too
@KonradRudolph - Not nearly enough! We should kill off more children with cheap and dangerous toys inserted in their food. The problem is we are protecting our children from stupidity... let darwin claim his due! — Chad 21 mins ago
@Chad Americans don’t believe in Darwin, they gave that job to the NRA. /out. — Konrad Rudolph 24 secs ago
 
(And so far I'm driving the design based on my needs for ogonek)
 
Xeo
@R.MartinhoFernandes I'm also kinda struggling, but I'm sure there's something. The question itself is still interesting, I think - how do you link two ranges so that you basically have a zipper? With iterators: [it1[it2)it3)
 
Gonna eat some tasty crêpes. See you later guys.
 
8:03 PM
I don't mind if I don't end up with a super generic design; covering real non-trivial uses can be enough.
 
crepes are weird
 
@Crowz Just depends on what you put in.
 
Ohkay
 
@Xeo You don't. You copy it, advance forward, and when you need [it1,it2) you get it with original.before(advanced).
 
Finally made it to Undead Parish
I still don't have any magic to speak of. :D
 
8:04 PM
they're like thin pancakes :(
 
@EtiennedeMartel When I went to an office, I usually showed up between about 10:00 and 11:00. Then we got a COO (or something like that) who was originally from AT&T. Decided to have a staff meeting at 8:00 every day, and for a while was even pushing the idea that everybody should show up in suits and ties every day!
 
@JerryCoffin Oh dear.
 
Xeo
@R.MartinhoFernandes Oh, what does before exactly do?
 
Because we all know how more productive we all are with a suit and a tie.
 
Xeo
8:05 PM
Blergh, suits.
 
@Xeo Given [it1, it3) and [it2, it3), where it2 >= it1, returns [it1, it2).
 
Xeo
Oh. Well, that's the answer then /cc @DeadMG
 
I added that to chop off the graphemes.
 
@EtiennedeMartel Yeah -- I figure a tie reduces circulation to the brain, thereby causing at least temporary stupidity (and in excess, it seems to become permanent).
 
@Xeo I had left and right.
 
(Btw, I'm open to bikeshedding on that one)
 
@JerryCoffin A guy here once told me ties are actually alien parasites that slowly suck all your creativity away.
 
@Morwenn I don't like French food
 
@EtiennedeMartel Obviously wrong -- there's nothing slow about it!
 
@EtiennedeMartel Well, it could be in worse hands.
 
8:09 PM
@R.MartinhoFernandes Eh, I think I'd play with it before commenting.
 
I'm still unsure about how to deal with line breaks.
 
Xeo
@DeadMG left == [it1, it2), right == [it2, it3) (or if it2 > it3, [it3, it2))?
 
@Crowz That is curable (though IMO, the Russians do it (Blini/блины) better.
 
@R.MartinhoFernandes When you considered returning positions?
 
@LucDanton Yeah :S
I don't want to mix the two things; I know it leads to Boost.Range quickly.
 
8:11 PM
What did Andrei say about positions? He hasn't found a need for them?
 
@JerryCoffin eh, I'm also vegetarian, hard to find good food for that in most cultures
 
ISTR to recall that coming up on the range reflector list, let me look it up.
 
@LucDanton Did I do something wrong or has that been dead again for months?
I can hear the crickets.
 
Yeah that's from March. The actually interesting discussion thread.
> I've resisted introducing the notion of position in D's ranges (on the obvious simplicity argument). For the most part I wanted to see how far we can do without it, and add it if really necessary. Turns out the need to add positions failed to materialize.
 
8:13 PM
@Crowz IMO, there's a good reason for that: removing animal products from your diet is a lousy idea.
 
From here.
> This reminds me - on occasion I did feel the need to return r[0 .. 0] or r[r.length .. r.length]. It wasn't of much consequence, for whatever reason. In coding with ranges such needs just don't occur as often.
 
FWIW, the line_break_opportunities function works well with the same interface as the others (S<char32> -> S<S<char32>> or something). But the positions thing is more for semantic reasons.
 
Ya I recall that.
 
But maybe I can survive with before.
 
Something that may help make a choice -- do you have random-access sequences, and can you slice them? What's the interface for that?
Fine, I'll cave in. string_view is useful.
 
8:17 PM
@LucDanton So far, no. I don't think I'll need them. (bidi, yes, for things in the spirit of find_last_of)
I've mentioned before how I find random-access useless.
 
Can I use positions for something else than RA slicing?
 
No; if I add them, I don't intend to provide much more functionality than chopping slices out of existing sequences.
 
It's really about the tandem of features.
 
Greetings. Anybody here use and understand PugiXML pretty well?
 
@RubyLovely you posted bad answers. It's that simple. It didn't answer the question. It wasted people's time reading it. The downvotes were not "for no reason" - they were because your answer was bad. If you continue posting bad answers and your reputation hits 0 (actually 1), it will accurately tell other users to ignore your answers because they're probably wrong or useless, and you should not answer further questions poorly. The way to solve this is to improve the quality of your answers. The comments on the downvoted answer explain how. Follow their advice. — djechlin 4 mins ago
 
8:20 PM
I have to concatenate bits, 11 and 0110. Doing this I would get 110110 which is 54 in decimal. I found out it is possible to do it by left shifting the first one by 4 and then summing them. Could someone tell me why this works?
 
So I'm really leaning towards a sequence of opportunities right now. Keeping in mind I have zero domain knowledge when it comes to that.
 
^^ Beautifully blunt
 
Primary use case for the lbo function goes like this: you start at the beginning of the line. Save that position. Iterate from opportunity to opportunity until you find the one you want (say, fill a screen line). Chop the line off using those positions.
 
@TonyTheLion Yeah, RPG-7s aren't that big.
 
8:21 PM
HAHAHAH
 
It's obvious the raptor was unarmed.
 
@R.MartinhoFernandes Can't last op be 'break the sequence of results once you have enough'?
(At least for the example you brought up.)
 
// I guess something like this could work
// (I know for sure it can't compile as is but it illustrates the idea; I don't want to work the details out now)
auto lbo = line_break_opportunities(seq);
auto remaining = seq::find(lbo, full_line_predicate);
auto line = seq.before(remaining);
 
@Xeo I guess main reason was to support deletion from different heaps.
 
@R.MartinhoFernandes Yup. If you later on want to provide something similar to 'seq of positions' there's the problem of 'overloading' the interface/finding an name for that operation I suppose.
 
8:27 PM
I think I'll roll with it for now. There is still a lot of time until I freeze the API for 1.0.0.
 
GUIS
I think I found them!
 
Who did you find?
 
The detectors, obviously
 
They were on sale via craigslist. Strangely, no one wanted to have them. So I bargained to take them of the seller - a symbolical amount :/
(ohai)
@R.MartinhoFernandes Green. Lime-green.
 
8:33 PM
I'm gonna have some tea and go to sleep. Ogonek does not compile right now but screw it; I'm tired enough to sleep with broken code around.
 
Xeo
g'night
 
@R.MartinhoFernandes G'night...or maybe H'night. Who knows.
 
@KonradRudolph OUCH. Too much truth in trolling
 
Xeo
> Standard C++ gets you less than 1% of the performance possible in modern hardware
I wonder if he's thinking of GPGPU, but from the sentences before that, it doesn't seem like it.
 
@Xeo He is.
 
Xeo
8:39 PM
> I write a huge amount of code where I'm trying to fit the algorithm into the number of registers I have - to keep my buffers small enough so I can stay in L1 and out of main memory. I have to know how to use memory barriers or my tasks can't efficiently communicate. I keep track of how much I can execute speculatively during a failed branch prediction.
That doesn't sound like GPGPU
 
@Xeo 1%? That's a strange number.
 
It's not, really. Percentages are common and 1 is the first positive natural number, which is naturally ubiquitous in counting. Hence, 1% might be the most unstrange combination one could think of, especially given a mental deficiency that would, e.g., prevent more advanced counting.
 
@sehe I like your humor.
 
:)
 
It's even more deadpan than a kitchen in the middle of a cemetery.
 
8:45 PM
I'd guess he's looking at a combination of factors, most of which he's alluded to above. I don't think he's saying standard C++ makes it impossible to achieve better than 1% of potential performance, only that to do much better than that, you need to get non-portable (e.g., use the GPU, take caching and memory organization into account, use SSE intrinsics, etc.)
 
@EtiennedeMartel Zing
 
Deadpan?
 
Hey if I use strtok() in combination with strcpy() will a null character automatically be attached to my token?
 
Another term to google!
 
@sehe In case anybody might take that seriously, I'll point out that if Sean Parent has mental deficiencies, they must be pretty minor ones. To put things in perspective, when they were both at Adobe, he was Alex Stepanov's boss...
 
8:47 PM
@JerryCoffin Which is probably still a faaaaaaaaaaaaaaaaaar cry from the truth for all but the most specialist applications
 
Xeo
@Vlad drop those algorithms
 
@JerryCoffin :) I have no clue as to the context of that number, let alone the thread. However, I can tell you this: "Standard C++ gets you less than 1% of the performance possible in modern hardware" is a ludicrous claim to make.
 
@sehe Sean has spent a lot of time at Adobe, so for a lot of what he's worked on, I'd guess using the GPU is huge.
 
@JerryCoffin That explains a bit. (Still think it's a ludicrous claim. Making the claim like that weakens his case, in that it is an easy target for criticism. Also, "For my business if I can't light up the machine a competitor certainly will" tells me he doesn't need C++, but he needs special purpose assembly/compilers. Always. C++ will never be able to keep up.
 
Xeo
8:49 PM
depends entirely in what he worked on, no?
 
Hm.
I need to have a container which orders things by a cost / priority value (an integer).
is that what std::priority_queue is for?
 
Yes
 
It looks like someone answered their own question with someone else post from a mailing list: stackoverflow.com/questions/16156130/…
 
Xeo
@JerryCoffin I mean, looking at Flash and Reader...
 
It's okay to answer your own questions usually but.. that's just weird.
 
8:52 PM
Okay. So I think std::priority_queue<std::pair<int, int>> threadpriorityindices; is a good choice then. :D
 
Xeo
you may want to make your heap yourself if you want to iterate it
since priority_queue doesn't have that
 
@Rapptz Seems like it is a bit wrong
 
@ThePhD Yes and no -- it doesn't maintain everything in order, but does let you get the lowest (or highest) cost/priority item at any time.
 
Sounds good to me. :D
 
@ThePhD Yes, for things like thread scheduling, where you just want to know "what's the next one I should schedule?", it's one of the best choices available.
 
8:58 PM
Shallots ftw!
 
@Xeo I prefer to look at them as rarely as possible, thank you.
 

« first day (919 days earlier)      last day (4023 days later) »