« first day (691 days earlier)      last day (4243 days later) » 

5:00 PM
One question still remains. The flushing-thread needs to be made aware that the queue has been updated. I can implement this with condition_variable. That would require a condition variable plus a mutex and lock at the consumer side. This is not a problem since I only need to eliminate the lock at the producer side. The other solution would be to use a while loop with sleep.
Both work, but the solution that uses a condition variable seems cleaner.
 
@StackedCrooked Meh, while() with sleep() is no bueno.
 
Also the mutex comes in handy. I can lock it in the destructor to delay destruction until consummation has finished.
 
the concurrent queue is completely non-blocking
 
@DeadMG How does it handle reallocation?
Or is it fixed size?
 
unbounded
as for reallocation, I have no idea. I think they're mostly linked lists under the hood anyway, with the operations implemented atomically using DCAS.
that's how they can be atomic for any T.
 
5:03 PM
@StackedCrooked They're often linked lists.
 
I see. So the new node is created and assigned locally. And then there is an atomic operation to link it with rest?
 
hmm, the PPL provides a call mechanism that is a lot more like what you're looking for
but IDK if TBB does
 
@StackedCrooked Yes, some atomic pointer compare-and-swap or whatever.
 
Nice.
 
5:09 PM
I'm trying to figure out if my value_ptr should be allocator aware or not. It seems like it would add a lot of space overhead, and for no clear improvement, since (in the naive implementation) each pointer would have it's own allocator.
 
@MooingDuck Except most allocators are stateless, effectively.
and many of the ones that aren't are simple pointers
 
@MooingDuck No.
 
@DeadMG true, the default allocator adds no overhead, and it opens doors for people to do wtf they want.
 
Make an allocator_cloner and an allocator_deleter if you want that.
 
> Are there virtual functions in Java? Yes, all functions in Java are virtual by default.
How moronic
 
5:11 PM
@Drise We all already know :P
 
@R.MartinhoFernandes oh, no. I have functionoids cloner and deleter for the data, but they can't handle allocation of the internal node type.
 
Node type?
 
@DeadMG I didn't. I've evaded Java for most of my career, but My school requires you take it as a required course, and the C++ Object Oriented class is an elective.
 
What node type?
 
@R.MartinhoFernandes for the type erasure needed by the cloner method, and for downcasting
 
5:12 PM
@Drise I have no idea what an elective is.
 
Oh.
You mean use an allocator for the type erasure, then?
 
@R.MartinhoFernandes in the general case yes
 
@DeadMG Normally, degrees require specific courses, with electives being "options" ie You must take 4 courses within the college of science as electives.
 
std::function doesn't do that (or does it?).
I wouldn't bother.
 
oh
 
5:13 PM
@R.MartinhoFernandes it doesn't, and I've always been bothered by that, but I can see why
 
so basically it's an optional module.
 
@DeadMG One you can take or not as you choose. IOW: Java is mandatory, C++ is optional.
 
Err.. s/can/must/
 
@MooingDuck It does.
 
@R.MartinhoFernandes std::function has an allocator?
 
o btw Jerry
I've been thinking about authoring some C++ tutorials
 
you reckon I could put them on my resume?
 
^ Another revival badge
 
@R.MartinhoFernandes and it's not even part of the type? how'd they do that?
 
5:15 PM
@MooingDuck Erm, type erasure?
 
> Courses can also be referred to as "electives". An elective is usually not a required course, but there are a certain number of non-specific electives that are required for certain majors.
The word course in the education context varies depending on which country it is used in. In higher education in Canada and the United States, a course is a unit of teaching that typically lasts one academic term, is led by one or more instructors (teachers or professors), and has a fixed roster of students. It usually describes an individual subject taken. Students may receive a grade and academic credit after completion of the course. In the United Kingdom, Australia and Singapore, "course" refers to the entire programme of studies required to complete a university degree, and the w...
 
It's... quite basic.
 
@R.MartinhoFernandes Alright, thanks for the info, I'll ponder what I'm doing some more
 
anyway, i wonder about is it very much faster to copy files to usb drive and to other machine, than using the home wireless network (about 1MB/s)?
the network thing is veeery slow
 
> Elective is a term used for an academic course chosen by the student from a set of options, as opposed to a required course. While required courses (sometimes called "core courses") are deemed essential for an academic degree, elective courses tend to be more specialized. Elective courses usually have fewer students than the required core courses.
 
5:16 PM
relative to the number of gigabytes to transfer
 
@DeadMG I was under the impression you'd already started writing some.
 
@R.MartinhoFernandes yeah, the type erasure is the reason I have an allocator in the first place. Can I type erase the allocator too? It seems like it puts the cart before the horse at first, but I begin to think it can be done easily.
 
@JerryCoffin Same principle.
 
@DeadMG I hope that cleared it up.
 
the point is, do you think that it would be helpful to put them on my resume.
 
5:16 PM
@Cheersandhth.-Alf Wireless should be upwards of 300mbps If you're on N
If G, then 54 mbps
 
@DeadMG If they become reasonably well known, definitely. Otherwise, open to a lot more question.
 
i think g, cause i recognize that number
54
but it reports only about 1 MB/s
 
@Cheersandhth.-Alf You recognize the number g?
 
no the number 54
g = 9.8
that's another number
 
5:18 PM
hmm, crashed my java. Not my java code, I crashed java.exe
 
Though you never really ever see those speeds. Sometimes it has to do with hard drive to cpu to bus to network card to network to router to network to netwrok card to bus to cpu to harddrive. So you'll never see those speeds.
 
@Cheersandhth.-Alf Today's episode is brought to you by the letter 'g' and the number 54.
 
oh yes
i just got my replacement laptop
 
For a vector v, v.erase(v.rbegin()); gives error. Why shouldn't it be valid?
 
but it's been copying music since before dinner
just a thousand files in 3 hours or so
 
5:19 PM
@Cheersandhth.-Alf Why not go to the cloud? Is google music not given in your living area?
 
@MooingDuck Yes, it needs care, but is doable.
 
@VinayakGarg erase takes a vector<>::iterator
 
even worse!
 
@MooingDuck I thought reverse iterators could be converted to regular iterators.
 
@MooingDuck yup, wouldn't that be nice way to get rid of last element?
 
5:19 PM
@Cheersandhth.-Alf But it's a one time thing. Upload once, don't have to bother again
 
@DeadMG can they (implicitly)? I would think that a terrible design decision.
 
@Drise wll you need a network... :-(
 
@DeadMG You can get base(), but that's not really converting, just getting another iterator that points to about the same general area...
 
@MooingDuck Why? An iterator to element X is pretty much the same thing, regardless of which direction you choose to go in from there
 
that's just like microsoft's offers to participate in this and that
 
5:20 PM
@VinayakGarg vec.erase(vec.end()-1);
 
all by VIDEO
no way i could do that
 
Sadly, My HP DV7 just started blinking the capslock button... According to HP, my CPU is fried. The damn laptop is only 2 years old D:
I'm never buying HP again
 
2
Q: passing C++11 lambda by templated reference

SteveIn gcc 4.5, the following code compiles and works as expected with -std=c++0x, #include <stdio.h> template<typename H> void caller(H h) { h(); } int main() { auto c = [](){ printf("A\n"); }; caller(c); caller([](){ printf("B\n"); }); return 0; } Prints, A B ...

How's the second example where he changes the function template to taking a pointer instead of reference working?
 
@DeadMG I'm thinking of accidental conversion to a function that then tries to iterate.
 
in a way it's all right, but at least they should consider that not all folks are living in urban areas
 
5:21 PM
@MooingDuck hmm, I used v.resize(v.size() - 1), is that okay?
 
@VinayakGarg that works too
 
even the latest visual studio has its instructions for beginners as videos only
that's dumb
 
@MooingDuck Well, I still don't see the fundamental problem. That function could still iterate that way with a reverse iterator if it wanted to.
 
@DeadMG mostly that copy(vec.rbegin(), vec.end(), dest) compiles and executes. There's probably worse examples
 
5:22 PM
@Drise HP is only a brand. Essentially all laptops are made by a half dozen (or so) companies in Taiwan. Most brands shop around, so if you look at (say) two HPs and two Apples, the two HPs might come out of different factories, one of which could easily be exactly the same as one of the Apples came from.
 
@MooingDuck No it doesn't. Template argument deduction fail.
 
@DeadMG true for that one
 
both iterators must be of the same type- all Standard algorithms are that way.
 
@JerryCoffin No, the design of the laptop blows. It's always extremely hot (I've gotten blisters before). Apparently this problem is caused by solder migrating from the CPU pins.
 
@JerryCoffin remember that HP (1) introduced management by walking around (good!), (2) introduced space-optimized cubicles (bad!), and (3) is not very much HP anymore (naturally)
 
5:24 PM
 
@Cheersandhth.-Alf No, HP bought out Compaq, who bought out DEC, who introduced space-optimized cubicles. But you're right about them not being much HP anymore.
 
downloadmorefish.com
2
 
@Cheersandhth.-Alf No problem. At DEC it was called something like "densitization". At least management by walking around is better than DEC's "matrix management" (the origin of the stories about people having 8 different bosses and such).
 
i wonder if i bring them two machines close together near modem if that will improve speed
 
5:26 PM
@Cheersandhth.-Alf Ha! No, not at all. Unless they are like at the edge of the wireless signal. (50 feet or so, depends on walls and shit)
 
@Cheersandhth.-Alf Strangely, over wireless, it very well might.
 
@DeadMG lol
 
@Cheersandhth.-Alf Btw, modem != router.
 
How enlightening.
 
5:28 PM
Modems nowadays are usually coax cable to Ethernet converters.
 
@Drise Not really just at the edge. 802.11n can use its multiple antennas for beamforming to improve a single signal at longer distances, or for transmitting multiple streams simultaneously if you're closer.
 
@JerryCoffin that's a family visit, of sorts then (or you stayed home?). Anyways, yeah, kids tend to cause heavy time fragmentation.
 
routers are usually Ethernet to wireless, or Ethernet to Ethernet.
 
@TonyTheLion what, "WHEEEEEEEEEEEE"?
 
5:29 PM
I"d be the on ending up in the pool
 
@sehe Yes, I'm at home, they left.
 
@TonyTheLion I repeat my previous question.
 
@DeadMG No obviously, it makes him feel like a beautiful young goddess, flying as if he had wings /cc @TonyTheLion
 
@JerryCoffin Well, he said he's likely on G anyway, so it's irrelevant, though I didn't know that.
 
5:30 PM
man
 
@DeadMG not sure what I"m supposed to answer to "WHEEEEEEEE"?
 
@Drise G handles it differently, but has somewhat the same effect.
 
@TonyTheLion I'd end up on the pool (deck)
 
tomorrow and saturday I have to pack and clean and shit
 
@sehe "beautiful young goddess, flying as if she had wings"
 
5:30 PM
lol
 
@R.MartinhoFernandes Redbull?
 
@R.MartinhoFernandes "It makes him feel,.... flying as if he had wings"
 
@R.MartinhoFernandes Redbull! It give you wings!
 
@Drise missing wings. They winged it
 
5:31 PM
@R.MartinhoFernandes An "energy drink" (i.e., lots of caffeine) whose slogan is "Redbull gives you wings."
 
I wonder if this is a good movie? NSFW
LOL
 
@sehe You used more emphasis. You win.
 
nice tweet from a police officer
 
@Prætorian VS bug.
 
@TonyTheLion It takes a special kind of idiot to make me not want to look at pictures of naked women, but that looks like the kind that manages it.
 
5:35 PM
lol
 
Now I'm tempted to click that link.
 
@JerryCoffin so you clicked it while you're at work?
 
Oh. A porn movie. Why was I expecting anything else from the lion?
 
@TonyTheLion I work out of my house, so with the wife and kids gone (and compiler chugging away in the background)...
 
5:37 PM
@R.MartinhoFernandes lol. I don't need to answer that then :P
@JerryCoffin oh nice. so NSFW doesn't really apply to you
 
@R.MartinhoFernandes I always use more /emphasis/
 
@TonyTheLion "Not Safe For Wife"?
 
oh that
:/
 
@R.MartinhoFernandes Damn, beat me to it.
 
@TonyTheLion More so, in a way. It's tougher because you can't be fired. easily
Anyways, off. Rehearsals. See you later
 
5:38 PM
Porn is a good reason to get fired :/
 
@sehe Later.
 
@sehe Have fun.
 
@TonyTheLion It should be, but I can't say I've ever seen any porn that was worth even a lousy job.
 
@JerryCoffin lol
porn is overrated.
 
@R.MartinhoFernandes Thanks, just tried it out on GCC
> source.cpp:13:36: error: taking address of temporary [-fpermissive]
 
5:40 PM
You can always get more porn. Not so easy with jobs.
 
Anyone who browses porn at their job is a moron
 
@TonyTheLion Or a baus.
 
depends on how you look at it
if you VPN into your home machine from your work machine and then look at pron on you home machine, then technically, you're not browsing pron at work :P
and since VPN packets are encrypted, even a stateful firewall will have no luck inspecting packet content
 
@TonyTheLion No, but the browser on your work machine will probably have a cache...
 
BAUS: What are you doing?
Smart ass: Browsing porn...
BAUS: What?
Smart ass: ... from home!
BAUS: Oh, that's cool. I thought you were browsing porn from work. Carry on.
 
5:44 PM
@JerryCoffin but you RDP into your home machine and do it like that, you don't need your work machine browser at all
@R.MartinhoFernandes hahah
 
@TonyTheLion Ah, now that would probably be better.
 
you RDP over a VPN
you can't browse pron with wget on a SSH terminal, or can you?
ASCII porn maybe...
 
You can also use SSH with X. Or vice-versa.
 
Where I used to work, it would have been harder for the baus to complain much -- at one point he (owner of the company, not to mention very publicly "christian") accidentally shared several megabytes of porn from his laptop...
 
hmmm
@JerryCoffin hahah
 
5:46 PM
@JerryCoffin Accidentally? lol
We can now send living beings to Mars!
 
@R.MartinhoFernandes Apparently iPhoto (or some Mac thing anyway) thinks it should 1) find all the pictures on your machine, and 2) make sure the whole network can see them.
 
@JerryCoffin so much for privacy
 
@R.MartinhoFernandes Could have sent then before. Now we might be able to use them (still need to work on an oxygen mask for them though).
 
5:51 PM
Ok, I have a map<int, int>, and I know the second int. How can I get the first?
.find(knownint)->first()?
 
Nope.
You need std::find.
 
@Drise have to iterate over teh map
 
@Drise If you need to do that, you probably want to look at Boost bimap and/or multiindex.
 
Jul 10 at 20:06, by Drise
@Fanael I can't stress enough how much I can't use boost.
 
Ell
5:53 PM
Does std::find know the internals of an std::vector?
 
@Ell Depends on the implementation.
It can certainly know them.
 
Ell
i don't see why that isn't breaking encapsulation?
 
I don't see how much it'd help though.
 
Ell
why not have myvec.find()
 
5:55 PM
map::find is different from std::find.
 
@Ell not normally
 
@Ell Why have it? It doesn't need the internals for anything (it can know them, but there's nothing it can gain from that).
 
You can't implement vector::find any more efficiently.
 
@Drise Do you need to support insertion/deletion frequently?
 
@JerryCoffin It's just a reference container. ONce it's loaded, it's not loaded until a new file is given
 
5:56 PM
Store two maps? (possibly a map and a multimap)
 
Ell
oh Nevermind then
 
@Drise Sucks to be you.
 
GetVTKPipeline()->mapSurfaceNodes <4 items> map<int, map<int, int>>
[0] pair<int const, map<int, int>>
[1] pair<int const, map<int, int>>
[2] pair<int const, map<int, int>>
first 3 int
second <157 items> map<int, int>
...
[19547] 32 int
[19548] 33 int
[19549] 34 int
...
[3] pair<int const, map<int, int>>
 
@Drise std::find_if
 
I have 32, I want 19547.
 
5:58 PM
@Drise In that case, instead of a map, I'd store the data in a vector of pairs, sorted by the first element. If you only rarely search for the second, just do a linear search. If you do it often, build a second index in a second vector, with the second item as the key, and an iterator (or subscript) of the item in the first vector.
 
Ell
Multimap
 
@Drise std::find_if(mymap.begin(), mymap.end(), [](int p)->bool{return p==32;}) (or something, I don't know lamdbas.)
 
@Drise If you can't use boost directly, then you will simply have to re-implement it's functionality yourself.
 

« first day (691 days earlier)      last day (4243 days later) »