IRC log of #maemo for Monday, 2016-04-25

MaxdamantusWhy would `switch` on strings have an O(1) search?00:08
WizzupMaxdamantus: can be hash table like00:09
Wizzuplike a python 'string switch': {'a': foo(), 'b': bar()}['a']00:09
Wizzupactually, that is wrong00:09
Wizzuplike a python 'string switch': {'a': foo, 'b': bar}['a']()00:09
Wizzupyou get the idea00:09
MaxdamantusI doubt it's likely to do that.00:10
MaxdamantusUnless you actually have a large number of strings, it's going to be faster to just do the comparisons.00:10
Maxdamantusor if there are too many common prefixes.00:11
WizzupI'm just suggesting a way it could be done00:11
WizzupNot saying that it is doing that00:11
Maxdamantushash functions are also O(n), not O(1).00:12
*** l_bratch has joined #maemo00:20
*** vakkov has quit IRC00:31
ceeneread access to a dictionary is O(1)00:35
ceenethis thing is receiving an index, say 7, translating 7 to say stream:error and then comparing stream:error with dozens of possible texts00:36
ceenewhy do that, when you can just switch(index) case 700:36
ceenethat's O(1)00:36
ceeneand not a back-and-forth mapping from hash to key and viceversa00:36
MaxdamantusWhere do you get the 7 from?00:38
PaliMaxdamantus: there are hash functions which have access in O(1)00:38
Paliin worst case, not only approx00:39
MaxdamantusSure. You can analyse the table and determine a unique set of character indices to compare.00:39
Maxdamantuseg, if you have `case "stream:error": ..; case "stream:features": ..`, you can determine that you only need to compare index 7 before checking that it matches the expected string.00:40
Paliyes, that "smart" compiler could do00:41
Maxdamantus(and create a jump table based on that single bit)00:41
MaxdamantusA compiler that smart would probably also do it with an if/else chain.00:42
*** Cor-Ai has quit IRC00:42
*** Cor-Ai has joined #maemo00:42
*** Pali has quit IRC00:51
ceenei've found this thing at my parents, from when i was little :)00:53
DocScrutinizer05hihi, I once had to dealwith a 'smart' pascal compiler that for a >>var I : int16; case I of 1 : xfoo;  -1 : ybar;  end; << created a jump table of humble 32k words length00:55
DocScrutinizer05well, at least it tried to, then segfaulted00:55
DocScrutinizer05I had to redirect the compiler listing to printer, to find out which line it blew chunks00:56
MaxdamantusAlthough I'm suspicious of the test (since such tests are likely to trigger tangential compiler optimisations), a randomly generated 10k `if` table on strings seems to be about 10× faster than the equivalent `switch` table on a recent version of V8.00:56
Maxdamantuson an older version of Spidermonkey, the `switch` is about 6× faster, and on a newer version it's about the same.00:57
kerioayy javascript lmao00:58
Maxdamantusbut that should be enough information to be suspicious generally of picking some language feature over another language feature for performance reasons without actually having good reasons to.00:58
Maxdamantusinput generated with: cat /dev/urandom | tr -dc 'a-zA-Z0-9 \n' | sed '/^\([^ ]\+\) \([^ ]\+\)$/!d' | head -10000 >input00:59
ceenei don't even know how to execute that thing01:00
Maxdamantusjs genif.js <input >testif.js01:01
Maxdamantusjs testif.js01:01
Maxdamantusnode -e 'this.print = function(s){ console.log(s); }; require("./testif");'01:02
ceeneonly thing i've ever done on javascript is alert("This is a very cool web page")01:02
Maxdamantuswhere `js` is the program you can build from the gecko-dev/mozilla-central source tree.01:02
ceenei'll just believe you then :)01:03
ceenei agree that case vs if may not be faster01:03
ceenebut i can't believe that arbitrary length string comparison is better than a look up table01:03
ceenewhen you already have that look up table01:04
*** ced117 has quit IRC01:04
MaxdamantusShould probably also try a preconstructed object.01:05
ceenecan this thing work on n900?01:05
ceeneoh :(01:08
MaxdamantusThe actual map is a lot faster, indicating that the switch doesn't generate a hash table.01:08
ceenethat's the kind of crazy thing that could have worked01:08
Maxdamantus(it gets different results though, since the map isn't ordered)01:08
Maxdamantusactually, it doesn't necessarily indicate that.01:09
ceenewell, gotta go to sleep01:09
ceenenight night!01:09
*** corvinux has quit IRC01:26
*** ashley has quit IRC01:28
kerioceene: i don't think that our gpu has dedicated ram01:31
*** ashley has joined #maemo01:33
*** ashley has joined #maemo01:33
*** bredebid has joined #maemo01:50
*** florian has quit IRC01:54
*** corvinux has joined #maemo02:07
*** pagurus````` has quit IRC02:23
*** pagurus has joined #maemo02:23
*** Venusaur has quit IRC02:30
*** salamisami has quit IRC02:31
*** M4rtinK has quit IRC02:35
*** Venusaur has joined #maemo02:46
*** bredebid has quit IRC02:48
*** salamisami has joined #maemo02:56
*** buZz has quit IRC03:01
*** buZz has joined #maemo03:03
*** buZz is now known as Guest2620703:03
*** salamisami has quit IRC03:08
*** at1as has joined #maemo03:11
*** Guest26207 is now known as buZz03:12
*** pagurus has quit IRC03:30
*** robink_ has quit IRC03:36
*** robink_ has joined #maemo03:52
*** RedM has quit IRC04:08
*** RedW has joined #maemo04:08
*** eMHa_ has joined #maemo04:17
*** eMHa has quit IRC04:21
*** enyc has quit IRC04:22
*** robotanarchy_ has joined #maemo04:43
*** RedM has joined #maemo04:46
*** robotanarchy has quit IRC04:46
*** RedW has quit IRC04:46
*** Defiant has quit IRC05:00
*** Defiant has joined #maemo05:04
*** vakkov has joined #maemo05:33
*** IANUS has quit IRC05:38
*** RedM has quit IRC05:47
*** RedW has joined #maemo05:47
*** lxp1 has joined #maemo06:01
*** lxp has quit IRC06:03
*** DocScrutinizer05 has quit IRC06:07
*** DocScrutinizer05 has joined #maemo06:07
DocScrutinizer05happy to pre-announce devuan will build a version for maemo5, so after debian went systemd and thus orphaned downstream distros like maemo that can't work with systemd, we now have a future again in upstream06:20
*** vahe1 has joined #maemo06:24
*** vahe1 has joined #maemo06:28
*** vakkov has quit IRC06:44
*** vakkov has joined #maemo07:16
*** vahe1 has quit IRC07:19
*** vahe has joined #maemo07:21
*** IANUS has joined #maemo07:47
KotCzarnyi have a code that maps song lenghts to song md5s, so i just did a hashing on those md5s to fit in int07:51
KotCzarnyworks nicely and luckily no collisions07:52
KotCzarnyhad to do that to fit it in few hundred of kB instead of few MB07:53
KotCzarnynot to mention it's probably faster to lookup an int than 32byte07:54
*** IANUS has quit IRC08:05
*** corvinux has quit IRC08:46
*** Oksana has quit IRC09:00
*** Oksana has joined #maemo09:02
*** ecloud has quit IRC09:03
*** ecloud has joined #maemo09:05
*** arcean has joined #maemo09:34
*** corvinux has joined #maemo09:59
*** hellekin has quit IRC10:00
*** hellekin has joined #maemo10:00
* Maxdamantus remembers noticing collisions in lengths (byte sizes of mp3s, mostly).10:03
Maxdamantuslengths and mtimes.10:03
KotCzarnythis one was the .txt db of lengths in seconds and files were identified by md5sum10:08
keriothis reminds me that i should do another scrub of my zpool10:22
*** freemangordon_ has joined #maemo10:25
*** freemangordon_1 has joined #maemo10:27
*** freemangordon_ has quit IRC10:30
* Maxdamantus will do one of his btrfs.10:30
Maxdamantus        scrub started at Mon Aug 17 14:21:41 2015 and finished after 37365 seconds10:30
KotCzarnyhow do i scrub my ext4?10:30
MaxdamantusYou can't.10:31
* KotCzarny sad panda10:31
Maxdamantusext4 is a degenerate filesystem that doesn't have integrity checks.10:31
KotCzarnyis ntfs better?10:31
KotCzarnyalso i think i have saw checksumming option in ext410:32
*** futpib_ has joined #maemo10:32
keriobtrfs has checksumming10:32
keriobecause it's a cheapo clone of zfs10:32
kerioext4 doesn't, because it's a toy filesystem10:33
KotCzarnySince the 3.6 kernel ext4 suppports metadata checksumming10:34
Maxdamantusbtrfs is like zfs that does fewer stupid things, like loading things into RAM twice.10:34
kerio[citation needed]10:35
*** vahe has quit IRC10:36
*** vahe has joined #maemo10:37
MaxdamantusOne of the reasons I probably wouldn't want to use it on an embedded device.10:38
MaxdamantusYou have to allocate memory for it because it doesn't just use Linux's disk cache system like everything else.10:39
*** Oksana has quit IRC10:39
*** Oksana has joined #maemo10:42
keriowell, you can't use it on n900 because the hard minimum for the ARC is 64mb10:44
kerioand that's a quarter of the n900's total ram10:44
KotCzarnyand its 4 times of the available ram10:49
luke-jronly if you use Maemo10:50
*** ecloud has quit IRC10:57
*** ecloud has joined #maemo10:58
*** futpib_ has quit IRC11:00
*** ced117 has joined #maemo11:20
*** bredebid has joined #maemo11:38
*** tanty_off is now known as tanty11:42
*** N-Mi has joined #maemo11:48
ceenethe guy from yowsup is a cool guy :)11:52
KotCzarnygood drinker? ;)11:52
ceenehe's answered me and says he'll try to discover what's wrong with libwa11:52
ceenedon't know, this guy is from germany11:53
ceeneso yes, he's probably a good drinker11:53
ceeneyesterday i started to implement libaxolotl on my own code instead of continuing with libwa11:53
ceeneit seems feasible, but... so many things seemed feasible before and end up being dead-ends11:53
ceeneso... i don't really know what's gonna happen11:54
KotCzarnyWA will change something to make things harder?11:54
*** florian has joined #maemo11:55
kerioi don't really think they care about alternate clients11:56
kerioit's just that...11:56
keriothey don't care about alternate clients11:56
KotCzarnyin fact, they hate alternative clients11:56
KotCzarnysomeone in usa should start group case against their monopolistic practices11:57
kerio"they run a messaging service AND THEY DON'T RELEASE THEIR TRADE SECRETS SO WE CAN CONNECT TO IT"11:58
keriothat will go well11:58
*** jskarvad has joined #maemo12:03
*** jskarvad has quit IRC12:03
*** jskarvad has joined #maemo12:03
*** Ex-Opesa has joined #maemo12:10
*** bredebid has quit IRC12:21
*** chem|st_ is now known as chem|st12:32
*** M4rtinK has joined #maemo12:36
ceenethey don't even care about their own clients12:37
ceeneproved by the fact that from 2017 they will no new releases for S40 nor old android phones12:38
*** vakkov has quit IRC12:50
*** thomasm has quit IRC12:57
*** vakkov has joined #maemo13:02
*** RedW has quit IRC13:07
*** RedW has joined #maemo13:07
*** eMHa_ has quit IRC13:13
*** arcean has quit IRC13:30
*** eMHa_ has joined #maemo13:30
*** vahe has quit IRC13:32
*** vakkov has quit IRC13:36
*** thomasm has joined #maemo14:01
*** arcean has joined #maemo14:03
*** vakkov has joined #maemo14:04
*** salamisami has joined #maemo14:10
*** vakkov has quit IRC14:12
*** corvinux has quit IRC14:17
*** kabouik1 has joined #maemo14:23
zZap-Xi think we should all stop using whatsapp and try and get our friends to use
zZap-Xand port that to N900 insteaad14:24
luke-jrwhy not standard XMPP?14:38
zZap-Xaye ok14:49
sixwheeledbeastmore devices need cross platform SIP and XMPP, OTB. N900 had this, other devices need proprietary apps from app stores14:53
sixwheeledbeastthe issue is getting others to switch from these proprietary systems they have been using for so long.14:54
sixwheeledbeastyou can lead a horse to water but you can't make it drink...14:54
M4rtinKone issue with XMPP is audio/video AFAIK14:55
M4rtinKIIRC there is still not one widely supported method of robust audio/video conferencing over XMPP14:56
M4rtinKpeople expect that more and more these days14:56
M4rtinKso many of the new IM services, including open source ones, usually provide audio/video conferencing by default14:56
sixwheeledbeastM4rtinK: Exactly my point15:02
M4rtinKfrom what I've seen about the open/semi open IM services15:03
M4rtinKTelegram seem to be quite popular15:03
M4rtinKbut too Whatsapp-like to my tastes (does something similar to the phone number nonsence whatsapp does)15:04
zZap-X"If your friends use Whatsapp, then maybe they are not your friends"15:04
M4rtinKthen Matrix (fully open source & federated) looks good15:04
M4rtinKkinda like XMPP/Jabber 2.0/done right15:04
M4rtinKand also tox15:05
zZap-XThere is always good old trusted SMS :D15:05
M4rtinKwhich is fully decentralized & encrypted, but kinda immature & the decentralization makes some things harder to do than on networks that are "just" federated15:05
M4rtinKlike having more accounts online under your identity15:06
zZap-Xmost smartphones have sms and email, i will use them instead for now15:06
M4rtinKwhich is a rather frequent use-case these days with people using a mobile device & PC or even multiple mobile devices15:07
zZap-Xor i could even actually phone somebody? i actually, maybe not15:07
Siceloexcept that phoning somebody can cost an arm & a leg in some places15:19
*** vakkov has joined #maemo15:22
*** L29Ah has left #maemo15:23
Siceloi fully agree with M4rtinK15:23
M4rtinKin any case more plugins for the Sailfish OS account system would be nice15:24
M4rtinKat least a Matrix one15:24
M4rtinKI'm using the Jabber/XMPP plugin and it work well15:24
Siceloi also am pissed off at whatsapp, and for years avoided using it ... unfortunately i've got 'real' peope to communicate with .. so it ended up that i didn't rally have a choice. trust me .. i tried to convert them to IRC/xmpp ... just didn't work15:25
*** L29Ah has joined #maemo15:25
SiceloM4rtinK: audio/video working with xmpp on sfos?15:25
zZap-Xeverybody uses facebook, everybody uses whatsapp... back in the old days it was Microsoft MSN lol15:31
zZap-Xim gonna see if i can get SMS working in a terminal, that would be great15:32
zZap-Xi believe there is a web interface for n900 sms15:33
Siceloyou can iirc (n900)15:33
Sicelothat's the 'problem' with communication15:33
Siceloit's not about 'you' .. but you need a common ground15:33
Siceloin the form of a common language (english), or common medium (whatsapp)15:34
zZap-Xi wonder if there is a tool what can send and recieve sms via email from your n90015:37
zZap-Xso when you get a sms, the n900 sends a email15:37
Siceloyou'd prolly want to hook to dbus15:38
M4rtinKSicelo: just simple text chat15:41
zZap-Xnow that is cool15:43
zZap-Xsaves grabbing my phone everytime there is a new sms :D15:44
*** L29Ah has left #maemo15:44
Linkandzeldayay, now i have 2 n900s. one is used condition and another in mint condition
zZap-Xlets test to see if this works15:53
zZap-XIT WORKS!!15:54
zZap-Xnow i need to find a way to send a sms from n90015:54
infobotmethinks phonecontrol is
*** zama has quit IRC15:59
*** zama has joined #maemo15:59
*** Defiant has quit IRC15:59
*** esaym153 has quit IRC15:59
*** Defiant has joined #maemo15:59
*** chadi_ has quit IRC16:00
*** erstazi_ has quit IRC16:01
*** erstazi has joined #maemo16:03
*** erstazi has quit IRC16:03
*** erstazi has joined #maemo16:03
*** chadi has joined #maemo16:06
*** clopez has quit IRC16:06
*** Hurrian has quit IRC16:07
*** esaym153 has joined #maemo16:08
*** clopez_ has joined #maemo16:09
*** at1as has quit IRC16:10
*** phlixi_ has joined #maemo16:17
*** phlixi has quit IRC16:17
*** at1as has joined #maemo16:22
Vajbwould be cool to use whatsap via irssi script :D16:42
zZap-Xhow can one turn off vibration for sms only but leave phone vibration on?16:45
zZap-XVajb: i used to use irssi + bitlbee + whatsapp-purple16:45
zZap-Xbut whatsapp-purple have stopped development and too scared to use it incase i get banned16:46
*** arcean has quit IRC16:46
Vajbi see16:51
VajbzZap-X: maybe there is ggonf key for it?16:52
*** Milhouse has joined #maemo16:52
*** corvinux has joined #maemo16:59
*** corvinux has quit IRC16:59
*** corvinux has joined #maemo16:59
zZap-XVajb: what is that?17:03
zZap-XKotCzarny: i think phonecontrol is a bit OTT, all i need is this
zZap-Xphonecontrol is a bit like SMSCOM what i already use17:04
Sicelocompletely unrelated17:11
zZap-Xwow i remotesms works in links but you need the phone number17:13
zZap-Xbut then again all it does is communicate with so might as well use that lol17:15
*** L29Ah has joined #maemo17:20
zZap-Xexcellent, [number] message straight from command line, and new messages go straight to email inbox :D17:21
zZap-Xno need to touch phone anymore17:21
Sicelohow do you read the messages that are in inbox?17:22
zZap-Xpity doesnt read contacts, i could make a little wrapper script for it17:24
Siceloi think you 'touch phone' for mutt, wrong?17:25
zZap-Xmutt is a terminal mail client17:27
*** troulouliou_div2 has joined #maemo17:27
Sicelothanks for the info. i've been using mutt on my N900 for a long time :)17:30
Siceloalthough i think i know now what you're trying to achieve17:31
zZap-Xi use mutt on my linux box, just ssh into n90017:32
zZap-Xusing screen17:32
*** florian has quit IRC17:36
*** corvinux has quit IRC17:36
zZap-Xall i need to do as set some variables in the shell, like MeMob=12345, then i can do MeMob message17:38
zZap-Xi wonder if there is a way to view the contact list in the terminal17:38
*** L29Ah has left #maemo17:39
Siceloit's a berkeley db .. readable17:47
Sicelothere's a python script somewhere for it17:48
*** sunshavi has joined #maemo17:48
*** freemangordon_1 has quit IRC18:02
*** troulouliou_div2 has quit IRC18:03
Sicelowell, that's not exactly the one18:04
zZap-Xnope it didnt work lol18:05
zZap-Xcant get that to work either18:05
Siceloi'll upload the one i have .. don't remember where i got it .. maybe on DocScrutinizer05 repo18:05
zZap-Xace :D18:05 maemo5 usr local bin contact218:07
Sicelothat's the url .. no spaces, of course18:07
zZap-Xgood man :D18:08
*** corvinux has joined #maemo18:09
*** corvinux has quit IRC18:09
*** corvinux has joined #maemo18:09
*** Smily has quit IRC18:09
*** Smily has joined #maemo18:09
VajbzZap-X: actually mispelled gconf. Install gconf-tool and see if there is something to it.18:11
zZap-Xworks awesome18:13
*** kabouik2 has joined #maemo18:21
*** troulouliou_div2 has joined #maemo18:22
*** troulouliou_div2 has quit IRC18:24
*** kabouik1 has quit IRC18:25
*** corvinux has quit IRC18:26
*** ced117 has quit IRC18:39
*** L29Ah has joined #maemo18:42
*** ced117 has joined #maemo18:43
*** Pali has joined #maemo18:45
Sicelogconf, or contacts2?18:51
*** ssvb has quit IRC18:51
*** L29Ah has left #maemo18:53
*** IANUS has joined #maemo18:55
zZap-Xwould i damage anything if i changed this in /etc/passwd  /home/user:/bin/sh  to /home/user:/bin/bash ?18:55
*** clopez_ is now known as clopez18:55
Sicelovery much18:58
Sicelodon't do that. maemo largely depends on busybox18:58
*** ssvb has joined #maemo18:59
zZap-Xaye ok19:00
zZap-XSicelo: so the best way to execute bash4 is by typing it19:00
Sicelosomething like that, yes19:06
*** L29Ah has joined #maemo19:06
*** tanty is now known as tanty_off19:17
*** krnlyng has quit IRC19:29
*** krnlyng has joined #maemo19:43
*** kabouik3 has joined #maemo19:52
*** kabouik has quit IRC19:55
*** eMHa_ has quit IRC19:56
*** jskarvad has quit IRC20:00
*** florian has joined #maemo20:01
*** futpib_ has joined #maemo20:13
*** kabouik4 has joined #maemo20:14
*** kabouik has joined #maemo20:14
*** TRD has joined #maemo20:16
*** Oksana has quit IRC20:17
*** kabouik2 has quit IRC20:18
*** IANUS has quit IRC20:19
*** kabouik3 has quit IRC20:19
*** eMHa_ has joined #maemo20:22
*** M4rtinK has quit IRC20:28
*** sunshavi has quit IRC20:39
*** TRD has quit IRC20:46
*** TRD has joined #maemo20:46
*** TRD has quit IRC20:57
*** TRD has joined #maemo20:58
*** robink_ is now known as robink21:01
*** robink is now known as robink_21:02
*** robink_ is now known as robink21:02
*** pagurus has joined #maemo21:03
*** kabouik5 has joined #maemo21:04
*** kabouik6 has joined #maemo21:05
*** kabouik4 has quit IRC21:08
*** kabouik has quit IRC21:08
*** ced117 has quit IRC21:19
*** ced117 has joined #maemo21:33
*** User123q has joined #maemo21:50
*** kabouik6 has quit IRC21:54
*** kabouik has joined #maemo21:54
*** Cor-Ai has quit IRC22:15
*** Cor-Ai has joined #maemo22:15
*** Cor-Ai has quit IRC22:23
*** Cor-Ai has joined #maemo22:23
*** L29Ah has left #maemo22:38
*** corvinux has joined #maemo22:38
*** githogori has quit IRC22:54
*** githogori has joined #maemo22:56
*** corvinux has quit IRC23:02
*** futpib_ has quit IRC23:23
*** L29Ah has joined #maemo23:42

Generated by 2.15.1 by Marius Gedminas - find it at!