« first day (1663 days earlier)      last day (3284 days later) » 

Ell
10:00 PM
@AlexM. it's aweseome
I wish c++ had better tools
even just renaming
 
how did you deal with arrays when getting them back from java?
what I mean is, how did you choose to send them to the client
 
Ell
I don't actually deal with arrays yet :P
 
ideally I'd want something like allowing the user to fill some specific category of containers with the values inside the original array but I didn't think about it too much
 
Ell
I only deal with primitive types atm
just starting to deal with objects
 
arrays are too little used in my situation for this to be critical so I'll probably keep returning a std::vector until I see everything works
 
Ell
10:03 PM
that's what I'd do
I don't know how to deal with generics yet though
 
@Ell it was a bit of a turnoff to see stuff like typedef float jfloat; in jni.h
I expected something fancier :P
 
Ell
haha
I don't use those
I ought to
this is what I have
typedef float Float; // TODO: needs to be 32 bit
but it ought to be jfloat, yeah :P
 
Omg rolling my own optional is the best thing ive ever done
 
Ell
I forgot what java calls a boxed int, and what a regular int
Int vs Integer I think o.O
 
my own code uses 100% value semantics without any issues so far
 
Ell
10:09 PM
damn they call it int
that's going to cause some confusion
uh
I'll rename stuff later :L
 
@R.MartinhoFernandes lol - I received your time traveling post card :)
 
@Ell atm I use ints for every conversion that is numeric and not floating point lol I'll change this later since the conversion is just a cast if that's even required
 
Delivery isn't exactly swift these days
 
jbyte? you build one from int and get an int from one
jchar? same
I really just want to see it running for now
I'll worry about these details later
 
So, last Sunday, Canada beat Germany 10 to 0 at hockey.
 
10:12 PM
Because Germany didn't even know what hockey is?
 
in JavaScript, 22 secs ago, by Benjamin Gruenbaum
Happy Birthday @BartekBanachewicz!
 
wait what it's barteks birthday?
 
Ell
@BartekBanachewicz happy birthday
 
10:13 PM
@CatPlusPlus It's their fault for even participating in that tournament.
 
Ell
@R.MartinhoFernandes hi :) how did it go?
 
@R.MartinhoFernandes WHADDUUUUUUUUUP
 
Xeo
@R.MartinhoFernandes Hi, how did your date go?
 
Good evening everyone!
 
Woah hold your horses.
 
user3010322
10:13 PM
Give us the details or we'll rip out the spine of a book.
 
Xeo
No, you must spit out everything. Nao.
 
Ell
Oh man I need a copyable lambda maybe
 
Xeo
@Ell lambdas are copyable
 
I have some weird jeopardy reverse Q&A feeling about this:
0
A: Recovering Files on Windows and C

πάντα ῥεῖ "The code I used on linux to open a disk as a file was:" File *f = fopen("E:\", "rb"); I seriously doubt you ever got this code working on any linux system (or windows either). You'll need to escape the backslash path delimiter, if it's presented in any string literal: FILE* f = fopen(...

 
Ell
oh
hmm
Ahh wait I see
 
Xeo
10:14 PM
unless you by-value capture a move-only type, I guess
 
yep
 
Robor you are a role model to all of us here.
 
Ell
it's okay I see what I did now :3
 
@sehe :D We wrote it while still in Amsterdam.
 
I got that. I'm not sure whether it was posted from the future too :)
 
10:16 PM
@sehe It was. We sent it the day after we left you :D
 
Xeo
@LucDanton This seems rather annoying: stackoverflow.com/a/30087881/500104 :/
 
@sehe Yeah, we sent out a bunch but fully aware we would be back in Berlin before any of them arrived to their destinations.
It will be funny when some people that didn't know I was out of town get theirs.
 
@Xeo Even if they contain references?
 
Xeo
yes
references are easily 'copied'.
lambdas are not assignable, if that's your concern
 
@Xeo Now that you mention it, that probably is what I was thinking of.
 
10:21 PM
@R.MartinhoFernandes does this include random stranger X that doesn't know you (here)[chat.stackoverflow.com/transcript/10?m=23056337#23056337]?
 
Yeah.
I don't know her either.
I found a stamp in a geocache with a message saying "Schick mir doch eine Karte" and an address, so I sent a postcard with the same contents (well, my address) :D
 
For a map<int, vector<string>> is it [] to access the vector inside the map, -> operator does not seem to work
 
Ell
mymap[0].push("hello world!");
 
@R.MartinhoFernandes inb4 infinite loop
 
It will be awesome if she reciprocates the same way.
 
10:25 PM
Hey robot, did you do Interrail by any chance?
 
I thought about it a while back but didn't have enough vacation days for all the trips I want to do, so I dropped that one.
 
Ell
Okay I have a question about that parameter thing - if I have template<class FT> and I want a function with the same signature as FT, how do I declare that function? (like std::function)
 
0
A: How can I detect parameter types of a function passed as a parameter?

PuppyIt's impossible. For example, what if the argument is a functor containing a templated (especially variadic) operator()? Or one that is overloaded? What are the "arguments" then? The core problem here is that you're effectively re-implementing ranges but worse. Just offer plain iterators over th...

Might be relevant
 
@Ell let me see if I can find a link again...
 
Ell
10:28 PM
Hmm actually
I think I know how
 
@Ell seeing std::function reminded me of this coliru.stacked-crooked.com/a/ac76221f0d59ffe8
 
Ell
template<class FT>
struct Method;
template<class ReturnT, class... Args>
struct Method<ReturnT(Args...)> {... };
 
@Ell Hmm, what?
What's FT?
 
I think it stands for FunctionType
 
10:31 PM
If it's a signature and FT = R(As...) for some R and As..., then you can just reuse FT.
 
@Xeo It went well, I guess.
 
Ell
yah function type
 
@Ell Oh yeah
 
> Reason for refund: Pre-order price protection
The following is the breakdown of your refund for this item:
Item Refund: £0.01
I'm rich.
@Ell You mean the hitchhiking?
 
Ell
10:34 PM
uh it's a pain having to special case for void
 
@Ell do you plan to provide some sort of access to jni types through your wrapper?
 
Ell
@R.MartinhoFernandes yeah
to her I meant :P
 
IME I haven't seen a need
 
Xeo
@Ell hahahahaha, and another one learns the pain
 
@Ell She knew I was doing that and that was the first thing she asked me about.
 
10:34 PM
@R.MartinhoFernandes ...and the truth finally comes out! The "R" actually stands for "Rich". Richard Martinho Fernandes...something there just doesn't seem to fit so well, but such is life I guess.
 
I'm talking about allowing people to use their own JNIEnv*, keep track of jclass and jmethodids etc
 
Ell
@Xeo before I just did struct Void {}; but it feels very hacky :L
 
Xeo
@Ell that's unit
 
Ell
@Xeo yeah, it was just so I didn't have to write an operator() that doesn't return
@R.MartinhoFernandes Oh cool
that's interesting
@AlexM. @AlexM. I have a (I'm writing a) Method class, I have a Field class
I will have a Class class, which acts the same way as a String class for instance - because it is an object
 
@Ell shit, you're covering everything
this is what I'm going for pastebin.com/Cat6frQh
I wonder how far I can go before someone needs more than just calling java from C++
 
10:38 PM
Putting a VM on an external HD is not a good idea.
SO SLOW
 
I like the idea of just using JFunction and nothing else
 
@StackedCrooked Worked fine for me (on eSATA).
 
@R.MartinhoFernandes Arent you supposed to be on a date right now?
 
Well that's great to hear.
It's an WD USB 3.0 drive.
 
Ell
@AlexM. yup
 
10:39 PM
@Borgleader not yet, he's still rich
 
@Borgleader I just got home 30m ago.
 
ba dum tschhh
 
But local SSD beats that.
 
Ell
I can't remember why I started it but it's fun so I'm carrying on
 
@R.MartinhoFernandes i see
 
10:41 PM
@StackedCrooked SSD faster than HD? Who'd ever have thought that could be possible?
 
HD is not really good for running a VM which involves a lot of random accesses.
It's great for anime though.
Because it's sequential access.
Anime rocks.
 
HAPPY BARTEKDAY!
13
/cc @BartekBanachewicz
 
harpy bartekday
 
Boost takes ages to release fixes lol.
Most of the tickets I see from 1.58 being resolved are from 7-11 months ago.
 
@Rapptz You need to contribute your fixes more quickly.
 
10:48 PM
Funny you say that.
This one had a patch. 11 months old. Fixed in 1.58.
(not my fixes but yeah)
 
Yeah. I do that too. Devs are on ~1.5y update cycles commonly, it seems
 
Ell
uhh I forgot what to do when my templates have circular dependencies
Just lots of forward decls I guess :S
 
Ell
I don't know what to forward declare where
 
/r/todayilearned is so nice
 
10:55 PM
Unless you are trying to store circular by value. that won't work.
 
anti-boredom material
 
@AlexM. Such a bad subreddit.
 
Ell
@StackedCrooked I'm not (I don't think)
I'm trying to construct B from inside a method of A, where B holds a reference to A
A's header includes B then uses B
 
You can separate the method definition from its declaration. put it below A and B class definitions.
 
Ell
but for some reason complains about unknown type 'B'
I shouldn't need to though :(
 
10:59 PM
@Ell Circular header inclusion is not gonna work though.
 
Ell
Meh
I always get confused with such a trivial thing
 
It's a matter of experience.
 
Ell
because In my mind, templates are always defined where they are declared
 
@Rapptz why it's fun
 
Well, fix your mind then :P
 
Ell
10:59 PM
haha yeah
@Rapptz reddit is just bad in general
no interesting content
 
disagree
 
Ell
What subs are you sub'd to?
I have r/linux, r/opengl, r/vulkan, r/amd, r/pcmasterrace, r/funny, r/DIY, r/food, r/CitiesSkylines, r/personalfinance, r/thalisophobia, r/low_poly, r/unixporn, r/Accounting, r/jakeandamir, r/cpp, r/UKPersonalFinance, r/gamedevscreens, r/SocialEngineering, r/engineering
 
many different ones
 
Ell
I think that's all of mine
@StackedCrooked errors are occuring in A for some reason, I don't understand why
 
May 11 '12 at 17:25, by Cat Plus Plus
@StackedCrooked You should get a medal for most horribly convoluted 13 lines of code.
Dammit, ideone! I wanna know what they were. But the page doesn't load.
 
Ell
11:03 PM
It should go C includes A, A includes B. A uses B
meh
 
@Ell I'm not subscribed to any sub :\
 
Ell
I'll figure it out
 
but I visit TIL and cs go everyday
 
I am subscribed to 102 subreddits.
 
Ell
oh wow
I have r/linux_gaming too
 
11:05 PM
> Bernie Sanders to cut the BS, now wants to be known as Ernie Anders. (self.circlejerk)
 
ooh thunderstorm starting outside
neat maybe tomorrow will be colder
 
I moderate a lot of subreddits too.
 
!!tell alexm thunderstorms
 
@Rapptz You moderate subreddits. I subvert moderators.
 
What did you monsters do to @CapricaSix?
 
11:08 PM
I forget.
 
We talked a lot, I drank some gin, she drank some wine, she told me a bunch of things she likes about me, I should have probably reciprocated that but I'm dumb, we left bar and were to head off in opposite directions (the bar was about halfway between our places), I was on foot, she was with her bicycle, she said she'd walk with me home then, we walked to my front door, talked some more, and said goodbyes, and she mentioned other stuff we could do some other time, and then she asked if I we would see each other on Friday as usual, and I forgot I'm supposed to leave town for the weekend on F
2
 
Ell
Ah jesus frickin christ I see the problem: #ifdef METHOD_HPP_INCLUDED
 
Robot almost sounds awkward
 
Ell
@Jeremy he doesn't sound awkward
 
iunno
 
11:10 PM
Guess I'll text my mates and tell 'em I won't join then on Friday.
 
robot has the legendary talent of being able to speak to people without getting awkward
 
good luck
 
Ell
@R.MartinhoFernandes I'd tell her directly if I were you
if she is expecting to see you and then you don't turn up with just a message passed on from a friend it might give the wrong impression
 
@Ell I think he wants to go with her and not with his mates
or so I got it
 
Ell
Oh wait
I thought he wasn't in town on friday?
ahh I see it now
 
11:13 PM
he was not supposed to be because he was supposed to be with his mates that he'll be texting
 
Ell
My bad.
 
when did I become an expert in Robot
4
 
it's raining outside and the temp dropped a bit <3
it's pleasant to sit close to the window
> TIL that the city of Portland, Oregon flushed 58 million gallons of water down the drain because a 19-year-old named Dallas Swonger peed in its municipal reservoir
lolwat
 
11:16 PM
@AlexM. haha what?
 
you know this is the best part about summer weather
storms
 
haha i love his quotes
 
especially if thunders happen rarely and there's lots of water dropping
 
Ell
balls I need a polymorphic Ref<> for my java refs
 
it's nice to see it from the window
 
11:18 PM
“I was like, ‘Dudes I have to piss so bad,’”
 
@Jeremy I've been described as "awkwardly social, not socially awkward" and "the most social anti-social person I know".
 
@R.MartinhoFernandes a lot better than what id describe myself as
 
@Ell java refs?
 
Ell
oh wait no I don't
 
I need to stop reading what you say about jni for a while
you make me think my design is bad
and that I'm missing something
 
Ell
11:22 PM
in reality my design is bad :P
 
JNI?
 
@Jefffrey java native interface
 
i didn't mean to hit enter :X
 
@Jeremy Why did you write down text then?
 
me and @Ell work on the same things but from what I see in different directions
 
11:23 PM
@R.MartinhoFernandes awww
 
I changed my mind
 
@AlexM. What's that supposed to be like?
 
and everything he says makes my solution seem simplistic :D
 
@Jefffrey it lets you do C or C++ <-> Java interop
the C++ support is pretty damn limited though
 
11:24 PM
TIL about Moldova
 
@StackedCrooked Wow, they're ugly..
 
@StackedCrooked which one? :D
 
@R.MartinhoFernandes I'm lying. I didn't really forget about being out of town ;)
 
@StackedCrooked oh, the republic
 
11:25 PM
@AlexM. Also the one next to your country iirc.
 
Ell
@R.MartinhoFernandes ;)
you dog you
 
@StackedCrooked that blows
 
Moldova is also the name of a region in Romania
 
I should sleep now
 
I really don't like the republic's situation
 
11:26 PM
It's novel.
 
i sent 600 usd to moldova one time
i am a hero to the people there
too bad its gone now
 
wish we could re-link with moldova
but russia's influence there is too huge
 
how does that much money just vanish
 
god damn that's a catchy song
 
Saved by GEMA
 
11:28 PM
@R.MartinhoFernandes you really really really really really really really won't like it anyway
 
Ell
I wonder if anyone has proposed that return void_function(); should work
 
god damn that's an annoying earworm
I have kids. Don't need a radio to yap at me
 
@Xeo thks for the link <3
 
you got the right number of reallies, too. I'm impressed
@Ell It does
 
Ell
@LightnessRacesinOrbit I mean inside a function also returning void
I should have included that detail
 
@Ell enable_if that :A
 
Ell
waiiit whaaat
 
Ell
11:30 PM
maybe I don't need to special case for void then
 
you don't
that's precisely why it's allowed
5
A: Why is g++ allowing me to treat this void-function as anything but?

Johannes Schaub - litbAs to why GCC allows it - sure because the Standard requires it to be valid. Building the transitive closure to the rationale of the rule in the Standard, I'm pretty sure that GCC allows this because it's useful in the event of templates template<typename F> typename std::result_of<F()>::type ca...

 
just make sure you don't need to do anything prior to returning that void thing
 
Ell
@LightnessRacesinOrbit what the hell man
I swear it's error'd on me countless times before
 
Ell
It has
 
11:31 PM
btw, isn't returning somevoidfunction(); the same as return void();?
 
It's been valid since C++98 so you must've done something different :)
 
Ell
believe me
it must have done :P
 
ignore side-effects
 
@AlexM. How can I ignore side-effects?
 
Ell
11:32 PM
@LightnessRacesinOrbit I know :(
 
@LightnessRacesinOrbit Ell's issue was that he couldn't return void right?
never mentioned side-effects
 
If your question is "ignoring the difference between return somevoidfunction() and return void(), isn't return somevoidfunction() and return void() the same thing?" then the answer is yes.
 
It's all about that void.
 
But, yes, return somevoidfunction() is valid by the same rule that allows return void().
@StackedCrooked no value
 
:D
 
11:37 PM
This is turning out to be one of the better anime this season.
 
> Base 2, 6 Digits - Unsigned Range
 
> One morning, on the train to school, Takeo saves a girl, Yamato, from being molested by a pervert. Could this be the beginning of spring for Takeo?
the guy is living the dream
 
It's actually good.
 
^^ That is what you call a terribly-phrased question.
 
C'est terrible.
 
11:39 PM
Life's good. Good night.
 
@StackedCrooked IRTA C est terrible.
wait is that the joke
 
@R.MartinhoFernandes OK, best wishes and good luck:)
 
Ell
heyyy my thing works
@AlexM. lemme show you what worked
 
suppose I ought to get some sleep too
night
 
bb
 
11:46 PM
Given Base 2, 6 Digits, what's the Unsigned Range?
 
@Ell are you going to cache the JNIEnv*?
 
Ell
@AlexM. no idea
probs not
it's just a pointer
 
I remember it not being threadsafe in any way
looks cool :D
 
Ell
still need a better way to declare those methods
but c++ doesn't allow non static auto :'(
 
I wonder if you'll find that you can implement some functionality that requires writing down a class for each use that I won't be able to
 
11:49 PM
Today is Bartek day? Nice.
 
Ell
what do you mean? :)
 
Happy birthday @BartekBanachewiczBartekBanachewicz!
@Ell Me?
 
@Ell from what I see you seem to mirror the Java implementation (I'm talking about requiring the user to do struct ExampleClass : public java::lang::Object)
whereas I just
 
Ell
Yeah
 
JFunction<JString(JInt, JBool)> myFunc;
myFunc.LinkStatic("MyClass", "MyFunc");
std::cout << myFunc(3, false);
and this happens in w/e scope
 
11:51 PM
@Ell I dunno. Borket day is nice?
 
wait
"what do you mean?" wasn't directed at me
 
Ell
@Nooble I meant @AlexM.
Sorru
Confusion caused by me :P
 
Oh :P
 
@Ell be sure to generate the string signatures automatically, they're a pain to work with manually IME
 
Ell
@AlexM. What does link static do?
 
11:53 PM
0
A: Valid snakes on a plane

orlpPyth, 22 20 bytes ql{m+=Z*=T^.j)hCdzlz Try it yourself or run the testsuite. Note the ASCII values of SRL, respectively 83, 76, 82. I abuse the fact that: i 83 + 1 = 1 i 76 + 1 = i i 82 + 1 = -i From here I just keep a variable for the current position and current direction. For eve...

 
@Ell it wraps GetStaticMethodID and assigns the result to the JFunction's internal jmethodID
 
Ell
I see
I haven't dealt with statics yet
 
I really need to read the jni docs properly once I'm done with this
 
Ell
But generating signatures is on my list next
 
I'm really working towards one particular case
(i.e. removing the cruft from the JNI-related code used at work)
since only one small part of the JNI is used I'm missing a lot of the picture
 
Ell
11:57 PM
Yeah
 
i.e. I've no idea what calling non-static functions is supposed to look like compared to static
and I also haven't touched theJNIEXPORT bit since it had the least cruft and felt like it didn't warrant attention atm
 
Ell
Yeah nor have I really
 
@orlp I'm reminded of Pawnguy.
 
@orlp Pyth is a very good CS GO player
 
Ell
ATM my wrapper just helps calling java code from c++ easier
 
11:59 PM
@StackedCrooked rip
 
@StackedCrooked who/what is Pawnguy?
 
He was one of our heroes.
 
@Ell that's where most of the work goes into anyway
 
He made the best snake game ever.
 
time for me to take a shower and sleep :D
cya
 

« first day (1663 days earlier)      last day (3284 days later) »