--- Log opened Fri Jul 14 00:00:54 2017 | ||
@wiking | lisitsyn, here? | 09:04 |
---|---|---|
-!- geektoni [~geektoni@93-34-128-38.ip49.fastwebnet.it] has joined #shogun | 09:20 | |
@wiking | geektoni, hey | 09:21 |
geektoni | wiking: hi | 09:21 |
-!- iglesiasg [~iglesiasg@217.119.234.214] has joined #shogun | 09:36 | |
@wiking | micmn, here? | 09:37 |
-!- mode/#shogun [+o iglesiasg] by ChanServ | 09:37 | |
micmn | wiking: here | 11:05 |
lisitsyn | wiking: yes sir | 11:13 |
@wiking | lisitsyn, i have a problem ;) | 11:27 |
lisitsyn | yes? | 11:28 |
lisitsyn | :) | 11:28 |
@wiking | so say i have a class that is a base class A | 11:28 |
@wiking | and it has many derived classes... and those derived classes has static const char* | 11:28 |
@wiking | but since there's no way to virtual a static variable | 11:28 |
@wiking | how sould you define these variables that a) they are static so no virtual function wrappers needs to be around b) they could be accessed from class A functions | 11:29 |
@wiking | ;) | 11:29 |
@wiking | my initial idea is to make class A templated where the template parameter is a class that contains the static variables... | 11:30 |
@wiking | micmn, do you think we could 'normalize' the linalgbackend interface using CRTP pattern? the thing is that i hate those macros :) | 11:30 |
@wiking | micmn, https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern | 11:31 |
micmn | yeah they are awful | 11:31 |
lisitsyn | wiking: yeah it looks like static polymorphism | 11:32 |
lisitsyn | which is done by CRTP | 11:32 |
@wiking | lisitsyn, you mean my problem i've described above? | 11:32 |
lisitsyn | wiking: yes | 11:32 |
lisitsyn | :) | 11:32 |
@wiking | mmm i just dont like adding a template param | 11:32 |
lisitsyn | although it is not static | 11:33 |
@wiking | to the base class | 11:33 |
@wiking | because i use it around | 11:33 |
@wiking | as A* | 11:33 |
lisitsyn | why do you want them to be static? | 11:33 |
@wiking | (in function args) | 11:33 |
@wiking | lisitsyn, coz they are just really some strings | 11:33 |
@wiking | that are fixed | 11:33 |
@wiking | (basically REST paths) | 11:34 |
lisitsyn | yeah but static is painful in this case | 11:34 |
@wiking | lisitsyn, i mean the script kiddie solution is that you maintain a map in class A :P | 11:34 |
@wiking | and you fill that map in the derived classes | 11:35 |
@wiking | but it's super aweful | 11:35 |
lisitsyn | static map? how to fill? | 11:35 |
@wiking | nono | 11:35 |
@wiking | simple map | 11:35 |
@wiking | :D | 11:35 |
@wiking | it's super aweful | 11:35 |
@wiking | 'works' | 11:35 |
@wiking | but i'd like to be able to check this during compile time | 11:35 |
@wiking | i mean the correctness | 11:36 |
@wiking | because if i store the paths in like map<string, string> | 11:36 |
@wiking | then i would do callREST(map["auth"]) | 11:36 |
lisitsyn | ah ok | 11:36 |
@wiking | but then what if the user fucked up the map and did not fill he value | 11:37 |
@wiking | *the | 11:37 |
@wiking | note this is super python solution | 11:37 |
@wiking | :P | 11:37 |
lisitsyn | yeah everything is dict | 11:37 |
lisitsyn | lookup in a dict like a pro | 11:37 |
@wiking | hence i wanna switch to something that uses the compiler | 11:37 |
lisitsyn | all night long haha | 11:37 |
@wiking | :) | 11:37 |
@wiking | and i wondering what's the nice solution in this case | 11:37 |
@wiking | ideas? | 11:39 |
lisitsyn | wiking: well you basically need static polymorphism right? :) | 11:44 |
Trixis | wiking: is there a document that summarises the rationale behind svmlight? | 11:46 |
Trixis | wiking: asking b/c i noticed it runs to issues with numeric stability under certain circumstances, hence i would like to see if it's an intentional caveat or an unintentional implementation error | 11:47 |
-!- HeikoS [~heiko@host-92-0-169-11.as43234.net] has joined #shogun | 12:00 | |
-!- mode/#shogun [+o HeikoS] by ChanServ | 12:00 | |
@sukey | [https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/3929 opened by geektoni | 12:41 |
micmn | wiking: currently we have get_cpu_backend() that returns a pointer to a LinalgBackendBase object, so how do we achieve that with a templated base class like in CRTP? | 12:42 |
@wiking | everything is LinalgBackendBase | 12:47 |
@wiking | but LinalgBackendBase has a template param that is the actual backend | 12:47 |
micmn | yeah I mean we have std::unique_ptr<LinalgBackendBase> cpu_backend; we need a workaround for this | 12:50 |
@sukey | [https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/3929 synchronized by geektoni | 12:51 |
@wiking | micmn, i undersand | 12:53 |
@wiking | but the thing is that if we use only the base class | 12:53 |
@wiking | say | 12:53 |
@wiking | template<class ActualBackend> class LinalgBackend {....}; | 12:54 |
@wiking | then we could actually have | 12:54 |
-!- geektoni [~geektoni@93-34-128-38.ip49.fastwebnet.it] has quit [Ping timeout: 240 seconds] | 13:40 | |
-!- HeikoS [~heiko@host-92-0-169-11.as43234.net] has quit [Quit: Leaving.] | 14:14 | |
-!- HeikoS [~heiko@host-92-0-169-11.as43234.net] has joined #shogun | 14:19 | |
-!- mode/#shogun [+o HeikoS] by ChanServ | 14:19 | |
-!- geektoni [~geektoni@93-34-128-38.ip49.fastwebnet.it] has joined #shogun | 14:31 | |
@sukey | [https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/3929 synchronized by geektoni | 14:47 |
-!- HeikoS [~heiko@host-92-0-169-11.as43234.net] has quit [Quit: Leaving.] | 14:55 | |
@sukey | [https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/3928 synchronized by geektoni | 14:57 |
@sukey | [https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/3928 synchronized by geektoni | 15:00 |
-!- iglesiasg [~iglesiasg@217.119.234.214] has quit [Quit: leaving] | 16:28 | |
-!- geektoni [~geektoni@93-34-128-38.ip49.fastwebnet.it] has quit [Quit: Leaving.] | 16:31 | |
-!- geektoni1 [~geektoni@93-34-128-38.ip49.fastwebnet.it] has joined #shogun | 16:31 | |
-!- HeikoS [~heiko@untrust-out.swc.ucl.ac.uk] has joined #shogun | 16:32 | |
-!- mode/#shogun [+o HeikoS] by ChanServ | 16:32 | |
Trixis | lol i managed to use shogun in a way that results in a segfault | 16:37 |
lisitsyn | oh it is not that difficult believe me :P | 16:42 |
Trixis | i think i know which part of the code is exactly causing it | 16:43 |
Trixis | lisitsyn: right, question: the issue is to do with unsafe element access CCombinedFeatures::get_feature_obj(), im about to fix this and submit a PR, however im not sure if i should throw an error if the idx is out of bounds, or simply return as expected by CCombinedKernel::init | 16:58 |
Trixis | or wiking if you're around | 17:01 |
@sukey | [https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/3928 closed by geektoni | 17:13 |
Trixis | how the hell does one submit a PR from the github desktop app ... | 17:54 |
@sukey | [https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/3929 synchronized by geektoni | 18:33 |
@sukey | [https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/3929 synchronized by geektoni | 18:49 |
-!- HeikoS [~heiko@untrust-out.swc.ucl.ac.uk] has quit [Ping timeout: 276 seconds] | 19:00 | |
-!- HeikoS [~heiko@eduroam-int-pat-8-96.ucl.ac.uk] has joined #shogun | 19:14 | |
-!- mode/#shogun [+o HeikoS] by ChanServ | 19:14 | |
-!- geektoni1 [~geektoni@93-34-128-38.ip49.fastwebnet.it] has quit [Ping timeout: 248 seconds] | 19:17 | |
-!- HeikoS [~heiko@eduroam-int-pat-8-96.ucl.ac.uk] has quit [Quit: Leaving.] | 19:52 | |
-!- OXPHOS [92bd305b@gateway/web/freenode/ip.146.189.48.91] has quit [Quit: Page closed] | 22:55 | |
@sukey | [https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/3930 opened by HeyItsDavid | 23:02 |
Trixis | yay finally managed to create the PR | 23:02 |
Trixis | and it looks like i flipped an inequality, fuc k | 23:12 |
Trixis | right, no that's only the variables in the error message i flipped around | 23:18 |
@sukey | [https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/3930 closed by HeyItsDavid | 23:25 |
@sukey | [https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/3931 opened by HeyItsDavid | 23:37 |
Trixis | so far its green | 23:59 |
Trixis | looks much better | 23:59 |
--- Log closed Sat Jul 15 00:00:56 2017 |
Generated by irclog2html.py 2.10.0 by Marius Gedminas - find it at mg.pov.lt!