« first day (681 days earlier)      last day (4493 days later) » 

GGG
GGG
00:18
oh wow
shared_ptr is awesome
I can make a shared_ptr and pass it around like your sister in highschool
and never worry about deleting it
lol
be aware that copying a shared_ptr is not free
GGG
GGG
@mfontanini well, what's the damage?
it requires some atomic incrementes/decrements, which cost much more than a simple pointer copy
@mfontanini One, not some.
it's not that much, but you should avoid unnecessary copies
00:32
but they may be non-trivial
GGG
GGG
I need some kind of reference counting thing and apparently shared_ptr is doing what I want behind the scenes
depends on how much contention there is, really
@GGG Indeed it does. shared_ptr is a reference counting pointer.
@DeadMG yeah well, if you're copying it around, you've got some increments
well, it's one increment per copy.
00:33
not that I'm pretending that it's free to copy because it isn't
but the only useful metric is increments per copy
not increments per some copies
GGG
GGG
Basically I was doing this, and realized my objects and arrays were all being copied all over the place instead of references being copied
when I got to the last few steps
shared_ptr worked nicely though and all my unit tests pass now :)
@DeadMG fair enough
@GGG Careful of cycles.
GGG
GGG
@DeadMG cycles?
well, it's pretty simple
GGG
GGG
00:36
like recursion?
why can't you pass stuff by (const) reference instead of using shared pointers?
consider class A { std::shared_ptr<B> b; }; class B { std::shared_ptr<A> a; };
if b->a->b == b
GGG
GGG
@mfontanini because it might be initialized with a temporary? Or is that not a reason
then neither of them can ever be freed, because they each refer to each other.
GGG
GGG
@DeadMG gotcha
that shouldn't happen
00:38
so normally, interpreted languages use a generational collector
rather than reference counted
well, that depends on how you're using references. as long as you don't do anything nasty, you shouldn't face those situations
GGG
GGG
it's for JSON structures so they shouldn't be self-referential, if they are it will need to throw an exception or something anyway
very true
when in regular C++ then you can prove the absence of reference cycles through the type system, if you want to, and good designs are trivially clear of ref cycles
but in JavaScript nothing stops you from creating a self-referencing object
nor Lua nor Python
GGG
GGG
yeah I think it's been a problem with JS GCs
I doubt anyone ever used ref counting for JS
the only place I ever know that used ref counting is some Python implementation; and they added extra code to break cycles
00:42
Hey, there's tofu in my chicken pad thai. Hmmmm.
@DeadMG Not just "some": it's CPython, and it's the reference implementation.
eh
you can't be the reference implementation for implementation details
Has any of you played Osmos?
@R.MartinhoFernandes I'm pretty sure this is the first time I've even heard of it.
@DeadMG The basic point of a reference implementation is that its details define the language.
There is a massive body being orbited by four less massive bodies on the same circular orbit, each one 90º away from each other. I'm in a much smaller (i.e. my gravitational field is negligible) body orbiting one of the planets. I want to switch to orbit one of the other three planets. I'm constantly crashing into the sun.
I'm annoyed.
@JerryCoffin I don't think it's implementation details define the language.
else, you could argue that the only possible implementation of Python, ever, is CPython, because it's the reference implementation and if you have one single byte out of line in your source files then it doesn't match the reference
00:55
@R.MartinhoFernandes blast straight away from the sun. You'll move away, then fall back toward the sun (as long as you don't exceed the escape velocity from the sun). Make it a strong enough blast, and by the time you fall back that far, the next planet will be right under you.
@DeadMG I'm simply pointing out what reference implementation means. If you don't like what it means, well, so be it.
I'm simply pointing out that when taken to the logical conclusion, it's contradictory.
@JerryCoffin Oh thanks, that worked.
Well, almost, but it's just my fault that I wasted too much fuel.
@DeadMG No, it's not. Taken to its logical conclusion, it means that this particular implementation is the standard for that language. No, most other implementations probably don't conform perfectly -- but that's nothing new. When you have a written standard (e.g., C, C++, Common Lisp) none of the implementations quite conforms. What of it?
@JerryCoffin If the non-observable details count towards the specification of the language, then you're not talking about a little bit of deviation, but rather massive deviations. In fact, it effectively outright bans other implementations - something that runs rather contrary to the purpose of a reference implementation, which is to provide a guide for other implementations without having to build a proper spec.
@DeadMG If they're truly non-observable, then of course people ignore them. But, what (in something like C or C++) we'd normally think of as implementation details (e.g., order of evaluation of function arguments) isn't for it -- any difference from the reference implementation is a bug (unless there's also a written spec that specifies which parts of the reference implementation aren't normative, or whatever term they decide to use).
01:03
right, but the algorithm they use to implement garbage collection is most definitely non-observable.
@DeadMG That depends on how you define observable. If, for example, you include things like timing characteristics, then it might be -- but in Python's case, I'd guess you're right; it's unlikely that anybody considers it observable.
@JerryCoffin Yeah, I don't think that anyone is insane enough to make performance (beyond complexity requirements) an observable behaviour
Insane, or working on a real-time system.
@DeadMG Unless they're working on real-time systems, in which case they have no choice. I was thinking more about characteristics than just basic performance though. For example, for some kinds of collectors, it's fairly easy to limit the maximum pause for GC at any one time.
Ah, yes. I've heard about using deterministic garbage collection in real-time systems, but really, I like avoiding it altogether.
01:11
need to apply for jobs
@DeadMG Then do iiiiiit.
but effort
Then get drunk. All your problems will (momentarily) disappear.
damn
if I said that I was dying of alcohol poisoning, you'd recommend getting drunk
6
01:33
@DeadMG Well, it's not like you would have anything to lose then.
02:22
@R.MartinhoFernandes Here's some homework for you:
9
Q: Why is < faster than <=

Viniyo ShoutaI'm reading a book where the author says that if( a < 901 ) faster than if( a <= 900 ). not exactly as this simple example, but slightly performance changes on loop complex code. I suppose this has to do something with ASM in case it's even true

I also supposed it's pure speculation, but for educational purposed I would like to know about it. - It's a portuguese book, the translated title is "A step into C depths" by Marcos Lorenzon. It's an old book (dated 2001). — Viniyo Shouta 9 mins ago
Get that book find out where it says that so we can all bash it.
02:50
@Mysticial wanna bash something? functionx.com/cpp/examples/returnpointer.htm
@mfontanini Oh, I've seen that. It's hilarious.
I've sent them an e-mail.
but nothing changed in the tutorial
That site is clearly a troll. They have pages and pages of that stuff. It's amazing.
It's like a programmer's version of the Onion.
someone should pwn them
lol, they've got 3.6M visits
don't make fun of the minister's body. make fun of the minister's brain
Well, our PM isn't exactly liked here. But only 9 days before the elections!
@Mysticial Hmm, never heard of it. And from the author's name it sounds like something from Brazil.
03:22
@R.MartinhoFernandes Those silly Brazilians.
03:36
hey guyz
anyone remember me ? :(
well, I'm gonna ask anyways , whats better to wrap numbers around
x%=128;
or if(x>=128)
x=0;
@angryInsomniac Depends on whether x can be negative and what you want to happen in that case.
@angryInsomniac x%=128; is better. And mostly likely faster as well.
those are not equivalent
@JonPurdy yeah , i did run into that problem, it seems I will have to write an if condition regardless
what happens if x is 129?
03:43
can never be, i increase it in increments of 1
@mfontanini Rabbits rain from the sky and shit on your porch.
@angryInsomniac For strictly equivalent behaviour (if x is non-negative) you would need x -= 128; instead of x = 0;
@EtiennedeMartel holy shit
Assuming, of course, that x is not greater than 256. :P
@JonPurdy was just about to say that
03:44
@angryInsomniac In which case while instead of if would work.
@JonPurdy ?
@JonPurdy naah, dont wanna introduce loops into a simple check
This whole thing smells of premature optimization.
I am thinking % to wrap the ceiling and a ternary condition to wrap the floor
@EtiennedeMartel or premature ejaculation
@angryInsomniac just use an offset
03:47
:D
@angryInsomniac Spluuuurrrtttt
@Cheersandhth.-Alf ummm ... whaa ?
well, that escalated quickly
@mfontanini Orgasmic code :D
@Cheersandhth.-Alf how to wrap back from the floor to the ceiling ?
@angryInsomniac x = (x + 1) % m; xx = x + offset;
03:49
@Cheersandhth.-Alf interesting !
04:10
I just realized that my first comment was a blanket statement. — Mysticial 1 min ago
 
3 hours later…
07:07
Your custom-comparator-function version is simply more elegant iff you already have the strings anyway. All the 'type-safe/manual allocation-free' hipness that you get with std::string is not very interesting if you're not going to use it. C++ makes you pay only for what you use. This is a tribute to the flexibility of std::map, if you ask me — sehe 6 secs ago
and the silence is broken...
Sorry, I'll pay for a new one
@IDWMaster a wry "Zing!" to that :)
Clearly, this guy doesn't get the hint that maybe his answer is complete BS...
0
A: Why is < faster than <=

Ravi Sainibeacuse in < only register is being used while in <= the two register of compare value and equality are beig used,so the < will run faster.

ah, back to work after holiday. edit: Damn, I'd forgotten that the coffee here was that bad! Yuck!
07:29
@Mysticial His answer is logical at least. I have to give him that.
Just.. wrong.
^ Beard clipper.
07:43
@Mysticial I fully expect this to get tweeted as 'Most Awesome Stack Exchange Of The Day' — sehe 12 secs ago
@Mysticial lolled so much it hurts
aww you deleted it...
@StackedCrooked my father had one of those
@Mysticial Thought it was better suited for chat.
I see that question going 100+ maybe even 200... It didn't seem like it was constructive enough to make it, but I guess I was wrong.
+1 interesting question. as i recall pointer cast is not permitted in "const expression". but i could be wrong, and if i'm right it only answers the immediate of why the compiler doesn't allow it, not why the standard is that way. — Cheers and hth. - Alf 55 secs ago
07:48
@Cheersandhth.-Alf Looks inconvenient.
@Mysticial: I suggest you don't go to the casino or horse-races; I think you're a bit too easily addicted to betting :)
morning all
@StackedCrooked works without great flow of electrons
@sehe I do actually, but I play at the arcade games where you win plushies. They usually kick me out after while...
07:50
@Mysticial Ouch. I didn't know :)
My dad and I love to "analyze" the hell out of those carnival games to figure out ways to "defeat" them.
Sometimes it works too well. And we get booted.
So, that's where you got the penchant for beating number games!
My house has so many plushies that you can literally trip and not get hurt.
That's somehow ironic. You wouldn't trip without so many plushies, but then, if you did, you wouldn't land so soft....
@sehe After I left for college, he started cleaning up the house. He donated most of the small ones which I had many duplicates of, air-compressed most of the bigger ones, and deflated all the inflatable ones...
There wasn't really much space in the house. It literally was all plushies.
07:54
he killed the plushies!?
@sehe some of them
At least, now you know why your parents aren't rich. It all went up in... plushies :)
@sehe They can be revived. Using inflation.
Zombie plushies
@Mysticial Saw your Venus pictures this morning. Looks like you were in a nice location there.
07:56
Most of them deflate pretty well. Some of the very large ones are good decorations. We ended up using out 3 x 3ft. plushie dice as furniture.
@StackedCrooked Inflation is cheap these days, not only economics have it, but politicians too, now!
@StackedCrooked :)
Was very lucky to be able to see it at all.
either you had a very small house, or your dad had a serious hoarding problem
He explained it
It familial or genetic :)
And it wasn't _hoarding_. It was _science_
@thecoshman Me and my mom have a serious hoarding problem. Once I was gone, there's one less voice in the house.
07:58
@sehe ah I see... "I didn't kill them all, I was just experimenting to see how people respond to small slugs of metal entering their brain at high velocity"
@Mysticial ooor, two locations to hoard in :P
Duh, no pictures since beard clipper.
@thecoshman Read the whole story. Start here: chat.stackoverflow.com/transcript/message/5101141#5101141
@sehe I had :P though it's nice for once for some one to tell you to read from the start, and actually provide a link to the start
My friend used to be freakishly lucky at those claw games as well...
Thanks. I thought you needed it because you weren't making any sense. If hoarding is science, it doesn't explain killing plushies, for one
my logical side believes them to rigged so that they will only let you win when they want you to, but after seeing him at work I can't help but doubt that
08:01
@sehe It took me a while to let go of all the ugly small plushies. But my mom and I are adamantly against getting rid of the big ones.
@sehe hoarding is not a science, it's a problem.
@Mysticial I guess I shouldn't encourage you...
You can't, buddy
@sehe I can, but I shouldn't, and will not
@sehe Speaking of which. My biggest plushie is this 5ft. long dog. It covers the entire grand piano - works great to dampen it since that piano is pretty loud.
@Mysticial Curtains/carpets do wonders. I have that in my studio :)
@Mysticial I was just going to ask 'grand or upright' :)
08:07
@Mysticial sounds like an excuse to me ¬_¬
@thecoshman Well like I said. If it wasn't on the piano, it'd be hogging floor space or air-compressed. So we ended up putting it on the piano.
Meh. The pirate is bored at work. Again.
@sehe captain obvious :P
I do actually have rather pressing work to get sorted... but planning to fall back on 'they delivered over a week late, it will done as I can be arsed possible'
@StackedCrooked It's funny though if you think about it. I've never seen a single solar eclipse, lunar eclipse, meteor shower, ever... But I got to see the Venus transit - which is the rarest of them all.
08:22
I saw a partial solar eclipse once. I once missed a full eclipse because I was mistaken about the time it would appear :P
@StackedCrooked God you're lazy! You remind me of me
2
I would've been able to see the annular eclipse at the end of May since it swiped a couple hundred miles north of where I live. But I was on vacation in Europe at the time. (and I was still on the same trip when the Venus transit took place)
I can't wait for space elevators to be invented.. that would be the true start of space tourism in my opinion
you know what the eclipse would look like in space?
@StackedCrooked That's gotta suck... At least eclipses are common. I'm probably not gonna see one until the 2017 eclipse that swipes through central US.
@StackedCrooked Actually, which eclipse was that one?
@Mysticial just how rare is the transit of Venus?
08:29
I don't really mind though.
@thecoshman In the current era, it's twice every ~120 years.
1000 years ago, and 1000 years in the future, it will be back to 1 every ~120 years.
The next one will be 2117.
The last one was 2004. I didn't see that one.
They usually occur in pairs that are 8 years apart. That's because every 8 years, Earth and Venus come back to approximately the same places in their orbits.
@StackedCrooked Ah, the France one. Did you actually travel to the path to see it?
@StackedCrooked ooh, I saw that one
my entire high school went to Munich for it. That was fun :)
@jalf It cut right through Munich?
08:37
I think so. I think it was that one, and I think it was Munich
but it's been a few years :p
wow...
@thecoshman Here's a good article: skyandtelescope.com/observing/home/152556885.html
@Mysticial shit... kind of regret not being so aware of this shit
@thecoshman Put it this way. One of my friends didn't find his telescope until right after sunset...
@Mysticial Nope I was making a walk in my neighborhood. It was getting a little dark and I figured it was a cloud and didn't bother to look up. Apparently it was the eclipse.
@StackedCrooked Ah, it would've been 90% blocked out in Belgium?
08:41
Something like that.
@StackedCrooked lol
@Mysticial welp, I missed it by a long bit :P
@thecoshman ah oh well... at least you can see Mercury transits. They happen every few years. But you need very good equipment through since it's a lot smaller.
@Mysticial always a catch
Even Venus was barely visible to (my) naked eye. It kinda flashed in and out of sight.
I'd say once I learn to drive, I should be able to get my self to nice remote place to see it really well
@Mysticial ¬_¬ because staring at the sun is great fun :P
08:50
@Mysticial that's just a dead pixel
oh wow... yeah, you're gonna need a pretty large telescope to be able to see that...
@thecoshman yeah, pretty much...
Whereas my Dad and I were able to get this one of Venus through a pair of binoculars:
@Mysticial was that mecury or venus?
@thecoshman The top one is Mercury, taken with what I assume to be very expensive equipment.
The bottom one is Venus. Taken by me using a $100 camera and a cheap pair of binoculars.
09:14
Speaking of Venus, I just found a great piece : youtube.com/watch?v=EE6_PacCnRw&feature=fvwrel
Xeo
Xeo
Mornin
09:27
Ohai
woah, the room is kinda dead today
We should do 6-hour compo or something.
all the time. Peeps in europe at work. Peeps in USA - absent
compo?
@BartekBanachewicz it happens
@sehe Mercans, always late :P
Xeo
Xeo
@BartekBanachewicz KITTY!
Okay, you got me.
Sup?
Oh, maybe it isn't international; I don't know actually
In polish gamedev community there was (is?) a common for short time game competitions
random idea, and 2/3/4/24 hours
@sehe maybe competition?
@thecoshman Yup.
the ideas were usually funny, like "do a game steered by at most 3 buttons, using something that bumps and red colour"
@BartekBanachewicz like @sehe said, most of us are at least pretending to work :P
@thecoshman I'm so freaking bored.
09:38
@BartekBanachewicz same here
Xeo
Xeo
@thecoshman Being bored sounds bad
@thecoshman But you at least have something to work on, right? I could do my homework for my uni (that I was supposed to do in a schoolyear), but it's even more boring that staring at the wall.
Algorithms n' shit.
@BartekBanachewicz yeah... but testing if I can work in through a VM is lame
solution to crappy source control is go to a virtual environment ¬_¬
nothing new.
indeed, clearcase is old as it is shit
09:43
@thecoshman ?! so you replace something slow and inconvenient by something even slower and even more inconvenient
@sehe I think it's mostly so they can use a server farm to help reduce build time... which for some reason can't be done on site :S
@thecoshman ? I don't follow. You stop using crappy source control, switching to virtual environment, so they can use a server farm to help reduce build time.... Whoa. Do you know what you're trying to say? Also, it cannot be done on site? Are you saying that virtual environments aren't on-site? That's orthogonal
I guess you - somehow - mean that you started working in the cloud, so they can have more servers for less (short term) money? I still don't know how that 'eliminates' the use of crappy source control
@sehe you realise this is like trying to explain logic behind creationism?
Mandatory troll: :%d cleans your vimrc up the best. Otherwise, :new|saveas! $MYVIMRC is quite effective — sehe 9 secs ago
I think they logic is, by moving towards a 'cloud' set up, it is easy to use a server farm to reduce build times. Either way are still using a crappy source control that has made this hole transfer a lot harder
09:50
@sehe What does %d do?
@thecoshman I start to think that you may fit in well with the organization, judging from your talent of explaining clouds :)
'cloud' I understand... why are still using clearcase I do not
Xeo
Xeo
@StackedCrooked most likely kill the vimrc file completely
What does the rc stand for anyways?
Resource?
@Xeo not sure, but it seems to be a standard suffix for 'stuff to do when you start'
09:53
@thecoshman You continue to use clearcase hoping it will one day pay off. You're like the theist of computer programming.
Actually I realize I may have misinterpreted what you meant by that, so that phrase is directed to whoever uses clearcase.
@Neil you make it sound like I have a choice? It's either suck it up and use clearcase or leave
Xeo
Xeo
@thecoshman mIRC has .mrc files for your scripts under the "remote" tab, which likely standy for "mIRC rc file", though I still don't quite get what "rc" is for
right now, I need to money
IIRC in Visual Studio resource files (WinAPI) have the .rc extension. Hence my guess.
rc is a bit of a misnomer for a file containing user settings.
@Xeo could stem from Remote Control maybe
Xeo
Xeo
09:55
Well, except those .mrc files are just like .cpp files holding code :/
or otherwise known as aliases
I keep getting timeout messages when trying to post to this chat. Strangely enough, the errors don't occur if I open a second chat window before the message times out.
Might be coincidence.
@thecoshman That sucks.. that almost merits leaving right there
@Neil sadly, clearcase is one of the better tools I have to use
@thecoshman You mean it gets worse?
That or it's the only tool he's using.
Xeo
Xeo
10:04
Somehow, that seems to have escaped everyone
oh, wait
dang, he had a custom comparator :(
@Neil a terrible terrible document revision tool, and perhaps the worse bug tracer I have ever laid eyes on
38
Q: What does "rc" in .bashrc stand for?

LazerIs it "resource configuration", by any chance?

Xeo
Xeo
Heh, thanks :)
@Xeo we have these lovely sites for answers to questions that even I don't know the answer to :)
@thecoshman I have yet to see a decent documentation program
Best there is to offer is Microsoft Word and MediaWiki
Our company uses the latter actually
10:13
@Xeo Yup. See my comment :)
@sehe "rc" stands for "rennaissance crappers"
@Neil I would just settle for something that did not get in my way, and tracked the changes rather then just storing individual files as distinct items
@StackedCrooked The tools are using clearcase. FTFY
@thecoshman Run! Get out of there before it's too late!
Individual files! Holy shit!
Svn and a text file would be better than that
Dammit. I'm getting empty error from cmake when building Clang on windows.
10:14
@Neil oh but it just 'has' to be a MS WORD
Google Docs does a better job of doc revision
and the fucking obscuring numbering system as well, fuck me is it a pain in the ass
@thecoshman Word comes with its own revision system
I've never used it, but why going through all the trouble of using clearcase?
oh, we are not using clearcase for documents
we are using some crap thing...
I think it's called 'teamcentre' but it's been 'customised' to make it better for us
well that helps, Eclipse crashes when I try to open a file ¬_¬
If your real code is different, this question is useless. Post a small, selfcontained benchmark (including timing methods) and you have Jon Skeet material. My guess is, it won't be possible to show that is slower in that way. — sehe 5 secs ago
10:30
Best afternoon.
Bestest
Uhoh. I have a premonition that @TonyTheLion will not be coming back. Just as he moves to Great Britain, this news arrived:
Xeo
Xeo
LOL
wait.... I thought he was British? Where is he from?
@thecoshman He is. And he was living in Belgium. Now he's moving to GB for a job
Xeo
Xeo
I'm losing overview of who has which nationality. Not that it really matters.
10:37
@sehe oh good, at least I wasn't wrong :P
@Xeo it's the most important thing, how else are we to discriminate?
@thecoshman Nooooo. Because, that never happened before!
@thecoshman I discriminate based on utterances. Pretty easy job
Yeah. Microbenchmarking is both hard and frequently useless. I was gonna say this, but I was out of energy for the rest of the responses for the moment :) (FWIW, C# has struct valuetypes which make the outer type be copied like in C++ value semantics. Not the string itself, though) — sehe 1 min ago
@sehe obiovusly
^^ @DietmarKühl is taking an interest in malleting extremely bad C# vs C++ benchmarks now
Tony isn't a lion, sillies.
@daknøk Well, no lion has been found :)
10:53
but one has ben seen
I think it's time to start selling anti-lion stones
11:05
@EtiennedeMartel Every time you update Chrome? Isn't it self-updating?
@sehe He's Belgian but went to school in the UK for a while. IIRC.
I really want to hit my leg really hard right know. If the clang compilation fails again THIS pain would be nothing -.-
I don't know, is it only me who has so many problems with this sh*t?
11:45
MS VC++ ftw
also you can compile clang with it
I would really love to just use VS2012.
but I feel it will stop my C++ learning until next version. Wtf is with the C++11 support?
They won't just give compiler patch or update until next year.
So no initializer lists, no template usings
yep, it suck
@Abyx hmm... "yep, it suck". So?
I want to plaster a tree.
11:49
@BartekBanachewicz but it has the best IDE I know
@Abyx Ok. But the compiler sucks. The only other option is ICC, which is pricey as hell. Or, non-commercial.
I want food.
Heh u can compile Clang with VS 11?

« first day (681 days earlier)      last day (4493 days later) »