Thursday, 2013-08-08

*** nahka has quit IRC00:07
*** jayrulez has joined #sailfishos00:14
*** yunta has quit IRC00:19
*** yunta has joined #sailfishos00:20
*** piggz has joined #sailfishos00:23
*** piggz has quit IRC00:33
*** triggerhappy has joined #sailfishos00:41
*** piee has joined #sailfishos00:41
*** piee has quit IRC00:46
*** M4rtinK has quit IRC01:06
*** XeN has joined #sailfishos01:16
*** kaxing has joined #sailfishos02:11
*** simathur has joined #sailfishos03:11
*** lpotter has quit IRC03:13
*** simathur has quit IRC03:16
*** simathur has joined #sailfishos03:16
*** diegoyam has quit IRC03:39
*** furikku has joined #sailfishos03:58
*** martyone has joined #sailfishos03:59
*** ericcc has joined #sailfishos04:01
*** VitaBushido_ has joined #sailfishos04:03
*** piee has joined #sailfishos04:05
*** Custodian has joined #sailfishos04:07
*** piee has quit IRC04:22
*** Eismann_ has quit IRC04:37
*** f3an0r has joined #sailfishos04:43
*** VDVsx has quit IRC04:58
*** maninc has joined #sailfishos04:58
*** VDVsx has joined #sailfishos05:07
*** lpotter has joined #sailfishos05:08
*** ericcc_ has joined #sailfishos05:12
*** louisdk has quit IRC05:14
*** ericcc has quit IRC05:14
*** maninc has quit IRC05:17
*** maninc has joined #sailfishos05:19
*** jayrulez has quit IRC05:26
*** maninc has quit IRC05:30
*** dhbiker has joined #sailfishos05:38
*** vogon has joined #sailfishos05:42
*** dhbiker has quit IRC05:43
*** dhbiker has joined #sailfishos05:43
*** vogon has quit IRC05:53
*** triggerhappy has quit IRC06:04
*** triggerhappy has joined #sailfishos06:05
*** Pat_o has joined #sailfishos06:08
*** VitaBushido_ has quit IRC06:17
*** maninc has joined #sailfishos06:26
*** f3an0r has quit IRC06:28
*** maninc has quit IRC06:31
*** Pali has joined #sailfishos06:32
*** maninc has joined #sailfishos06:33
*** Sfiet_Konstantin has joined #sailfishos06:45
*** jjanvier has joined #sailfishos06:52
*** ericcc has joined #sailfishos06:56
*** toartist has joined #sailfishos06:59
*** ericcc_ has quit IRC07:00
*** jpetersen has joined #sailfishos07:01
*** Xruxa has joined #sailfishos07:04
*** gabriel9|work has joined #sailfishos07:04
*** b0bben has joined #sailfishos07:15
*** niqt has joined #sailfishos07:17
*** itbaron has joined #sailfishos07:19
*** martyone_ has joined #sailfishos07:20
*** martyone has quit IRC07:21
*** f3an0r has joined #sailfishos07:29
*** njeiseck has joined #sailfishos07:35
*** martyone_ has quit IRC07:36
*** martyone has joined #sailfishos07:37
*** huanming has joined #sailfishos07:38
huanmingHey, I got a problem when building sailfishos example project named componentgalley. It says that "Fatal: SailfishOS-i486-x86 is an invalid sb2 target".07:39
huanmingCan anyone help me?07:39
huanmingMy os is windows 8 professional07:39
huanmingit is a 64-bit operating system07:40
*** maninc has quit IRC07:41
Yanielhmm sounds like your toolchain is misconfigured or something..07:41
Yaniellbt^07:41
huanmingthe message in the window "compile output" is " The process "C:\Users\*\AppData\Roaming\SailfishAlpha\mer-sdk-tools\MerSDK\SailfishOS-i486-x86\qmake.cmd" exited with code 1.07:45
huanmingError while building/deploying project new (kit: MerSDK-SailfishOS-i486-x86)07:45
huanmingWhen executing step 'qmake' "07:45
kaltsihuanming: which sdk version? Is it the qt5 alpha? Did you have the first alpha installed previously?07:45
huanmingno, i have not installed any alpha version yet.07:46
Yanielthere are only alpha versions of the sailfish SDK07:46
huanmingsorry, i have not installed any alpha version before07:47
huanmingit is the qt5 alpha07:47
*** Pat_o has quit IRC07:47
huanmingi have installed on my os now07:47
kaltsiok.. I don't have a windows machine to test it on here myself.. do you see the virtualbox machines running.. the emulator and the MerSDK build machine?07:48
*** maninc has joined #sailfishos07:48
*** Pat_o has joined #sailfishos07:48
huanmingboth of them run well07:48
kaltsihuanming: have you tried restarting windows after you ran the installer? :)07:54
*** Pat_o has quit IRC07:54
huanminghmm, i have not restarted it yet07:55
huanmingshould i restart it now?07:56
kaltsidon't know if it helps.. you could also try to ask on the sailfish-devel mailing list, which might have more users with windows 8.. but do try restarting07:56
huanmingok, i try restarting now07:57
*** huanming has quit IRC07:57
*** b0bben has quit IRC08:01
*** nahka has joined #sailfishos08:03
*** f3an0r has quit IRC08:05
*** b0bben has joined #sailfishos08:05
*** huanming has joined #sailfishos08:06
huanmingI have restarted my windows 808:07
huanmingbut the result is still the same08:07
*** njeiseck has left #sailfishos08:07
kaltsido you get it also with the default template application? "File/New file or project" -> SailfishOS Qt Quick Application etc..08:08
aknightthere are 2 icons in the lower-left for connecting the ide to the vms08:11
huanmingi have created one project as you said, but the result is the same08:11
aknightthey must be in a "red" state to be working08:12
huanmingi have followed the instruction in the website step by step08:12
kaltsihuanming: ok sad to hear it, I wish I had a windows machine to test it myself08:13
huanmingwell, thank you all the same. it seems that it does not work on my windows, and now i am going to try it on my linux08:14
*** huanming has quit IRC08:17
aknighti have no problems under windows 8, except that the SailfishOS "mode" doesn't really work08:19
*** Pat_o has joined #sailfishos08:19
aknightbut building/deploying works fine08:19
aknightyou just need to activate the vms using the lower-left buttons08:19
*** maninc has quit IRC08:30
*** exec_s has joined #sailfishos08:33
*** Pat_o has quit IRC08:38
*** cxl000 has joined #sailfishos08:40
*** fk_lx has left #sailfishos08:41
*** maninc has joined #sailfishos08:42
*** t7 has joined #sailfishos08:43
*** f3an0r has joined #sailfishos08:44
*** maninc has quit IRC08:44
*** arcean has joined #sailfishos08:46
auri__Aard: ping08:49
*** cxl000 has quit IRC08:50
*** Pat_o has joined #sailfishos08:52
Aardauri__: pong08:57
*** cxl000 has joined #sailfishos08:57
*** ericcc_ has joined #sailfishos08:59
*** b0bben has quit IRC09:01
*** ericcc has quit IRC09:03
*** Pat_o has quit IRC09:03
*** b0bben has joined #sailfishos09:04
*** maninc has joined #sailfishos09:06
*** tg has quit IRC09:09
*** tg has joined #sailfishos09:11
*** Superpelican has joined #sailfishos09:17
*** b0bben has quit IRC09:25
SuperpelicanSfietKonstantin:Would it be more efficient to specify the size of a QVector at declaration time?09:31
Superpelicaninstead of just doing a QVector<int> myvector09:31
Superpelicanand then insert/push_back all the ints?09:32
SuperpelicanSfiet_Konstantin: ^09:32
Sfiet_KonstantinSuperpelican: what are you trying to do ?09:33
Sfiet_Konstantin(and I think you can)09:33
SuperpelicanSfiet_Konstantin:eh09:33
Sfiet_Konstantin(or you can do plain C, but that's useless in modern computing)09:33
Superpelicanwell it's not very easy to explain09:33
SuperpelicanI've thought of arrays too09:34
Sfiet_KonstantinSuperpelican: reading the docs (once again), you can see that QVector have a constructor taking an int for size09:34
Sfiet_Konstantinso ...09:34
Superpelicanbut I need to be able to remove things during runtime from my array/vector09:34
Superpelicanyes I know09:34
Yanielplain C and useless?09:34
SuperpelicanI'm reading the docs09:34
Superpelicanand also in Qt Creator as you suggested ;)09:34
Sfiet_KonstantinYaniel: nope, but if you want efficiency, better use plain C09:34
Superpelicanbut09:35
Superpelicanmy question is09:35
Sfiet_Konstantinbut the gain in memory by allocating an array of 4 entries and a QVector is negligeable in modern computing with gigs of ram09:35
*** b0bben has joined #sailfishos09:35
Superpelicanwell I wouldn't say that mobile devices have unlimited resources09:35
Sfiet_KonstantinSuperpelican: they have ~1 gig of ram09:35
Superpelicanbut still09:35
Superpelicanmy question is...09:35
Sfiet_Konstantinwell do you really think that a bunch of int will take too much space09:36
Superpelicanwould it be faster/less space consuming/more efficient09:36
Sfiet_KonstantinSuperpelican: it will be more efficient09:36
Sfiet_Konstantinbut depends on the size of your array09:36
Sfiet_Konstantinvectpr09:36
Superpelicanwell it's 10 ints09:36
Sfiet_Konstantinpreallocate is _always_ more efficient09:36
SuperpelicanI'll just show you the code09:36
Superpelicanok09:36
Sfiet_Konstantinhowever, it might not be _much more_ efficient09:37
Yaniel10 ints? just use whatever is easy09:37
Sfiet_KonstantinYaniel: yes, we are not talking about 10^n ints :)09:37
SuperpelicanSo it's more efficient09:37
Superpelicanwait09:37
SuperpelicanI'll make a paste09:37
Sfiet_Konstantindepending on the operations as well09:37
Sfiet_Konstantininsert in vector ? or only append prepend ?09:38
Sfiet_Konstantinhow much, how is the data set expected to grow etc.09:38
Sfiet_KonstantinSuperpelican: btw, in your case, QVector is enough, but for generic case, QList might be better09:40
Sfiet_Konstantinespecially storing classes / structs09:40
SuperpelicanSfiet_Konstantin:http://paste.kde.org/p43aa92e7/09:41
Superpelicanoh and the push_back is insert/append at the end of the vector09:41
Superpelicannot somewhere in between09:41
Sfiet_Konstantinmore efficient09:41
Superpelicanit's just about filling the vector with 1,2,3 etc.09:41
Sfiet_Konstantinbut for 10 ints the gain is unnoticiable09:41
SuperpelicanSfiet_Konstantin:What is more efficient?09:42
Sfiet_Konstantinpreallocating09:42
Superpelicanso that is QVector<int> myvector(10)?09:42
Sfiet_Konstantinit is always more efficient, since you don't recreate memory chunks etc09:42
Sfiet_Konstantinyes09:42
Superpelicanok09:42
SuperpelicanSfiet_Konstantin:And would removing things during runtime cost a lot?09:43
Superpelicanperformance/memory-wise?09:43
Superpelicaneh09:43
SuperpelicanI mean .erase()09:43
Superpelicanor whatever it is called in Qt09:43
Superpelicanhaven't read the whole QVector doc09:43
Sfiet_KonstantinSuperpelican: yes, it costs "a lot"09:43
SuperpelicanSfiet_Konstantin:Should I rewrite my program again?09:43
Sfiet_Konstantinbasically when you do an insertion / removal, in memory, the whole list is copied09:43
Sfiet_Konstantinno09:44
Superpelicanso I can use a plain C array?09:44
Sfiet_Konstantinplease no09:44
Sfiet_Konstantin:P09:44
Sfiet_KonstantinNEVER09:44
SuperpelicanIt would make it more complicated09:44
Sfiet_Konstantinif you have C++ conveinent containers, NEVER use plain C09:44
Sfiet_Konstantinit costs "a lot"09:44
Sfiet_Konstantinbasically a few cycles of CPU, and some memory09:44
Sfiet_Konstantinbecause you recreate a whole list09:44
Superpelican:nod:09:44
Sfiet_Konstantinit is actually also what's happen when you append, but in a lesser impact09:45
Sfiet_Konstantinie, if you do an insert / erase, you have a O(n) complexity09:45
Sfiet_Konstantinstill, for a CPU going at 1 Ghz, it consts nothing in time09:45
SuperpelicanI've never understood the O notation09:45
Sfiet_Konstantin<1ms09:45
Sfiet_Konstantinn is the number of elements in your list09:45
Sfiet_KonstantinO(n) means costs C x n atomic operations like allocate memory, set a variable in memory, free memory etc09:46
Sfiet_KonstantinO(..) means constant times what's inside your brackets09:46
*** b0bben has quit IRC09:46
Sfiet_Konstantinso if you have a list of 10 elements, removing one in the middle will cost in average c x 10 operations, (c is most likely 3 or 4)09:46
SuperpelicanWhat's the C then?09:47
Sfiet_Konstantin(1 for allocate, one for copy, one for free)09:47
Sfiet_Konstantinwell, c is useless if your n is huge09:47
*** maninc has quit IRC09:47
Sfiet_Konstantinif n is 10^50, then if c is 2 or 5 don't depend much09:47
Sfiet_Konstantinbecause you might want to save from the n09:47
*** mikhas has joined #sailfishos09:47
Sfiet_Konstantinlike if you go from 2 x n to 5 x log(n), then you save a lot09:48
Sfiet_Konstantin2 x 10^50 or 5 x 5009:48
SuperpelicanSfiet_Konstantin:The docs say QList is better for insertions and removals in the middle of the array/vector/list?09:49
Sfiet_Konstantinbut basically, your program is about n = 10 here09:49
Superpelicanshould I use those?09:49
Sfiet_Konstantinso nothing problematic09:49
Sfiet_KonstantinQList is better because instead of copying the data represented by T it copies a pointer on T09:49
*** Pat_o has joined #sailfishos09:49
Sfiet_Konstantinthat's better if sizeof(T) > sizeof(T*)09:49
Superpelicanbut a pointer is as big as an int09:49
*** b0bben has joined #sailfishos09:49
Sfiet_Konstantinexact09:49
Superpelicanso that probably won't have much benefit09:50
Sfiet_Konstantinso in your case QList<int> will cost more memory09:50
Sfiet_Konstantinso stick with QVector09:50
SuperpelicanSo it'll only work if you have a list of structs or something like that?09:50
Sfiet_Konstantinbut about writing in C, if you do your algo bad, the C perf can be worse than the C++ perf, so stick with Qt's containers. They are quite optimized09:50
Sfiet_KonstantinSuperpelican: yes09:50
Superpelicanok09:50
Sfiet_Konstantinso, in your case, do whatever you want09:51
SuperpelicanI'm currently reading a book about C pointers etc.09:51
Superpelicana pretty nice one09:51
Sfiet_Konstantinbecause basically it will cost you really nothing09:51
Sfiet_Konstantin:)09:51
*** dhbiker has quit IRC09:51
SuperpelicanSfiet_Konstantin:http://shop.oreilly.com/product/0636920028000.do09:51
Superpelicanthey were 50% off last week09:52
Sfiet_Konstantinthese books are usually good09:52
Superpelicanand they're DRM-free :D09:52
SuperpelicanI also bought a C and C++ pocket reference09:52
Superpelicanthey were 3 euro each09:52
Superpelicanwith the 50% off :D09:53
Sfiet_Konstantin:P09:53
Superpelicanwill always come in handy :)09:53
Sfiet_Konstantinwell, my C C++ refs are the internet09:53
Sfiet_Konstantinand I learnet pointer on the internet09:53
Sfiet_Konstantineverything is on the internet09:53
Superpelicanwell09:53
Superpelicanthe book I have is very in depth09:53
SuperpelicanI doubt you'll find something like that on the web09:54
Sfiet_KonstantinSuperpelican: well, dunno09:54
Sfiet_Konstantintrue that books are useful. I got some books of algorithm09:54
Sfiet_Konstantinbut it is just my case that I self-taught close to everything related to code09:55
Superpelicanwell I'm self teaching myself everything too :P09:55
Superpelicanof course09:55
Superpelicanwell09:55
Superpelicanwith a lot of help09:55
*** Pat_o has quit IRC09:55
Sfiet_Konstantin:P09:55
Superpelicanfrom for example you09:55
Superpelicanand the nice books ;)09:55
Superpelicanbut other than that09:56
Nicd-I haven't really found any programming books useful09:56
Nicd-most are really boring and often outdated already09:56
SuperpelicanSfiet_Konstantin:Out of curiousity: do you use complex C++ things like polymorphism, multiple inheritance and virtual functions daily?09:57
SuperpelicanNicd-:Do you think this one is outdated and useless too: shop.oreilly.com/product/0636920028000.do :P09:58
Sfiet_KonstantinSuperpelican: yes09:59
Sfiet_Konstantinmultiple inheritance yes, a lot: but in a JAVA style09:59
SummeliI guess that those are pretty basic things if you're writing an app with c++09:59
Sfiet_Konstantinwith interfaces most of the time09:59
Sfiet_Konstantinvirtual functions, of cause09:59
Superpelicanah I see09:59
Sfiet_Konstantinpolymorphism as we10:00
Sfiet_Konstantinwell10:00
Sfiet_KonstantinSummeli: not multiple inheritance, especially that in Qt it is not always doable, because of the impossibility to do diamond like inheritance graph10:00
SummeliSfiet_Konstantin: ok, with Qt you usually don't need that10:01
Sfiet_KonstantinSummeli: yes :)10:01
*** Morpog_PC has joined #sailfishos10:01
*** ericcc_ has quit IRC10:02
SuperpelicanSfiet_Konstantin:So polymorphism I actually the same as what I've done with QObject * QMLrootobject = view.rootObject()10:02
Superpelican?10:02
Nicd-Superpelican: maybe not outdated but uselss to me, yes10:02
Sfiet_KonstantinSuperpelican: yep10:02
Sfiet_KonstantinNicd-: well, not useless, virtual functions are essential10:03
Nicd-Sfiet_Konstantin: I was talking about the book Superpelican mentioned10:03
SuperpelicanSfiet_Konstantin:But why would you use virtual functions10:04
*** lpotter has quit IRC10:04
Superpelicaninstead of a single function10:04
Superpelicanthat has an if-else statement10:04
Superpelicanand calls 2 other functions10:04
SuperpelicanI've also heard that they can be slow10:04
SuperpelicanIs that true?10:04
SummeliSuperpelican: interfaces are usually pure virtuals10:04
Summeliin c++10:04
Superpelicanyou mean UIs?10:04
Superpelicanor interfaces of classes?10:05
Summelino, I mean like interfaces in java10:05
Superpelicanlike public slots/functions10:05
Superpelican?10:05
Superpelicans/functions/methods10:05
Summeliyes, you can use slots in Qt10:05
Summelibut in c++ you usually just writi virtual int foo()=0;10:06
Superpelican?10:06
Nicd-Superpelican: the performance implications of birtual functions are negligible. they are not the place you should go looking at when optimizing10:06
Sfiet_KonstantinSuperpelican: well, if you do inheritance, it is usual to have virtual functions10:06
Nicd-virtual*10:06
Sfiet_KonstantinNicd-: there is the cost of resolving the vtable etc10:07
*** Aard has quit IRC10:07
SummeliSfiet_Konstantin: yes, it's like couple cycles :)10:07
Nicd-Sfiet_Konstantin: there is but it is nothing you should worry about unless you are in the business of writing high frequency trading software :P10:08
Sfiet_KonstantinSummeli: in pure C they don't exist10:08
Sfiet_Konstantin:D10:08
Sfiet_KonstantinNicd-: or HPC10:08
*** martyone has quit IRC10:08
SummeliShapeshifter: yes, but you can just implemetn that with sturcts and function pointers10:08
SummeliSfiet_Konstantin even :P10:08
Nicd-if you are doing really high performance stuff, you are usually at the level to understand these things anyway10:08
Nicd-so if you need to ask "are virtual functions slow", chances are it doesn't matter to you10:09
SummeliI have once ported a c-library where they implemented the polymorphism with structs and function pointers, it was pretty fun10:09
Sfiet_Konstantinwell, in my daily time, virtual functions are useless10:09
Sfiet_KonstantinSummeli: hehe10:09
Sfiet_Konstantindon't know if it is really better10:09
SuperpelicanNicd-:So you mean I don't need virtual functions?10:09
*** martyone has joined #sailfishos10:09
Superpelicanby: "so if you need to ask "are virtual functions slow", chances are it doesn't matter to you"10:10
*** Aard has joined #sailfishos10:10
*** maninc has joined #sailfishos10:11
Nicd-no10:11
Nicd-I mean their performance is good enough to not matter to you10:11
Nicd-the things you should worry about are elsewhere10:11
SuperpelicanSfiet_Konstantin:This has a red line under it: "QVector<int> tables(10);"10:13
SuperpelicanI've done it exactly like in the docs10:13
Superpelican"QVector<QString> vector(200);" from the docs10:13
Sfiet_Konstantintry to compile ?10:13
Superpelicanbuilt-in Qt Creator10:13
Sfiet_Konstantinand maybe the redline comes from a ";" that was forgotten in the previous line10:14
Sfiet_Konstantinetc10:14
SuperpelicanSfiet_Konstantin:When I hover over the line it says "unexpected token 'C'"10:16
Superpelicans/C/(10:16
Sfiet_Konstantindoes it compile ?10:16
Superpelicanno10:17
SuperpelicanBut that seems to be related to other things10:17
Sfiet_Konstantingo figureout10:17
*** zenvoid has joined #sailfishos10:18
Superpelican"error: expected identifier before numeric constant"10:20
Superpelicanand "20: error: expected ',' or '...' before numeric constant"10:22
Superpelicanon the same line10:22
*** arcean has quit IRC10:23
SuperpelicanSfiet_Konstantin:http://paste.kde.org/p45598c77/10:24
Superpelicancan't find anything wrong10:25
*** exec_s has quit IRC10:26
Sfiet_KonstantinSuperpelican: are you kidding me ?10:29
Superpelicanno10:29
Sfiet_Konstantinyou are calling a constructor when declaring a variable10:29
Sfiet_Konstantin:/10:29
Sfiet_Konstantinyou should call the constructor in the constructor of Logic10:30
Sfiet_Konstantin...10:30
SuperpelicanSfiet_konstantin:from the docs: "QVector<QString> vector(200);"10:30
Summeliyou should declare it like QVector* myvector;10:30
Summeliand then initialize that in the constructor for example10:30
SuperpelicanSummeli:Why a pointer?10:30
Superpelicannvm10:31
SummeliSuperpelican: because you can not call the constructor in declaration10:31
Summeliyou can move that code to the contructor of the object10:32
Superpelicanok10:32
*** Shaan7 has quit IRC10:34
Sfiet_Konstantinno need of a pointer Superpelican and Summeli10:38
Sfiet_Konstantinjust declare QVector<int> myVector;10:39
Sfiet_Konstantinand in the constructor do myVector = QVector<int>(20)10:39
*** maninc has quit IRC10:39
*** kjokinie has quit IRC10:40
Summelithat'll work too10:40
*** kjokinie has joined #sailfishos10:40
*** b0bben has quit IRC10:40
Nicd-Sfiet_Konstantin: shouldn't it be in the initialization list?10:41
*** Shaan7 has joined #sailfishos10:42
Sfiet_KonstantinNicd-: it is not mandatory (and you can put it in the initialization list)10:42
Sfiet_Konstantinlike myVector(QVector<int>(20))10:42
Nicd-is using the initialization list normal/good practice?10:42
Sfiet_Konstantinbut sometimes I like using the = notation. It is clear, and still call the constructor10:42
Superpelicanyay10:42
Sfiet_KonstantinNicd-: it is, but it is efficiency vs clearness10:43
Superpelicanmy Jolla T-Shirt has left Finland10:43
Sfiet_KonstantinI prefer to have clean code, even if it is less efficient10:43
Superpelicanit must now be traveling to Germany in a dinghy10:43
Sfiet_Konstantin(especially that the compiler is able to fix the case of using = in constructor by not initializing twice)10:43
Nicd-it seems there is an anwser: http://stackoverflow.com/a/92679510:44
Sfiet_KonstantinNicd-: let me try10:45
Superpelican"I prefer to have clean code, even if it is less efficient" :O10:45
Sfiet_KonstantinIIRC, in release mode, compiler is able to detect that10:45
Sfiet_KonstantinSuperpelican: yes10:45
SuperpelicanSfiet_Konstantin:Just kidding ;)10:46
SuperpelicanI know you should try to balance those 2 things10:46
Sfiet_Konstantinwell, of cause10:46
Sfiet_Konstantinbut clean cod efirst10:46
Yanielclean code tends to be sufficiently efficient anyways10:47
Superpelican:nod:10:49
*** Pat_o has joined #sailfishos10:49
Sfiet_KonstantinNicd-: aah, you are right10:51
Sfiet_Konstantinit first calls a default constructor then calls the overloaded one10:51
Sfiet_Konstantinmaybe it is because I'm using pointers10:51
Sfiet_Konstantinwell anyway10:51
Sfiet_Konstantinit is good to initialize them10:51
*** maninc has joined #sailfishos10:52
*** Pat_o has quit IRC10:55
SuperpelicanSfiet_Konstantin:What would you use for an "About" box/dialog in an Sailfish app?10:55
Superpelicana Dialog{}?10:55
Superpelicana custom made Rectangle{} derived object?10:55
Sfiet_KonstantinSuperpelican: a page10:55
SuperpelicanA whole page?10:56
Sfiet_Konstantinyes10:56
Sfiet_Konstantinaccessed via a pulley menu10:56
Superpelican:nod:10:56
Sfiet_Konstantininside you can put version nformation10:56
Sfiet_Konstantincopyright10:56
Superpelican:nod:10:56
Superpelicanand credits10:56
Sfiet_Konstantingithub link10:56
Sfiet_Konstantinicon10:56
Sfiet_Konstantinanything you want10:56
*** gabriel9 has joined #sailfishos10:56
Sfiet_Konstantindonation10:56
Sfiet_Konstantinexplaination about what a free sw is10:56
SuperpelicanWhich will of course include all the people who have helped me ;)10:56
Sfiet_Konstantinusually it fills a page10:56
Sfiet_Konstantin:P10:56
SuperpelicanIncluding "Sfiet_Konstantin"10:56
Superpelican:D10:56
Sfiet_KonstantinLOL10:57
*** gabriel9|work has quit IRC10:57
*** mikhas has quit IRC11:03
*** Pat_o has joined #sailfishos11:08
*** arcean has joined #sailfishos11:14
*** Pat_o has quit IRC11:14
*** simathur has quit IRC11:19
*** triggerhappy has quit IRC11:22
*** triggerhappy has joined #sailfishos11:24
*** dhbiker has joined #sailfishos11:32
*** b0bben has joined #sailfishos11:34
*** jpetersen has quit IRC11:34
*** jpetersen has joined #sailfishos11:43
*** ericcc has joined #sailfishos11:44
*** arcean has quit IRC11:46
*** arcean has joined #sailfishos11:49
*** Pat_o has joined #sailfishos11:49
*** ericcc has quit IRC11:57
*** ericcc has joined #sailfishos11:57
*** simbrown has joined #sailfishos11:59
*** martyone has quit IRC12:04
*** Pat_o has quit IRC12:11
*** f3an0r has quit IRC12:15
*** niqt has quit IRC12:16
*** f3an0r has joined #sailfishos12:21
*** Superpelican has quit IRC12:22
*** khertan has joined #sailfishos12:23
*** Pat_o has joined #sailfishos12:24
*** arcean has quit IRC12:24
*** f3an0r has quit IRC12:26
khertanMorning12:28
*** f3an0r has joined #sailfishos12:29
*** b0bben has quit IRC12:35
*** M13 has joined #sailfishos12:36
*** maninc has quit IRC12:50
*** Pat_o has quit IRC12:52
*** Superpelican has joined #sailfishos13:01
*** rcg has joined #sailfishos13:03
SuperpelicanSfiet_Konstantin:If I want to send a signal to QML which carries a string with it,13:03
SuperpelicanShould I use a QVariant or a QString as parameter?13:03
SuperpelicanI'm a bit confused13:03
Superpelicanabout when a QVariant is necessary13:04
Superpelicanand when the type will automatically be converted for you13:04
Sfiet_KonstantinQString13:04
Sfiet_Konstantinsignals are strongly typed13:05
*** Pat_o has joined #sailfishos13:05
Superpelicanok thanks :)13:06
*** arcean has joined #sailfishos13:07
SuperpelicanSfiet_Konstantin:Signals always have a void return type, right?13:11
Sfiet_Konstantinyep13:11
Superpelicanok13:11
*** VitaBushido_ has joined #sailfishos13:12
*** Pat_o has quit IRC13:12
khertanSuperpelican: QString13:13
Superpelican:)13:13
Superpelicankhertan:Sfiet_Konstantin had already replied ;)13:14
Superpelicanbut thanks anyway :D13:14
khertanuse a QVariant<QString> only to carry different type of returned value13:14
khertanlol :)13:14
khertandidn't see it :)13:14
Superpelicankhertan:What do you mean with a different return type?13:14
SuperpelicanInts or booleans?13:14
khertana signal that can return int, bool, string, garbagedata13:15
khertan:)13:15
khertanoups ... can't update my sdk target13:15
khertancan't resolve sailfishos.org same for you ?13:15
*** VitaBushido_ has quit IRC13:16
khertansame for http://merproject.org/13:16
t7Qt has its own string class?13:16
*** Shaan7 has quit IRC13:16
*** VitaBushido has joined #sailfishos13:16
khertant7: at least since Qt313:16
t7why not std string?13:16
Yanielencodings I guess13:17
t7oh unicode stuff?13:17
YanielIIRC QString does UTF-8 by default13:17
Nicd-http://stackoverflow.com/questions/11028948/advantage-of-qstring-over-stdstring13:17
Yanielstd::String does not13:17
*** Shaan7 has joined #sailfishos13:17
aknightyep, QStrings are stored as utf1613:17
Superpelicankhertan:I can reach http://sailfishos.org in my browser13:17
YanielSuperpelican: works fine here13:17
SuperpelicanYaniel:I'm not the one having problems ;)13:18
Superpelicankhertan is13:18
Superpelicant7:Plus no dependency on the STL13:19
Superpelicanor whatever it's correct name is13:19
YanielSTL13:19
Superpelicanstd::string isn't exactly part of the STL iirc13:19
t7Qt is a pretty hefty dep13:19
Superpelicant7:Yes13:19
Superpelicanbut if you are already using it13:19
Yanielexacctly13:20
Superpelicanyou can better use all of it13:20
Superpelicaninstead of pulling in even more ;)13:20
khertanoh ... can resolve http://sailfishos.org13:20
Yanieland std::string is part of the STL13:20
khertanbut not www.sailfishos.org13:20
khertannor https://releases.sailfishos.org/13:20
Superpelicanlol :)13:20
Superpelican:(13:20
khertanarg13:21
khertancan't install python-devel to finish ownNotes13:21
khertan...13:21
Sfiet_Konstantinkhertan: can resolve here13:21
Superpelicankhertan:I can reach it in my browser13:21
khertanroh ...13:21
Superpelicanincluding https://releases.sailfishos.org/written_offer_for_source_code.txt13:21
Superpelican:D13:21
*** f3an0r has quit IRC13:22
Morpog_PCkhertan, try http instead of https13:23
ottulotypo in that txt :<13:23
khertanlook like that s come from dns13:24
*** b0bben has joined #sailfishos13:33
*** khertan has quit IRC13:34
*** khertan has joined #sailfishos13:35
SuperpelicanSfiet_Konstantin:The Qt-project docs page about the Connections{} says it can also be used with objects that are not available to QML13:57
SuperpelicanSo I could use it with my QObject derived class, right?13:57
Superpelicanwithout setContext*?13:58
Sfiet_KonstantinSuperpelican: do whatever you want honestly13:59
SuperpelicanSfiet_Konstantin:yes, but is it possible?13:59
Sfiet_Konstantinwell, you have to expose something to QML14:00
SuperpelicanSfiet_Konstantin:But: http://qt-project.org/doc/qt-5.0/qtqml/qml-qtquick2-connections.html14:00
Sfiet_Konstantinbasically the Connection component is often used to connect to global singletons14:00
SuperpelicanHowever, it is not possible to connect to a signal in this way in some cases, such as when:14:00
Sfiet_Konstantinlike those that you are exposing14:00
Superpelican    Multiple connections to the same signal are required14:00
Superpelican    Creating connections outside the scope of the signal sender14:00
Superpelican    Connecting to targets not defined in QML14:00
Superpelicansorry for the flood :(14:00
Sfiet_Konstantinstop spamming14:00
Sfiet_Konstantinyou can use Connection to connect to whatever that is available in QML14:01
Sfiet_Konstantinincluding global singletons passed via setContextProperty14:01
Sfiet_KonstantinI know, I have tried14:01
SuperpelicanSfiet_Konstantin:But I don't instantiate my class in QML14:01
Superpelican"When any of these are needed, the Connections type can be used instead."14:02
Superpelican"Connecting to targets not defined in QML"14:02
SuperpelicanSfiet_Konstantin:So will I have to expose my object that is instantiated in C++ to QML with setContext*?14:02
Sfiet_Konstantinyep14:05
Sfiet_KonstantinIMO the easiest way14:05
*** VDVsx has quit IRC14:05
Sfiet_Konstantinthen you create a Connection component and use target: NAME_GIVEN_IN_SET_CONTEXT14:06
SuperpelicanSfiet_Konstantin:Well I think that page is very unclear then14:06
Sfiet_Konstantin:/14:06
SuperpelicanSfiet_Konstantin:But I could use QObject::connect too?14:07
Superpelicanwith of course .findChild()14:07
Superpelicanfirst14:07
*** kaxing has quit IRC14:09
Sfiet_Konstantinwell14:11
Sfiet_Konstantinif you want14:11
Sfiet_KonstantinI don't like messing with QML from C++14:11
Sfiet_Konstantinbut you can do that14:11
SuperpelicanSo Connections{} is prefered by the experts ;)14:12
SuperpelicanAnd what about a QML signal -> Qt/C++ slot connection?14:12
SuperpelicanWould Connections{} be preferred for that too?14:13
aknightSuperpelican: you can get a pointer to the qml object and use QObject::connect in that case14:13
Superpelicanok14:13
*** Eismann has joined #sailfishos14:13
aknightbut you could also do onMyQMLSignal: myCPPObject.slot()14:13
Superpelicanyeah14:13
Superpelicanbut then I would have to do a setContextProperty() first14:13
aknightyep (or use a singleton import)14:14
*** VDVsx has joined #sailfishos14:19
*** liar has joined #sailfishos14:19
*** fk_lx has joined #sailfishos14:21
Superpelicanaknight:And every page would needs it's own Connections{} ?14:21
*** b0bben has quit IRC14:21
aknightSuperpelican: if the qml "slot" (reaction to the signal) is different for each page14:22
Superpelicanoh14:22
aknightSuperpelican: or you can define a function in each page14:22
Superpelicanaknight:So I could also just put it in main.qml?14:22
aknightand maybe make one Connections that fires currentPage.myFunction()14:22
Superpelicanwell14:22
aknightor loop through the pages and fire that function...14:23
SuperpelicanI don't really have14:23
Superpelicanpages with the same signal14:23
Superpelicanbut who need a different handler/slot14:23
Superpelicanall my pages14:23
Superpelicanare totally different14:23
aknightok14:23
Superpelicanand have a different purpose14:23
Superpelicanand therefore also totally different slots and signals ;)14:23
aknightso you probably want a Connections object in each then14:23
SuperpelicanSo I can't put one in main.qml?14:23
SuperpelicanI won't have signals/slots with the same name14:24
aknightyou can, if your page is available14:24
aknightyou can say myPage.mySlot()14:24
Superpelicanaknight:So they should be in the same scope?14:24
aknightright14:24
Superpelicanhmm14:24
aknightyou just need to be able to access the page by id and you can call functions it has defined14:24
SuperpelicanThen I'll just give each page it's own Connections{}14:25
Superpelicanaknight:Pulley menu entries can be dynamic too, right?14:26
SuperpelicanSo for example a variable number14:26
Sfiet_KonstantinSuperpelican: not sure14:26
Sfiet_Konstantindon't think so14:26
Superpelicanhmm14:27
SuperpelicanI'll take a look at Chris' project again then14:27
Superpelican(from the ML)14:27
SuperpelicanI thought it had dynamic menu entries14:27
Superpelicanbut not sure14:27
SuperpelicanIt won't work in Qt514:27
Superpelicanthough14:27
Superpelicanbut I can read the code14:27
*** b0bben has joined #sailfishos14:28
*** simbrown has quit IRC14:29
SuperpelicanSfiet_Konstantin:Can't you just the menu item an id and put "menuitemid.text = number_str" in some other component's signal handler?14:30
Superpelicans/just/just give14:30
khertanrahhhhh i got some problem package isn't deployed to the emulator... but none error ! grrrr any advice14:30
Superpelicankhertan:So you chose the Deploy by RPM package option?14:31
*** simbrown has joined #sailfishos14:33
Superpelicanhuh14:34
*** stephg has joined #sailfishos14:34
SuperpelicanQt Creator itself is still based on Qt 4.8.4 lol14:34
khertanSuperpelican: yep as python file aren't deploy else14:34
Superpelicanah14:34
Superpelicanyour using Python14:35
Superpelicanwell I think that's an important detail14:35
SuperpelicanAnd I haven't used Python + Qt14:35
Superpelicanlet alone with the Sailfish SDK14:35
SuperpelicanSo I don't think14:35
SuperpelicanI can help much14:35
khertanSuperpelican: i m alone with the sailfish sdk :)14:35
Superpelicankhertan:Try it on the ML14:35
*** jayrulez has joined #sailfishos14:36
khertani ve found / not really ... restarted qt remove the .pro.user and restart the vm14:36
khertanfix the thing14:36
SuperpelicanIIRC there are more Python developers for Sailfish14:36
khertan:)14:36
Superpelicanstrange14:36
khertanSuperpelican: https://github.com/khertan/pyotherside14:36
khertanSuperpelican: yep14:36
khertanSuperpelican: like the 3 target kit x86 x862 and x86314:37
Superpelicankhertan:Are you the developer of PyOtherSide?14:37
khertanlook like i mess something14:37
*** chriadam has quit IRC14:37
khertanSuperpelican: now i m the one who made it s own fork :)14:37
khertanthp is the devel of pyotherside14:37
SuperpelicanAh so you are a contributor14:37
Superpelicankhertan:So PyOtherSide is for QML UIs and PySide is for Qt4 Widget based UIs?14:37
SuperpelicanI've heard of PyOtherSide on the ML14:38
khertanpyside is binding for Qt14:38
khertanactually only Qt414:38
fk_lxkhertan: I was good with developing with PyQt3, but later life caught me so I'm unfortunately not up-to-date with newest solutions regarding Qt and Python14:38
*** chriadam has joined #sailfishos14:38
khertanPyOtherSide is extending qml with a python interpreter14:38
SuperpelicanSo instead of JavaScript, you then use Python with QML?14:39
SuperpelicanAh it's also for Python 314:39
Superpelicannice14:40
SuperpelicanMy first computer programming language was Python :)14:40
SuperpelicanI read a book about it14:40
Superpelicanand wrote 2 small programs with it14:40
Superpelicanthen I switched to C++14:40
Superpelicanah14:40
Superpelicanthp = Thomas Perl14:40
khertanalmost the same ... except that i switch to python at the end14:40
khertanSuperpelican: yep14:40
Superpelicankhertan:But Thomas is on the ML14:41
khertanSuperpelican: i know14:41
SuperpelicanSo you should ask him14:41
khertani've no problem with pyside :) the problem is the sdk right now :p14:41
khertanok ... i got it ... python file are now copied with the binary14:41
khertan...14:41
Superpelicanexactly14:41
SuperpelicanBut the SDK wasn't designed for use with Python14:42
SuperpelicanSo problems could occur14:42
Superpelicanwhich are Python specific14:42
Superpelicaneven though they don't aren't Python related14:42
SuperpelicanSo you should contact other Sailfish + Python users for that problems/stuff14:42
Superpelicans/aren't/are14:42
khertanmy problem was founding documentation about .pro and the qmake documentation14:46
khertan:)14:46
khertans/founding/found14:46
Sfiet_Konstantinkhertan: qmake is ...14:47
Sfiet_Konstantin:D14:47
*** toartist has quit IRC14:47
khertanyeah14:50
khertani would like to track when user reenter in my application ...14:50
khertanafter switching from elsewhere14:50
khertanso i test it on onStatusChanged { if (status == PageStatus.Activating ) { ... }}14:51
khertanbut i this event is also called when page is being created and so all other components aren't yet ready14:52
khertanand sometime didn't exist ... tracking a ready status with a boolean property and onCompleted look like a bit over kill14:52
khertanany idea ?14:52
*** arcean has quit IRC14:57
*** exec_s has joined #sailfishos15:00
*** gabriel9 has quit IRC15:02
*** b0bben has quit IRC15:04
*** b0bben has joined #sailfishos15:06
*** arcean has joined #sailfishos15:06
*** Xruxa has quit IRC15:09
*** rashm2k has joined #sailfishos15:17
* Superpelican just checked out KhtCMS, looks nice :)15:18
khertanSuperpelican: oh thanks15:19
SuperpelicanIt's funny15:20
khertani should push a bug fix for the rss.php :)15:20
SuperpelicanA while ago15:20
khertanSuperpelican: it s horrible php15:20
khertan:)15:20
Superpelicanwell I didn't actually check the code ;)15:20
SuperpelicanAnd I don't know php15:20
Superpelicanso15:20
SuperpelicanI'll probably not notice15:20
Superpelicananyway15:20
Superpelicana while ago15:20
khertanSuperpelican: u should not ... it s a ugly aggregation of code ... nothing clear15:20
SuperpelicanI had a thought about a simple CMS, that just uses Markdown15:21
Superpelicanand now there is actually one :D15:21
*** exec_s has quit IRC15:21
SuperpelicanI was introduced to Markdown15:21
khertanbut that funny to write note on my n9 with KhtNotes and push them as post to my site15:21
Superpelicanfor the wiki of my project on Bitbucket15:22
khertan:p15:22
khertanSuperpelican: ... ur name come from pelican ? the python markdown blog engine ?15:22
Superpelicanno ;)15:23
Superpelicannever heard of that15:23
*** rm_work_ has joined #sailfishos15:23
khertanSuperpelican: http://docs.getpelican.com/en/3.2/15:24
Superpelicankhertan:What was your reason to write KhtCMS then?15:24
Superpelicanif Pelican already existed?15:24
Superpelicanand you seem to like Python a lot15:25
Superpelican(with almost all your project written in Python)15:25
khertanSuperpelican: pelican is a python tool ... which need to run on the host or locally15:25
khertanbut my host is php only15:25
*** TW1920_ has quit IRC15:25
Superpelican:(15:25
Superpelicantoo bad15:25
khertanand it use some libs complicated to compile on harmattan15:26
khertanso can publish from my phone15:26
SuperpelicanI'm still thinking of buying a  Beaglebone Black and running Owncloud + some other stuff on it :D15:26
khertans/can/can't15:26
khertanSuperpelican: i'm waiting my raspberrypi for that15:26
Superpelicankhertan:You can also buy a BBB15:26
SuperpelicanIt has a faster CPU15:26
Superpelicanso it should be better for a web server15:26
SuperpelicanRPi should be better for multimedia ;)15:27
SuperpelicanBut currently I'm saving up for my Jolla :)15:27
Superpelicanso the BBB will have to wait a while :(15:27
*** t7 has quit IRC15:31
*** rcg has quit IRC15:36
*** b0bben has quit IRC15:37
*** Pali has quit IRC15:41
SuperpelicanSfiet_Konstantin:the sizeof() an empty vector is 4 bytes, should I declare one if I'm not sure if I'll need it?15:46
SuperpelicanBecause I've read that you can't declare a variable in an if-statement15:47
Superpelicanotherwise you won't be able to use it out of the if-statement's scope15:47
SuperpelicanOr do you have a better solution?15:47
Nicd-why would you not be sure if you'll need it?15:47
SuperpelicanNicd-:Well it depends on user input15:47
*** TW1920 has joined #sailfishos15:48
*** piee has joined #sailfishos15:48
Superpelicanthe user can choose a mode15:48
Superpelicanand one mode does need a specific vector15:48
Sfiet_KonstantinSuperpelican: well15:48
Superpelicanand the other doesn't15:48
Sfiet_Konstantin4 byts15:48
Sfiet_Konstantin4 bytes15:48
Superpelican4 bytes isn't really much15:48
Nicd-Superpelican: then define it inside that mode?15:48
Sfiet_Konstantinno15:48
Sfiet_Konstantinit is ok15:48
Sfiet_Konstantin4 bytes is nothing15:48
Nicd-yeah but if he only needs it in one section it is cleaner to have it there15:48
SuperpelicanNicd-:But how do you check which mode is selected?15:48
Superpelicanan if-statement15:48
Superpelicanand you can't declare stuff in if-statements15:49
Superpelicanthat's the point15:49
Nicd-so then you define it inside that if statement. if you need it outside the if statement, that means you always need it, doesn't it?15:49
Superpelicaneh15:49
Superpelicanno15:49
SuperpelicanBecause I have a seperate initialisation function15:50
Superpelicanmy old command line non-Qt worked that way15:50
Nicd-then you *have* to define it outside the if statement15:51
Nicd-I don't see what the problem is15:51
*** Pali has joined #sailfishos15:51
Superpelicanwell I only want to declare the vector if a specific mode is chosen15:51
Superpelicanso you'll have to check for that15:51
Superpelicanwhich is done with an if-statement15:51
Sfiet_KonstantinSuperpelican: if your vector is an attribute, and if you don't declare it15:51
Sfiet_Konstantinit will be defaulty constructed15:51
Sfiet_Konstantinand you will waste these 4 bytes anyway15:52
SuperpelicanSfiet_Konstantin:What do you mean with an attribute?15:52
Superpelicanyou mean an argument for a function?15:52
Sfiet_KonstantinSuperpelican: no15:53
Sfiet_Konstantinif it is an attribute15:53
Sfiet_Konstantinof an object15:53
SuperpelicanSfiet_Konstantin:So you think the sailors will be fine if I waste http://www.wolframalpha.com/input/?i=4%2F1024^4 of the memory of the Jolla (if it has 1GB of RAM) :P15:54
Superpelicans/fine if I waste/fine with the fact I'll waste15:55
Superpelican:D15:55
Sfiet_KonstantinSuperpelican: if they are not fine, they will kill your app15:55
Nicd-Superpelican: you cannot not declare it if you use it inside multiple separate if scopes, you have to declare it in the outer scope15:56
Nicd-so there really is no problem15:56
Sfiet_Konstantinand I will make sure to add a hidden routine in the kernel to kill your app each time it is launched15:56
Superpelicannooooo15:56
SuperpelicanSfiet_Konstantin: than I'll install Nemo on my Jolla muhahah15:57
Superpelican:D15:57
Superpelicanand port my app to Nemo15:57
Superpelicanwhich I'll do anyway15:57
Sfiet_Konstantin:P15:57
SuperpelicanNicd-:Could you please explain with you're trying to say with an example?15:58
Nicd-Vector foo; if (something) { foo will be used here } .... if (something2) { foo will be used here too }15:59
Nicd-if you have something like that you *have* to declare foo in the outer scope, you cannot not declare it15:59
Superpelicanok16:00
*** jjanvier has quit IRC16:00
Nicd-so I don't know what your problem is since you have to do it anyway16:00
SuperpelicanNicd-:But what if one mode needs *2* vectors and the other only 1?16:00
Superpelican(spoiler:which is my current case)16:00
Nicd-define a variable in the smallest scope it is used in16:01
Nicd-that would mean you define the second vector inside the if scope if it is only used there16:01
Superpelican...16:01
SuperpelicanNicd-:I have a seperate slot/function for initialisation16:01
SuperpelicanAnd I can't change that16:02
Superpelicanunless I add some counter16:02
Superpelicanand let the other function check each time it is run, is the first time it's called16:02
Superpelicannvm16:03
Superpelicanthat'll cost just as much resources16:04
Superpelicanas that counter will be an int16:04
Superpelican...which uses 4 bytes too16:04
Nicd-you should stop worrying about 4 bytes16:04
SuperpelicanNicd-:But what if I in the future write an app16:04
Superpelicanwhich uses more than 4 bytes16:04
Superpelicanand actually does use *a lot* of memory16:05
SuperpelicanIt's not that I really care all that much about the 4 bytes16:05
Superpelicanbut it's more a matter of principles16:05
SuperpelicanI'm learning programming16:05
Nicd-you need to learn to optimize in the right places16:05
Superpelicanand I want to learn myself the right way16:05
Nicd-ints and pointers aren't the things you want to avoid16:05
*** rainemak has quit IRC16:06
SuperpelicanNicd-:So what should I want to avoid then?16:07
Sfiet_KonstantinSuperpelican: memory leak16:08
Sfiet_Konstantinif you cannot trim down a variable allocation16:08
Sfiet_Konstantineither it is because you are doing it right (most of the time)16:08
Sfiet_Konstantinor it is because the algo is wrong16:08
Sfiet_Konstantinand you might have to take some time to rethink it16:08
Nicd-memory leaks, allocating large things and not releasing them, memory use when you have very large containers16:09
SuperpelicanNicd-:And what would be very large containers?16:09
Superpelican>2016:09
Superpelican?16:09
Sfiet_KonstantinNicd-: not large stuff, just allocating some small stuff and repeating is enough16:09
Superpelican>5016:09
Superpelican?16:09
Sfiet_KonstantinSuperpelican: > 10^416:09
Nicd-Sfiet_Konstantin: that goes under very large containers :)16:09
Superpelicanso that's 10,00016:10
Sfiet_Konstantinworry about stuff when your reach 10^2-316:10
Sfiet_Konstantinand be careful when you reach 10^416:10
Superpelicanok16:10
Sfiet_Konstantinbecause you won't fill RAM with a couple of ints16:10
Sfiet_Konstantinyou are not in 20th century16:10
Sfiet_KonstantinRAM is cheap, even in mobile devices16:11
Sfiet_Konstantinjust don't abuse16:11
SuperpelicanSfiet_Konstantin, Nicd-:So I shouldn't worry about if I'm not using an int or point too much?16:11
Sfiet_Konstantinyes16:11
Sfiet_Konstantinjust like you shouldn't care about allocating a buffer of size 128 if you are only gonna use a part of it16:11
Sfiet_Konstantin(like for strings)16:11
Sfiet_Konstantinbecause a buffer of 128 is so cheap16:12
*** nahka has quit IRC16:12
Superpelicanok16:12
SuperpelicanI think I'll have to accustom a little bit to this16:13
Superpelicanbut eventually...16:13
Nicd-note we are not saying you should be careless. but as a programmer you should learn to recognize the things that are worth your time16:14
Sfiet_KonstantinNicd-: +116:14
Sfiet_Konstantinbe careful on stuff that can create really bad things: algorithm, when you have to process lot of data, memory allocation / desallocation16:14
Sfiet_Konstantinalgorithmic complexity16:15
*** nahka has joined #sailfishos16:16
SuperpelicanSfiet_Konstantin:Where an algorithm should be as complex as possible or as simple as possible?16:16
SuperpelicanI had to make a trade off when coding my original non-Qt app16:17
Sfiet_KonstantinSuperpelican: simple: an algorithm must be as simple as possible16:17
SuperpelicanI could use a very simple algorithm16:17
Superpelicanbut use 5 times the memory16:17
*** stephg has left #sailfishos16:17
Superpelicanor use a slightly more complex algorithm16:17
Sfiet_Konstantinsimplicity is not about simplistic though16:17
Superpelicanand I ended up choosing the more complex option16:17
Sfiet_KonstantinSuperpelican: try to get an optimum between kloc and alpha in O(n^alpha)16:18
Superpelicannote: I saved 320 bytes by the more complex algorithm16:18
Sfiet_KonstantinSuperpelican: show me your code16:18
Nicd-320 bytes is nothing16:18
Sfiet_Konstantinand compute the algo complexity16:18
Sfiet_KonstantinNicd-: it can be something, especially if you have a O(log(n)) instead of a O(n)16:18
Sfiet_Konstantinit really depends on the number of kloc involved, the maintenance burden etc.16:18
Nicd-Sfiet_Konstantin: if he saved 320 bytes _total_, it's nothing :P16:19
Sfiet_KonstantinSuperpelican: if your algo is slightly complex but well documented, written, and easily maintainable, it is ok16:19
Sfiet_KonstantinNicd-: well, his app is simple16:19
Superpelicanwell TBH16:19
Sfiet_Konstantinbut if he want to do something more complex involving the algo, it migt worth it16:19
SuperpelicanI think I should comment my apps a bit more16:19
Superpelicanbut then16:20
Superpelicanthe apps I've written16:20
Superpelicanall still derive from the time I really was a C++ n00b16:20
SuperpelicanWhen I was still learning the very basics16:20
Sfiet_Konstantinmind showing the two versions of the code ?16:20
SuperpelicanSfiet_Konstantin:Which 2 versions?16:21
Sfiet_Konstantinthe simple one and complex one16:21
Sfiet_Konstantinsaving 320 bytes16:21
Superpelicaneh16:21
SuperpelicanI've never actually written the simple one16:21
Superpelicanit was just a thought16:21
SuperpelicanTBH16:21
SuperpelicanI've thought days and days16:21
Superpelicanhow I could implement a not too difficult and not too memory wasting algo16:22
Superpelicannote: I haven't literally thought all day16:22
Sfiet_KonstantinSuperpelican: IMO, a good code is code that minimize algorithmic complexity16:23
Sfiet_Konstantinbut that if you left it uncommented16:23
Sfiet_Konstantinand went to vacation for two weeks, you can understand how it works in < 10s16:23
Sfiet_Konstantinwhen looking at it again16:23
Superpelicaneh16:26
Sfiet_KonstantinSuperpelican: that's IMO16:27
*** ericcc has quit IRC16:27
Sfiet_Konstantin(remember, I'm for clearness over efficiency)16:27
SuperpelicanSfiet_Konstantin:When I had to rewrite a part of my program yesterday, TBH I didn't understand my algo in < 10s16:27
Superpelicanbut I'm n00b16:27
Superpelicanso I'll probably get better16:28
Superpelicanat understanding algos16:28
Sfiet_Konstantinwell, in <tau16:28
*** arcean has quit IRC16:28
Sfiet_Konstantintau proportional to your leve16:29
Sfiet_Konstantinl16:29
SuperpelicanSfiet_Konstantin:Well, I think it would be interesting to see how fast you understand my algo ;)16:47
SuperpelicanSfiet_Konstantin:https://bitbucket.org/Superpelican/clamshell_cli/src/1d99c3abb3db1d2f94588debaf2dbdc6bfbb0d10/clamshell.cpp?at=default16:47
Superpelicanwell actually I've got 2 algos16:47
SuperpelicanBut I'll let you try to understand the most complex one16:48
Superpelicantime saving hint:Only check the newquestion_mixed and checkAnswer functions16:48
Superpelicanand the if-statement of the main while loop16:48
Superpelicanwith "//initialize practise all multiplication tables mixed mode" in it16:49
Superpelicanthose are the relevant parts16:49
Superpelicanthe rest is for the other, simpler algo mode, the multilingual system and the score system16:50
Sfiet_Konstantincomplex16:51
Sfiet_Konstantin:/16:51
Superpelicanyeah16:51
Superpelicanbut I wanted to save mem16:51
Superpelicanby not creating to much variables16:51
Sfiet_Konstantinflemme16:52
Superpelicanso I took some shortcuts16:52
Superpelicanwith the +1 and -1's16:52
Superpelicanso I could for example fill a vector with only one variable16:52
Superpelicaninstead of 216:52
SuperpelicanI used the counter for both the loop and the value16:52
Superpelicanit's cleverly designed IMHO, but not very easy to understand16:53
Superpelicanafter you forgot how it worked16:53
*** nahka^ has joined #sailfishos16:53
Superpelicanor if you see it for the first time ;)16:53
SuperpelicanBut maybe I should just write some additional docs about it16:53
*** nwoki has quit IRC16:54
SuperpelicanSfiet_Konstantin:But did you understand it after all?16:54
*** nahka has quit IRC16:54
Superpelicanah http://translate.google.com/#fr/en/flemme16:54
SuperpelicanSfiet_Konstantin:Do you understand know why I wanted to avoid rewriting parts of the program? :)16:55
SuperpelicanI wanted to the write it once16:55
Superpelicanand then just treat it as a black bo16:55
*** nwoki has joined #sailfishos16:55
Superpelicanx16:55
Superpelicanby copy and pasting the existing logic into my app16:55
Superpelicanbut that didn't work ;)16:55
Superpelicans/know/now16:56
Superpelicanand it's probably a bad idea too16:56
Sfiet_Konstantinyeah16:57
Sfiet_Konstantinmaybe not a good idea16:57
Superpelicanlol :)16:57
Superpelicanworst idea ever16:58
Superpelicanlaziness comes with a cost :(16:58
*** spider-mario has joined #sailfishos17:00
*** pixraider has quit IRC17:03
*** pixraider has joined #sailfishos17:05
*** triggerhappy has quit IRC17:09
*** exec_s has joined #sailfishos17:11
*** pixraider has joined #sailfishos17:16
*** piee has quit IRC17:26
SuperpelicanSfiet_Konstantin:I should #include QQmlContext to be able to use setContextProperty, right?17:26
Sfiet_KonstantinSuperpelican: maybe17:27
Sfiet_Konstantinyes I guess17:27
SuperpelicanI do get errors17:27
Superpelicanabout forward declaration blahah17:27
Superpelicanand invalid use of struct QQmlContext etc17:27
SuperpelicanSfiet_Konstantin:Adding setContextProperty broke the QObject::connect17:29
Sfiet_KonstantinSuperpelican: just manage17:29
Superpelicansame error as when I do a QObject::connect before setView17:29
Sfiet_Konstantinif there is an invalid use of QQMlContext it means that QQmlContext is not declared17:29
Sfiet_Konstantinand then you shjould include it17:29
SuperpelicanI have already #Included17:29
SuperpelicanSfiet_Konstantin:Should I use QObject::connect for C++ signal ->QML handler/slot instead of Connections{} then?17:30
Sfiet_KonstantinI don't kno17:30
Sfiet_Konstantinonly you can tell17:30
Superpelicanbut is it considered bad practice?17:31
SuperpelicanI'm trying to teach myself good habits17:31
Superpelicanso I won't come up with hacky, dirty solutions17:31
*** piee has joined #sailfishos17:31
SuperpelicanSfiet_Konstantin:That's why I'm asking you ;)17:32
Superpelicanyou know what's good and bad17:32
Superpelicanout of experience17:32
Sfiet_Konstantinno, I don't know17:32
Sfiet_KonstantinI have my habits, using Connection17:32
Sfiet_Konstantinbut some have others17:32
Sfiet_Konstantinhere both should be ok17:32
Sfiet_Konstantinbut I think that using Connection is cleaner17:32
*** nahkaz has joined #sailfishos17:33
Superpelicanhmm17:33
Superpelicanthen I'll just use what works17:33
SuperpelicanI don't really care if I'm forced to give a specific element a specific name if I create a new UI for my app17:33
Superpelicanwhen I would like to reuse my C++ logic class17:33
Superpelicanfor for example a Nemo UI17:34
*** b0bben has joined #sailfishos17:34
Superpelicanthat doesn't matter to me17:34
*** lbt has quit IRC17:34
*** lbt has joined #sailfishos17:34
*** nahka^ has quit IRC17:36
*** b0bben has quit IRC17:46
*** fk_lx has left #sailfishos17:51
*** rm_work_ has quit IRC18:11
*** diegoyam has joined #sailfishos18:17
*** Superpelican has quit IRC18:25
*** Superpelican has joined #sailfishos18:25
*** Superpelican has quit IRC18:29
*** Culain has quit IRC18:31
*** Culain has joined #sailfishos18:33
*** Tomiol80 has joined #sailfishos18:36
*** lpotter has joined #sailfishos18:38
*** rm_work_ has joined #sailfishos18:41
*** Sfiet_Konstantin has quit IRC18:48
*** disharmonic has joined #sailfishos18:55
*** b0bben has joined #sailfishos18:56
*** exec_s has quit IRC18:56
*** furikku has quit IRC18:59
*** rashm2k has quit IRC19:07
*** Sfiet_Konstantin has joined #sailfishos19:07
*** rashm2k has joined #sailfishos19:17
*** rashm2k1 has joined #sailfishos19:21
*** rashm2k has quit IRC19:21
*** piee has quit IRC19:31
*** rashm2k1 has quit IRC19:36
*** rashm2k1 has joined #sailfishos19:36
*** piee has joined #sailfishos19:36
*** b0bben has quit IRC19:49
*** Zotan has joined #sailfishos19:50
*** ajalkane has joined #sailfishos19:50
*** jpetersen_ has joined #sailfishos19:55
*** jpetersen has quit IRC19:59
*** louisdk has joined #sailfishos20:01
*** Pali has quit IRC20:05
*** rashm2k1 has quit IRC20:15
*** itbaron has quit IRC20:25
*** ajalkane has quit IRC20:28
*** M4rtinK has joined #sailfishos20:29
*** arcean has joined #sailfishos20:45
*** arcean has quit IRC20:50
*** Eismann has quit IRC20:56
*** M13 has quit IRC20:58
*** dhbiker has quit IRC21:24
*** liar has quit IRC21:27
*** piee has quit IRC21:31
*** Custodian has quit IRC21:32
*** fk_lx has joined #sailfishos21:36
*** piee has joined #sailfishos21:37
*** spider-mario has quit IRC21:40
*** Tomiol80 has quit IRC21:42
*** zenvoid has quit IRC21:49
*** jayrulez has quit IRC22:02
*** Sfiet_Konstantin has quit IRC22:10
*** rashm2k1 has joined #sailfishos22:17
*** fk_lx has quit IRC22:20
*** gabriel9 has joined #sailfishos22:26
*** piee has quit IRC22:28
*** disharmonic has quit IRC22:28
*** piee has joined #sailfishos22:31
*** gabriel9 has quit IRC22:32
*** Morpog_PC has quit IRC22:33
*** nahkaz has quit IRC22:34
*** gabriel9 has joined #sailfishos22:36
*** rashm2k1 has quit IRC22:41
*** piee has quit IRC22:51
*** piee has joined #sailfishos23:03
*** gabriel9 has quit IRC23:06
*** piee has quit IRC23:11
*** Zotan has quit IRC23:11
*** triggerhappy has joined #sailfishos23:16
*** datagutt has quit IRC23:17
*** cxl000 has quit IRC23:32
*** miksuh has joined #sailfishos23:57

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!