hkaiser changed the topic of #ste||ar to: STE||AR: Systems Technology, Emergent Parallelism, and Algorithm Research | stellar.cct.lsu.edu | HPX: A cure for performance impaired parallel applications | github.com/STEllAR-GROUP/hpx | Buildbot: http://rostam.cct.lsu.edu/ | Log: http://irclog.cct.lsu.edu/
ct-clmsn has quit [Ping timeout: 250 seconds]
<Yorlik>
Allright back ..
<Yorlik>
Couldn't sleep - too many templates in my head
<Yorlik>
hkaiser: Thanks for that constexpr trick. Unfortunately a core problem still isn't solved, and that is the enforcement of the proper order of inheritance such, that A is always before B and B is always before C
<Yorlik>
I think I might have to fallback to some template recursion to solve that
<hkaiser>
Yorlik: why would you need to enforce that?
<Yorlik>
Because swapping them by error would generate a new type and a new storage pool for that type
<Yorlik>
OFC I could leave it to the programmers
<hkaiser>
but you could easily check for this
<Yorlik>
But since I am learning the advantages of static checks I wanted to implement it
<Yorlik>
How would I do that at compile time?
<Yorlik>
I didn'zt find out how to contruct a static assert for that
<hkaiser>
it's a simple recursive template that compares the id of the current type with the next one
<hkaiser>
let me see what I can do
<Yorlik>
Yes, that's what I guessed
<Yorlik>
I still have to better understand and learn how this template recursion works
<Yorlik>
This line gives me a syntax error: static constexpr uint64_t flags = ( Ts::id | ... | 0 );
<Yorlik>
It's complaining about the ellipsis
<Yorlik>
lemme check - m,aybe something stupid on my side
<Yorlik>
Allright - clang manages - so - there is a real issue
<Yorlik>
Had to do some minor hack to switch really quick
<Yorlik>
Now the recursion
<Yorlik>
I stopped using clang on windows because boost was such a pain
<Yorlik>
But I should go back to it - we want to use it on Linux and its better to have the same compiler everywhere
<hkaiser>
Yorlik: no need, see above link
<Yorlik>
I'm working on it
<hkaiser>
I had nothing but trouble using clang on windows
<Yorlik>
I'm not just copypasting but mixing it into my code and looking over it - after all I want to learn and not just use a recipe
<Yorlik>
IC
<Yorlik>
Boost + Clang = pure evilness
<hkaiser>
might have become better, though - have not tried in a while
<Yorlik>
I have 7.0.1
<Yorlik>
Nice ! The assert works. Lovely !
<Yorlik>
Now I have to sudy it a bit closer
<Yorlik>
I like having as much stuff checked as possible at compile time. Totally thrilled about the power of templates
<Yorlik>
This whole generic programming / metaprogramming thing feels so mad - but i think that's the case when you face something totally new and everything is weird
<Yorlik>
I'm totally amazed what you can do with it and want to learn it
<Yorlik>
Barely scratched the surface so far.
<Yorlik>
now I can just do : auto X = entity< container, physics, body > ( );
<Yorlik>
love it.
<Yorlik>
And noone can mess up the order of template params
<Yorlik>
hkaiser: Do you have a reading recomendation for a systematic learning of generic programming? I was reading in this book you recommended (A.Alexandrescu) but I think concerning advanced templates there might be better resources.
<hkaiser>
Yorlik: there aren't any for modern c++, afaik
<hkaiser>
there is an older book about boost mpl
<Yorlik>
So it's mostly grabbing whats on the net and asking people?
<hkaiser>
yah, and reading good code
<Yorlik>
I believe it's totally worth it. though I'm betting a know in my brain from it
<Yorlik>
getting a knot ...
<Yorlik>
sry - my typing is horrible again
<hkaiser>
lol
<hkaiser>
indeed, there is always a chance of that
<Yorlik>
I must admit I have a hard time understanding your gist
<hkaiser>
ask away
<Yorlik>
I htink I'll chew a bit on it andf ask you if its too hard later
<Yorlik>
I feel I need to do some grokking work first
<Yorlik>
:)
<hkaiser>
Yorlik: there are some basic things you have to know
<hkaiser>
template types in metaprogramming are the equivalent to function invocations in normal code
<hkaiser>
template instantiation is like function invocation
<hkaiser>
template specialization like function overloading
<hkaiser>
that one separates the first type from the parameter pack
<Yorlik>
Actually it was a dissection of typename ... Ts into T1, typeneam ... Ts
<hkaiser>
yes
<Yorlik>
Allright
<Yorlik>
So - the final constexpr goes int your seert
<Yorlik>
assert
<hkaiser>
yes
<Yorlik>
I like how the detail ns is hiding all the nitty gritty details from the user
<Yorlik>
because thats what i want in the end
<Yorlik>
I'll never forget this iconic phrase from Scott Meyers about whats the most important design principle: Making Interfaces easy to use correct and hard to use wrong
<Yorlik>
It kind sticks and I always see how easy I fail at it
<hkaiser>
lol
<hkaiser>
who doesn't
<Yorlik>
I see that when I have to use my own old code and how easy or hard it is
eschnett_ has joined #ste||ar
eschnett_ has quit [Quit: eschnett_]
<Yorlik>
Does MSVC have issues with std::literals::chrono_literals ? I have a hard time using it here.
<Yorlik>
hkaiser: I think I finally understood that template code you wrote. Thanks a lot for thze instructions yesterday - helped a lot in understanding.
<zao>
Deep magic, eh? :)
<Yorlik>
Its heavy but digestible.
<Yorlik>
And yes - black wizardry too :)
<Yorlik>
Not that black anymore since yesterday
aserio has joined #ste||ar
eschnett_ has joined #ste||ar
bibek has joined #ste||ar
<hkaiser>
Yorlik: most welcome
<Yorlik>
:)
<Yorlik>
It's a bit annoying MSVC bails on the folding expression - it's too nice to have
<Yorlik>
I hope they will fix that soonish.
<hkaiser>
yah
<Yorlik>
Maybe they are afraid C++ will kill F# ;)
<Yorlik>
C++ Templates as the next functional programming language ...
<Yorlik>
Do we have concurrent queues in HPX?
<hkaiser>
Yorlik: what for?
<hkaiser>
the HPX thread-scheduler relies on one
<Yorlik>
my internal messaging system passing requests to the processors working on vectors will be a multiple producer single consumer schema
<K-ballo>
Yorlik: what's the problematic folding expression?
bita has quit [Read error: Connection reset by peer]
<K-ballo>
it means anything that works on msvc will work on clang-cl
<Yorlik>
I'm just pulling your legs a little ;)
aserio has quit [Quit: aserio]
aserio has joined #ste||ar
<aserio>
hkaiser: yt?
<hkaiser>
aserio: here
<aserio>
hkaiser: are you planning to come to LSU today?
<aserio>
How would you like to meet with Chuanqiu at 2pm?
<hkaiser>
aserio: I'll be there for the 2pm meeting
<aserio>
ok, see you then :)
bita has joined #ste||ar
<hkaiser>
bitayt?
<hkaiser>
bita: yt?
<bita>
hkaiser, yes, hi
<hkaiser>
hey
<hkaiser>
question wrt hylanx #805
<hkaiser>
what is K.variable(...) supposed to do?
<bita>
K.variable just hold the variable and show the value when eval is called on it
<hkaiser>
k
<bita>
K.placeholder allocates memory for a variable and does not know the value before runtime
<hkaiser>
so def variable(value): return phylanx.execution_tree.var(value) doesn't work?
<bita>
no, this is the error I get `RuntimeError: C:\Repos\keras\keras\backend\phylanx_backend.py(49, 11): shape:: primitive_argument_type does not hold a numeric value type (type held: 'phylanx::execution_tree::primitive'): HPX(bad_parameter)`
<hkaiser>
bita: could you construct a small reproducing test case and attach it to the ticket?
<hkaiser>
should be easy enough to fix
<bita>
sure, just a question: phylanx.execution_tree.var is merged, right? because I am working on lazy_eval branch
eschnett has quit [Read error: Connection reset by peer]
eschnett has joined #ste||ar
eschnett has quit [Client Quit]
aserio has quit [Quit: aserio]
<Yorlik>
hkaiser: I like the readability of "using mtype = com::pli::cated::type;" much better than "typedef com::pli::cated::type mtype;". Apart from readability - is there any important side effect of changing it?
<K-ballo>
they are equivalent
<K-ballo>
oh sorry, you asked hkaiser
<K-ballo>
irc choose a gray color for his nick today
<Yorlik>
woops
<Yorlik>
Thanks K-ballo
<Yorlik>
I just asked him because i saw him chaning a bunch of typedefs in hpx to usings