« first day (668 days earlier)      last day (4271 days later) » 

12:01 PM
You know, I should write a book titled How Not To Write C++ Code, in which I give glimpses of my past code-base.
 
@R.MartinhoFernandes Also, don't
> I would absolutely not write a technical book again. It’s a tedious process and unless you LOVE writing and are really good at it (like Nicholas Zakas or Dave Flanagan) then I suggest that you stick with the medium that is truly successful: Writing long-form articles/blog posts and possibly spinning them off into purchasable ebooks.
> Ironically working on the book (or not working on it, however you look at it) actually compelled me to NOT blog more as every time I wanted to write a technical blog post I was forcing myself to make the decision “I’m writing about 1000 words on a technical matter, shouldn’t this just be going towards my uncompleted book?” and would just end up writing nothing as a result.
 
@FredOverflow Was this technique ever actually used in commercial code at any time?
 
I don't know.
 
@ApprenticeHacker Each time you have a bad idea, you can be sure someone somewhere implemented it in production code.
 
And how does he know the idea is bad?
 
12:10 PM
At first no one does. That's why it ends up in production code.
 
I have been toying with this idea of translating <algorithm> into a void* C library. It's gonna be the best thing ever, right?
 
@kbok Well, what's the context? What about 1) modèle, 2) gabarit
 
@sehe ITT it was CRTP, so I preferred "modèle"
 
0
Q: How can I implement a 'come from' feature in C++

Chris Huang-LeaverIn Intercal there is a come from operator because obviously, GOTO is very dangerous. How could I implement such a feature in C++ ?

poor mate, people don’t like is question
it’s not that bad
 
> In computer programming, COMEFROM (or COME FROM) is an obscure control flow structure used in some programming languages, originally as a joke.
 
12:24 PM
It works in a really sick way
 
it’s actually an interesting construct – certainly not in the general way, but in a structured way it would be equivalent to a poll, or listener
 
Or a coroutine yield - which is much cleaner
 
@BartekBanachewicz = poll
 
@KonradRudolph herp.. I don't know if it's perfectly the same, but still... derp.
 
sbi
@BartekBanachewicz No, I mean I'd have to use some abstruse Alt+NumPad combination to produce the glyph on my keyboard.
 
12:32 PM
Wow, look at all the questions on stack overflow :)
 
@kbok oh, and now fancy English! what is this? correct day?
 
sbi
@R.MartinhoFernandes That's old enough that I have already forgotten most about it. :-/ I recently read Snuff, though.
 
@thecoshman No, I mean, "pattèrne" is not a real word
 
@kbok it fucking is now (╯°□°)╯︵ ┻━┻
 
@thecoshman ouch.
 
12:34 PM
Java power:
 
@sbi are you aware of what a 'Snuff site' or 'snub site' is?
 
> Although this is a checked exception, it is rarely recoverable. Most callers should simply wrap this exception in an unchecked exception and rethrow
 
sbi
@thecoshman Nope.
 
@sbi if I could spell it right, it would be a site through which you can organise to kill people in style of your choosing
 
@KonradRudolph I voted to reopen.
 
12:36 PM
@thecoshman ┬─┬ノ( º _ ºノ)
 
sbi
@thecoshman I think the book refers to smokeless tobacco more than anything else, although it's not exactly a tobacco — since it's consumed by (and consumes) troll kiddies.
 
@rubenvb probably “not constructive” … that’s why I abstain from voting either way
 
@sbi snuff is a thing you snort
 
sbi
@thecoshman I already said what I think it refers to.
 
12:38 PM
@KonradRudolph well, I never heard of comefrom, so it seems legit to me, even if it was meant as a joke. I'm sure some of the regulars here could take the OP up on the challenge.
 
@sbi hey! not only. I do snuff and I find it really good alternative to smoking. It's cheapier, much more healthier and you don't screw other ppl up.
 
@sbi it's also a site you get watch people be killed, often to your whim
 
sbi
@BartekBanachewicz Sigh. I. Think. The. Book. When. Mentioning. Snuff. Mainly. Refers. To. That. Stuff. Trolls. Consume. Is that really so hard?
 
@BartekBanachewicz really? It's very old fashioned, akin to smoking a pipe
 
@CatPlusPlus checked exceptions suck
 
12:40 PM
No, really?
 
holy crap. Google is down.
 
Google can't be down
 
ah wait
 
No, it's not.
 
12:42 PM
it's back, relax
 
Google is never down :P
 
stupid browser caching of ... stuff
 
Their entire network must be down for Google to be down.
It's not very likely.
 
It might have been a local outage
 
12:45 PM
I'd say you would mass DNS poisoning is more likely to happen
 
sbi
Oh, BTW, since last night I cannot load any twitter.com address. It just keeps trying to connect the server. The tweets in the tabs already open, however, are updated. I suppose that's on my end?
 
@sbi twitter.com works here.
 
@sbi clear ALL the cache!
 
clear the browser and DNS cache.
 
sbi
Mhmm. Since I had the issue at home as well as at work, I suppose it's time to restart FF. Damn, and it's not even been patch day!
@thecoshman Doesn't help.
@rubenvb How do I clear the DNS cache? An erroneous DNS entry seems like a problem that fits the symptoms.
 
12:53 PM
@sbi lol. I periodically close my browser just to clear my head/thoughts
 
@sbi off and on again?
 
@sbi WIndows or Linux?
 
sbi
@rubenvb Win7 64bit
 
@sbi ipconfig /flushdns
 
sbi
@thecoshman Dude, I don't even want to restart my browser, let alone the machine!
 
12:54 PM
@sbi you could try just turning it on a second time?
 
sbi
@rubenvb I'll try, but it seems unlikely, since I just saw that ping twitter.com works...
Nope, doesn't help either.
Must be FF.
Oh well, I might restart it tonight.
 
did you cycle FF?
 
@thecoshman he doesn't want to
 
sbi
@thecoshman ??
 
for some reason.
you can restore the previous session you know
 
sbi
12:56 PM
@thecoshman I have a three-digit number of tabs open. Restoring the previous session takes several minutes. It's a major PITA.
 
@sbi fuck sake man, just restart FF would you!
 
@sbi and how long have you been staring at a non-twitter.com tab?
 
@sbi fuck sake man, you can book mark shit you know
 
next week on hoarders, a man with 4000 tabs
8
 
lol
 
12:56 PM
@TheForestAndtheTrees how long have you been waiting in the wings to post that?
 
sbi
@rubenvb Once last night, and once this morning, probably about 1min combined.
@thecoshman He has 1000 tabs open to different forums, so he posts this about once an hour.
 
@sbi what? that's idiotic. He would obviously have a script to cycle between each tab sending that message
 
@sbi I think you forget to count the time you discussed this here, and tried to flush the dns cache.
 
@sbi Set Firefox to not load everything at once.
 
sbi
12:59 PM
@rubenvb For one, you were explicitly asking about the time spent staring at non-opening twitter tabs. Also, most of that time here was spent explaining why I dislike restarting.
 
I think it's even exposed in the UI now.
 
@sbi lol. ugh
did you know bash's [ works differently than sh's [?
 
sbi
@CatPlusPlus I wish it would load everything. Instead it only loads those tabs visible (driving me mad every time I switch tabs), and still takes minutes to load.
 
@sbi Use a different browser, or mess with about:config
 
@sbi You really don't.
If it loaded everything, it would take 20 minutes to load and possibly even burn and crash.
Options > General > Don't load tab until selected
 
1:01 PM
@sbi you want over 100 tabs attempt to load at the same time?
 
I wish Chrome had this setting.
 
sbi
@CatPlusPlus Ah, thanks. Unchecked that now.
 
though, I it would be nice if it would load the other tabs in idle
 
sbi
@thecoshman What do we have DSL for, huh?
 
@sbi It's really not a good idea. Just saying.
 
1:02 PM
so you do get them all loaded
 
It's not a matter of bandwidth.
 
@sbi it's not the net connection I am concerned about
 
It's a matter of RAM, and a 64-bit browser eventually
There's x64 nightlies, but that would update every day, so not really an option.
 
it's the sheer number of connections opening to try to pull all of those pages
 
Sheer.
 
1:03 PM
Shire
 
@CatPlusPlus thanks
@StackedCrooked screw you :P
 
doesn't Windows just limit that to a ridiculously low number?
 
sbi
@CatPlusPlus They are Shirlay shearing the wire!
 
It's mostly CPU and RAM issue.
 
like... 5 or something?
 
1:03 PM
XP did.
And it's apparently only about half-open connections.
 
@sbi :'(
 
And 7 disabled it.
 
sbi
I have 8GB of RAM on 64bit. RAM really shouldn't be the issue.
Everyone calm down. Olympics are 2012 years old, not 3000. Jesus competed in the first one and won gold for America. Learn your history!
2
 
Firefox has no official 64-bit builds yet.
 
sbi
1:06 PM
@CatPlusPlus Indeed? Nevertheless, since I have 8GB (rather than 4), FF's performance became good. (It was poor before.)
 
yes it does, nightlies. Have been there for quite a while. Stable for a little shorter while.
 
Alpha nightlies are not official.
 
about a year and a half it's been quite stable.
Flash was the biggest problem in the beginning (remember Flash player Square?)
@CatPlusPlus euh wut?
 
@CatPlusPlus don't think 'official' is the best word there
 
Builds are not official/supported until released, geddit.
Officially released.
With official stuff.
 
1:10 PM
Official == built by mozilla. you mean official release.
 
my timing is impeccable.
 
shudder 'commandFactory.java'
@CatPlusPlus gedit only has one 'd'
 
"C++ supports cleaner code" but Linus will not like this - GCC Moves Forward With Conversion To C++ http://zite.to/Nt0hVo #gcc #cplusplus #li
 
Yay, GCC will be written in horrible C++ instead of horrible C.
3
 
@thecoshman I don't think it's old fashioned. For example, there was Ozona campaign in my city, when hot chicks offered the non-tobacco version to passer-bys.
As to sbi, (lost the link) ok, just sayin'
 
@CatPlusPlus your bitter cynicism will always be garnered with meaningless stars
also, cynicism is a really hard word to spell
 
@CatPlusPlus indeed. At least the C++ camp convinced the C camp to use std::vector (the counterargument was: "shudder templates")
 
@thecoshman Truly.
 
1:22 PM
#1 pet peeve about Google Chrome. It's dictionary is utter crap compared to Google search
 
@thecoshman Pessimism is better, because then people can surprise you only positively.
 
nice theory :)
 
@thecoshman your apostrophes are killing me :P
3
 
Or you get to say "told you so" and feel smug. Win/win.
 
@rubenvb fuck!
why do I keep farting them all over everything I write? Where the hell did I pick up that havvit
Expect anything, expect disappointment
 
1:24 PM
@thecoshman we'ren't you saying it's use whe're'ever was all'right?
 
@rubenvb commas probably :P
I love me some commas
 
You commie.
 
lol and they used Clang 1.5 vs GCC 4.5
 
@rubenvb Nope.
I've seen much worse.
 
@rubenvb lolwot
 
1:26 PM
And not just ones from 1999 era of animated GIFs and JS stuff following mouse cursor.
 
oooh Super secure SSH
 
With a bluetooth keyboard and a charging dock or a stand, iPad is a great platform for Vim coding.
^ idiot-matic
 
@thecoshman markdown fail
 
@thecoshman You can use OTP, too.
 
1:27 PM
One-time passwords.
 
Well, this is a two-factor with OTP.
 
ah lol
 
not actually read the article yet :P
 
The GCC diagnostics are quite good in the special cases they present:
but they'd be worse in the more complicated cases IMHO.
 
1:30 PM
@kbok its nice. I don't have BT keyboard yet, but of course I already installed vim
 
and the ~~~~~ are much nicer in Clang still.
 
@rubenvb Yay, diagnostics fight.
 
Notice the pun with "idiomatic", "idiot" and "automatic".
 
I've used it first.
Copycat.
2
 
@kbok I don't get it
@CatPlusPlus That one I got ;p
 
1:31 PM
idiomatic storage
 
@StackedCrooked still... maybe i'm stupid or whatever
 
@CatPlusPlus Sillycat.
 
@BartekBanachewicz what's to get? it's the word 'idiot' and 'automatic' rammed together?
 
@CatPlusPlus they also tend to not include older GCC diagnostics to show how bad they were.
 
@rubenvb Everyone knows how bad they were.
 
sbi
1:32 PM
15 hours ago, by sbi
> The GCC initiative to convert more of the code-base from C to C++ as the implementation language for this leading open-source compiler is nearing fruition. — http://www.phoronix.com/scan.php?px=MTE1ODc&page=news_item
 
Why would they embarrass themselves further. :P
 
@thecoshman i don't get it with the context of iPad coding
 
i'm cold
 
@thecoshman No, it's idiomatic
 
@KonradRudolph May Linus choke on his fanaticism.
 
1:38 PM
May GCC become slower still.
 
@rubenvb why do you say that?
 
@thecoshman in general, bad C++ code => slower than GNU C code.
 
@rubenvb well of course bad code is bad.
 
@sbi Friend of mine bought a bunch of Discworld books after my suggestion, so I'm taking advantage of it and borrowing some :) (My friends lend me their books even though I don't lend them :P)
 
@thecoshman hehe.
 
sbi
1:40 PM
@R.MartinhoFernandes You don't lend yourself?
 
@rubenvb I doubt it's going to be any slower, since they're probably going the C with Classes route anyway.
 
I have that obsession for pristine books. And my friends invariably ruin them for me.
 
Hey guys, for will waitpid ever cause EINTR is the WNOHANG option is set?
 
sbi
@R.MartinhoFernandes "...I don't lend me"
 
@R.MartinhoFernandes I guess we all got our own obsessions.
 
1:41 PM
@sbi Oh.
 
@MrAxilus What what the the fuck fuck?
 
sbi
@MrAxilus Umm. The language here is English.
4
 
EINTR WNOHANG EVRR!!1
 
whoah, I must be tired. lol I just reread that and I didn't even understand it. Hold up..
 
@EtiennedeMartel and when they start working around its limitations... chaos will ensue.
 
1:43 PM
@MrAxilus I wouldn't bother, I doubt you on on course for a decent response
 
will a call to waitpid() ever cause the EINTR error if the WNOHANG option has been set?
 
@sbi That sounds like IKEA instructions for some reason.
 
sbi
@thecoshman Umm. The language here is English.
4
 
@sbi's on a roll.
 
sbi
@MrAxilus What part of the C++ standard is that mentioned in? Because I don't recall 'WNOHANG' at all.
 
@sbi Trollish you.
 
@sbi I think he's talking pthreads
but of course you knew that
 
@sbi It's POSIX. Come on, that's not really off-topic here (POSIX is even referred to in the C++ standard and there's a misteriously reserved namespace posix thing in it).
 
It's almost standard.
 
sbi
Yeah, but isn't is a bit mean to expect everyone to get what you're mumbling about when you just throw them a few bones?
 
1:46 PM
@MrAxilus I don't see WNOHANG influencing the return value of waitpid.
 
sbi
@rubenvb Actually I didn't. That's because I have never worked with pthreads.
@EtiennedeMartel Is it now? Well, "WNOHANG" sound Chinese to me, TBH.
 
Not the return value, the value of errno.
from errno.h
 
@R.MartinhoFernandes There's a large number of us who are Windows men.
 
@MrAxilus the only occurence of errno on that page is with regards to ECHILD.
 
@sbi shit it
typo, but I will stick to it
 
1:48 PM
@MrAxilus and these docs are waaay better: pubs.opengroup.org/onlinepubs/009695399/functions/waitpid.html
 
@sbi Ah, ok, that's fair enough.
 
When in POSIX land, use the POSIX docs. Not linux man pages.
 
@DeadMG oxymoron
 
Oh, fun stuff. Thanks.
 
@MrAxilus see the return value section, it talks about setting errno to EINTR
 
1:49 PM
Does anyone knows of a tool to manage windows environments variables ?
 
@kbok set
 
before I kill myself
@rubenvb It doesn't handle the different variables storages
 
Right-click on My Computer -> System tab -> Environment variables.
You probably already know that...
 
Control Panel -> System and security -> system -> Advanced settings -> Environment variables
 
1:51 PM
@StackedCrooked You must be trolling
 
@kbok How could I be trolling? It's what you asked.
 
@kbok if that's not enough for you, tell us more. You're being very specific right now.
 
sbi
@kbok Rather than asking about an ill-fated attempt to solve your problem, why don't you tell us what your actual problem is?
 
@sbi I bet a penny it's only PATH.
 
@sbi Fair enough. I have database connection issues and several people in my company told me it's probably related with environment variables. Now I have to investigate said variables, but set and the control panel UI are so terrible that it's near impossible to work out typos and such
 
sbi
1:53 PM
@BartekBanachewicz And I wouldn't bet against that. Still, if you want to know something, you shouldn't make those you ask guess what your problem is.
 
thanks @rubenvb despite my initial failed attempt at Engilsh you still helped a lot.
 
Also, neither the control panel nor set lets you access the volatile environment, you need specialized tools for that.
 
@kbok If you write a nice tool that manages these (say, using .NET), i'll buy a license for a 6-pack of any reasonably priced (~beer) beverage
 
So no, no tools on a vanilla windows install are sufficient to manage environment variables
 
I don't think so
 
sbi
1:56 PM
@BartekBanachewicz I'm not sure how that would work. Wouldn't any tool you write only change its own environment?
 
Also, it's a matter of taste but I find the environment variable UI terrible
 
@sbi Why? There's the interface via set to change it globally, i believe
 
@sbi Usually those tools update the registry and flushes what it can
 
@MrAxilus The right documentation helps a lot :)
 
sbi
@kbok It is indeed terrible. However, as you have found out yourself, it is a vast improvement over the command line.
@BartekBanachewicz Is there?
 
1:57 PM
@sbi Put the EINTR in the WNOHANG while turning the waitpid.
 
@kbok volatile environment?
 
I wish environment variables on Windows were kept in a text file.
 
'"a" is a memory address': no, no more than x is a memory address if you write int x;. The name of the array can decay to a pointer to the first element of that array, though. — Lightness Races in Orbit Aug 14 '11 at 15:14
Thanks for spreading the word, Lightness. By the way, is (s)he still around?
 
@sbi It misses a few useful things, like printing all variables beginning with a given prefix.
 
@FredOverflow no, dtor shouldn't be virtual, because you won't own an object via IFoo*
 
1:58 PM
It's one of those cases where it makes things infinitely easier.
 
@sbi "It is not part of every Windows XP setup but a command-line tool called setx.exe is included in the Windows XP Service Pack 2 Support Tools. This tool extends the set command so that permanent changes in the environment variables can be made. "
 
@rubenvb That's the one no one knows about. :(
 
@CatPlusPlus but you canny do that, think of the children
 
sbi
Really, it depends on what you're doing. If I have to edit my path variable, I just copy the damn thing into the editor of my choice and edit it there.
 
@Abyx What if a factory function returns an IFoo* or a std::unique_ptr<IFoo>?
 
1:58 PM
As for GUI, Rapid Environment Editor and you'll never have to look at the standard editor again.
 
@kbok That helps a lot now, doesn't it.
 
@CatPlusPlus set > file.txt
 
sbi
@BartekBanachewicz Ah, I hadn't heard of that!
 
@Abyx So helpful.
 
sbi
@kbok sort | grep
 
1:59 PM
Environment variables aren't meant for what you're seemingly using them.
 
@sbi It's contained in vanilla Windows 7 (at least I have it right now)
 
@BartekBanachewicz Neat.
 
@rubenvb Sorry. Those are environnment variables that are reset each time you login; they are stacked on top on your user and machine ones. They are usually defined by the login process. They are used in corporate networks for instance.
 

« first day (668 days earlier)      last day (4271 days later) »