« first day (892 days earlier)      last day (4056 days later) » 

1:03 PM
0
Q: Can you forward-declare a namespace alias in C++?

JohnI'd like to set up some common aliases in a shared header, so that individual headers don't have to declare it individually. But I don't want to include the headers for the target namespace in this shared header, only declare the alias. Is this possible? e.g I want namespace GE = Graphics::Engin...

Not sure if this is possible, but sounds unlikely...
 
Xeo
Aw fu Robot
 
Ok, well I learned something new
Thanks
 
user784668
-3
Q: C++ source code browse tools on Linux, install problems

runner frankI am doing a project, which is based on 50+ C++ files and 60k lines of C++ code. I need to understand the calling relationships of hundred functions, e.g. callers and callees. I am trying to install some source code calling browse tools. such as cscope and kscope. But, kscope depends on many...

 
user784668
yay, all five types of close votes cast on that one
 
And it's even a useful dupe.
 
user784668
1:07 PM
So when there's a tie, the last vote wins.
 
@Fanael How do you know that?
Could be that dupes always win.
 
user784668
Right.
 
user784668
Will have to try again, crap.
 
Yay! I get to delete some code
 
@ScottW its at -18 already
lol
lol
needs one more delete vote
 
1:31 PM
poor guy
 
does anyone here use firefox?
 
user142019
Of course not.
 
no, why?
 
user142019
Why would anybody use that crap.
 
failfox is terrible
btw robot
 
user142019
1:33 PM
vat robot
 
helper(std.string arg) {
    std.cout << arg;
    return helper;
}
type checks fine... only executes last call in chain :(
 
lolwut
what is helper? Isn't it a function?
 
what language is that?
 
user142019
@TonyTheLion A function that returns itself.
 
1:34 PM
@TonyTheLion Not exactly.
 
I'm just curious - for as long as I can remember, ctrl+shift+tab to go back a tab in firefox has always been slow, if there's lots of tabs even up to a second delay before the tab switches, while clicking on the tab to switch to it doesn't have any delay like that.
 
user142019
helper("a")("b")("c")("d");
 
@DeadMG I thought so, it's a mysterious thing
 
@TonyTheLion Not really.
I just automatically convert it into struct helper { helper operator()(std.string) { ...; return helper(); } };
 
@DeadMG, do you have a standard for Wide?
 
1:35 PM
no
 
user142019
noooo
 
@DeadMG and it only does the cout << arg for the last one? o_O
 
I'll Standardise it when I'm done building it and am happy that it's fit for purpose
 
user142019
GHC would be crappy as hell.
 
@DeadMG, do you have anything that I could see about Wide?
 
1:36 PM
@melak47 Just a code generation bug, which I have now fixed.
 
user142019
GHC FTW
 
unfortunately, Wide can only differentiate between overloads based on their argument number right now.
 
@DeadMG ah now I get it
 
@TonyTheLion More usefully, it means that no matter how many overloads you have, or if they're (Wide's version of) templates, you can still pass them all in one go as like, std.sort(args, helper);.
 
How's everyone doin' today?
 
1:38 PM
@DogPlusPlus My type system is more capable than Haskell's!
 
I'm not doing good, my code fails me and I'm tired
 
also, I need food.
 
also differential equations baffle me
 
user142019
@DeadMG but does it pwn as much?
 
1:39 PM
I'd like food, too.
 
@Zoidberg It should do when I actually finish implementing it.
 
user142019
Do you know anything about Haskell's type system?
 
user142019
Do you encode purity of functions into the type system?
 
I know that it can't type check a function that returns itself.
also, I probably will.
 
user142019
A function that returns itself is pretty pointless in Haskell.
 
user142019
1:42 PM
What could it do? It could return itself and that's it. It cannot perform side effects since it would have to return IO a.
 
void foo() { return foo(); }
endless death
 
user142019
Dat is recursie.
 
yea
it is
 
Well, I've found Nutella.
 
user142019
Eww.
 
1:43 PM
Oh god nutella
 
Three jars. I seem to buy them and never eat any.
 
lol
 
@Zoidberg If you can't return a, you also can't return IO a.
 
give them to cicada :)
 
user142019
Oh right. :P
 
1:45 PM
Function that returns itself has an infinite type
And yes that doesn't typecheck
 
user142019
let f x = unsafeCoerce f :: Int
 
user142019
Here, function that returns itself. :P
 
(Type erasing in this case doesn't really make the type system more powerful, it just shifts crap around and makes things less reliable)
 
user142019
(Yes, still won't typecheck.)
 
Function that returns itself sounds like a paradox.
 
1:46 PM
Sounds like recursion
 
It's recursion but on the type level, and with no base case
It's also useless
 
What do you need returning a function for?
 
Currying.
 
There's nothing unusual in returning a function
 
herro
 
1:48 PM
home go_home() { return home(); }
returning function
 
I'm not saying it's unusual, I'm asking what do you need it for?
just curious
 
It is only unusual when you return the function, rather than a new function.
 
user142019
@Jueecy many things.
 
user142019
@Jueecy std::bind?
 
For returning a function
 
1:49 PM
Yes, std::bind. You can wrap, for example, a constant argument and return a function which takes one argument less.
That would be the simplest idea.
 
right
 
@DogPlusPlus std::bin? Is that like a garbage collector?
 
@DeadMG Your jokes are lame today.
 
@bamboon Hah, 'd' fell out. ^^ Thanks
 
My graphs slowly start to work
It only took me a month
And I'm 2 weeks late
 
user142019
1:50 PM
What graphs?
 
But whatever
Resharper is nice
 
user142019
I use MacVim for C#. :v
 
It is, isn't it?
 
user142019
Facebook recommends the page "Grieten met brillen zijn geil" ("Girls with glasses are horny").
 
lolwat
 
1:52 PM
Girls with horns are glassy.
3
 
@Zoidberg are they horn-rimmed glasses perhaps?
 
user1357851
Oh Cat++
 
user1357851
 
@melak47 Nah, he's got a fetish for girls holding glasses of liquid
 
user1357851
1:55 PM
Maybe Cat++ is a girl
 
user784668
> More aggressive loop optimizations
 
user784668
Yay, the compiler will finally break broken code!
 
std::bind... mah...
 
user1357851
Last time I spoke to Cat++ on mumble, she sounded girly. Could be her voice changing app was not functioning properly
 
1:57 PM
lolwut
 
user784668
@Telkitty he's too moany to be girl
 
I'm Lion++ in disguise
 
user1357851
I am Cat--
 
The duck is too mooning to be a girl.
 
user1357851
2:00 PM
@Fanael umm, max value for int is ... less than 128 * (0x02000001)?
 
@Telkitty Says the text-to-speech bot.
 
user784668
@Telkitty yes
 
user784668
>>> 2**31-1
2147483647
>>> 128 * 0x02000001
4294967424
 
@Fanael Yeah, that will produce an endless amount of whining from crappy programmers, but "fuck 'em" is the appropriate response.
Loops are overrated anyway.
 
@DogPlusPlus lol, that was hilarious
 
user784668
2:03 PM
@R.MartinhoFernandes I'll fork GCC and change it so that it optimizes loops like this one to std::cout << "because FUCK YOU";
 
That is harder.
It requires special casing which currently does not exist.
 
user784668
@R.MartinhoFernandes It does, they already try to emit a warning.
 
user142019
@R.MartinhoFernandes That's what she said.
 
ARGH
MY TEETH ARE COLD
 
Stone cold, yo.
 
2:09 PM
lolwut
 
Hey, @Xeo, I'll be in Bonn in June. Is that close to where you are?
 
user142019
@DeadMG put them in hot water problem solved.
 
user1357851
 
huh
if you're gonna design a robot with the sole purpose of gluing tits on the front, you could at least make them nice tits.
 
Xeo
@R.MartinhoFernandes Not really, no
 
2:14 PM
@DeadMG ^
 
user1357851
@DeadMG that's where the quadcore are located, in the chest
 
user1357851
Or maybe that's the battery
 
user1357851
I dunno
 
user784668
-23
Q: How to calculate packet loss, packet delay and jitter in android?

Sachi Naikplease let me know how to write an application to calculate packet loss, packet delay and jitter in android Help is appreciated... Thanks

 
user784668
-23!
 
2:16 PM
-24
 
the score is ongoing
 
someone has @Cat's shoes
 
Just delete it already.
 
@ScottW I'll bet she can start me up
Really the number of puns here is limitless
 
man
I found some old code of mine
it's shit.
 
2:18 PM
s/ old//
 
Well, if you find your old code good, it means you haven't progressed shit.
 
!/s/ old/
 
@DogPlusPlus Or that you're awesome :P
 
user1357851
or awesome to start with, but regressed :p
 
user1357851
2:23 PM
@TonyTheLion aged only '92', but I think the user is more likely to be 19
 
I really need to sort out: inferring the return type of recursive functions, including mutually recursive ones, and overload resolution
 
When writing a view component for a given model class, is it better to expose a set of individual properties matching the model or just a reference to the model instance?
 
Overload resolution is a bitch.
 
@kbok The whole point of the view is to hide the model
 
mutually recursive type inference scares me more.
 
2:24 PM
If you reference the model, you are tempted to use it, which breaks the pattern
 
I at least have a fairly basic idea how overload resolution works
 
@kbok I'd expose different properties, since you probably will want most of them to be strings anyway (i.e. do the formatting)
 
user784668
Overload resolution works only because of fairies.
 
@DeadMG Overload resolution is a patchwork mess.
 
eg in a banana_view should I expose a shared_ptr<banana> or a string name, color color, integer length
 
2:26 PM
@R.MartinhoFernandes Better a patchwork mess I vaguely understand
 
@kbok The second
What good is a view if you're directly accessing the model?
 
@DeadMG lol, vaguely. Yeah, sounds great.
 
I haven't found any explanations of Hindley-Milner in English, and I've got no idea if my basic plan has a chance in hell of succeeding.
@R.MartinhoFernandes vaguely > none.
 
@Neil I dunno. It's like this in the app atm. I wondered if there was a valid reason to it
Thanks guys
 
Hindley-Milner probably falls terribly with unconstrained overloading.
 
2:27 PM
@kbok Np
 
well, principally
I will have to stop going directly from parsed AST to code generating tree
I need to have another intermediate semantic tree stage.
 
Does typename T::foo SFINAE is foo is a static const data member?
 
well, it's not a type, so I'd intuitively say yes
but the C++ Standard probably says no because they're kinda dicks like that.
 
@kbok View is usually an end consumer of the model, so it doesn't really expose anything
Also fuck patterns
 
user784668
2:34 PM
fuck patterns
 
user784668
Patterns are the best examples of antipatterns.
 
More like V-TheRest
 
Note that this isn't a pattern question, it's a "what makes the most sense" question
 
user784668
const banana&
 
user784668
2:35 PM
There, a view.
 
@DeadMG "All these languages have extended Hindley-Milner; Haskell, Clean, and Objective Caml do so in ambitious and unusual ways. (Extensions are required to deal with mutable variables, since basic Hindley-Milner can be subverted using, for example, a mutable cell holding a list of values of unspecified type. Such problems are dealt with by an extension called the value restriction.)" source: stackoverflow.com/a/399392/2128327
 
I use 🍌 const &.
 
user784668
@KhaledAKhunaifer shut up and take my upboats
 
user1357851
Anyone aware of any problem changing avatars?
 
Yes, since we always change avatars on daily basis
Image macros
 
user1357851
I upload a new avatar now it looks ... completely blue
 
I feel blue, I see no blue
 
user1357851
it has not been pushed through, this is my old avatar
 
And this is why art is best left to professionals. Because we programmers suck at it.
 
Xeo
2:46 PM
@EtiennedeMartel That looks amazing
 
user1357851
Lounge <🍌>
 
user1357851
🍌 *b = new 🍌();
 
wtf
it's a Daily WTF that did not conclude in one day's worth of WTFing.
that's not how a Daily WTF is supposed to work.
 
user1357851
lol, have anyone seen this:
 
user1357851
21
Q: Why is there a peeking duck in my profile pic?

Mark GarciaIn my SO profile, you may see something odd: a peeking duck. I've just recently uploaded this new profile picture of mine. I checked it after the upload and everything's fine. After a few hours, I opened my profile and there it is, the duck has somehow become afraid of the people viewing it. ...

 

« first day (892 days earlier)      last day (4056 days later) »