K-ballo 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/
hkaiser has quit [Quit: bye]
K-ballo has quit [Quit: K-ballo]
bita has joined #ste||ar
bita has quit [Ping timeout: 245 seconds]
jehelset has joined #ste||ar
jehelset has quit [Remote host closed the connection]
jehelset has joined #ste||ar
K-ballo has joined #ste||ar
hkaiser has joined #ste||ar
<hkaiser> jedi18[m]: thanks a lot for all the work you're doing!
<hkaiser> and sorry that it took me so long to get back to your PRs
<jedi18[m]> @freenode_hkaiser:matrix.org Thank you :D, no problem I don't mind waiting. Also my mid sems are finally over so I'll try to write my proposal asap and send them to you for review
<gonidelis[m]> bravo!
K-ballo has quit [Read error: Connection reset by peer]
K-ballo has joined #ste||ar
<hkaiser> jedi18[m]: very nice, thanks
jehelset has quit [Remote host closed the connection]
<jedi18[m]> hkaiser: Thanks for the review, but I don't understand why T is guaranteed to be decayed?
<K-ballo> "decay" is what happens to an argument passed to a by value parameter
<hkaiser> jedi18[m]: the argument is `T init, `T` will be deduced as a plain type already
<hkaiser> `T` will never be a reference
<hkaiser> usually decay is used for forwarding references (T&&)
<gonidelis[m]> i managed to compile a dummy cpp header with range-v3 using this cmake file https://gist.github.com/gonidelis/985c28519627b8429a5333dc8bf9a742
<gonidelis[m]> is this equivalent to `gcc-9 test.cpp -o test -I/home/giannis/HPX/range-v3/include` ?
<hkaiser> gonidelis[m]: see https://github.com/NWmath/NWgr/blob/master/cmake/RangeV3.cmake for an example on how to fetch it during configuration
<K-ballo> by default includes from imported libraries use -isystem instead of -I
<gonidelis[m]> hkaiser: this gives me a 404
<K-ballo> you can always do `VERBOSE=1 make` or `ninja -v` to see the actual commands
<hkaiser> after that just add a target_link_libraries(<your target> INTERFACE range-v3::range-v3)
<gonidelis[m]> hkaiser: you mean in my cmake?
<gonidelis[m]> <K-ballo "by default includes from importe"> nop that does not work either
<K-ballo> "work"? that's what cmake does
<gonidelis[m]> my cmake works
<gonidelis[m]> i want to find the equivalent cmd options in order to pass them to vs code in order to debug
<gonidelis[m]> i know it's anorthodox
<hkaiser> yep
<K-ballo> is it?
<gonidelis[m]> unorthodox*
<K-ballo> just ask make/ninja to tell you what the command is
<gonidelis[m]> that's the output
<gonidelis[m]> it does not mention my range-v3 source anywhere included
<K-ballo> do a clean build
<gonidelis[m]> hkaiser: for some reason I am not allowed to view the links you are sending
<hkaiser> ahh, sorry
<gonidelis[m]> hkaiser: but the cmake already works
<gonidelis[m]> the CMakeLists.txt file i showed you
<K-ballo> yeah, -isystem silences warnings
<K-ballo> why are you passing -MD -MT -MF flags to gcc?
<K-ballo> ah, that's just cmake stuff
<gonidelis[m]> K-ballo: i was just going to send you
<gonidelis[m]> that
<K-ballo> you keep reusing the same gist
<gonidelis[m]> yes
<jedi18[m]> hkaiser: Oh ok got it, thanks!
<K-ballo> you can see the relevant flag is `-isystem /home/giannis/HPX/range-v3/include`
<gonidelis[m]> K-ballo: do i need to link the thing, except from including it
<gonidelis[m]> yes i just used that
<gonidelis[m]> and i get a better result
<gonidelis[m]> still not fully compiling
<gonidelis[m]> i think linkage is needed only if i have object libs
<gonidelis[m]> which i don;t
<gonidelis[m]> i think
<K-ballo> what's an object lib?
<gonidelis[m]> object file
<K-ballo> if it doesn't compile then it won't even get to linking, are you sure your problem is with compiling?
<gonidelis[m]> K-ballo: check the gist
<gonidelis[m]> the same gist of course
<gonidelis[m]> looks like linkage to mean
<gonidelis[m]> me *
<K-ballo> yes, you are calling the C compiler instead of the C++ compiler, as a result the C++ standard library isn't linked
<gonidelis[m]> don't!
<gonidelis[m]> fuck... you are fast
<K-ballo> fwiw the code is fully compiling
<gonidelis[m]> https://gist.github.com/gonidelis/a98ae45ad5bb8ecb25ba425c14525006 shouldn't this json work then?
<K-ballo> a json? no idea
<K-ballo> what command line does the json correspond to?
<gonidelis[m]> for some reason it uses `/usr/bin/g++-9 -g /home/giannis/HPX/cppnow/test.cpp -o /home/giannis/HPX/cppnow/test "-isystem /home/giannis/HPX/range-v3/include"`
<gonidelis[m]> wtf
<gonidelis[m]> why `".."`
<K-ballo> because you quotted it
<K-ballo> you are passing it as a single argument
<gonidelis[m]> K-ballo: ;)
<gonidelis[m]> i hate IDEs
<gonidelis[m]> like terminals weren't already good enough for humans
<K-ballo> what's keeping you from using gdb from the terminal?
<gonidelis[m]> hkaiser's advice
<gonidelis[m]> i need to get accustomed with one debugger at first
<gonidelis[m]> so i went with a graphic one
<gonidelis[m]> i am not in place of learning how to use multiple IDEs, debuggers, editors at once
<K-ballo> sounds like learning just gdb would have been simpler than gdb, vscode, and cmake all together
<K-ballo> you just point it to the binary your cmake project generated, and are in debugging bussiness
<hkaiser> except gdb is a pain in its own
<K-ballo> it's pretty decent for being a terminal app
<K-ballo> the vscode ide is just calling gdb underneath
<gonidelis[m]> ok great... no it compiles with tasks.json but it won't compile for debugging with launch.json
<gonidelis[m]> now^^
<gonidelis[m]> also, it shouldn't "compile" for debugging but when i "run-> start debuggin" it hits on the range-v3 include which is weird
<K-ballo> you shouldn't need to compile everything again just to debug
<gonidelis[m]> yy
<gonidelis[m]> my bad
<gonidelis[m]> K-ballo: can i follow the execution line by line on a terminal debugger
<gonidelis[m]> ?
<srinivasyadav227> gonidelis[m]: yes in gdb
<K-ballo> gdb is the very same debugger the IDE uses
<K-ballo> if you can do something on the IDE, you can do it on the terminal, it's just a lot less convenient
<gonidelis[m]> This things pops in Niebler's source code at a given `view` call!!! DEBUGGER ROCK!
<gonidelis[m]> DEBUGGERS^^
<srinivasyadav227> is there any we can tell the compiler to use host system architecture to "-m" flag with gcc https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
<srinivasyadav227> sorry, native does, my bad, i just wanted to know if i could get the what cpu type variable is substituted or used when we pass "-m=native"
<jedi18[m]> hkaiser: I'll add disentangling the remaining algorithms here https://github.com/STEllAR-GROUP/hpx/issues/5156 to my proposal as well? Since there aren't many left
<gonidelis[m]> K-ballo: could I `auto vi = ranges::views::whatever()` and then `for(auto i : vi){cout << i;}`
<gonidelis[m]> or is it per case?
<jedi18[m]> Also I can't find adjacent_difference here http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4685.pdf but it mentioned as one of the algorithms to be adapted to ranges here https://github.com/STEllAR-GROUP/hpx/issues/1668
<hkaiser> jedi18[m]: sure - otoh, if more students show up, this is a nice entry-level task for them to familiarize themselves with hpx
<jedi18[m]> Ok so I'll wait till the final proposal submission date and since students won't show up after that, I can implement it then?
<hkaiser> jedi18[m]: nod
<K-ballo> gonidelis[m]: the view itself can't own anything, so it can be freely and cheaply copied around
<gonidelis[m]> K-ballo: so the code is valid
<gonidelis[m]> K-ballo: although this, won't compile. it does not allow the `<<` op on the zip view
<K-ballo> how does that relate to the previous question?
<gonidelis[m]> K-ballo: i am printing a view
<K-ballo> so, what's the relation between auto vi = ... and printing views?
<gonidelis[m]> they both `std::cout`ed
<K-ballo> what do you mean? you've only shown one std::cout, or did I miss the other?
<gonidelis[m]> <gonidelis[m] "K-ballo: could I `auto vi = ran"> i cout both here and in my wandbox snippet
<K-ballo> I can't make sense of what you are asking, I have no idea what your reasoning is, put it in code
<K-ballo> if possible use compiler-explorer and enable ranges-v3
<K-ballo> make them distinct compilations, the working one and the failing one
<gonidelis[m]> K-ballo: https://godbolt.org/z/n635ja5d8
<gonidelis[m]> this
<gonidelis[m]> i expected to compile
<gonidelis[m]> but it does not allow the print
<gonidelis[m]> that's the question
<gonidelis[m]> i don't understand why
<gonidelis[m]> ohhh it's a zip!
<K-ballo> how does that relate to the auto vi question?
<gonidelis[m]> it's two thing
<gonidelis[m]> s
<gonidelis[m]> i thought that the auto vi was a general case of that
<K-ballo> how?
<gonidelis[m]> it's a view and it's printed. i already told you that ;p
<K-ballo> where you actually asking whether one can just stream into cout any random type?
<gonidelis[m]> what's the relationship between a view and a type
<K-ballo> none
<gonidelis[m]> does view encapsulate types?
<gonidelis[m]> or is view a type?
<K-ballo> view is a concept
<K-ballo> in order for `cout << i` to compile, whatever the type of `i` is, it has to be output streamable
<K-ballo> completely orthogonal to ranges and views
<gonidelis[m]> aren't views define whether their result is output streamable???
<K-ballo> just like for the copy part it needs to be copyable, and for the range-for it has to be "iterable"
<K-ballo> no
<gonidelis[m]> and how is it defined, given a view?
<K-ballo> what is?
<gonidelis[m]> if it's streamable
<K-ballo> if you have a view over Ts and look at any particular T within it, it's semantics are only determined by T and not the view
<gonidelis[m]> ahhhhh.....
<gonidelis[m]> but view::zip is a special case
<K-ballo> no
<gonidelis[m]> i have a zip of two types
<K-ballo> zip is a view over pairs in that case
<gonidelis[m]> so it's not because the types are not streamable
<gonidelis[m]> huh
<gonidelis[m]> yesh it's std::pair you are right
<K-ballo> if you look at any one pair, it's semantics are only determined by pair and not zip
<gonidelis[m]> so it's pair's false for not being streamable
<gonidelis[m]> "false"
<K-ballo> a type T always behaves as a type T, it's impossible for a type T to behave differently depending on where it comes from
<K-ballo> it's a very important design principle in the language
<gonidelis[m]> yy i get it
<gonidelis[m]> i don't blame the pairs to be honest
<gonidelis[m]> i just rationalize on their nature
<gonidelis[m]> and for a user using range-v3, and especially `zip` they have to know the internals in order to manipulate the output data from zip
<gonidelis[m]> that's my case
<K-ballo> it's not an internal, it's part of the interface guarantees
<gonidelis[m]> so it's should be declared on the official docs, if accepted
<K-ballo> you mean in the standard? yes, it cannot possibly be implemented otherwise
<K-ballo> it should be declared on ranges-v3 official documentation too, if it has any, but
<gonidelis[m]> i wam mainly referring to cppref ;p but yes
<gonidelis[m]> i don't expect the user to read the standard
<gonidelis[m]> <K-ballo "it should be declared on ranges-"> yes it is
<K-ballo> eric used to joke writing docs was so hard, he went with standardizing ranges-v3 instead so that other people would have to do it
<gonidelis[m]> lol
jaafar has quit [Quit: Konversation terminated!]
jaafar has joined #ste||ar
Chuanqiu has joined #ste||ar
<gonidelis[m]> K-ballo: are boost prog options still supported?
<hkaiser> gonidelis[m]: we have a compatibility mode, not sure how good it is, though
<hkaiser> but you can use hpx::program options which is a 100% fork
<gonidelis[m]> hkaiser: i am working on niebler's calendar program
<gonidelis[m]> so it does not have to do with hpx
<hkaiser> just switch boost:: for hpx:: for the program_options
<hkaiser> ahh
<hkaiser> well, then it should just work
<gonidelis[m]> i get `undefined reference to boost::program_options`
<hkaiser> you need to link with it
<gonidelis[m]> and i can see on SO that people complain a lot about it
<gonidelis[m]> that included with <string>
<hkaiser> you don't link with boost
<hkaiser> ahh, you do :/
<hkaiser> what error do you see?
<gonidelis[m]> the clasic linking one
<gonidelis[m]> sec
<hkaiser> show me
<hkaiser> what c++ standard settings did you use when compiling boost?
<hkaiser> make sure boost and your code uses the same c++17 settings
<gonidelis[m]> ahh
<gonidelis[m]> i compiled it from source
<gonidelis[m]> did not define c++17 anywhere
<gonidelis[m]> i am sure they have an option
<gonidelis[m]> that must be it
<gonidelis[m]> thanks :)
<K-ballo> judging by the linker errors it's not that, at least not _just_ that
<K-ballo> and looking at the cmake, it's clearly not linking program options
<K-ballo> merge your find_package calls, fix the argument order, and get rid of the bogus -l flag given to the compiler
<K-ballo> and prefer using targets instead of variables
bita has joined #ste||ar