« first day (1627 days earlier)      last day (3324 days later) » 

11:00 AM
it goes out when I send out the papers, I'm on B2B contract
 
> a while ago
it was like 3 days ago or sth
is motomapa lrio or cicada?
 
@AlexM. What's that?
 
why you have to spoil everything
 
@khajvah something that lets you map your classes to data in databases
I had to use it in uni once but didn't but thought it seemed nice at first glance
 
user1804599
11:01 AM
CicadaScript
 
GNU/CicadaScript
 
user1804599
@AlexM. nooo
 
@AlexM. query is fine and I can afford to load all the data once. My question is about the algorithm.
 
user1804599
KISS
 
user1804599
ORMs are complex as shit.
 
11:02 AM
my ass
 
my humps
 
my titties
 
@BartekBanachewicz close enough
 
Whatever, I will work with objects and see what happens
 
you will notice that trying solutions before deciding is a good way to get things done
 
11:03 AM
IMO it is not good to store objects in database
 
as you keep on doing it
 
GNU/Momotapa
 
database is better to store plain data rather than objects
but just my opinion of course
 
@MomotapaLimpopo I am not storing objects in database
 
11:04 AM
> Before calling a Java object's method from JNI, we need its signature. For example, the method

long myMethod (int n, String s, int[] arr);

is seen from JNI with the signature

(ILJAVA/LANG/STRING;[I)J
this is so ugly oh my god
and I have to use this all the time
 
user1804599
 
@райтфолд Putin approves
 
I think I'll make a wrapper or sth
where you pass proper params
and it returns that abominable string
 
my day of work is finished, dear fair-skinned friends
i shall return to my home at once
 
like, makesignature(returntype, param1, param2...); where the things are enums
 
11:06 AM
have a good day
 
does java have variable # of params
 
GNU/Home
 
yes it has
goody
 
user1804599
@AlexM. yes.
 
61
A: Как вы нашли работу?

cy6erGn0mТак же как и многие другие. В конце второго курса написал резюме и послал в кучу мест. Много где меня послали куда подальше, так как опыта работы не было и режим работы мой был неясный.. но в одном месте взяли. И понеслась :)

 
11:10 AM
lol ru stackoverflow exists
 
Translation: "How did you find a job?"PERFECT so question
 
happy birthday to me
 
all grow up now? :D
 
keep thinking that
 
@khajvah cyka blyat
3
 
11:13 AM
> fair-skinned
Skinned fairies
 
skinny hairy
 
my life has been taken over by stackegg
 
Is the mainsite lagging badly for anyone else?
 
@райтфолд on the other hand I have to do it in C++
 
@sehe russian one was lagging
 
11:16 AM
and va_args look so ugly
 
That's on purpose
 
user1804599
 
@sehe not sure what other alternatives I have
a list of args would have worked if I was on C++11
not being able to do something like {arg1, arg2, arg3} defeats the usability purpose
 
user1804599
We should use Vim and donate to Cicada.
 
@AlexM. you can provide template overloads manually
 
Xeo
11:19 AM
Ew, manual variadics.
 
@MomotapaLimpopo you're really bored today tonight
 
Xeo
I'd rather generate them with Boost.PP
 
template<typename T>
void f(T t);

template<typename T, typename U>
void f(T t, U u);
and so on
 
@райтфолд hehehe. I donated my sister. And $50 once, IIRC
 
@Xeo not really relevant in most cases
 
11:19 AM
so I have to do that for all possible combinations?
 
@AlexM. not combinations, arities
 
yes arities
 
user1804599
> I donated my sister.
 
I have no upper limit on arities
 
Xeo
Yes you do, in C++03
 
11:20 AM
@AlexM. do you have a practical upper limit?
 
nope, what I'm trying to do is
you need these string signatures in JNI: (ILjava/lang/String;)V
 
Haskell i.e. provides up to 10-tuples in most cases
and that's not really a problem
 
instead of writing them by hand, I want to pass enums to a method generating them
method(return type, variable number of arguments here)
 
yeah well and what's the maximum numbers of arguments you expect?
 
a lot, dunno
 
11:21 AM
if you use Boost.PP you can generate dunno a 100 of them
 
Xeo
@AlexM. Got a specific example of what you're trying to do?
 
I'll take a look at pp
 
user1804599
I should write a tool to grep YouTrack.
 
Xeo
Maybe you're approaching it wrongly.
 
user1804599
The built-in search is terrible.
 
11:22 AM
but frankly a function that takes more than 10 is suspicious
 
@райтфолд I did. Well, she moved outof her own volition, but I promised to use Vim for as long as she stays
 
@Xeo is that not good of an example? :P
 
user1804599
@sehe :[
 
Xeo
Code-example.
 
I have multiple Java methods that I need to call from C++, right
 
11:22 AM
ITT I don't want to get banned on April 1st
 
these have to be registered by that string signature
 
You don't get banned for calling people volunteer pimps
 
and instead of constantly checking with the docs to see what signature each type has
 
is there managed or un-managed code in c++?
 
do you have those docs in XML?
 
11:23 AM
I want to GenerateSig(JType::Void, JType::Int, JType::String)
 
Xeo
Okay
Following you so far
 
Can you generate signatures for those functions out of docs?
 
@sehe there are no hard rules on banning, the rules behind banning are highly illogical - it's like winning a lottery to be sent to the moon (rar rar rar ...)
 
as a separate build step?
 
I am not taking my chances
 
user1804599
11:24 AM
@AlexM. Should be very easy to implement.
 
@BartekBanachewicz nothing organized that way, by "docs" I meant googling for stuff and finding this rgagnon.com/javadetails/java-0286.html
 
user1804599
Just a variadic template that does string concatenation.
 
2 mins ago, by Alex M.
I have multiple Java methods that I need to call from C++, right
do you have to compile those strings in c++?
can you do it outside of your program?
 
@BartekBanachewicz yeah
 
11:25 AM
@chmod711telkitty that would make a perfect april 1 gift
 
@BartekBanachewicz not sure if I can do that as it changes the way everyone would use the library
 
@chmod711telkitty who's illogical here
 
@AlexM. you can provide an up-to-date pregenerated header with the functions
 
@ammarali29 yes
 
that's what i.e. haskell bindings to OpenGL do
 
11:26 AM
@sehe that's what the ''rar rar rar ...' at the end for
 
and now what is it this "StackEgg" ? :|
is it already April fool's day?
 
@chmod711telkitty you need to eat fewer tinfoil hats
 
11:27 AM
@райтфолд I googled happily but that's C++11 only :(
 
user1804599
Then just implement to_string for your types.
 
@MarcoA. maybe on the east most edge of the world
 
user1804599
Oh in C++03 you need C-style variadics.
 
user1804599
And they probably break with non-PODs.
 
@sehe ah that's right. Seattle should be -9 with respect to my area
that might be it
 
user1804599
11:28 AM
So instead just use Boost.Preprocessor to generate 22-odd overloads.
 
22 is not odd
 
@BartekBanachewicz yup but I still need the var arg function
my god it's so difficult to just have a variable number of arguments of the same type and iterate through them lol
 
@AlexM. what for?
 
@AlexM. marshal as array. Profit.
 
@BartekBanachewicz so I can generate those strings
 
11:29 AM
@AlexM. wait why are you generating those strings
I though you are calling java
or is java calling you?
 
user1804599
SWIG
 
I need those strings when I map C++ jmethodID objects to their java counterparts
 
um what?
 
ajmethodID gets set via JNIEnv::GetStaticMethodID and one of the params to that getter is the string signature
(..., "MyJavaMethod", "MyJavaMethod'sSignature")
 
again, is the pool of those functions closed?
 
11:31 AM
what do you mean?
 
do you have a list of all java functions you might want to call so you might pregenerate it?
because that would be much easier
 
yes, I already know what I'm going to call, but the idea is to have that thing handy so I can more easily read the code and add other methods
 
// SO BAD
super_duper_global_seed = params.data_seed;
 
without checking with the docs
 
@BartekBanachewicz impregnate it??
 
11:32 AM
I'm losing my faith in clFFT.
 
@rubenvb You should. (And that doesn't make it less good, it just improves your mind)
 
@AlexM. write a tool that parses those docs and generates new headers every time the java list changes or expands
 
@sehe Hmm, well, I can't seem to get it to match FFTW, unlike the other OpenCL FFT thing I found, but it's a factor 4 slower than cuFFT.
Anyone know how to call clFFT and compare it to FFTW calculated results?
My modified example code doesn't want to match up.
 
Unions cannot have static member variables?
 
@R.MartinhoFernandes union stuff { int x; float y; static bool wtf; } ?
 
11:42 AM
> error: hlife::cell::key may not be static because it is a member of a union
 
@R.MartinhoFernandes interesting. Another "arbitrary" limitation then. That's a shame. Can it have inline declared friend functions?
 
@sehe It can have pretty much everything else including static member functions.
 
@BartekBanachewicz I'll settle for something like this for now coliru.stacked-crooked.com/a/e4e28fdc17f1210c
and talk to the android guys here who make the package everyone uses about how we can do this there so more people use it
 
@R.MartinhoFernandes mmm. so, declare the static member function and use a static local ... but that incurs locking for thread safe initialization...
It's a damn arbitrary restriction
 
Xeo
@AlexM. Erm, if they're all the same type, just pass an array / vector. Really.
 
11:46 AM
@sehe In this case it's just a token value for the passkey idiom so I can just return one by value.
 
@Xeo but that means I have to create the array/vector before the generation
 
@R.MartinhoFernandes constexpr even. Nice
 
for 8 methods that's 8 vectors built separately by hand
I don't have C++11 for the {sth, sth} as param fancy initializer list stuff
 
Xeo
JType args[] = {JType::JString, JType::JBool};
MakeSig(JType::Jint, args); // template<int N> std::string MakeSig(JType returnType, JType (&args)[N]);
Also, you have a dangling pointer with return ss.str().c_str();
 
11:48 AM
well damn, that I did not notice
how is it a dangling pointer?
 
Found a bug caused by the class using its own constructors when it shouldn't.
This code is so freaky.
 
Xeo
ss.str() returns a temporary std::string
@R.MartinhoFernandes uh... what
 
@AlexM. that's what you get for writing code like that
 
I want the ctors to be inaccessible to the class itself, but accessible to a friend.
 
Xeo
@R.MartinhoFernandes wow
 
11:50 AM
I wonder if this thing's interface really expects a const char*
 
@R.MartinhoFernandes use a key?
 
Xeo
@AlexM. it will likely copy it internally, if it does
 
@BartekBanachewicz Both will have access to it: one for the declaration, another for the use.
 
Xeo
@BartekBanachewicz Yeah, sounds like passkey might work
 
I added passkey to be able to emplace (it's a brick), and found a bug where I passed pointers instead of references and they were converted to bool and the other ctor was used.
 
Xeo
11:51 AM
omg
 
@R.MartinhoFernandes why
 
@Griwes I want all instances flyweighted.
 
@R.MartinhoFernandes lol
 
joy of joys boost::format crashes on %s if you hand it a char*
 
11:53 AM
boss has discovered the term "zero-defects methodology" and is now assigning pretty much every single open bug to the current release. even though we're nearly done on it. and even though he's historically utterly lambasted his own superiors for changing milestones outside of review meetings. wtf.
 
@AlexM. it's not attached
@Mgetz sounds like improbable. what char* are you "handing" "it"?
 
@sehe one that exists, which is why I'm surprised that it crashed on MSVC with an access violation attempt to read nullptr
 
@Erowlin In this case I really think it was warranted, because the question was the same (we have multiple weights for each edge) and the answer too :) In my opinion people are frequently far too dismissive of good tips if they're not spelling things out. (That hurts both the asker and the answerer). I don't mind now. I get a nice answer that I can reuse in the future :) — sehe 4 mins ago
@Mgetz wow. A char* that exists
 
struct key { private: key() = default; }; doesn't seem to be working.
I can create keys from anywhere.
 
@R.MartinhoFernandes can you return a key* with key` incomplete?
 
Xeo
11:58 AM
make it key(){}?
 
I haven't thought this through
 
Xeo
Maybe it's trivial and doesn't need to call the ctor.
 
oi
give me sympathy
knobs
 
Oh, aggregate init.
 
@LightnessRacesinOrbit here
 
11:59 AM
No, not that.
WTF
 
@sehe when I figure out the particulars and if it's my fault or not I'll file a bug report
 

« first day (1627 days earlier)      last day (3324 days later) »