« first day (479 days earlier)      last day (4467 days later) » 

3:00 PM
Is it possible to declare some function as extern inline?
 
@DzekTrek I think so. It has a special meaning in C though.
 
sbi
@RMartinhoFernandes The difference is that between a library and an application.
An app only needs to be as fast as necessary, and that can be measured and decided about. A lib could be used anywhere, including high-performance code, so it has to be as fast as possible. An app has a limited range of problems it's applied to, and it only needs to be useful to those. A lib needs to be applicable to as many problems as possible. An app needs to have as few bugs as you can get away with given the user base and range of problems, a lib ideally has no bugs at all...
 
That meaning is "Why, why, why, WHYYYYYYYYYYYYYY did you do that C99???" by the way.
 
sbi
In a lib, you want to leave as many decisions to the user, to adapt their usage of the lib to what fits them. In an app, you want to make as many decisions for the user as possible, in order to not to overwhelm them.
 
Xeo
3:04 PM
@sbi Some libs would benefit of the latter too, atleast to a certain degree
 
sbi
@Xeo Yes, of course, users of libraries find this overwhelming, too, sometimes — or even often. Still, when a lib just prints to stdout, it's pretty unusable for many purposes. And when it favors fault-tolerance over speed, that's also true.
Or memory footprint over speed (and fitting the framework), as std::vector<bool> does.
 
yeah, but a lib can come in the form of a very raw lib that assume nothing and then a sort of wrapper lib that combines things together into a more high level lib. Sort of the difference between using openGL directly and a game library
 
Xeo
Hmm... this tuple-for is getting funny..
 
I don't think at is very useful, anyway. If it throws, what do you do with a std::out_of_range?
 
@Xeo Use indices<Indices...>, pretty straightforward to implement then (and still fun!).
 
3:09 PM
@LucDanton so what is behavior of the given function declared as extern inline?
 
Xeo
@RMartinhoFernandes A reply to whom is that?
@LucDanton I want to "support" the control-flow changers (continue, break, return)
 
while(true) {
    try {
        x = v.at(n);
        break;
    } catch(std::out_of_range&) {
        --n; //?
    }
}
 
Xeo
The loop itself is dead easy
 
@DzekTrek Same as any other extern function, inline or not (which is most functions in program usually). And if you add a definition for that function, then no diagnostic required if a) it's not the only definition in the program b) it's not the same definition as elsewhere in the program.
 
@Xeo Exceptions as control flow!
@Xeo It's not a reply. It's just a statement.
 
3:12 PM
So it does occur very rarely. @LucDanton Thanks! :) Excellent, that is what I have been looking for.
 
@RMartinhoFernandes (void)continue_; where continue_ has operator void() { throw continue_control_flow(); };?
 
@LucDanton If only that worked.
 
@RMartinhoFernandes It does. What doesn't is just continue_;.
 
Oh, it does?
Still, I prefer continue_();.
Less ugly.
 
And no #defines were abused!
Oh man, return_(value); is going to be tricky if you want to support implicit conversions.
 
3:17 PM
I don't think you can get return to work.
I mean it.
Not without user intervention.
 
Well, first we can ask ourselves the meaning of plain return foo;.
Should the return type of the functor be taken into account at all?
 
I suppose @Xeo is implementing is special loop as a function that takes a polymorphic functor.
 
If so, then you can catch return_control_flow<return_type> const&.
 
That means you can't return from the function that calls that.
 
Hence the problem with implicit conversions.
transform(std::make_tuple(42), [](int i) -> double { return_(static_cast<double>(i)); }); kind of deal.
 
3:20 PM
Doesn't work!
 
What doesn't?
 
As a client I would have to write try { super_for(things go here); } catch(return_control_flow<blah> const& r) { return r.get(); }?
Your super_for function can't return from the function that calls it.
 
No, the transform implementation catches return_control_flow<typename std::result_of<Functor(element_type)>::type> const& on each iteration.
Man, that's silly, just use return in my case.
 
transform is fine, it's for_each that's tricky.
 
3:22 PM
Unless, of course, you #define that problem away.
 
Meh, have to explicitly pass the return type somewhere. You could use std::common_type<return_type...>::type but supporting implicit conversions is going to be painful.
Also, each overload is going to have to explicitly write continue_ or return_ to avoid flowing off at the end...
 
Xeo
@RMartinhoFernandes I think I can.
 
Unless of course using a result_type<T> helper!!
 
@Xeo Without client intervention or macros?
> retuning a pointer to a local variable
Damn, silly typo.
 
Xeo
@RMartinhoFernandes Well, my implementation is something that a theoretical tuple-for would expand to
 
3:25 PM
So, it's a macro?
 
Xeo
Nope
 
[](T&) -> result_type<T> { if(blergh) return_(42); return {}; /* return {}; same as continue_()! */ }
Totally not misleading.
 
@Xeo Then I doubt you can get return to work without shifting the burden to the client.
 
sbi
This article (PDF link) is quite old, but still a very useful resource to point at if someone asks about how C++ works under the hood.
 
Xeo
@RMartinhoFernandes There is no client. It's just a reference implementation. :P
 
3:26 PM
@RMartinhoFernandes I'd write it to shut you off but my eyelids are heavy.
 
@LucDanton Right.
 
hello, is this AA?
 
close enough
 
@Xeo Don't let my ramblings distract you. Code speaks louder than words. This is the kind of thing that I love to be proved wrong about.
 
sbi
@Daniel No, we're not the Alcoholic Anonymous.
 
3:27 PM
But don't be fooled: I'd also love to see your face when you realize that I am right.
 
@sbi that's too bad. :(
 
sbi
@Daniel I can point you to aa.org, though. Good luck for you!
 
@RMartinhoFernandes template<typename Functor, typename Element, typename... Elements> auto implementation(Functor&& functor, Element&& element, Elements&&... elements) -> decltype( /* */ ) { typedef typename std::result_of<Functor(Element)>::type::type result_type; try { functor(element) } catch(return_control_flow<result_type> const& ret) { return ret.forward(); } catch ...
 
@sbi they don't speak C++, so they're of no use for me, sadly.
 
Hard to read on purpose because shut up.
 
sbi
3:29 PM
@Daniel So why are you asking about them
 
@sbi I was looking for a more programmer-friendly implementation of that.
 
Perfect forwarding elided for the purpose of brevity and that return type might actually need some std::common_type and not just decltype.
 
You still don't get it do you?
void f() {
    for(auto x : xs) {
        return; // returns from f!
    }
}
 
sbi
@LucDanton Do you have a cat? because that code looks like it's been on the keyboard while you were in the bathroom. Oh, wait! It's Perl, right?
 
Herbs keynote isn't available online yet, is it?
 
3:31 PM
void f() {
    some_for_as_a_function([] {
        return; // doesn't return from f!
    });
}
 
Yeah I'm writing algorithms for tuples, not language features. Go write a compiler somewhere else.
 
Xeo
@jalf Nope
 
you forgot ); on the end of the call, robot
 
sbi
@jalf Last time I looked, you could still stream the second day.
 
@LucDanton But that's what @Xeo was trying to write.
What did I just write?
I can't make sense of it. This is bad.
 
3:32 PM
@sbi hmmm, got a link for that? The C9 page I checked jsut has a download link for the slides
 
@RMartinhoFernandes Has anyone really been far even as decided to use even go want to do look more like?
 
@DeadMG Thanks.
 
wtf am I quoting
 
@RMartinhoFernandes For the purposes of gender equality, I now feel the need to call you an incompetent tit.
 
3:33 PM
ah cool
 
Type 'for_each' in search box, blindly link first result.
 
people seem to having problems with knowing what they are on about :P
 
thanks
 
Oh yeah, I edited that message from for_each to transform.
 
@LucDanton Seem you, me and Xeo, we're arguing about something but we can't even think straight.
 
3:34 PM
oh wait
 
sbi
@thecoshman Yeah, noticed that, too. "What did I just write? I can't make sense of it." "wtf am I quoting?" Is that lack of sleep?
 
@RMartinhoFernandes Case in point, did my code even remotely look like a language feature or a Standard algorithm?
 
@RMartinhoFernandes thinking in spirals is the best way
 
sbi
@jalf Sumpnwrong?
 
Xeo
@sbi Yes.
Atleast for me and @Luc it seems
 
3:35 PM
I'm confused now. The page you linked to just has a link to the page about Herb's talk, doesn't it?
 
@sbi I calls um like I sees um
 
or is it the silverlight thing at the top? I wonder if I can get silverlight on a mac :D
 
15 mins ago, by Luc Danton
transform(std::make_tuple(42), [](int i) -> double { return_(static_cast<double>(i)); }); kind of deal.
^ not a language feature.
 
@LucDanton Blame it on bad timing.
 
sbi
@jalf Yeah, it's a Silverlight thingie. Sorry, I didn't know you're onna mac.
 
3:36 PM
oh, looks like it might work
 
@RMartinhoFernandes I'm probably going to write those algorithms for tuples soon and I'm still not decided what to do about the result of calling for_each. Returning the functor as usual I guess.
 
crazy stuff, I think I have silverlight
I guess I'll celebrate by cooking dinner
 
why?
as in why silverlight
 
@jalf Wait, dinner? Are you back on Europe?
 
Xeo
Damn, need to watch my little brother for a bit. Afk...
 
3:38 PM
dinner is self explanatory :P
 
sbi
@RMartinhoFernandes Yeah, he is. He said he'd only be in Canandada for a few days (a week?), and he again posted during European hours for a while now.
 
Canandada?
 
sbi
@DeadMG I think he said he was in Ontario.
 
uh
the name of the country is Canada
not Canandada
 
3:40 PM
Canandadadadadadadada
home of the stutter
 
@DeadMG Maybe it's German.
 
@DeadMG How do you know when to stop?
 
sbi
@DeadMG Yeah, and the guys I share the room with at work aren't really cow-workers. Also, I don't have a personal head-hunter, things never really work automagically, and I am not a bonobo in a gorilla costume. And, breaking news!, the puppy isn't a @dead machine gun. Oh well. Get over it.
 
you stop when you have got it right
@sbi hard day?
 
sbi
@thecoshman I have a hard day seven days a week.
 
3:43 PM
Ca ok good start na I'm on a roll na to make sure da better change tactics da where the fuck am I
4
 
@sbi oh yeah, kids :P
 
I only wished for you to have an opportunity to correct a typo.
 
Just like bananana.
 
@DeadMG It wasn't a typo. It was a joke.
 
@LucDanton don't you mean banananana?
 
3:45 PM
@thecoshman You know, it sound exactly like that in my head.
 
Here's some precedent:
2 days ago, by sbi
@StackedCrooked Ah, Canandada! I almost suspected it...
 
sbi
@thecoshman I don't always have kids. I'm several times diworst, you know. (And, yes, this, too, is a deliberate typo. If you think about it, you might even understand it.)
 
@LucDanton you mean, you actually say banananananana in your head?
 
@LucDanton Because inside your head it echoes?
 
@RMartinhoFernandes Yeah that's really funny hahaha ha .. .. ha .. .. ha
 
3:46 PM
@sbi deworst... erm... nope. Can't work that one out. German?
 
sbi
@thecoshman Look again!
 
diworst...
 
@LucDanton I'm sorry I have to ask, but I'm not certain. Am I pissing you off? I don't want to.
 
do I need to Google this?
 
You can't google it.
 
sbi
3:47 PM
@DeadMG I don't do typos. I only do unintentional puns.
 
It's "divorced".
 
@RMartinhoFernandes It's fine. Rendering echo is hard since markdown swallows whitespace :(
 
ooooh
 
@LucDanton Use code markup for \ \ \ \ \ extra \ \ \ \ \ whitespace.
 
@sbi oh, really
 
sbi
3:48 PM
@RMartinhoFernandes Of course he can!
 
Fuck. It doesn't work.
 
                                                              this does but is silly.
 
another point for markdown :P
 
sbi
@thecoshman Oh really what?
 
@sbi this
 
sbi
3:49 PM
@thecoshman What about it?
 
@sbi didn't know
 
sbi
@thecoshman Shrug. Why would you? You're usually only here during the day, I usually only whine about it at night.
 
Because he's the Gmail man in disguise!
 
sbi
@RMartinhoFernandes I don't use Gmail for anything important currently.
 
@sbi well then...
@TonyTheLion so glad I found this in the back log :D
 
3:55 PM
I        won!
Unicode 1-0 Markdown.
 
@RMartinhoFernandes happy?
 
sbi
Alan Turing's pardon denied: http://geeks.thedailywh.at/2012/02/06/alan-turing-pardon-denied-of-the-day/
That is really, really sad.
 
@RMartinhoFernandes Should I look at the value of those codepoints? :)
 
I understand the argument, but it is ridiculous to not pardon someone of something that should never have been a crime in the first place
 
@LucDanton It's EM QUAD, U+2001.
 
4:04 PM
@thecoshman lol
 
@TonyTheLion is that a typo, or yet another reddit joke I am not aware of?
 
He's legally out louding.
 
a typo
lol
 
Xeo
back
 
loudly out louding :D
 
4:06 PM
I've seen the case made that either all those convicted of similar offenses should be pardoned (if it's not already the case), or no one should.
 
@LucDanton all of them it is then
pardon ALL the gays!
 
@Xeo super nap?
 
@TonyTheLion brother
 
Xeo
@TonyTheLion Babysitting my brother
 
oh lol
meh
 
Xeo
4:07 PM
But it'd be awesome if I could do power naps
 
yea
save so much
time
more time on reddit or tvtropes
oh no, I mean more time to write code and work hard :P
 
I wish my job could accommodate me going for polyphasic sleep
would fun to give it a go :D
 
no one answers java questions nowadays. :(
 
@TonyTheLion You can't live on power naps.
 
damit
you ruined it
 
4:09 PM
Power naps are good if you want to switch phases, or catch up after a few deficient nights of sleep, but you can't sleep only 30 minutes a day.
 
@sbi isn't the more sad thing that nobody is even talking about all the others in the same position?
 
no one answers complaints about no one answering java questions nowadays. :(
 
sbi
Like being Jewish in Germany was once. RT @laurenbeukes "He would have known that his offence was against the law" http://chzb.gr/wxVOVl
@awoodland You gotta start with someone, and Turing would have be a good one to start with.
 
Xeo
@RMartinhoFernandes You sleep 2h each day, in periods of 20min
 
@RMartinhoFernandes polyphasic sleep, probably got the wrong name
basically taking lots of naps through out the day
 
4:11 PM
You know you have no life when you spend your spare time programming instead of all the other stupid things people your age do.
:(
 
@Xeo What? Do you have a reference?
 
@sbi I would have been much more in favour of a blanket pardon that happened to include Turing
 
sbi
No one answers complains about no one answering complains about n one answering Java questions.
 
Segmented sleep, also known as divided sleep, bimodal sleep pattern, or interrupted sleep, is a polyphasic or biphasic sleep pattern where two or more periods of sleep are punctuated by a period of wakefulness. In Western civilization before the Industrial Revolution, segmented sleep was the dominant form of human slumber since time immemorial, according to A. Roger Ekirch, a historian at Virginia Tech. Over the course of nearly two decades of research, Ekirch discovered extensive evidence of this sleep pattern in a wide variety of documents, dating from the ancient world until the ninete...
Happened to me during two weeks, was really nice. Can't seem to come back though.
Err related to the topic at hand but not quite similar, I should specify. In any case polyphasic sleep is just one click away.
 
sbi
@Xeo There was an article (last year?) on spiegel.de from someone having tried it. Conclusion: In theory, it would be good, but in practice, it's not practical.
@LucDanton That is different from polyphasic sleep, though.
 
Xeo
4:18 PM
Polyphasic sleep, a term coined by early 20th-century psychologist J.S. Szymanski, refers to the practice of sleeping multiple times in a 24-hour period—usually more than two, in contrast to biphasic sleep (twice per day) or monophasic sleep (once per day). It does not imply any particular sleep schedule. The circadian rhythm disorder known as irregular sleep-wake syndrome is an example of polyphasic sleep in humans. Polyphasic sleep is common in many animals, and is believed to be the ancestral sleep state. The term polyphasic sleep is also used by an online community that experiments with...
That's what I was talking about, the last one
 
@Xeo Er, that explicitly mentions that only one person on record ever claimed to have a successful Dymaxion cycle.
 
And I suppose you know what Übermensch is.
 
trollololo
 
user142019
4:19 PM
@Xeo I initially read "Polymorphic sheep"
 
It also mentions the possibility of "decreased mental and physical ability, increased stress and anxiety, and a weakened immune system".
 
I think we need some human guinea pigs :D
 
@sbi I use 'not quite' almost (but not quite) always as a euphemism for 'not at all'.
 
any way, I think it's close enough to half four for me
home time :D
 
what's the criteria again for a C++ gold badge?
 
4:26 PM
Fleet of a thousand, 200 answers.
 
thousand upvotes in C++ tag?
 
Xeo
Yeah, and a few answers
 
ah ok
I'm not close
damnit
 
sbi
@Xeo When I was in the army, I sometimes had to be on watch. There were three sets of personal for a 24hr watch cycle. Officially, we were expected to be on a 2hr cycle. That is, 2hrs walking outside on watch, 2hrs of sleep, 2hrs being awake for backup. But everybody considered that terrible, so we usually talked the officer into an 8hr cycle.
Some officers, however, did it by the book, and when it was really cold, you couldn't survive outside for longer than 2hrs, so we did have to try 2hr cycles once in a while. Nobody liked them.
 
hihi, got more rep in the then in the
although I started with
 
sbi
4:30 PM
@TonyTheLion So do I. In fact, I think most of use here do.
 
I started in too.
 
Xeo
I started with , but not on SO.
 
Oh, I meant on SO.
 
sbi
Well, if it comes to that, I started with BASIC, back in the 80s.
 
I don't see how that's gonna help much
other than set up a protection racket
 
4:35 PM
Sigh.
> The exam will test for basic knowledge, not mastery of subject matter
 
FWIW 'engineer' is a trade with legal protection where I live.
 
(There are of course legacy names like 'sound engineer' and the like which aren't considered engineering trades.)
 
I thought that in the US engineers drove trains
 
IEEE just wants to make some money
 
Xeo
4:38 PM
Okay, back to tuple-for
 
Hello guys! How are you? :)
 
@sbi it surprises me, must mean I've learnt a lot since I've been doing c++ and chatting here
lol
 
Als
Well i got a gold shiny in C and C++ both.
;)
Okay and there's no one who wants to comment on my boast.
 
4:54 PM
You're great.
 
Als
lol
Oh but thank you :P
@RMartinhoFernandes You got a truck load of gold shiny's
 
sbi
@Als Ick, a golden C badge!
 
Als
@sbi Oh yes. I didn't get understand what ICK means though, I looked chat slang page here acronymfinder.com/ICK.html but i think none applies
 
0
Q: Regulation of the software industry

awoodlandEvery few years someone proposes tighter regulation for the software industry. This IEEE article has been getting some attention lately on the subject. If software engineers who write programs for systems that expose the public to physical or financial risk knew they would be tested on thei...

 
4:59 PM
@Als it's a way to utter disgust
 
Not 100% sure that's a good question for programmers, but it fits the right place in the diagram of what makes a good Q for the site
 
At what point does mentioning TV Tropes become trolling? (in reference to Xeo at channel9.msdn.com/Events/GoingNative/GoingNative-2012/…)
 
Als
aha now I get it, something like eeeeewwww
:P
 

« first day (479 days earlier)      last day (4467 days later) »