IRC logs of #shogun for Thursday, 2017-06-08

--- Log opened Thu Jun 08 00:00:04 2017
-!- olinguyen [81615ad9@gateway/web/freenode/ip.129.97.90.217] has quit [Quit: Page closed]00:03
-!- OXPHOS [92bd305b@gateway/web/freenode/ip.146.189.48.91] has quit [Quit: Page closed]00:33
@sukeyWiki page: How-can-we-get-the-data created on shogun-toolbox/shogun by xxnyufengzhe03:58
@sukeyIssue #3839 "How can we get the data" opened by xxnyufengzhe - https://github.com/shogun-toolbox/shogun/issues/383904:01
@sukeyIssue #3839 "How can we get the data" closed by vigsterkr - https://github.com/shogun-toolbox/shogun/issues/383904:02
-!- mikeling [uid89706@gateway/web/irccloud.com/x-mwxnzdevzvoozsnr] has joined #shogun04:05
mikelingwiking: Hi, I see the comment. Thank you04:06
mikelinghow to deal with the problem that vector can't use bool as index?04:06
mikelingI mean can't return something like &bool04:07
@wikingyou can specialize CDynamicArray<bool> to something else04:12
@wikingand handle that somehow else04:12
@wikingso yeah i mean with std::vector<bool> we have the same problem as in case of std::deque<T>04:15
@wiking Does not necessarily store its elements as a contiguous array (so &v[0] + n != &v[n])04:15
@wikingmikeling, we might have arrived to the point04:24
@wikingwhere one should say04:24
@wikingthat we cannot04:24
@wikingdo this04:24
@wiking:)04:24
@wikingi mean i'm sorry that i'm smiling04:24
@wikingbut this could be the reality unfortunately04:24
mikelingwiking: oh, it's ok. I just hope I haven't waste too much time on it04:26
mikeling:)04:26
mikelingreally really sorry about that04:27
@wikingmmm04:27
@wikingwell04:27
@wikingi think what one can do is that we use04:27
@wikingstd::vector<T> for everything04:27
@wikingexcept bool04:27
@wikingof course in this case one can ask himself04:27
@wikingwhy wouldn't we use DynArray ;P04:27
@wikingbut it's fine04:29
@wikingwe wanna get rid of DynArray04:29
@wikingso this will be the only exception where we need some hacking04:29
@wikingdo you know how to specialize one way or another a tempalte?04:29
@wiking*template04:29
mikelingsure, I think I can do it04:30
@wikingmmm04:30
@wikingwait wait04:30
@wikinghave you considered std::array04:30
@wiking?04:30
@wikingit's since c++1104:30
@wiking"satisfies the requirements of ContiguousContainer"04:31
mikelingmmmm, no I haven't04:31
mikelingwiking: oh, I do think about it04:32
mikelingbut it's not dynimc04:32
mikeling*dynamic04:32
@wikingyeah04:32
@wikingwell04:32
mikelingso, you need specify a length when you init it04:32
@wikingyou can wrap that under the CDynamicArray04:32
@wikingyeye04:32
@wikingbut i mean you can keep resizing things04:32
@wikingnow04:32
@wiking?04:32
@wiking:)04:32
mikelingbut I can't find function like push_back or resize in std::array04:33
@wikingyes04:38
@wikingyou have to manually do the resizing04:38
@wikingfor that case maybe it's better to use valarray04:39
@wikingas that one has at least .resize()04:39
@wikingbut04:39
@wikingi'm not so sure how swig will react to this04:39
@wikingalthough the same can be told about std::array04:40
@wikingok that works https://github.com/swig/swig/blob/master/Lib/std/std_array.i04:41
@wikingmikeling, i mean essentially you would just need to do any of these hacks04:47
@wikingfor bool case04:47
@wikingright?04:47
mikelingyes, I argee.04:48
mikelingok, let's try array04:49
mikelingthen think about extend vector<bool> if it doesn't work04:49
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has joined #shogun08:34
@sukeyNew Commit "Merge branch 'feature/progress' into develop" to shogun-toolbox/shogun by vigsterkr: https://github.com/shogun-toolbox/shogun/commit/8d6f9c495e90da2d0fe1ac2c5cca2b6a5d0d397a08:53
@wikingbingo08:53
@wiking:)08:53
geektoni:D nicee08:53
@wikinggeektoni, this way now you'll get a lot of test on different os/distrib08:53
@wiking(see buildbot)08:53
geektonikk I like it ;)08:53
-!- iglesiasg [~iglesiasg@217.119.234.214] has joined #shogun09:16
-!- mode/#shogun [+o iglesiasg] by ChanServ09:16
@sukeyPull Request #3840 "[SmartPointers] Port SGObject and its unit tests to Some<>."  opened by geektoni - https://github.com/shogun-toolbox/shogun/pull/384010:39
geektoniping wiking10:40
@sukeyPull Request #3840 "[SmartPointers] Port SGObject and its unit tests to Some<>." - https://github.com/shogun-toolbox/shogun/pull/384010:42
@wikinggeektoni, pong10:46
geektoniregarding smart pointers, we agreed to first port SG_REF to Some<> and then change the method signatures.10:48
geektoniHowever, I'm not so sure on how I have to proceed.10:48
geektoniI mean, should I begin to work on changing the signature right now, or is it better to do it when all the code is ported to Some?10:49
@wikingah yeah10:49
@wikingwell10:49
@wikingthe problem is going to be of course10:49
@wikingthat passing Some<>-ed objc10:50
@wikingyou should change the signature10:50
@wikingno??10:50
@wikingor you can of course always10:51
@wikingdo the .get() and pass then the pointer10:51
geektoniyeah sure. For instance that happens with SGObject::clone().10:51
@wikingyeye10:52
@wikingi see that10:52
@wikingwell look10:52
geektoniehehe depends if the Some<>-ed object is a return value of a method10:52
geektoniin that case, .get() won't work10:52
@wikingmmm10:53
@wikingi mean in this case either way you do it is fine10:53
@wikingon the end of the day10:53
@wikingi'll squash that feature branch10:53
@wikingso those intermediate changes will disappear10:53
@wikingso i mean you can do the signature changes now10:54
@wikingor later10:54
@wikingor go one by one10:54
geektonikk10:54
@wikingdoesn't matter10:54
@wikingdo it the most easiest way10:54
geektonithnx10:55
lisitsynhey11:06
lisitsyngeektoni: I'm a bit out of everything, does Some work well now?11:07
geektonihey lisitsyn, it seems so. I did some tests with valgrind and there were no particular problems.11:10
lisitsynoh what a relief ;)11:16
geektoni;)11:19
@iglesiasgit deserves a small dance11:20
@iglesiasgshogun-buildbot: dance11:20
shogun-buildbot<(^.^<)11:20
shogun-buildbot<(^.^)>11:20
shogun-buildbot(>^.^)>11:20
shogun-buildbot(7^.^)711:20
shogun-buildbot(>^.^<)11:20
@iglesiasg\o/11:20
geektoniinglesasg: ahaha nice :D can it do other things? ;)11:31
geektoni*iglesiasg11:31
@iglesiasggeektoni: I am not sure, let's check it11:45
@iglesiasgshogun-buildbot: commands11:46
shogun-buildbotbuildbot commands: commands, dance, destroy, force, hello, help, last, list, mute, notify, shutdown, source, status, stop, unmute, version, watch11:46
@iglesiasglol destroy sounds dangerous11:46
geektonimmmh destroy11:46
geektoniahaha11:46
geektoniyeah, I agree11:46
@iglesiasgxD11:46
@iglesiasgshogun-buildbot: hello11:46
shogun-buildbotyes?11:46
@iglesiasghaha the alexa precursor11:46
geektonialexa?11:47
@iglesiasghave you heard of amazon echo and dot devices?11:47
@iglesiasgalexa is in them11:47
geektoniehmm nope11:48
@iglesiasgit is a service for voice recognition and doing stuff on response to it11:48
@iglesiasgit can answer questions getting data from wikipedia, tell you about the weather, set alarms, stuff like that11:48
geektoniit seems cool! Does it use only Wikipedia?11:49
@iglesiasgit is something like siri in the iphone and the equivalent in android (google now?)11:50
@iglesiasgI think it also uses other sources11:50
@iglesiasgyesterday for instance I asked it about a movie and gave me the imdb score11:50
@iglesiasgbut well, the score could also be in wikipedia11:50
@iglesiasgI find it a bit of a fancy toy11:51
@iglesiasgbut I was impressed with the quality of the voice recognizer, it worked better than I expected11:52
-!- leagoetz [~leagoetz@host-92-0-178-129.as43234.net] has joined #shogun11:54
geektoniSeems like a tool to carry out research projects. :P What are you using it for? :D11:54
leagoetzhey guys, how is it going?11:55
leagoetzhas anyone seen Olivier in here recently11:55
@iglesiasggeektoni: for fun and listening to music; nothing researchy :P11:56
geektonileagoetz: it's fine from my side :)11:56
@iglesiasgleagoetz: I haven't been around the last two days, but from the logs I can see he connected to the channel11:57
@iglesiasggeektoni: some of the fancier things I have heard are controlling lights at home, heating, and so via voice with it. Let's say smart house type of thigns11:59
geektoniiglesiasg: because  listening to music from just an iPod is too boring ;)12:03
@iglesiasggeektoni: haha yeah12:04
@iglesiasgI don't have a dolby or something like that, so I'd either use the phone or computer to play music. This thingy has better sound12:05
@iglesiasgand what about that feeling to control the volume with the voice from another room :D12:06
geektoniahah, I agree. It makes you feel powerful ;)12:06
@iglesiasgit's cool ^_^12:07
@iglesiasgbut yeah, at least for the use I make of it, it is a fancy toy12:08
geektonibtw, you mean that this things provides a higher bitrate? :P12:08
geektoniI mean, for the songs.12:08
@iglesiasgoh, I meant the speaker is better than the on in a phone or laptop12:09
@iglesiasgwhich I find reasonable12:10
@iglesiasghttps://images-na.ssl-images-amazon.com/images/I/41-v1fozy0L.jpg12:10
@iglesiasgit has more surface for the speaker (I am assuming all the dotted part is speaker)12:11
geektoniOh, ok! It make sense now LOL12:11
@iglesiasgmaybe it is the bitrate, no idea12:11
@iglesiasgjust a qualitative measure; the sound is good12:11
geektoniyeah, if the sound is good, I don't care about technical details ;)12:12
leagoetz(iglesiasg: just making up for my bad conscience of being absent myself ;P)12:13
@iglesiasghihi12:14
-!- leagoetz [~leagoetz@host-92-0-178-129.as43234.net] has quit [Remote host closed the connection]12:17
-!- leagoetz [~leagoetz@host-92-0-178-129.as43234.net] has joined #shogun12:17
-!- leagoetz [~leagoetz@host-92-0-178-129.as43234.net] has quit [Ping timeout: 246 seconds]12:22
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has quit [Quit: Leaving.]13:00
lisitsynwiking: remember we were talking about storing models in protobuf13:00
lisitsynit is kinda ridiculous feeling when you *know* what to do but fail to execute13:01
lisitsynhaha13:01
@wikingque?13:36
@wikingwhat do you mean lisitsyn ? :)13:36
lisitsynwiking: apple ml stuff13:36
@wikingaaaah13:36
@wikingyeah13:37
@wiking:)13:37
@wikingfuck i mean13:37
@wikingthey have the $13:37
@wikinglisitsyn, what do we do with m_parameters->add_vector ? :)13:47
lisitsynwiking: tough14:33
lisitsynor?14:33
lisitsynis it really different14:33
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has joined #shogun14:55
geektoniping wiking14:57
mikelinglisitsyn: hi14:59
lisitsynhey14:59
mikelingstd::vector::operator[] return reference right?15:00
mikelingwhy I got binding ‘const value_type {aka const int}’ to reference of type ‘std::vector<int, std::allocator<int> >::reference {aka int&}’ discards qualifiers return m_array.at(idx1 + dim1_size * (idx2 + dim2_size * idx3));  for https://pastebin.mozilla.org/902391515:01
lisitsyndiscards qualifiers hints for const15:04
@iglesiasginderdaad15:04
mikelinglisitsyn: mmm, I still don't understand why15:06
mikelingbecause [] can return const_reference also15:07
lisitsynwhat's m_array?15:07
mikelinglisitsyn: https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/lib/DynamicArray.h#L64715:07
mikelinggoing to refactor it by stl vector15:08
lisitsynI think at returns a value for you15:10
lisitsynconst value_type {aka const int}15:10
mikelingyeah, but why it returns int rather than int&, std::vector::operator[] do return reference as described on document15:11
@iglesiasglisitsyn, mikeling: by the way, I also wonder why the signature is 'inline const typename std::vector<T>::reference get_element' instead of just 'inline const T& get_element'15:12
mikelingiglesiasg: oh, because vector can't return reference of bool element15:12
@iglesiasgah!15:13
lisitsynyeah because vector<bool> is fked15:13
lisitsynthe worst thing happened to vector15:13
@iglesiasgbitset is the way to go15:13
mikelingiglesiasg: yeah, but bitset  require a a fixed size to init it. But we want Dynamic array for DynamicArray15:14
@iglesiasgmikeling: I see, it makes sense15:16
@iglesiasgmikeling: let's see, does vector has a ::const_reference similar to the ::reference you are using above?15:18
@iglesiasgit looks like it15:18
@iglesiasgmikeling: http://en.cppreference.com/w/cpp/container/vector15:19
@iglesiasgmikeling: maybe that's the way to go in this case15:19
mikelingiglesiasg: oh, ah, I believe you are right15:19
mikelinglet's do this15:19
mikelinguse const_reference15:19
mikelingiglesiasg: thank you15:19
@iglesiasgcool, let us know how it goes15:19
@iglesiasgmikeling: sure, no problem15:20
mikelingiglesiasg: lisitsyn const_reference works, but15:50
mikelinginline T* get_array() in DynamicArray went wrong, because std::<bool> have no way to access a pointer point to its element15:51
mikeling:(15:51
@iglesiasgmikeling: std::vector<bool> or std::bool?16:09
mikelingstd::vector<bool>16:09
mikelingsorry16:09
@iglesiasgstd::vector has a pointer member similar to the reference/const_reference you have been using16:11
mikelingiglesiasg: not exactly16:11
mikelingiglesiasg: no data() for bool16:11
mikelinghttp://en.cppreference.com/w/cpp/container/vector_bool16:11
mikeling:( I hate this16:11
@iglesiasgmikeling: I referred to the members cited here http://en.cppreference.com/w/cpp/container/vector16:11
@iglesiasgin the member types table, just velow reference and const_reference, pointer and const_pointer16:12
@iglesiasgbelow* lol16:12
@iglesiasgI am not sure if that could help, mentioning just in case16:13
mikelingyou mean something like std::vector<T>::const_pointer16:13
@iglesiasgyes16:13
@iglesiasgI am not sure if that would help in your case though to get a pointer to the data16:14
@iglesiasgmikeling: looking at the problem from another perspective, are we using a lot of DynamicArray for bools?16:17
mikelingnot sure, I haven't check the places using DynamicArray  one by one16:18
mikelingiglesiasg: Could we just ignore get_array() when the T is bool?16:18
@iglesiasgI am glad that you haven't done that, because it would be a bit of a loss of time16:18
mikelinglike std::vector<bool>16:18
@iglesiasgyes, that's is sort of what I meant by saying looking at it from another perspective16:19
mikelingwe don't provide get_array() function for bool :/16:19
@iglesiasgif you are getting a compile error, I guess it must be because somewhere that class is being instantiated for T = bool16:19
mikelingye;p16:19
@iglesiasgmikeling: does that make sense?16:19
@iglesiasgok16:19
mikelingonly for bool16:19
mikelingsure16:19
@iglesiasghave a look where that is happening16:19
mikelingbut I don't know how16:20
@iglesiasgand see if that really needs to use a dynamic array16:20
@iglesiasgah, ok. Let me give it a shot, one second16:20
mikelingok, thank you16:20
@iglesiasghow does the error trace look?16:22
@iglesiasgmikeling: from $shogun_repo/src/shogun you can just do grep -r DynamicArray\<bool16:25
@iglesiasgDynamicArray<bool> is being used in Features and structure/DynProg16:25
mikelingiglesiasg: I found an ugly but maybe works move like &(*(m_array.begin()));16:26
@iglesiasgbtw, I recommend using ag instead of grep16:26
mikelingI'm building it and hope it can works this time16:26
@iglesiasgoeps, nasty16:26
mikelingiglesiasg: ok,  &(*(m_array.begin())); doesn't work16:52
mikelingactually16:52
-!- OXPHOS [92bd305b@gateway/web/freenode/ip.146.189.48.91] has joined #shogun16:56
@iglesiasgmikeling: are the places using DynamicArray<bool> getting the pointer to the data?17:18
-!- HeikoS [~heiko@host-92-0-178-129.as43234.net] has joined #shogun17:32
-!- mode/#shogun [+o HeikoS] by ChanServ17:32
@HeikoSwiking: hi17:32
-!- iglesiasg [~iglesiasg@217.119.234.214] has quit [Quit: leaving]17:38
-!- HeikoS [~heiko@host-92-0-178-129.as43234.net] has quit [Ping timeout: 246 seconds]18:15
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has left #shogun []18:26
@wikingmikeling, hi19:35
mikelingwiking:20:13
mikelingwiking: hey I thought you afk now20:14
mikelingBecause it's 2am in China now20:15
mikelingAnyway, I found a way to return reference of vector<bool> by typename std::vector<T>::reference20:17
mikelingBut still can't figure out how to get a pointer for it20:17
mikelingHonestly I'm pretty nervous cause I haven't make any progress for almost one week20:18
mikelingYou know I haven't send you daily report for four days due to I don't know what to write about :/20:19
-!- olinguyen [81615ad9@gateway/web/freenode/ip.129.97.90.217] has joined #shogun21:10
-!- mikeling [uid89706@gateway/web/irccloud.com/x-mwxnzdevzvoozsnr] has quit [Quit: Connection closed for inactivity]22:34
--- Log closed Fri Jun 09 00:00:05 2017

Generated by irclog2html.py 2.10.0 by Marius Gedminas - find it at mg.pov.lt!