« first day (688 days earlier)      last day (4262 days later) » 

10:00 PM
Here's the most downvoted not-deleted answer in the past month:
-10
A: After Autorelease pool is drained, retain count of autorelease variable is still 1. Shouldn't be zero

anka[pool drain] marks all autorelease objects for a release message after the current execution block (which is the end of the method) and doesn't do it immediately.

 
Is there a point when the captcha stops?
 
Too bad I know nothing about that area...
@Rapptz for what? the data explorer?
 
@Rapptz It shoul actually not kick in, unless you jam on the forward/backward buttons too much (or just are insanely fast)
 
I have to input captcha when I answer questions on SO too
 
@Rapptz Really. Probably because you're a suspected spammer, then
 
10:01 PM
1
A: Limits for self promotion, round II

casperOneNo, I didn't decide to start deleting your answers out of nowhere. You had at least ten spam flags across those answers and I was processing those flags. Looking at them, yes, you did disclose that they were your product, but the links didn't seem integral to the answer provided; the answers lo...

 
I don't think I've spammed though, only 2 of my answers have gotten downvoted.
 
Oh hey, the puppy has the second most downvoted answer in the past month.
 
Woot Woof
 
oh shit... I'm dead... literally
 
How so?
 
Xeo
10:05 PM
@Mysticial link?
 
starred... he's gonna see it
 
Evidently those moderator nominations where the scores are hidden... they're available via data.stackexchange.com
 
-7
A: Count the number of occurrences of 0's in integers from 1 to N

DeadMGIt's clearly proportional to n^2, so just do it brute force up to 10k or 100k to derive a constant and you're done.

 
@Mysticial Sorry. Luckily, I'm all out of mercy
 
Xeo
@Mysticial And what's a puppy gonna do?
 
10:05 PM
Bark
Loudly
 
I like how the puppy doesn't give fucks about downvotes. He should be a cat, not a puppy. Cats don't give fucks.
 
is there a function in C++ called getint?
 
Xeo
not that I know, why would there?
 
@MohamedAhmedNabil not sure. There might be one, but it's internal to the implementation of iostreams
 
Xeo
Where would it get the int from?
 
10:11 PM
input?
Java has a getInt I think - or something like that.
 
@MohamedAhmedNabil I know there is std::put_time, std::get_time etc. The stream extraction operators are defined in terms of these functions
@Mysticial Yeah, you can use it to cache integers; lol
 
i dont like using cin>> so i use this
int getint(string c){
if(c.size()==0){
return 0;
}
return stoi(c);
}
 
You what? Meh
 
Why don't you like std::cin?
 
@MohamedAhmedNabil Sure. Way to go. Nice error handling and reporting.
2
 
10:13 PM
That's kinda like saying, "Loops are ugly, so I'm going to avoid them."
 
@MohamedAhmedNabil At the very least just use boost::lexical_cast<int>(str);
 
@Rapptz There are alot of stuff. iif the user enters no input it just stays there and waits and if the user enters a whitespace and if ........ so on and on
 
@Mysticial A switch with goto is way more flexible
@MohamedAhmedNabil You're not making sense. I'm sure you are thinking of something, but you're just rambling trying to describe any of it
 
@MohamedAhmedNabil If you didn't want an input, why use std::cin in the first place?
 
@Rapptz i use getline to get the value stored in a string and then convert it to int
@sehe Im a bit sleepy, but there are alot of reasons i have against using cin>> , The biggest one is that using cin.getline with cin>> causes problems.
 
10:16 PM
I am legitimately confused.
 
@MohamedAhmedNabil Sure, just don't tire us with them :)
 
@sehe They asked why XD :D
 
3 mins ago, by sehe
@MohamedAhmedNabil At the very least just use boost::lexical_cast<int>(str);
@MohamedAhmedNabil Don't answer
 
@sehe will do
@sehe ok :)
 
:)
 
10:18 PM
I remember there being an answer in SO that compared stoi and atoi with other functions.
I can't find it though
Found it
 
@MohamedAhmedNabil By the way, using boost::lexical_cast<T> (str) is roughly equivalent to using std::istringstream iss(str); T val; if (!iss >> val) { throw Exception; } return val;
@Rapptz Just cut the story short. I'm sure scanf is the ultimate tool for our new C++ user :)
 
10
A: Is std::stoi actually safe to use?

Generic HumanDoes std::stoi throw an error on the input "abcxyz"? Yes. I think your confusion may come from the fact that strtol never reports an error except on overflow. It can report that no conversion was performed, but this is never referred to as an error condition in the C standard. strtol is define...

 
@Rapptz woah... and only 10 upvotes... time to fix that
It even has a freaking table in it...
 
Anyways. Would be fun to actually go and pledge on theanticorruptionpledge.org/take-the-pledge (even while I don't live in the US). Oh, context: blip.tv/lessig/how-money-corrupts-6204167
@Chimera @whoelseisfrom_US ^^
 
@sehe what's that about?
Looks like a good pledge
 
10:24 PM
Wish it actually did something though
 
Yeah
 
@MohamedAhmedNabil /cc @Xeo There is (from § 22.4.2.1 of the specs)
std::num_get<charT, InputIt>::get(..., bool&);
std::num_get<charT, InputIt>::get(..., long&);
std::num_get<charT, InputIt>::get(..., int&);
std::num_get<charT, InputIt>::get(..., unsigned int&);
... etc.
@Rapptz It will, if you do. I think it has been explained that the amount doesn't really matter. See the linked video for context.
 
@Rapptz Ill decode what you said and tell you what i think. I didnt learn exception handling yet
 
You try something. If it fails, you throw something. You then catch it.
I always think about it like baseball.
 
@Rapptz The basic try and catch i know it, but i dont know how it works in C++
 
10:26 PM
Mmm. Not sure about that. That could be from a tDWTF anecdote
 
@sehe listening to it now
 
@MohamedAhmedNabil The same, Just correctly :) It honours destructors (deterministically) and it lets you decide what you need to throw
 
@Rapptz I used it back in the day, when i was in school 3 months ago :P (using visual basic)
 
@sehe Just the basic idea.
 
@Chimera To be honest, it sounds a bit polished for my taste (I have a marketing aversion). And I'm not a US citizen, so I really have no clue how your electoral system works.
@MohamedAhmedNabil So how old are you? 18, 19?
 
10:28 PM
15.
 
@sehe I just reached 15 last month :)
 
Whoa. Isn't that a bit early to leave highschool?
 
@sehe leave? I didnt even start high school. 15 days left till school starts. Summer now :)
 
Wait, isn't that a bit old to start highschool?
 
Yeah
At least here.
 
10:31 PM
@sehe it is :O ?
 
I think most start 13-14.
 
Really? Most start at 12 in the Netherlands. Some a bit earlier (skipping grades, but that's rather uncommon)
 
when do people start school ?
 
High school is grade 9 to 12
in the US
I don't know where Mohammed lives though
 
@Rapptz Here it is 3 years , and i live in Egypt
 
10:32 PM
@MohamedAhmedNabil At 4. Well, primary school proper begins at 6, but kindergarten has been integrated in the education system for primary schooling
 
@MohamedAhmedNabil Ah I see.
 
@MohamedAhmedNabil They just have annoying kids. They want them out of the house a.s.a.p. :)
Oh wait, that should be the situation in the US then
 
school starts at 4-5 here.
with preschool being 3-4.
 
@sehe here kindergarten has nothing to do with primary stuff. They just teach english and basic maths
 
@MohamedAhmedNabil And that's why the US is going downhill. We don't learn math in kindergarten...
 
10:34 PM
Here is like this start at 4 -then- 2 year KG - 6 years primary school - 3 years middle school - 3 years highschool
 
@Mysticial hehe
 
@Mysticial When I used to help in Preschool, they learned basic math like addition and subtraction.
Which was last year.
 
@Mysticial Every single place in the world's math education is going down since they introduced the usage of calculators. Calculators should be for highschool algebra ony
 
@sehe Our college entrance standardized tests have 2 sections of English and 1 section of Math.
 
Dayum. You have a way of crippling what you want to say. Almost as good as the Pirate!
You must mean, `maths` education is going down?
 
10:36 PM
Oh and those English sections are ridiculous. They test vocabulary words that nobody other than a lawyer would ever use.
 
I despise the way they use English learning here in the US.
 
@sehe if you dont know maths, you cant know physics , ergo you know nothing about the universe
 
@Mysticial Our colleges have no standardized tests (well, there is the requirement for a specific high diploma certificate, of course). You just decide. The subjects that do have auditions/entrance exams pose their own restrictions. Which are usually very high.
 
@MohamedAhmedNabil I've been spoiled by Mathematica ever since middle school.
 
Ell
I can't do basic arithmetic without a calculator but I can do algebra
 
10:37 PM
@MohamedAhmedNabil 42
 
@MohamedAhmedNabil Exactly. But in the US everything is run by the wrong type of people...
 
I used to enjoy programming in TI-BASIC with my TI-83.
never really used mathematica until later
 
@sehe since are talking with numbers now
 
ew. saw it
 
i gtg see ya all, arrrrr
 
10:41 PM
In random news ^ Spot the odd one out
 
@sehe Bottom left :)
 
What is it?
 
Ell
Man holding a horse?
 
Wrong :) Literature common knowledge fail :)
Any more guesses now?
 
Oh shat.
I'S NOT REAL!
 
10:44 PM
fml
 
Ell
Still a man holding a horse?
 
@EtiennedeMartel oh. sorry about that. Did I mention it is a random bit?
Pippi Longstocking (Swedish Pippi LÃ¥ngstrump) is a fictional character in a series of children's books by Swedish author Astrid Lindgren, and adapted into multiple films and television series. Pippi was named by Lindgren's then nine-year-old daughter, Karin, who requested a get-well story from her mother one day when she was home sick from school. Nine-year-old Pippi is unconventional, assertive, and has superhuman strength, being able to lift her horse one-handed without difficulty. She frequently mocks and dupes adults she encounters, an attitude likely to appeal to young readers; h...
 
Ell
Bye now
 
@sehe Oh, not that crap.
 
10:45 PM
I still have a mean way to chase them away, don't I?
@EtiennedeMartel Too fun for the nomer. A lot of crap has been written, but this is certainly not part of it
^ Spot the odd one out?
(PS. I made all these snaps with my phone camera)
 
Why is chat so laggy for me now
 
the kid?
 
@Rapptz No idea ;)
@Mysticial Just zoomed/panned in
 
a missing leg?
 
This is here in Rotterdam. It's call Railz Miniworld. They have all Rotterdam landmarks and a few national ones included. It is fun for parents too :)
Could be. I reckon it's just folded awkwardly
(You'd be surprised to see what goes on the miniaturized version of the WTC building.)
Anyways, enough random things. I was searching for a pic of our own cat not giving a fuck about the kids. Can't find it. Alas
I'm off to bed. You can all disnable the image-filter now, no risk of semi-nudity anymore
 
10:55 PM
Good night
 
11:06 PM
Hey, a quick question, how can save a transcript for the chat?
 
Ell
Not sure o.O
 
You need 100 rep and you just go to room then create a new bookmark
 
@Rapptz how?
 
It's on the right side.
 
@Rapptz Did you mean "at least 100 rep", or is this a scheme to get people to put up bounties to keep from having more than 100 rep?
 
Ell
11:13 PM
I wonder what a universal reputation system would be like
 
@JerryCoffin Yeah, at least 100 rep to get the privilege of doing it.
 
@Rapptz found it
 
Congrats
 
Ell
For real life, for people and for internet and everything else
 
@Ell Probably close to useless. Just for an obvious example, what "universal" reputation would you give to Hans Reiser who 1) invented and implemented one of the coolest Linux file systems ever, but 2) also murdered his wife?
 
11:16 PM
@JerryCoffin yea instead of jail, you just loose rep points,
 
@JerryCoffin A solid -1.
 
Instead of going to jail, you say "I earned that murder, i spent the last 10 years helping people so i can kill that son of a b***""
 
BTRFS is cooler.
 
Or, what about Linus Torvalds, who's obviously done some fairly decent code, but also fairly routinely makes a complete ass of himself, in everything from arguments with Andrew Tanenbaum to stupid, uniformed statements about C++?
 
A solid 0. Also Linus.. Unless it's a pun.
 
11:20 PM
@CatPlusPlus Well, yes -- since ReiserFS hasn't been maintained in a while, some others are catching up and (arguably) surpassing it -- but it's taken quite a while for any to even catch up.
@Rapptz Oops -- no, just a stupid typo.
 
@JerryCoffin Someone can be a good C programmer while being a complete self-important asshole at the same time.
 
Obviously the universal rep system must use complex numbers.
 
Ell
What's so good about reiser fs?
 
-1 for wife killing +1i for FS.
 
@EtiennedeMartel Yes, but this was about "universal reputation", not just rep as a programmer.
 
Ell
11:23 PM
I think more than -1 for wife killing
also you must have > x rep to vote
 
@Ell It was pretty much the first journaled FS for Linux, so it's (among other things) quite a bit less likely to be damaged in a crash than most predecessors. Also able to grow volumes without using a volume manager, etc.
 
rep*(rep^-1) -1 for wife killing.
 
@Rapptz Hmm...rep^-1 would normally translate to 1/rep, and rep*1/rep would give 1 (assuming rep!=0), so overall that seems to work out to `0 for wife killing."
 
yep.
 
Ell
-0 for wife killing
I would go out tonight but I haven't got a stitch to wear
 
11:40 PM
YES! found my mandelbrot generating code from 4 years ago! I've looking for it all weekend. Now to re-write using SSE intrinsics and other optimizations.
Woot! How you like? It's a very small portion of the mandelbrot set.
Took me a while to find a decent "escape speed" coloring algorithm.
I am so lonely
 
Play games.
 
Thinking about it. Maybe some CS:Source. Maybe do something with the wife.
You like my image Cat?
 
Well, it's a fractal. I'm afraid I'm out of my fractal fascination phase.
Blah, 2AM again.
 
Ell
I am lonely also
 
The day is too short.
 
11:48 PM
@CatPlusPlus Yeah, but it will be fun to optimize the code to use SSE don't you think?
 
Ell
maybe I will murder my ex
 
Hi Ell
 
Well, if you like optimising the code to use SSE.
I prefer to stick to my lovely extremely high-level abstractions.
 
Ell
Hi :)
 
@CatPlusPlus Will learn something new.. so should be fun.
 
11:49 PM
Fun is important.
 
And we do have one of the best to ask for help here if needed. :-)
@CatPlusPlus Indeed
 
Ell
one of the best for help with murdering my ex?
 
@Ell lol no. One of the best for getting advice about optimizing math routines...
 
Okay, threads don't update so I can go to sleep. Bye.
 
@CatPlusPlus cya
 
11:56 PM
hey programmers! anyone in here ever use a library called CVODE/SUNDIALS (computation.llnl.gov/casc/sundials/main.html)?
or has done parallel programming?
@CatPlusPlus Nice cat pic! :D
 

« first day (688 days earlier)      last day (4262 days later) »