« first day (1055 days earlier)      last day (3911 days later) » 

12:00 PM
As derpstorms go, the phantom variety was more entertaining
 
New people are born everyday, old people die everyday, some new people join this chat and some old people quit
 
A propos overrated titles: does herb have an mba?
 
Are you really 38? why do I remember you were 18 the last time I looked at your profile?
I must admit my memory isn't the best though?
 
2 hours ago, by Griwes
@gregcons @bretkuhns Throwing a curtain in front of a template and saying "look, no template here!" doesn't make it not a template.
Read the whole discussion that tweet is part of.
 
Isn't it strange how PANIC removes all sensible thought processes? Five days before my hols, I cannot find ANY of my three cards that I could use cheaply in Spain. Three hours of undiluted panic later, I find them in a reasonably obvious place - inside passport. WHEW!
 
12:09 PM
@MartinJames 43 pounds
 
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF‌​FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF‌​FFFFFFFFFFFFFFFFFFFFFFFFFF
 
Doesn't this amount to reimplementing std::function (and virtual functions too!)? — R. Martinho Fernandes 2 mins ago
What am I missing?
 
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUNK
 
Don't do this.
@R.MartinhoFernandes But it's FAST!
 
Better? <:
 
12:11 PM
ck. Though I'm sure I lost quite a bit of weight while tearing my house apart.
..and my kindle is flat. I know it was kinda flat before, but the battery has joined in the overall flatness.
 
Oo flat ... not fat
 
@Telkitty猫咪咪 Well thank you for that :)
 
@MartinJames First you mentioned "lost quite a bit of weight " ... then you mentioned "is flat" :p
 
0
Q: Do data members form a range?

FredOverflowCan I treat consecutive data members of the same type as a range? For example: struct X { int a, b, c, d, e; }; X x = {42, 13, 97, 11, 31}; std::sort(&x.a, &x.a + 5); // kosher?

 
using namespace std;
using namespace std::chrono;
// :(
 
12:15 PM
So it has come to this. I started watching Free!
 
Not sure if I've ever used an explict function pointer for anything except API calls. Member function pointers/events, (ie with the this thingy), sure.
 
@FredOverflow <or not>
 
@StackedCrooked Danger! You may have sobered up :)
 
Xeo
lol, "syntactic vinegar"
 
@Xeo I don't know how it works.
 
12:18 PM
@MartinJames No worries. I just came back from the shop with 12 cans of beer.
 
There a codeproject thing that goes on about how member function pointers are implemented which makes me think it uses bad stuff.
 
Xeo
Oh, yeah, IIRC it uses the union-cast
and dubs it horrible_cast
 
@StackedCrooked I'm trying to run my beer fridge down before my hols. If I leave any in, Anne will 'dispose of them'.
 
If I leave any in my mom drinks them.
@MartinJames disposing = consuming ?
 
@StackedCrooked The capacity for females, of any class, to absorb alcohol is awesome, and often underestimated.
 
12:20 PM
Whoever Anne may be.
 
Also, the author puts their code in a namespace, and then proceeds to using namespace it. I don't get this, and I hate it.
 
@StackedCrooked Wife/carelessly-left-around-beer-disposer
 
I see :D
ouch coliru is down
 
@StackedCrooked Last time I went away on holiday without Anne, all my vodka mysteriously disappeared.
 
lol, are you sure she's ok? :P
 
12:23 PM
..and my car had done an extra 300 miles..
..and the tank was empty.
 
So she used the vodka as fuel?
 
@StackedCrooked I guess it could be interpreted that way :)
 
You're going on holiday alone, again?
 
@R.MartinhoFernandes Yeah - there was only one seat left on the plane.
 
12:25 PM
@Griwes that discussion is about that hiding it doesn't remove it. It's not really about wether hiding it is a good thing or not. My point is that we're used to implicit dtor calls, almost implicit runtime polymorphism and so on. So why not have almost implicit compiletime polymorphism.
 
@MartinJames Is that why you are trying to lose weight?
Oh gosh, that was bad.
@ArneMertz Because it makes code harder to read.
 
@StackedCrooked Heh - it's diesel, I'm sure Anne has better uses for vodka than trying to propel my Fiesta.
 
(And because the version with using before introduces names into the global scope for no reason)
 
Cool, a Fiesta.
 
@MartinJames I don't know ... you can't just say it is her. If I had a husband and he was on holidays, I might call all my friends over and have a party while he's away ... But I don't have a husband to start with so there is no need to hypothesize :x
 
12:28 PM
It also adds more context sensitivity to the grammar, no?
@Telkitty猫咪咪 Nor friends?
Ow.
 
@StackedCrooked Ford tin, but cheap to run.
 
:iceburn: all around
 
@MartinJames Is it one of those old Fiestas that you can open with the key of any other of the same sort of Fiesta?
 
@R.MartinhoFernandes good question, lemme check & get back 2 ya!
 
Funny how cars changed from looking like this into this.
 
12:30 PM
@Telkitty猫咪咪 Of course it's Anne. Apart from anything else, I phone her up at night, she's obviously pissed up and says 'I had a little shot of vodka' :)
 
'... to start'
 
@Telkitty猫咪咪 awww..
 
Or maybe she has my superpower.
 
For some values of little.
 
@R.MartinhoFernandes No - it's got modern central-locking with a radio-key.
 
12:31 PM
@MartinJames Yes ... needed to clarify - a little shot of vodka, very important!
 
@R.MartinhoFernandes I agree about the global scope pollution, but not about the diminished readability only because it does not explicitly say template anymore. Think of polymorphic lambdas. They are templates under the hood, but don't say so explicitly - because noone really has to care.
 
@MartinJames RADIO
 
Anyway, now the 'missing cards' panic is over, I have to go buy stuff. BFN.
 
@ArneMertz It diminishes readability because now you have five parts in a function and only one gets a clear syntactic delimitation (arguments).
 
12:34 PM
hey im new here
whats the purpose of chat here?
 
Chatting.
 
@StackedCrooked Well, I didn't know what to call it, the key-fob thing that sends the code.
 
Why do you think people sometimes put the return value on a separate line?
 
@KutluhanMetin It's a lounge. A place to relax.
 
@R.MartinhoFernandes the flaw of using different editing tools?
 
12:35 PM
@R.MartinhoFernandes They are using UnIntelliSense?
 
ok thats nice
 
DumboSense
 
Because VS debugger. :v
 
AKA 'code corruption'
 
Ooops, I meant "return type"
 
12:37 PM
@R.MartinhoFernandes what do you mean by "5 parts"?
 
Too much TMP and you start thinking of types as values as types.
6
 
Anyone have any idea why does boost causes Intellisense errors?
 
@ArneMertz Template shit, return type, name, arguments, extra qualifiers.
@KutluhanMetin Because IntelliSense is messed up?
 
Because IS is shit.
 
12:38 PM
Robor ... you seem to be making a lot of mistakes lately ... are you alright?
 
Xeo
> almost everything turns out to be a category if you look at it long enough
 
@KutluhanMetin IntelliSense causes boost errors.
 
@KutluhanMetin If Intellisense fails to parse (legal) boost code then Intellisense is at fault.
 
@MartinJames Intellisense messes up. Its better
 
var DIACRITICS = {
'a': '[aÀÁÂÃÄÅàáâãäå]',
'c': '[cÇç]',
'e': '[eÈÉÊËèéêë]',
'i': '[iÌÍÎÏìíîï]',
'n': '[nÑñ]',
'o': '[oÒÓÔÕÕÖØòóôõöø]',
's': '[sŠš]',
'u': '[uÙÚÛÜùúûü]',
'y': '[yŸÿý]',
'z': '[zŽž]'
};
 
12:39 PM
intellisense , is shit
 
International! Support for diacritics!
Also indented with stupid tabs!
 
@CatPlusPlus wtf is that
 
A piece of brillance.
 
Anyway to fix it?
 
@CatPlusPlus lol
 
12:41 PM
See, Robot gets it.
 
@CatPlusPlus Why is there a lack of capital A?
I also note a distinct lack of ogoneks ;)
 
It... tries to lowercase at the same time? I don't know.
 
Does anyone know the English word for dia?
 
@StackedCrooked Slide?
Oh. Reversal film.
 
12:43 PM
@StackedCrooked You can use the wikipedia sidebar to open the article in a different language.
 
@StackedCrooked diapositive?
 
@R.MartinhoFernandes TIL!
God damn, that's useful.
 
@R.MartinhoFernandes tbh I don't get it how that diminishes readability. when reading a function signature, I normally skip the template shit. I first see the Ret foo(X x) and only when i have no clue what X might be, I'd have to look it up. And then it's either a class, or a typedef, or a template parameter - or a concepted quasi-typedef (or however one should call it).
 
@ArneMertz The template shit is easier to identify (in order to skip it) when it doesn't look like any other declaration.
 
But normally I dont have to look it up, because I don't really care, what kind of (pseudo-) Type Mergeableor SomethingContainer is, because most information should be in the name.
 
12:49 PM
Newkia, is this a joke?
 
I also feel the hash combining is a bit iffy. The semi-primes look fine (allthough 19349663 is not prime) but especially the % 1024 takes me by surprise. Why would you limit the hash to 10 bits, if it could use all of size_t bits? On my platform it's 64 bits! It seems you copied the hash function from a hashtable implementation with the number of bucket fixed at 1024? In the future, consider using boost::hash_combinesehe 10 secs ago
 
@R.MartinhoFernandes the using shit is just some sort of typedef, so I can equally skip it like any other typedef.
 
@StackedCrooked I'm not sure how much better it is. I'm quite convinced they got safer, though
 
@ArneMertz Oh. I was talking about the version without using (one that just dropped the constraint right there before the return type without any decoration).
The one with using is to be discarded outright as the polution is unacceptable.
 
@Xeo linky?
 
@R.MartinhoFernandes you have an example of that?
 
@ArneMertz Was on one of the slides in Bjarne's keynote. Sec.
 
Xeo
@R.MartinhoFernandes It was not the keynote's slide
 
(Could be yet another of Bjarne's fuckups)
 
Xeo
Those were the slides from the ACCU talk, before the feedback
 
12:59 PM
Mergeable{For,For2,Out}
void merge(For p, For q, For2 p1, For2, Out oo)
// it was something like this
 
@R.MartinhoFernandes sadly I didnt have time to see that. I know, there's nearly no excuse...
 
Xeo
The feedback changed using Concept{...}; /*...*/ void fun(...); to template Concept{...} void fun(...);
@R.MartinhoFernandes Nah, that is right
 
Yuck.
 
Xeo
@R.MartinhoFernandes Oh, did they also remove the template before it? I can't remember
 
@Xeo That's what he put in the slides. But Bjarne is notorious for making these mistakes all the time.
 
Xeo
1:01 PM
yea
 
Actually, IIRC, it actually had Mergeable{T1,T2,T2}, but used For, For2, Out in the body, and someone pointed that out at the end.
 
@Xeo Others seems to be correctin , even saying:
> Furthermore, if we discuss the run-time cost of wrapping function into functor, I think the []syntax is more appropriate. Using lambda introducer ([]) clearly states that the closure object will be created in that context (so all run-time overheads as the same as for pointer), but stand alone identifier suggest some magical version of polymorphic function pointer (please remember that at this moment using of id means pointer in every context), ...
 
@CatPlusPlus I bet he had some fucking problems to take care of.
 
Xeo
@sehe Are you mixing up the authors?
 
One of my coworkers is thinking under the table.
 
1:04 PM
@Xeo Gah I am. Silly me (edited in the very very last split second)
 
Xeo
:/
I'd really like to know what that last mail, which is now deleted, contained
 
Perhaps a lounger who wanted to rant, but thought better of it.
 
That's the nice thing about being in the mailing list: only the NSA can mess with your e-mail.
 
The NSA jokes are getting old. Did you mean email-address?
 
@sehe No, I mean the actual mail. The messages.
 
1:08 PM
Wokay. Apparently at least you can delete posts. Or is this spam moderation?
 
$ nm obj1.o | grep foo
000000000001be9f t foo
$ nm obj2.o | grep foo
                 U foo
$ g++ obj1.o obj2.o 2>&1 | grep foo
obj2.cpp:(.text+0x6b7): undefined reference to `foo'
$
Really?
GCC is mocking me.
Any ideas?
 
no scoping issues?
 
How so? It's the same symbol.
 
ahh its a direct copy paste
thought it was a rephrase
 
I only s/realSymbol/foo/, but the rest is verbatim.
 
1:17 PM
try flipping the objects, or try ABA
I dont often work with the objects themselves like this
 
@ÓlafurWaage Me neither, this was part of boiling the issue down.
 
try g++ obj2.o obj1.o
 
@Xeo looked it up - in N3701, it's Concept{...}, without template and without a semicolon as a single-use declaration for one template, and either using Concept{...}; to quasi-typedef until the end of scope, or using Concept{...} { /* template go herer */} to quasi-typedef for the scope following. Not sure I like those.
 
@ArneMertz Yeah, I don't like any of those.
Waiiiiiiiiiiiiiiiiiiiiiit.
Fuck me.
Stale build state.
 
fixed?
 
1:23 PM
Yeah :S make clean && make did it.
 
@R.MartinhoFernandes tempting
@R.MartinhoFernandes ¡olé!
 
Xeo
@R.MartinhoFernandes Mind helping me with defining left using app? I can't seem to get the type-signature polymorphic enough :s
-- this is all I'm getting atm
left' :: (a -> a) -> Either a b -> Either a b
left' f (Left l) = Left $ app (f, l)
left' _ e = e
 
Lemme look at app first. There are too many things named after "application" in Haskell.
 
Xeo
ArrowApply
app :: a (a b c, b) c
 
1:35 PM
Oh, so it's generic $.
 
Xeo
uncurry ($) for functions, I think.
Btw, the above signature is what GHCi deduces for me
Can't see why f isn't allowed to be a -> b :(
 
You can't treat app as a function because it's an arrow.
Does arr Left help?
 
Xeo
not really, no :/
 
It's really messy. Things to keep in mind are: you can only use app by composing it with another arrow (like >>> app) or similar, otherwise you force the signature back to functions; and arr can bridge the gap.
 
Xeo
I know that I should compose, but I don't quite get with what.
 
1:45 PM
With an arrow that produces a pair of: an arrow and a value.
 
Xeo
yeah, I just tried something that yields either (f, l) or (arr id, r), but that gives me an infinite type
 
user1804599
I need a waterproof FANUC robot.
 
Oh, you can't put Left l for pattern matching either.
left has only one argument.
I think I know how I can help. I'll write a slightly unusual specialisation for functions.
 
Xeo
let left' f = arr (\e -> case e of
    (Left l) -> (f, l)
    (Right r) -> (arr id, r)) >>> app
is what I tried
 
Xeo
That sentence confused me.
... I'm an idiot, I think
hm, no, nvm
Atleast I got rid of the infinite type!
 
1:51 PM
@JerryCoffin That looks nice, I will use that, thanks.
 
Xeo
(the code here is correct, in my snippet in GHCi I had _ -> (arr id, e) in the case)
 
Would ifstream fail for locked files?
 
Xeo
I just need to put app somewhere else, I think
Okay, I need to return only e if it matches (Right _)
 
@Xeo Nah, app goes at the end.
What's the issue now?
 
Xeo
Ugh, I think I know what I need to do... gimme a sec
I need to retag l and r after their invokation... ah
I... think I got it?
 
2:01 PM
@Xeo Yes.
 
Xeo
left' :: (ArrowApply a) => a b c -> a (Either a d) (Either c d)
left' f = arr (\e -> case e of
    (Left l) -> (f >>> arr Left, l)
    (Right r) -> (arr Right, r)) >>> app
I think I can work either into that, somehow, though
 
No, because functions.
+++ is the generic form, I think.
Either that or |||.
Ooh, there's a pun.
 
Xeo
f ||| g = (f +++ g) >>> untag
    where untag (Left l) = l
          untag (Right r) = r
I think
The (Right r) -> (arr Right, r) case kinda feels redundant, btw
_ -> arr id?
woops, right back to infinite types
... obviously
 
user1804599
I thought at first that "untag" was some obscure German word meaning "bad day".
 
lol
 
2:08 PM
@Xeo That untag looks... untypeable?
 
Xeo
@R.MartinhoFernandes Either a a -> a?
 
But that does not fit the signature of |||
 
Xeo
(|||) :: ArrowChoice a => a b d -> a c d -> a (Either b c) d
(+++) :: ArrowChoice a => a b c -> a b' c' -> a (Either b b') (Either c c')
 
user1804599
Don't you need a b ~ c constraint?
 
Xeo
and for +++ if b' = c', you can untag and get |||, no?
 
2:10 PM
@Xeo Either b c and Either a a do not match.
("unify" in Prolog terminology)
Short break, rebooting.
 
Yeah you can't restrict the signature from within implementation.
 
Xeo
I think I have an error in my reasoning somewhere
 
It's the caller that decides what b and c are.
 
user1804599
This isn't C++-like template instantiation.
 
user1804599
The signature needs to match the implementation.
 
user1804599
2:12 PM
It can't be looser.
 
The implementation has to match the signature. :P
 
user1804599
It's like saying foo :: a -> b; foo x = x.
 
user1804599
You can say foo :: a ~ b => a -> b with a language extension, though. But that's silly. :P
 
Yeah.
 
user1804599
Hmm.
 
user1804599
2:14 PM
Is it possible to do this?
 
user1804599
foo :: a
foo x = x
 
user1804599
Wait no of course not. I'm an idiot.
 
user1804599
a is less specific than a -> a.
 
Xeo
> untag (Left l) = l
> untag (Right r) = r
> :t id +++ id >>> untag
id +++ id >>> untag :: Either c c -> c
It typechecks :(
And if a = (->), that's |||
wait
 
user1804599
I'm waiting all my life already.
 
2:17 PM
@Xeo That part typechecks, but it won't typecheck as an implementation of (|||).
 
Xeo
yeah, I noticed that it's not "polymorphic enough"
 
6 mins ago, by Cat Plus Plus
It's the caller that decides what b and c are.
 
"Your opinion could be worth 1000". Pay up and I will consider? Silly ads,
 
So the implementation cannot introduce b ~ c constraint.
 
user1804599
If you specify a type explicitly it better be 100% correct in all cases.
 
2:18 PM
Hehehe... just read the starboard re. robot's trip to work. I have done similar brain-dead things in the past, so I'm happy it's not just me :)
 
user1804599
How does C# deal with this, by the way?
 
user1804599
This is illegal, right?
 
user1804599
void Foo<T>(T x) {
    x.SomeRandomMethod();
}
 
Xeo
fanin :: ArrowChoice a => a b c -> a b' c -> a (Either b b') c
fanin f g = (f +++ g) >>> arr untag
  where untag (Left l) = l
        untag (Right r) = r
typechecks correctly
 
@not-rightfold Yes.
You need to constrain with an interface.
 
user1804599
2:23 PM
So… where T : ISomeRandomMethodable.
 
user1804599
Cool. :3
 
user1804599
C++ is quite funny in this regard.
 
user1804599
It's just macros on steroids.
 
user1804599
Damn. I'm filling myself with Coca-Cola, donuts and butter-flavoured lozenges. Can't be good.
 
@not-rightfold It's actually better.
 
user1804599
2:29 PM
@CatPlusPlus I have a file containing <reference path='…' /> crap for TypeScript but I want to generate it. Any idea how to best do that? Ideally I'd do it in Python but I'm not sure if that's easy to integrate with the build system.
 
@not-rightfold are you a) doing sports, b) too young to be affected by all the sugar, or c) just entering the asymptotic giant branch? (i.e. slowly blowing up)
 
The reason we have constraints is that generics are instantiated at runtime, so the compiler can't check if you're using them correctly without specifiying constraints. Or something like that.
It's a patch.
 
Constraints are good.
 
user1804599
@ArneMertz a) I cycle 12km to work and 12km back every day. b) I have no idea. c) No.
 
@CatPlusPlus They sure make more readable error messages.
 
2:31 PM
@not-rightfold okay, the cycing should do :-)
 
The problem I have with them in C# is that we don't have enough of them.
You can't constraint on enum types, for instance. Or delegate types.
 
@EtiennedeMartel or ctors other than ()
 
@R.MartinhoFernandes Or operator overloads.
 
Really, I guess my main gripe is that it's so fucking simple.
It's a start, but they never bothered with pushing it further.
 
2:33 PM
It's always the functional languages that get the bestest features.
You imperative-minded peeps suck.
 
inb4 @not-rightfold saying completely pointless shit about his current flavor of the month.
 
user1804599
completely pointless shit about his current flavor of the month.
 
Fail. There were no quotes in my sentence.
 
user1804599
death sentence
 
Xeo
So, Robot, the ||| definition I gave before does type-check correctly - just needed an arr before untag :/
How did we get on that tangent anyways?
 
2:35 PM
Wut?
 
> I think we're in an era where, instead of evolution in hardware, it's evolution in engines and tools that's more important to a dev studio.
I think I just did a mess in my pants.
 
user1804599
ANIMATED GIF
 
You know I'm talking about games, you GIF poster.
YOU BETTER BIN THAT YOURSELF.
 
@R.MartinhoFernandes evolution, not revolution
 
2:38 PM
@EtiennedeMartel animation_mode = once does wonders.
I no longer care about gifs.
 
Tss tss.
 
(for those who don't know: in FF go to about:config find image.animation_mode and set it to once; now gifs only animate once)
 
I'm in Chrome.
 
May 23 at 10:36, by R. Martinho Fernandes
Chrome sucks.
 
Because Chrome was better than FF when it came out, and I'm sure nothing changed on either side since then.
 
Because things never, ever change.
 
I switched over to FF
Pretty happy with that change.
 
user1804599
Firefox sucks too.
 
user1804599
All browsers suck.
 
Lynx rox
 
2:41 PM
@not-rightfold Hipster.
 
user1804599
The web is so mainstream.
 
I was cool before cool was cool
 
Xeo
hmm... crap, I think my left' still isn't entirely correct
 
So premake generates VS project files that don't build.
 
Xeo
-- still not polymorphic enough :s
left' :: ArrowApply a => a b c -> a (Either b b) (Either c b)
left' f = arr (\e -> case e of
    (Left l)  -> (f >>> arr Left, l)
    (Right r) -> (arr Right, r)) >>> app
 
2:48 PM
Ha, same issue.
arr ((\x -> (arr (\() -> x) >>> f >>> arr Left, ())) ||| (\y -> (arr (\() -> y) >>> arr Right, ()))) >>> app
And that's all my thought capability for the next hour used up.
 
Xeo
That really helps, since ||| is defined in terms of left :/
... fuck, it's the case statement that fucks it over :/
 
@Xeo It's the specialised ||| there.
 
Xeo
@R.MartinhoFernandes Oh, function-|||?
 
Xeo
I see
 
2:54 PM
@Xeo What are you trying to do, anyway?
 
Compute the pair entirely in ->, add a dummy (), and app to get it.
 
Xeo
@CatPlusPlus Define left using app, exercise from Hughes' paper
 
Level of indirection blah blah.
 
Xeo
There should be a better way :(
 
Xeo
2:58 PM
Oh gawd
 
Use arr (\() -> x) to lift a value to an arrow, and app with () to get the gunk out.
 

« first day (1055 days earlier)      last day (3911 days later) »