« first day (873 days earlier)      last day (4076 days later) » 

9:00 PM
The function will still accept negative input.
 
@CatPlusPlus ok, what's better?
 
I would make a "Deferred" type, which is like, an as-yet-unknown type.
 
You need overflow control
Boost has numeric_cast
 
@Abyx "The long names and template-like syntax of the new casts put off some people. That may be all for the better because one of the purposes of the new casts is to remind people that casting is a hazardous business and to emphasize that there are different kinds of danger involved in the use of the different operators." (D&E, §14.3.1).
 
then e.g. deferred.identifier is still deferred type.
 
9:00 PM
@CatPlusPlus he already handles that case
 
@DeadMG Unknown until when?
 
the thing is, I'm not sure how to "unify" it back later.
 
@CatPlusPlus nah, I don't need it there
 
@R.MartinhoFernandes Say, type inference on this function is completed.
 
9:01 PM
so when I create a function, then I start by making it's return type "Deferred"
 
I only know of this system:
In type theory, Hindley–Milner (HM) (also known as Damas–Milner or Damas–Hindley–Milner) is a classical type inference method with parametric polymorphism for the lambda calculus, first described by J. Roger Hindley and later rediscovered by Robin Milner. Luis Damas contributed a close formal analysis and proof of the method in his PhD thesis. Among the properties making HM so outstanding is completeness and its ability to deduce the most general type of a given source without the need of any type annotations or other hints. HM is a fast algorithm, computing a type almost in linear time wi...
 
@MooingDuck Yup.
 
In general, I don't really care about your crappy code
 
@R.MartinhoFernandes I read that, but it's not in English.
 
9:02 PM
HM is just haskell without type classes AFAIK
 
lol
 
meh... casting int <-> unsigned is such a pain =\
 
@Abyx Casting is a sign of a bad design, though.
 
also
the other thing is, I'm really not sure WTF to do after I resolved the Deferred type.
 
We implemented something like that in the Program Calculation class, but I don't think I kept it.
 
9:04 PM
I tend to use unsigned integers only for bit fiddling these days
 
template<typename Iterator, typename Orig>
boost::iterator_range<boost::ForwardTraversalIterator> my_make_range (Orig o) {
	return boost::make_iterator_range<Iterator(o), Iterator());
}
 
I mean, I'd have to rescan virtually every function looking for where that type was dependent.
 
My colleague insists on using unsigneds everywhere he can.
 
^ how about this?
 
It gets weird real fast.
 
9:05 PM
@CatPlusPlus you have to use size_t for sizes
 
@BartekBanachewicz Take a reference; streams are generally not copyable.
 
@BartekBanachewicz You have a < where you should have a (.
 
I don't write C++
 
@CatPlusPlus Right.
 
template<typename Iterator, typename Orig>
boost::iterator_range<boost::ForwardTraversalIterator> my_make_range (Orig & o) {
	return boost::make_iterator_range(Iterator(o), Iterator());
}
yeah.
science, bitch.
 
9:06 PM
@BartekBanachewicz I don't like the name, I think not many iterators are unbounded like that. make_unbound_range?
 
@BartekBanachewicz Non-const. Reading from streams is a mutation.
 
@Abyx I'd create id as a bounded type instead of an int (with, in this case, 0 and m_globals.size() as the bounds).
 
@EtiennedeMartel I prefer using int32 and int64 (signed) for all types, all the time.
Unfortunately, std::size_t is unsigned and that gets really messy really fast.
 
int64 is_small = true;
 
On the whole, I'm only losing 2 billion byte slots if I stick to int32.
 
9:07 PM
@ThePhD You mean int32_t and int64_t, from cstdint?
 
int32 name = "foo";
 
@EtiennedeMartel I typedef them down to int32 and int64.
 
@MooingDuck what does "unbound" mean in this context
 
@ThePhD Erm.
 
The only way you'd be able to use the full range of std::size_t is if you were working with bytes.
 
9:08 PM
@BartekBanachewicz the "position of the end" is unknown. for reading in streams, writing to streams. pushing things onto vectors... stuff like that.
 
If it's shorts, you can only have (2 ^ 32 - 1) / 2
 
template<typename T>
boost::iterator_range<std::istream_iterator<T>> make_istream_range (std::istream& o) {
	return boost::make_iterator_range(std::istream_iterator<T>(o), std::istream_iterator<T>());
}
 
and it only gets smaller.
 
Write 64-bit code, never be able to use full range of std::size_t
 
@MooingDuck makes sense. Thanks!
 
9:09 PM
I would simply do this.
 
Unbounded integers are bestest
 
anyway, compiler should be smart enough to understand that if I said "x >= 0 && ..." then it's OK to have "... x < some_uint"
 
Maybe with the stream char and char_traits params, but that's it.
 
@R.MartinhoFernandes what about back_inserter?
 
@MooingDuck What about it? That's an output iterator.
 
9:10 PM
@R.MartinhoFernandes actually, yes.
a function for each iterator type is fine with me
 
unsigned is also a bitch for subtraction. ._.
 
Type system should be smart enough to disallow any and all implicit conversions
 
It ends up less verbose and clearer.
 
user142019
Arrgg singleton y u no work.
3
 
lots of laughs @MooingDuck @R.MartinhoFernandes
@DeadMG ^
 
9:12 PM
eh
 
@BartekBanachewicz whistles
 
@Zoidberg Sweet fuck, why do you keep making these bad decisions? Haskell, singletons...
2
 
user142019
I am not.
 
user142019
I'm asking why singletons don't work in general.
 
user142019
If they did, the world would have fewer problems.
 
9:13 PM
@Zoidberg they always work for me
 
@Zoidberg No, because people would want to use them more.
 
Woot, compatibility equivalence is le completorz.
 
Because bad design can't work
 
@Zoidberg global state makes reasoning confusing
 
user142019
@Abyx yes but you also prepend all your class names with C and A.
 
9:13 PM
@Abyx That's it, I never want to have to see your code ever.
 
Global state is least bad really
 
@Zoidberg no I don't
 
Dependency hiding trumps it
(Okay maybe not least, but less)
Any code using singletons instantly becomes unmaintainable
 
@EtiennedeMartel His "singletons" are just (initialized-on-demand) globals, btw.
 
uh what.
 
9:14 PM
@Zoidberg Mostly because they represent a poor abstraction -- a type of which only one instance can ever exist.
 
error : no instance of function template "boost::range::istream_range" matches
 
@CatPlusPlus ServiceProvider :3c
 
@CatPlusPlus only if it was maintainable before.
 
@BartekBanachewicz Usage goes something like boost::range::istream_range<int>(std::cin)
 
@ThePhD Yeah it's bad
 
9:15 PM
@R.MartinhoFernandes It's even worse.
 
@R.MartinhoFernandes oh damn, yes.
it compiles!
@R.MartinhoFernandes it's just in boost:: though
 
@EtiennedeMartel nope.
 
Why are you using them
 
And text is close to feature complete. Now I need collation, and testing and bug fixing.
 
9:17 PM
Cool
 
@R.MartinhoFernandes And VC++ support! <3 <3 ?
 
Fuckyouton
 
@Abyx I like how you never try to even argue your point.
I feel like I'm getting worked up for nothing.
 
@EtiennedeMartel He's probably tired of doing it here. Can't really blame him.
 
@EtiennedeMartel Yup
 
9:19 PM
it's just nothing to argue here.
 
@R.MartinhoFernandes I wonder why.
 
define "bad".
 
Feb 27 at 13:50, by R. Martinho Fernandes
@DeadMG No, I said before I won't try it before the C++11 update.
 
"bad"
 
Feb 27 at 13:51, by R. Martinho Fernandes
Basically, the same reason I am not even testing with GCC 4.8 or clang 3.3: I don't want to track a moving target and spend time using workarounds for bugs that will be fixed/missing features that won't be missing.
 
9:20 PM
@Abyx Why do you use singletons?
 
they are evil, but sometimes it's necessary evil.
 
q_q
 
Guess I have to keep using my shitty Encoding support.
 
@EtiennedeMartel 'coz they are better than plain global variables.
 
9:21 PM
Jesus
In what way
 
@R.MartinhoFernandes Maybe VC++ will fully support C++11 and then you'll switch into modules because GCC/Clang would support it.
 
@Abyx That's like saying "Getting a sword to the chest is not as bad as taking two swords to the chest".
 
@ScottW yep, I agree.
 
Shit, it's like he's proud of doing quick and dirty stuff.
 
9:21 PM
They're not a solution at all
 
@Rapptz lol, I doubt there will be usable modules before Q3.
 
Short term or long term
 
I wish I had some beer right now.
 
Only beer?
I wish I didn't remember my name right now
 
@R.MartinhoFernandes Ooh. Is Q3 when VC++ will update C++11 support?
 
9:22 PM
@Abyx I'm not (at all) sure I agree. You're putting a lot of work into maintaining their singularity, but generally accomplishing nothing useful in the process. A normal global accomplishes the same basic goal, but with substantially less work.
 
I don't drink hard liquor on weekdays.
 
@Rapptz No. I don't know when that will be to be honest. Q3 is when Unicode 6.3 comes out, and it's my current target for 1.0.0.
 
Well, I'm at the party. Beer everywhere. It's so intense I've just logged in here on phone.
 
@DomagojPandža . . . .
 
Ahaha
 
9:23 PM
You're doing it wrong.
 
@EtiennedeMartel nope. thing is that if you already have bad code, you can make it a bit better by using singletons.
 
@Abyx WHAT. You can make it only worse
 
@R.MartinhoFernandes Oh. So you're not going to switch to modules when it becomes substantially supported?
 
Some algorithms will change in 6.3, so I don't want to release something that will be outdated a few months later.
 
@Abyx Or by injecting the dependency where needed.
 
9:23 PM
Global scope should die
 
@Rapptz Well, when that happens I will probably need to have support both compilation models for a while.
 
inb4 "repairing code by adding singletons"
 
Also shut up about singletons already it's tired it's boring it's physically painful to read people who defend them
 
@EtiennedeMartel "Of course, now I touch nothing stronger than buttermilk: 90-proof buttermilk."
 
ugh, I hate beat up bananas.
 
9:24 PM
@EtiennedeMartel you can't just switch from bunch of global variables to DI
 
@JerryCoffin sssh.
 
Singletons can choke on a dick.
 
@Rapptz But the thing is, once I start supporting VS, it's a lot easier to do that dual-support then, than it is the other way around.
 
@Abyx You accept your fate way too easily for my tastes.
I would be throwing chairs around in your position.
 
@Abyx so you should repair the code that needs fixing, instead of covering it with singleton :/
It's like covering a hole in a wall by a poster :/
 
9:25 PM
@JerryCoffin Alcohol proof is weird
 
@BartekBanachewicz one project at my work uses globals for all variables except for those required by recursive functions :(
 
Why why why do you people invent weirdest units
 
Proof by alcohol: I am drunk, so God exists.
@MooingDuck Sorry, I should not have laughed at your misfortune.
 
@R.MartinhoFernandes I'm still not sure how the new compilation model will actually be. It sounds promising from all the things I've read but I feel as if I'm setting myself up for massive disappointment.
 
@MooingDuck sorry my job is great :<
 
9:26 PM
I don't want to be a programmer
Please shoot me
 
i am not starring that
 
@MooingDuck I weep for your soul
 
meh... just take a large C codebase with globals and crap, and try to refactor it to C++ without globals. IMO it's better to do it with singletons.
 
@CatPlusPlus Marketing -- bigger numbers sound more impressive.
 
You don't "refactor" C code into C++
OH HEY I JUST REFACTORED THIS ASSEMBLY CODE INTO JAVA
 
9:28 PM
@CatPlusPlus why not?
 
Because it's not refactoring
 
@BartekBanachewicz I think you are overdoing it.
@CatPlusPlus lol
 
@R.MartinhoFernandes you are right. cat is ok by himself, he doesn't need my help
 
asm.js
 
@CatPlusPlus percentage of the minimal alcohol level where you can dump it on gunpowder and still light the gunpowder? Yeah, that's a wierd unit.
 
9:29 PM
@BartekBanachewicz "I'm sorry, but you are [insult]".
 
Every time someone remarks about converting C codebases to C++ I cringe
 
Always sounded so weird.
Why are you apologizing if you're insulting him?
Fake politeness, that's what it is.
 
Sometimes I wonder why you guys use amperes instead of "blitzes" or volts instead of "flashes" or something.
 
He's apologising for not insulting him earlier or harder
 
@EtiennedeMartel Probably because I know I shouldn't open my mouth in the first place
 
9:30 PM
@CatPlusPlus ...which the JIT is going to re-factor back into assembly. The circle is now complete. If you cut me down I will become more powerful than you can imagine!
 
lol @Cat
 
@BartekBanachewicz You don't have to. You can write with your mouth shut.
 
really. I have better stuff to do than insulting @Abyx
like, I am getting unresolved external
 
We should talk about not-programming more and about programming less
 
@EtiennedeMartel Now there's an opportunity for re-factoring: "I"m sorry but you're an ass" becomes "I"m sorry that you're an ass." :-)
 
9:32 PM
I'm sorry butt you're an ass
5
 
I'm sorry your butt is an ass
 
Who's abellina?
Hi?
 
Lounge<C++> Presents: ConversationSharper - refactoring for hilarity.
 
@CatPlusPlus I'm sorry butter you're an ass.
 
hey
 
I am just hanging out getting the idea behind the chat. First time. Read the wiki.
 
They'll see about localized!
 
@ScottW :frogout:
 
@ScottW Thanks!
 
You can't stop the photons bananas!
 
9:34 PM
You can't stop the banana signal
 
Voted reopen.
 
Tsk having privileges on meta
 
nvm
 
first, send Blizzard ten dollars.
 
9:36 PM
It solves everything
 
no, not really.
 
At least on Blizzard's side
 
I sent them my soul last week
 
It must've been worth less than ten dollars then
 
@ScottW Next tuesday.
 
9:37 PM
@Borgleader Well, that's why you can't play vs AI then.
 
Tuesday Next.
 
you had no soul left since I already used it for payment.
 
@ScottW 40.
Standard for an expansion pack.
 
user142019
 
user142019
lol dat face
 
9:37 PM
@EtiennedeMartel It was practically the same price as a full-price game here.
 
@DeadMG So sad.
 
@Zoidberg Seriously, that is so...
Ridiculous?
 
Here WoL was 60$.
 
Like having a pile of poo as an emoticon wasn't ridiculous
 
@EtiennedeMartel The poor exchange rate has made buying goods from the US expensive.
 
9:38 PM
Like having said emoticon as a dedicated Unicode character wasn't ridiculous
Apple just went along
 
@CatPlusPlus Well, people were using it. It wasn't added out of the blue.
 
I'd probably do the same if I were the person designing glyphs for that
 
Xeo
Did I hear boost::icecream_range?
 
@R.MartinhoFernandes Right. Sounds reasonable
 
@CatPlusPlus Actually, Apple and Google were the ones behind the proposal to encode it.
They didn't "go along", they pushed for it.
 
9:39 PM
vOv
 
@sehe I'm serious. Japanese are crazy, man.
 
user142019
http://💩.la/
 
Shitla, new startup by Zoidberg
 
I'd work for Shit.la.
 
By the way Robot
 
user142019
9:41 PM
I'd call my start-up oxyMORON.
 
Sounds fun.
 
Didn't you say 4 hours ago that you're tired and have to go wake up early
 
Hmm, maybe.
(It was 2 hours ago)
 
user142019
Rotating PILE OF POO. :|
 
user142019
Oh hey
 
user142019
9:41 PM
the font family used there is called "Lobster Two".
 
Anyway I'm falling asleep so I'll just simply let that happen
 
Nov 28 '12 at 2:59, by Xeo
Sleep typing, secret German skill.
 
Byeee
 
@R.MartinhoFernandes So, you're becoming fully German now?
Next thing you know you'll be looking forward to the Oktoberfest in Munich.
 
What do people here think the odds are of North Korea restarting their war(s)?
 
9:43 PM
@MooingDuck I think they're just desperate.
 
Heh, rewriting my CV using LaTeX.
Feels much nicer than Word.
 
@EtiennedeMartel haha
 
ZWSP does not have carbohydrates. — R. Martinho Fernandes 3 hours ago
lol ^
 
Yeah, the "zero-width" kinda gives it away.
 
@TonyTheLion Until you start doing tables
 
9:45 PM
@EtiennedeMartel That's Bavarian.
 
Oh, tchrist commented on my answer.
 
After third you want to kill yourself
 
@LucDanton I know.
 
Not true
 
9:45 PM
But isn't that the same thing?
 
@CatPlusPlus Isn't that with everything you do?
 
(Hihihi)
 
Everything? No
 
Which flag is that?
 
9:46 PM
@CatPlusPlus lol
 
Confederate
 
@R.MartinhoFernandes confederate
 
Computer tools? More and more
 
Hii Tony
 
9:46 PM
I find it kind of funny/sad that Southerners still use the Confederate flag as something to be proud of.
 
American-class rednecks.
 
@R.MartinhoFernandes Historically, confederate. Currently, redneck.
 
@Rapptz Only the racist ones do.
 
@JerryCoffin hahah
@Rapptz funny
 
@R.MartinhoFernandes Another opportunity for you to give your bananas:
0
Q: Should minor spelling errors be corrected?

SlapoutI was reading through the Hottest Questions list and came across this question. As I read it I noticed that type was misspelled as "tyep" so I figured I'd be helpful and fix it. But since I changed less than six characters, it wouldn't allow the edit. I noticed the editing guidance says to "Avoid...

 
9:47 PM
@EtiennedeMartel I like to think they don't know their history.
 
@R.MartinhoFernandes Not a joke, I'm afraid.
 
^^ Just answer "yes"
 
:ironicat:
 
lol
 
9:50 PM
guys
why is make_shared destroying my object? :<
 
@Mysticial I liked it better as "ues".
 
@BartekBanachewicz And with that, you officially lost your right to tell anyone they suck.
 
Well played.
 
Yeah, sometimes I get some good inspiration.
 
9:52 PM
Now I want an orchard.
 
For.....?
 
Working till I'm sore!
 
@EtiennedeMartel I did something terrible, right?
 
@BartekBanachewicz make_shared is not supposed to destroy your object, unless you suck.
There's a if(user_sucks) check in there.
 
@EtiennedeMartel :<
 
9:53 PM
32
Q: Are there any worse sorting algorithms than Bogosort (a.k.a Monkey Sort)?

wompMy co-workers took me back in time to my University days with a discussion of sorting algorithms this morning. We reminisced about our favorites like StupidSort, and one of us was sure we had seen a sort algorithm that was O(n!). That got me started looking around for the "worst" sorting algori...

^^ wtf?
 
It's mandated by the standard.
 
lol
 
static_cast<void>(make_shared<T>())!
 
static_cast<lol>
 
@LucDanton You cast the poor object into the void!
 
9:54 PM
Indeed I did.
 
@EtiennedeMartel if(user_is_a_goat)
 
sbi
@R.MartinhoFernandes No. It's more like things like this tend to happen when you're drunk.
 
@R.MartinhoFernandes if(user_is_a_polish_goat)
 
865
Q: Proper use cases for Android UserManager.isUserAGoat()?

Ovidiu LatcuI was looking at the new APIs introduced in Android 4.2. While looking at the UserManager class I came across the following method: public boolean isUserAGoat () Used to determine whether the user making this call is subject to teleportations. Returns whether the user making this ...

 
@sbi HELLOOOOOOOO!
 
9:58 PM
@EtiennedeMartel <context>
 
sbi
Anyway, you haven't reacted to those mails. Did you copy, robot?
@EtiennedeMartel Looooo.
 
@sbi Yeah, I was going to reply.
 
@R.MartinhoFernandes I don't care about the inside jokes I am unaware off.
I shall kill the humor.
 
sbi
@R.MartinhoFernandes They all say that.
 
user142019
> UserManager
 
user142019
9:59 PM
:||||||||||||||||||||||
 

« first day (873 days earlier)      last day (4076 days later) »