IRC logs of #shogun for Thursday, 2018-01-11

--- Log opened Thu Jan 11 00:00:14 2018
-!- witness [uid10044@gateway/web/irccloud.com/x-lzbqopswhunfgnhq] has joined #shogun08:40
-!- HeikoS [~heiko@host213-122-246-7.range213-122.btcentralplus.com] has joined #shogun10:16
-!- mode/#shogun [+o HeikoS] by ChanServ10:16
@HeikoSlisitsyn:10:16
@HeikoSI have become a troll that stalks you!10:16
lisitsynHeikoS: yeah yeah10:17
lisitsyn:)10:17
@HeikoSlisitsyn: hehe10:17
@HeikoSlisitsyn: so i didnt submit workshop in the end10:17
lisitsynyeah it is clear10:17
@HeikoSi got too busy the last few days and then realised it would be a shitty application10:17
@HeikoSbut lets do nips10:17
lisitsynHeikoS: that's true, lets do nips10:18
@HeikoSand lets do it befiore it is a rus h:)10:18
lisitsynHeikoS: what is nips deadline?10:18
@HeikoSdont know10:18
@HeikoSbut nips is in december10:18
@HeikoSso deadline for submission paper will be may10:18
@HeikoSso thats the time we should be prepared10:18
@HeikoSmlpack peeps offered help as well10:18
@HeikoSso the 4 of us could do that10:18
@HeikoSwould be fun10:19
@HeikoSlisitsyn: I also have another question for you10:19
@HeikoSclone10:19
@HeikoSyou said, there is a clone already10:19
lisitsynyeah what's with clone?10:19
@HeikoSbut I dont see/find it10:19
lisitsyndid I?10:19
@HeikoSI feel it has to be the same decltype as for equals10:19
@HeikoSsame idea10:19
lisitsynah any?10:19
@HeikoStry ->clone then .clone then =10:19
lisitsynaah you mean deep clone for sgobject10:19
@HeikoSyep10:19
lisitsynno I didn't do that10:19
lisitsynthat's true10:19
@HeikoSok10:20
@HeikoSso I will just copy your equals stuff10:20
lisitsynbut do you need to?10:20
@HeikoSneed what?10:20
lisitsynah yes you have to10:20
lisitsynnevermind10:20
@HeikoSyes we need a clone10:20
lisitsynyeah just do something similar10:20
@HeikoSunfortunately10:20
@HeikoSok cool10:20
@HeikoSlisitsyn: just wondering10:20
@HeikoSthe crucial part of the old clone was actually not copying the data10:20
@HeikoSbut more allocating an appropriate amount of memory10:21
@HeikoSbecause newly created objects are all empty10:21
lisitsyndon't get it yet10:21
@HeikoSoperator== is easy in some sense10:22
@HeikoSas I just need to compare two pieces of memory10:22
@HeikoSjust cast them to the right type and all good10:22
@HeikoSbut clone is different. I first create a new empty object10:22
@HeikoSthen I clone each (tag,any) entry in the map10:23
@HeikoSthe newly created object already has a map10:23
@HeikoSbut the any objects in there all point to null10:23
@HeikoSas the member variables of the newly created thing are not instantiated10:23
@HeikoSso previously I just called operator== on any10:24
@HeikoSnow I need something like10:24
@HeikoSany_a.copy_from(any_b)10:24
lisitsynkind of10:24
lisitsynyes10:24
@HeikoSor better any_b = any_a10:24
@HeikoSbut I think that is taken already10:25
lisitsynit does copy10:25
lisitsynin some cases10:25
@HeikoSbut it keeps the pointer no?10:25
lisitsynHeikoS: check the policies10:25
@HeikoSI am a bit confused where to look for that10:25
@HeikoSyou mean this one Any& operator=(const Any& other)10:26
lisitsynhttps://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/lib/any.h#L26310:26
@HeikoSif (empty())10:26
@HeikoS{10:26
@HeikoSpolicy = other.policy;10:26
@HeikoSset_or_inherit(other);10:26
@HeikoSreturn *(this);10:26
@HeikoS}10:26
lisitsynHeikoS: ^ this is where copy happens10:26
lisitsynit is called by set_or_inherit yes10:26
@HeikoSok10:26
@HeikoSso for basic types, this works10:27
@HeikoSbut if T is SGObject10:27
lisitsynthen it should call clone10:27
@HeikoSyeah10:27
@HeikoSshall I put this logic in the operator= ?10:27
lisitsynHeikoS: https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/lib/any.h#L34310:28
lisitsynhere I think10:28
@HeikoSmmh10:28
@HeikoSyou mind having a start with that?10:28
@HeikoSjust for the ->clone?10:28
@HeikoSand then I fill in the gaps10:28
lisitsynHeikoS: but actually there is a tricky problem10:28
@HeikoSas for equals?10:28
lisitsynyeah I can later today10:28
@HeikoSwhats the problem?10:29
lisitsynHeikoS: if we assign non-owning we just copy the pointer10:29
lisitsynbut we don't call 'set'10:29
@HeikoSyeah10:29
lisitsynso this thing is not even called10:29
@HeikoSI mean this has to happen before in my eyes10:29
lisitsynI'd not change operator=10:29
@HeikoSin this "if(is_empty())10:29
lisitsynbut add clone10:29
@HeikoSah ok10:29
@HeikoSadd clone method10:29
@HeikoSI mean we can assume that policies are the same10:29
@HeikoSso we want a method void Any::clone_from(const Any& other)10:30
lisitsynyeah10:31
@HeikoSok let me see if I can get that10:31
@HeikoSIll let you know how it goes and if I confuse myself Ill leave it to you :)10:32
lisitsynok sure10:32
lisitsynhttps://github.com/shogun-toolbox/shogun/pull/4072 HeikoS I can't get it working still10:32
lisitsynit works for get_vector but does not generate the typemap for put10:32
@HeikoSwhats the problem with that?10:32
@HeikoSmmmh no idea10:32
lisitsynyeah me neither10:32
@HeikoSbut seems like a small patch10:32
lisitsynI was debugging swig to understand why the hell it does not generate the typemap10:33
lisitsynno success yet10:33
@HeikoSyeah I once went into that but left if confiused10:35
@HeikoSlisitsyn: one more q about clone10:35
@HeikoSlisitsyn: I will add a method to Any class10:35
@HeikoSvoid Any::clone_from(cont Any& other)10:35
lisitsynyes10:35
@HeikoSand then in there I will call clone_from_impl using decltype10:35
lisitsynHeikoS: no I think you call it from policy10:36
lisitsynotherwise you don't know the type10:36
lisitsynHeikoS: so you add virtual function to policy (clone)10:36
lisitsynand in there you call appropriate clone function10:36
lisitsynif it supports clone decltype(obj->clone()) then you do that10:36
lisitsynotherwise just new T(..)10:37
@HeikoSIt doesnt need to be purely virtual and then specialized in the sub-policies right?10:38
@HeikoSI can just put it in base class10:38
@HeikoSjust looking at equals, the code in both owning and non owning seems the same10:39
@HeikoSlisitsyn: I think I will leave the first steps to you10:41
@HeikoSlisitsyn: will take me too much time to backengineer all the any stuff10:42
@HeikoSlisitsyn: if you could add a minimal version (doesnt even need to work) then I can take it from there10:42
lisitsynHeikoS: ok :) hopefully tonight10:46
-!- HeikoS [~heiko@host213-122-246-7.range213-122.btcentralplus.com] has quit [Ping timeout: 276 seconds]12:32
-!- HeikoS [~heiko@host213-122-246-7.range213-122.btcentralplus.com] has joined #shogun14:02
-!- mode/#shogun [+o HeikoS] by ChanServ14:02
-!- HeikoS [~heiko@host213-122-246-7.range213-122.btcentralplus.com] has quit [Quit: Leaving.]14:38
-!- HeikoS [~heiko@host213-122-246-7.range213-122.btcentralplus.com] has joined #shogun14:38
-!- mode/#shogun [+o HeikoS] by ChanServ14:38
-shogun-buildbot:#shogun- Build deb1 - libshogun #234 is complete: Failure [failed update shogun (failure)] - http://buildbot.shogun-toolbox.org:8080/#builders/10/builds/23418:35
-shogun-buildbot:#shogun- Build trusty - libshogun - viennacl #253 is complete: Failure [failed update shogun (failure)] - http://buildbot.shogun-toolbox.org:8080/#builders/6/builds/25318:36
-!- HeikoS [~heiko@host213-122-246-7.range213-122.btcentralplus.com] has quit [Ping timeout: 276 seconds]18:58
--- Log closed Fri Jan 12 00:00:16 2018

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