« first day (913 days earlier)      last day (4041 days later) » 

9:00 PM
ctx swtch alltiem evrytiem
 
Are you familiar with David Firth's work?
 
I'm afraid not.
 
Also related to the other discussion
 
@user703016 He's the guy behind Salad Fingers.
He made, amongst other stuff, this cool thing.
 
Ell
omg java exceptions are annoying the hell out of me.
 
user142019
9:03 PM
@Ell checked exceptions?
 
@CatPlusPlus this again lol
 
Ell
@Zoidberg yeah >:(
 
user142019
Another reason why you don't use Java.
 
Haha, all the videos by this guy are super creepy :D
 
@BartekBanachewicz, how exactly do chunks work? Infinite generation, I mean. I don't quite get it.
 
9:04 PM
@Morwenn You mean awesome?
 
@EtiennedeMartel Well, both.
 
I don't like SF videos.
 
I like rusty spoons.
 
@Pawnguy7 you generate noise with an offset
 
The feeling of rust, against my salad fingers, is almost orgasmic.
 
9:06 PM
But before I leave... I have to caress this rusty kettle.
 
Also that episode where he eats his own head.
 
@BartekBanachewicz I mean to say, moving from a finite bounds to overflow-limited bounds, not the terrain generation itself. Like... how are they stored?
 
@EtiennedeMartel That was disturbing
 
@Pawnguy7 have you seen my code?
 
@user703016 See? Hmmm.
True Art.
 
9:07 PM
@Pawnguy7 I use std::map with a triple of ints as a key
 
@BartekBanachewicz No, but I doubt I would understand it, I am a newb :\
 
@Pawnguy7 meh. That code, compared to that in lundi, is easy
 
@EtiennedeMartel More like, uhm, a mix of depression and schizophrenia.
 
@user703016 Those are not mutually exclusive.
 
@user703016 You probably did not see the episode with some guy using tomar seeds on himself before cutting himself and his dog.
 
9:09 PM
That is like saying I don't have to aim for president, only mayor. It is still difficult with little political background.
 
    auto wrapper = detail::function_wrapper_impl<Return, Params...>(
        std::forward<std::function<Return(Params...)>>(func));
you gotta love that.
@Pawnguy7 so, do you understand map<xyz> concept?
 
* tumor
 
I am not certain what that would mean in this context.
 
@Morwenn I've seen terrible stuff on the internets, and always I wonder what the story behind these horrors is. So, if people are to make such kind of cartoons, what the hell is wrong with them?
 
@Pawnguy7 let's go to opengl room, shall we?
 
Ell
9:10 PM
What are tomar seeds?
 
@EtiennedeMartel Not implying the contrary.
 
@Ell That was a mispeel: "tumor seeds".
 
Ell
Ohh
 
@user703016 I would not like to be in those people's head.
 
You can edit your messages for 2 minutes
I have no Boost and I must compile a thing
 
9:12 PM
Can I go void foo(); static_cast<void>(foo())?
 
@CatPlusPlus Awesome, I did not know :o
 
Xeo
@BartekBanachewicz The fuck is std::forward doing there?
 
@LucDanton (void)0 or (void)variable is pretty common thing in macros and otherwise so static_cast should be fine too I guess
 
Xeo
@LucDanton Ya
 
@Xeo func is &&
 
9:13 PM
Was wondering if my EXPAND macro covered that.
 
Xeo
@BartekBanachewicz Aaaand... you forward as std::function...
No makes sense.
 
@Xeo it's the "obvious" std::function overload
 
Xeo
Listen, std::forward only makes sense when passed both the deduced argument and the corresponding function argument. (most of the time, anyways. Special cases with T&&/T withheld.)
 
Also, perfect storing. And it's not just me using that, std::thread does as well!
 
@Xeo hey, we settled on the fact I need 3 overloads, right?
template<typename Return, typename... Params>
void register_function(std::string const &name, std::function<Return(Params...)>&& func) {
maybe that clears that up a bit
 
Xeo
9:16 PM
@LucDanton T&&/T
@BartekBanachewicz std::move, sucker.
 
@Xeo robot told me to forward :confused:
 
@Xeo Doesn't make a lick of sense. Whether in a function or somewhere else you use std::forward<T>, and T does represent the same thing as the function argument.
 
isn't forward like completely transparent compared to move forcing move constructor?
 
Xeo
@LucDanton Okay, I think we're missing each other here. I mean taking T&& and storing T.
@BartekBanachewicz Only if you passed it a deduced template argument
 
It's the same std::forward<T> as if it were in the function template. And same T.
 
Xeo
9:18 PM
What you're doing is exactly equivalent to std::move(func)
 
@Xeo I am afraid I don't understand that, sorry :(
@Xeo okey, so I'll just take by value and move then, right?
 
Xeo
@LucDanton Okay, so what do you mean here with "perfect storing"? I take that as T& for lvalues, T for rvalues
Or atleast I think I explained my view of "perfect storing" that way some time ago
@BartekBanachewicz No need for by-value, really. Why the extra copy? Your choice, though.
 
no fuck that
figure it out
 
:lol:
 
@Xeo I am confused
 
Xeo
9:21 PM
@BartekBanachewicz template<class T> void foo(T&& v) -> std::forward<T>(v) // good
 
@DomagojPandža: Have you seen this: nvidia.ca/object/scenix-home.html ?
 
Xeo
template<class T> void foo(X<T>&& v) -> std::forward<X<T>>(v) // bad
 
@Xeo isn't that what I am doing?
4 mins ago, by Bartek Banachewicz
template<typename Return, typename... Params>
void register_function(std::string const &name, std::function<Return(Params...)>&& func) {
12 mins ago, by Bartek Banachewicz
    auto wrapper = detail::function_wrapper_impl<Return, Params...>(
        std::forward<std::function<Return(Params...)>>(func));
 
Xeo
No it's not, look above.
@LucDanton :(
 
ah
crap.
@Xeo so proper way will be template<typename T> foo(C<T>&& c) { move(c);}, aye?
 
Xeo
9:23 PM
Beware that c only binds to rvalues that way... okay, maybe you want by-value after all. :P
 
Xeo
The std::forward thing still stands
 
right.
@Xeo is asking "why's that exactly" ok now, or is it too hard for me to get atm? :)
 
@Borgleader Yeah, I'm not aware that many people use it. At least not for games. :D
 
What's the point of std::forward besides avoiding copies?
 
9:26 PM
@user703016 passing noncopyables?
 
Xeo
@BartekBanachewicz std::forward is for forwarding either lvalues as lvalues, or rvalues as rvalues.
But a C<T>&& can never be passed an lvalue, only an rvalue.
A T&&, on the other hand, can take everything (literally).
 
aahaaaaaaa!
@Xeo why? :) (oh god you will eat me soon)
 
Ell
gawd I think I might have to do everything server side just because I can't stand java so much >:(
 
Wait, what
 
Xeo
@BartekBanachewicz Because it's an rvalue reference?
T&& is simply special
 
9:29 PM
@Xeo oh, that's new
 
Xeo
Remember the "universal reference" stuff?
deduced-argument + rvalue reference == universal reference
I thought you knew this stuff
 
Burn him!
 
user142019
@Ell Can't you use another language that runs on the JVM? :v
 
@Ell What are you trying to do?
 
@Xeo I knew "universal reference" term, but didn't really understand it, it seems
 
Xeo
9:32 PM
Watch Scott's talk again
 
user142019
 
will do. Sorry for my ignorance.
 
Xeo
21
A: How does std::forward work?

XeoFirst, let's take a look at what std::forward does according to the standard: §20.2.3 [forward] p2 Returns: static_cast<T&&>(t) (Where T is the explicitly specified template parameter and t is the passed argument.) Now remember the reference collapsing rules: TR R T& & -> T& // lv...

And/or read the example there
 
hey, thanks a lot. You could've posted me to that at sight. It means a lot :)
 
Ell
I could actually :3
@user703016 I have some ruby code which does my maths homework for me that I'm porting to an app :p
 
user142019
9:34 PM
JRuby lol.
 
user142019
@Ell ruboto.org :P
 
Ell
I have ruboto :P
But also. It uses the mechanize gem. Not sure if I can get that on android
 
user142019
There are too many gems.
 
Ell
It's a headless web browser type thing
I don't know how cookies/post/http works :(
 
Xeo
Man, JENOVA's theme is just so awesome.
 
9:39 PM
btw, @BartekBanachewicz, I'm browsing GitHub things and about closing issues with commit messages, they only close once the commit is merged into default branch
 
@Xeo You don't say!
 
For future reference
 
@Zoidberg Hm?
 
I just found this puzzle:
> You are given a the source to a application which is crashing when run. After running it 10 times in a debugger, you find it never crashes in the same place. The application is single threaded, and uses only the C++ standard library. What programming errors could be causing this crash? How would you test each one?
It uses time function?
Or "general UB"
 
Xeo
9:41 PM
> What programming errors could be causing this crash? How would you test each one?
 
It's using abysmal C error handling.
 
user142019
@EtiennedeMartel Pinkie Pie following Rainbow Dash in season 1 episode 5.
 
I'd use Valgrind.
 
Xeo
Too many to count, Valgrind
 
> What programming errors could be causing this crash?
1. It uses C standard library
 
9:42 PM
Sorry bout that.
@CatPlusPlus fixed.
 
Xeo
IRTA "could you test each one" at first
 
user142019
What’s orange and tastes like an orange? An orange.
 
The problem is the programmer. I would change him.
 
user142019
PEBCAC
 
Fuck puzzles like that
You need source and environment data and debugger feed
 
9:44 PM
@Zoidberg Oh, so you started watching it.
 
After running it 10 times maybe I'd have an idea what's wrong
 
user142019
@EtiennedeMartel :>
 
With "application is single threaded, and uses only the C++ standard library, and crashes randomly" as my information I can only say "it's a horrible code written by an awful programmer"
Please tell me it's not a ~job interview puzzle~
 
I think StackedCrooked made it.
 
user142019
All C code qualifies for IOCCC.
 
9:47 PM
XD
 
@CatPlusPlus It is! And I want to know the answer too.
 
There is no answer other than "fuck you for believing this puzzle has any utility"
 
Noted.
 
You still preparing for Google interview?
 
Somewhat.
I only started a few days ago.
 
9:52 PM
But really there's not enough information in that ~puzzle~
You can guess
But seriously
 
@StackedCrooked if(rand()) abort(); at various places in the code?
 
In reality I'd run it with Valgrind.
 
I don't even know if Valgrind is strictly needed
I don't know anything until I see the code
 
@EtiennedeMartel That would actually always crash at the same place if the default seed is used.
3
Q: Debugging a program that crashes 10 times in different places

hiddenboyYou are given the source to an application which is crashing during run time. After running it 10 times in a debugger, you find it never crashes in the same place. The application is single threaded, and uses only the C standard library. What programming errors could be causing this crash? How wo...

lol, I could have googled it
 
@EtiennedeMartel That's extremely easy to spot on the backtrace
 
9:54 PM
Yeah, but it would still fit the description.
So the question is bullshit.
Next.
 
Unless you're tasked with debugging something you have no code and no symbols for
But then there's not enough money for me to do that
In the world
 
user142019
@hiddenboy hyperlink? — Zoidberg 25 secs ago
 
> Easy: infinite loop. Only crashes when the call stack overflows, and that could happen anywhere, depending on how much memory is available for the call stack.
 
user142019
( ͡° ͜ʖ ͡°)
 
Two upvotes
:stackoverflow:
You know this being ~interview puzzle~ it might actually be a trick question with an answer being "I don't know, there's not enough information"
 
9:57 PM
I guess.
 
Or it might be just a dumb bullshit question that someone VERY CLEVER wrote down while high/drunk one day and thought it'd be a perfect one for interviews
Or "I had a problem like that once so surely you'd do something similar for any unspecified piece of code"
 
C or C++? Pick one. — Etienne de Martel 3 secs ago
 
An other interesting question I found was to find the set of common characters in two strings in linear time.
 
@EtiennedeMartel Looks like C to me.
 
Ugh algorithm memorisation
 
9:59 PM
@Rapptz But it's tagged C++.
"Never assume" is the first step towards being a pedant asshat.
 

« first day (913 days earlier)      last day (4041 days later) »