« first day (1638 days earlier)      last day (3308 days later) » 

1:00 PM
> If the #! line does not contain the word "perl" nor the word "indir" the program named after the #! is executed instead of the Perl interpreter. This is slightly bizarre, but it helps people on machines that don't do #! , because they can tell a program that their SHELL is /usr/bin/perl
@райтфолд It was kinda obvious.
It only became mildly surprising when he said he explicitly invokes using perl(1)
 
Hello
I am having trouble forwarding a function pointer (atleast that is what I think it is)
incoming coliru
 
Okay. Have you tried Stack Overflow?
@MichaelMitchell (awaiting coliru; about to leave, be quick?)
 
Bah.
KeeperRL does not seem to save games properly or something. If your keeper dies, you cannot load the game.
 
@MichaelMitchell take cover!
@wilx maybe that's a feature? perma death? :p
 
@wilx is this your jam entry/
 
@wilx well, the joke hardly works
@MichaelMitchell MMM is not defined. Neither is EventHandler. Game over
 
yeah yeah
bad copy/pasta
essentially
 
So, you take 2:09 to post. A bad coliru?
 
my problem is I don't know how the forward the function pointer (if that is what it is) on the commennted line
to the constructor of the CallbackDerived
 
MMM::EventHandler::EventHandler_2<>::Create() o.O
 
1:08 PM
@sehe lol, no. It is a Steam game.
 
VS has been applying update 4 for 20 mins now
vspls.jpeg
 
Oh. That's nothing.
 
@AlexM. what update?
 
Update 4, I guess :D
 
also...don't you know? when you update VS...it goes and fetches all the things you didn't pick when you installed it :D
 
1:09 PM
Sep 7 '14 at 20:27, by Fanael
@sehe Because installation takes fifty hours more than update 3
 
TFS this, SQL that, yadda yadda
 
@melak47 this
 
validating install?
 
I'm installing it for the first time and it's been sitting at update 4 there for like 25 mins now
I blame the slow HDD
 
don't
 
1:12 PM
the PC is definitely I/O starved atm, it took me ~25 seconds to see Paint in the search thing in Start
opening new tabs takes a while
oh it's installing windows phone emulators now lol
just what I needed
 
@AlexM. I've waited for hours for simpler changes
 
I still don't understand how to forward the function pointer :/
 
@MichaelMitchell find a simpler solution?
 
I wish
 
@AlexM. yeah all that shit you didn't want, you now get for free!
@MichaelMitchell can you reduce your code blob? and also make it...like, work? minus the thing you're trying to fix? :p
 
1:15 PM
I have a working solution
 
if all else fails
 
make that thing global and access it from everywhere you need :P
:P :P :P :P :P
 
T_T
I am trying to improve my working solution
 
I know, don't listen to my ideas
 
1:16 PM
since a majority of the processing is spent on weak_ptr::lock
 
unless you're 0.5 milliseconds close to deadline
then come ask me for how to patch your code with scotch tape
 
not sure what you are saying
 
@melak47 yay :(
I like how Google delivers their Android stuff
 
be thankful it's not also installing MFC :)
 
with the SDK wizard and all that, letting you install only what you need
sometimes I wonder why VS is my favorite IDE
anyway, it's done, I can use it
finally
 
user3010322
1:23 PM
@melak47 Isn't that shipped with VS by default?
 
@ThePhD yes, but you don't have to install it
 
user3010322
Weee.~
 
I like how the sign in options are
"Sign in"
and "Not now, maybe later"
Microsoft just doesn't let you say "No."
 
YOUR LICENSE HAS GONE STALE. YOU MUST SIGN IN NOW TO CONTINUE TO USE VS 2015.
 
I like that it seems to sync themes and stuff in the cloud
so I use the sign in stuff
 
1:26 PM
@AlexM. UGH
it always syncs the wrong one and discards my actual settings if I don't sign out quick enough
maybe they just hate me cause I called my microsoft account "Steve Jobs" :(
 
> if I don't sign out quick enough
reminded me of this lol
 
:p
actually..
I find VS opens darn quick if I open a random cpp file
 
gVim opens fastest for me on Windows
followed closely by Sublime Text
N++ is the slowest to open
~4 seconds at least
 
oh well. bbq time. @MichaelMitchell if I'm bored later, maybe I'll look at your code blob :p
 
user1804599
It is not possible to prove a program is correct unless you prove all its dependencies are correct, which is impractical. We can conclude that tests are indeed necessary.
 
1:30 PM
@melak47 its fine, I think it is a compiler problem
 
@melak47 Resharper does not seem to have syntax coloring settings
 
@AndyProwl thank god :)
 
And the VS settings don't seem to have an effect either
I like my syntax coloring scheme :(
everything's black here except keywords and includes
 
user1804599
Speaking of which, it might be time to implement static analysis in my compiler.
 
one of my friends uses the whole tomato thing, and everything is just too damn colorful
 
1:30 PM
that sucks
 
user1804599
Although I should restructure it to use proper data types instead of hash tables.
 
The car park locked my car in, I got dropped home by my friends
 
user1804599
I might look into Moose.
 
@melak47 I like that, except it's not applied very consistently. It can't parse C++ properly I guess
I was hoping for R# to have proper support
 
You know you can just put your settings under git or even dropbox, right?
 
user1804599
1:32 PM
@MomotapaLimpopo Does that mean we have to use Dev-C++?
 
Signing in to my IDE just sounds silly.
 
@R.MartinhoFernandes Is it a question for me?
oh
probably not
 
I just got 9999 as a TAN.
 
no VS didn't sync theme or anything
what a piece of trash
nvm it did
I love Microsoft and VS
 
1:34 PM
oh I wait I found some settings
 
How often do you change theme anyway?
 
it was under "Code Inspection"
 
@AlexM. VS sometimes decides to lose it's layout settings and my solution explorer inexplicably ends up on the right when its usually on the left
 
@R.MartinhoFernandes never, but I sign in to Microsoft's stuff while using to keep the same theme on all of my PCs
 
1:35 PM
I thought it didn't sync it now but it did in the end
 
You're the reason we can't have nice things.
 
okidoki, I solved the issue
 
@R.MartinhoFernandes cmon the cloud is the future
> Smart Sewers Will Reveal What’s in Cambridge Citizens' Guts spectrum.ieee.org/tech-talk/biomedical/diagnostics/…
this is interesting
 
@AlexM. inb4 theyre full of shit badumtss
 
http://coliru.stacked-crooked.com/a/10c1549ae802b6a3
line 21:
std::function<bool(ClassName*, std::tuple<Args...>)> func_;
should be
std::function<void(ClassName*, std::tuple<Args...>)> func_;
 
1:36 PM
ergh, I should go get some food and stuff
 
Yay I found the syntax coloring settings
It's great
 
actually wouldn't it be interesting
 
I love this already
 
ever household to have some sort of sewage monitoring
and notifications when some bad shit is found
e.g. "We have detected an increased intake of <X> this month."
where X is something bad
 
That totally sounds like the setting of a dustpan dystopian novel.
 
@LightningRacisinObrit why so many time stuffs?
 
In other news, the CLion RC got released, and it's still not as good as I hoped it would be :(
 
I wish VS also synced the extensions you use
this is the only extension I use but it's kinda meh to always install it and map the shortcut visualstudiogallery.msdn.microsoft.com/…
 
With git I can sync my vim plugins.
 
@AlexM. dunno that's why I posted it
it does that sometimes after restoring from hibernation
 
1:49 PM
The cloud!
 
one of my favourite answers ever:
0
A: Pointer to a map

ofiranother nice way of using pointers, which I like is calling mappings->(and the function you want to call)

 
SDL vs SFML
Hm...
 
VsFileNav is great
 
@Cinch I have a project idea for you
 
I map it to Ctrl + G, Ctrl + G
 
1:55 PM
@khajvah what.
 
when I want to switch to another file, I quickly do the keys and type in the first two letters of the file, then enter
takes ~3 seconds in all
 
@Cinch versus.com
 
@khajvah ???
makes no sense
 
I don't know why a plugin is faster than VS's default solution search box
but it is
 
Write a website called versus.com
 
1:56 PM
@khajvah I'm not studying web right nnow
That's for later
My internship is probably gonna be Webdev with the unholy trinity so that'll be good
 
Where people can ask "this vs that" and receive biased and stupid answers
 
@khajvah There's stuff like that already
 
@Cinch what is unholy trinity?
 
@khajvah HTML/CSS/JS
 
boringest combination of all.
 
1:59 PM
Bah.
Welp, time to adopt SDL
 
This seems like a god-tier book
 
@khajvah Stack Overflow?
 
there was a this vs that site somewhere
 
@AlexM. google fight?
 
dunno
 
2:12 PM
> Graph traversal? I've never had to know a damn thing about that. No examples given to support the argument. This is just more Computer Science bullshit.
 
@RichardTingle If you change the implementation of a setter later on, there is a high risk of silently breaking all your clients, because their assumptions about valid inputs may no longer hold. — fredoverflow 1 min ago
 
How do I download .torrents in kick ass torrent
 
whenever I go to VS > Options > Text Editor > Tabs and check "Keep tabs" instead of "Turn into spaces" I imagine hordes of nerds burning in pain
 
user1804599
It is well-known that mutation is bad since it can have global effects. We can conclude that setters are only good if they don't mutate anything (such as lens setters). — райтфолд 6 mins ago
 
smart kat, ublocker blocks the download link too
 
user1804599
2:25 PM
The last time I needed a mutating setter was a long time ago.
 
user1804599
Likely several years.
 
I need them daily
Computer broen & bored, go to work or nap?
 
you mean you can't shut half of your brain while work with the other half?
 
Ahem
 
Ven
just shut the broca area... it'll be quieter
 
2:30 PM
Is there a better meta-make system besides CMake?
 
Ven
just read comments, I have my answer.
 
@chmod711telkitty parse error
 
Is it a bad sign when you search an error message on google and the first few results are lines of code on github for the given language implementation?
See this as an example
 
user1804599
Yes.
 
user1804599
It's terrible.
 
user1804599
2:38 PM
@fredoverflow I posted an answer.
 
@райтфолд AMAZEBALLS
 
user1804599
I love how mutations in Rust aren't dangerous like in other languages.
 
If you love C++ 80%, how much do you love Rust?
 
user1804599
Since you cannot have multiple aliases to an object if at least one of them is mutable.
 
user1804599
@fredoverflow 0%; I just checked and it still lacks exception catching.
 
2:40 PM
0% love for Rust? How much do you love Java then?
 
user1804599
1%.
 
Do you actually love C++ 80%?
 
user1804599
Yes.
 
@Cinch did we ever hear about what happened with that one guy who wrote that one paper?
 
@MichaelMitchell what are you talkng about
 
2:41 PM
lol
 
0.8 amour units
 
remember that biology paper on LDL
 
@MichaelMitchell oh
That's @Blob
He's probably at school right now
 
(ON a saturday)
 
2:42 PM
gross
 
user1804599
@fredoverflow But this is amazing about Rust:
 
user1804599
fn f(n: &i32, m: &mut i32) {
    while *n >= *m {
        *m += 1;
    }
}

fn main() {
    let mut x = 1;
    f(&1, &mut x); // ok
    f(&2, &mut x); // ok
    f(&x, &mut x); // borrow error
}
 
user1804599
It makes mutable objects completely safe to use.
 
@JohanLarsson That F# domain driven design talk was quite interesting.
 
Rust makes me excite
 
2:43 PM
so I have a quick question on static polymorphism:
with dynamic poly we can have Shape base class and Triangle and Circle derived, we can then have an array of Shapes objs and put Triangles and Circles in it.
It it possible to do that with static poly?
 
@MichaelMitchell static what.
 
Rust has strange syntax. I hope nobody ever crosses Rust with Lisp, or my eyes will fall out.
 
@MichaelMitchell And no, you can't
that'll result in splicing
(if i'm not mistaken)
 
I thought so
 
@fredoverflow yeah, very little syntax jerking and very much I-want-more enticing.
 
user1804599
2:44 PM
The equivalent C++ code would run and would never terminate.
 
@Cinch but I think you can make some cases where you can use reinterpret_cast magic and do it, but that is super janky
 
@MichaelMitchell why would you want to do thi
Dynamic is the way
 
dynamic costs alot
 
user1804599
@fredoverflow It will probably happen one day.
 
user1804599
@MichaelMitchell You'd have a shape concept and two classes that implement the concept.
 
user1804599
2:46 PM
Concepts are currently purely conceptual (pun intended), but a future version of C++ may have syntax for them (see concepts TS and related proposals).
 
I think I heard it mentioned in one of the cppcon talks
 
@MichaelMitchell well uh
How else are you gonna do it?
 
currently doing dynamic
but I hate it
 
user1804599
template<typename T>
concept bool Shape = requires(T x) {
    { x.area() } -> int;
};

struct Circle {
    int radius;
    int area() { return radius * pi * pi; };
};

struct Rectangle {
    int w, h;
    int area() { return w * h; };
};
 
user1804599
It would look something like this.
 
user1804599
2:48 PM
@MichaelMitchell Maybe.
 
coming in 17?
I can hope
 
user1804599
I really hope it will be there. It's the #1 feature I'm hoping for.
 
Why are concepts so important?
 
user1804599
Currently you can get some of it with constexpr and std::enable_if, though.
 
Aren't they basically opt-in interfaces?
 
2:49 PM
not sure how constexpr would help
 
@райтфолд What will the Rust/Lisp crossover be called? Rusp? List? :)
 
I thought that pretty much makes things eval at compile time if given r-values
 
@fredoverflow Lust.
 
user1804599
Here's a polymorphic function that uses shapes:
 
user1804599
template<typename T>
requires Shape<T>()
int area_twice(T x) {
    return x.area() * 2;
}
 
user1804599
2:50 PM
This is static polymorphism.
 
@райтфолд what
is it really?
 
user1804599
It's just polymorphism except at compile-time.
 
I like that
 
Oh.
Ohhhh...
Wait but that syntax though
 
user1804599
In C++14 you can leave out requires Shape<T>() and it will just use duck typing.
 
2:50 PM
it is so good
I love you right now
 
oooh, Catch formats the failures so nicely, it's almost a shame to fix the bugs
 
user1804599
template<typename T, typename = std::enable_if_t<Shape<T>()>>
int area_twice(T x) {
    return x.area() * 2;
}
 
user1804599
You can do this right now as well.
 
Hnnnnnnng
that is so massively sexy
 
@райтфолд wait
So concepts comes after the template
but before the defintion
Otherwise, they seem awesome
 
2:52 PM
@райтфолд but still, how do you have an array of shapes?
 
@Cinch what's wrong with that?
 
user1804599
Can't.
 
user1804599
You need dynamic polymorphism for that.
 
le sigh
 
@LightningRacisinObrit idk I'm trying to get the hang of this
 
user1804599
2:52 PM
You can of course define a shape any_shape. :)
 
it's like reverse-dependent interfaces
 
I think imma try some reinterpret_cast shit
 
@MichaelMitchell Don't????
 
user1804599
nono wait
 
I am not saying as a fix all
in my specific case
it should work
 
2:53 PM
sourceforge is fucked up today
 
user1804599
Wait, I'll make an example of arrays of shapes.
 
@райтфолд oh goddddd
 
lololol
 
Damn these games.
 
Can't we just use dynamic_cast and get along?
 
2:53 PM
did I commit prime heresy?
 
Please?
@MichaelMitchell Well, let's do this mental exercise
If you were a C programmer, how would you get dynamic behavior?
 
lots of indirection
 
user1804599
class any_shape {
public:
    template<typename T> requires Shape<T>()
    explicit any_shape(T shape)
        : ptr(std::make_unique<concrete_t<T>>(std::move(shape))) { }
    int area() const { return ptr->area(); }
private:
    struct concept_t {
        virtual ~concept_t() = default;
        virtual int area() const = 0;
    };
    template<typename T>
    struct concrete_t : concept_t {
        explicit concrete_t(T value) : value(std::move(value)) { }
        int area() const override { return value.area(); }
 
There's no dynamic behavior besides void* in C if I'm correct
 
user1804599
Pretty simple.
 
user1804599
2:55 PM
That's how you turn static polymorphism into dynamic polymorphism!
 
@райтфолд the fuc
 
the sound of small minds exploding
 
Hmmm, I could make a language with concepts.
 
user1804599
There are also proposals for reducing this boilerplate (see @AndyProwl).
 
user1804599
I think Rust solves the problem very nicely.
 
2:56 PM
Even for me, it would take shorter than introducing concepts in C++.
 
@райтфолд This looks strangely familiar
 
user1804599
@Cinch sizeof on VLAs is dynamic.
 
It looks like my flgl::any code
@райтфолд Okay.
But that's still not very lenient for design purposes
 
unions are totally uh dynamic..ish...
 
function pointers are dynamic.
 
2:59 PM
@ScottW Do you know OCaml by any chance? I may have a student for you if you do
 
Also uh
 
user1804599
@milleniumbug They're already there. :) coliru.stacked-crooked.com/a/b3c64c18dafa987a
 
Isn't that concept_t class still need to be inherited?
 
user1804599
@Cinch It is inherited from by concrete_t<T>.
 

« first day (1638 days earlier)      last day (3308 days later) »