*** dafox has quit IRC | 00:19 | |
*** pagurus has joined #maemo | 01:04 | |
*** florian has quit IRC | 01:46 | |
*** L29Ah has left #maemo | 02:09 | |
*** L29Ah has joined #maemo | 02:10 | |
*** LouisA has joined #maemo | 02:24 | |
*** gry has joined #maemo | 02:30 | |
*** sunshavi has joined #maemo | 02:34 | |
*** xy2_ has quit IRC | 02:36 | |
*** Pali has joined #maemo | 02:58 | |
*** Pali has quit IRC | 03:02 | |
*** infobot has quit IRC | 03:20 | |
*** infobot has joined #maemo | 03:22 | |
*** cyphase has quit IRC | 04:17 | |
*** cyphase has joined #maemo | 04:21 | |
*** LouisA has quit IRC | 04:27 | |
*** RedW has quit IRC | 05:03 | |
*** RedW has joined #maemo | 05:04 | |
*** pagurus` has joined #maemo | 05:54 | |
*** hurrian has quit IRC | 05:55 | |
*** pagurus has quit IRC | 05:56 | |
*** pagurus` has quit IRC | 05:58 | |
*** pagurus has joined #maemo | 05:59 | |
*** spiiroin has quit IRC | 07:11 | |
*** DocScrutinizer05 has quit IRC | 07:25 | |
*** DocScrutinizer05 has joined #maemo | 07:25 | |
*** sunshavi has quit IRC | 08:03 | |
*** spiiroin has joined #maemo | 08:08 | |
Vajb | KotCzarny: the guru of commandline. Is it possible to write simple shell script that checks certain cell from .gnumeric file. Multiplies that value and adjusts its functions based to get value. And after succesful ran writes results to same .gnumeric file? | 08:25 |
---|---|---|
Vajb | hmm i guess im asking if it is possible to get value from .gnumeric file and write values to it. By using shell script. | 08:27 |
*** hurrian has joined #maemo | 08:28 | |
KotCzarny | yes, assuming .gnumeric uses text and not binary packed format | 08:34 |
KotCzarny | otherwise you would have to write decoder/encoder | 08:34 |
KotCzarny | if you can pastebin some example file it would be easier to say | 08:34 |
Vajb | i don't know which file type it uses, but it is default maemo spread sheet program | 08:35 |
KotCzarny | do you have some example file? | 08:36 |
Vajb | it is just a thought now and i wanted to ask if it is even possible | 08:36 |
Vajb | i don't | 08:36 |
KotCzarny | https://rdrr.io/cran/gnumeric/man/read.gnumeric.sheet.html | 08:38 |
KotCzarny | seems like there are scripts for that already | 08:38 |
KotCzarny | but if you simply want to hackily change the data set, awk will probably do it, or python, or perl, or php-cli | 08:40 |
Vajb | oh. I'll check them to see if they r understandable for me. I managed to make script that asks for user input and it works! | 08:40 |
KotCzarny | and treat things like text with some predefined boundaries | 08:40 |
KotCzarny | :) | 08:40 |
KotCzarny | scripts are fun | 08:40 |
KotCzarny | usually i write a script if i have to do something more than once (ie. data is repetitive) | 08:41 |
Vajb | yes i like them too. I use them mostly to avoid writing wrong commands | 08:42 |
KotCzarny | yup, that too | 08:42 |
KotCzarny | extremely important ;) | 08:42 |
Vajb | hmm meant long, but works that way too | 08:42 |
*** clopez has quit IRC | 08:54 | |
*** clopez_ has joined #maemo | 08:57 | |
*** dmth|intevation has joined #maemo | 09:29 | |
*** gry has quit IRC | 09:38 | |
*** Kabouik has joined #maemo | 10:07 | |
*** florian_kc has joined #maemo | 10:21 | |
*** jskarvad has joined #maemo | 10:44 | |
*** jskarvad has quit IRC | 10:44 | |
*** jskarvad has joined #maemo | 10:44 | |
*** chainsawbike has quit IRC | 10:51 | |
*** chainsawbike has joined #maemo | 10:54 | |
*** florian_kc is now known as florian | 11:00 | |
*** xy2_ has joined #maemo | 11:08 | |
sixwheeledbeast | Is you data already have in a spreadsheet and that is why you need to read the spreadsheet? | 11:08 |
*** xy2_ has quit IRC | 11:20 | |
Vajb | sixwheeledbeast: there would be just one value for script to read and then the script itself would input three different fields in file | 11:23 |
sixwheeledbeast | Maybe consider if doing the work in the spreadsheet is easier than doing the work in the script then. | 11:27 |
Vajb | yes, that's where i do it now, but since i need the script for part of the work. I though that script could do all the heavy lifting while i just pick the cherries :) | 11:30 |
sixwheeledbeast | That ssconvert looks useful tho. What is the spreadsheet not doing at the moment? | 11:31 |
*** xy2_ has joined #maemo | 11:40 | |
Vajb | sleeping certain amount of time and using espeak to guide me | 11:43 |
Vajb | to sum it up simply. Spreadsheet is my training log and script is my interwall timer. | 11:47 |
*** xy2_ has quit IRC | 11:57 | |
*** chainsawbike has quit IRC | 12:04 | |
*** chainsawbike has joined #maemo | 12:06 | |
*** xy2_ has joined #maemo | 12:14 | |
*** xy2_ has quit IRC | 12:19 | |
*** eMHa has quit IRC | 12:21 | |
sixwheeledbeast | Ah yes, sorry espeak | 12:54 |
*** eMHa has joined #maemo | 13:01 | |
*** drcode has quit IRC | 13:16 | |
*** xy2_ has joined #maemo | 13:18 | |
*** drcode has joined #maemo | 13:21 | |
*** benthomas has joined #maemo | 13:58 | |
*** geekben90 has joined #maemo | 14:02 | |
*** benthomas has quit IRC | 14:03 | |
*** geekben90 has quit IRC | 14:09 | |
*** xy2_ has quit IRC | 14:12 | |
*** florian has quit IRC | 14:35 | |
*** geekben90 has joined #maemo | 14:38 | |
*** geekben90 has quit IRC | 14:43 | |
*** Wikiwide has joined #maemo | 14:48 | |
Wikiwide | Saera : I can type text in, and receive text-and-speech responses. But Saera doesn't hear me. Even if I have General (not Silent) profile. | 14:49 |
Wikiwide | During the last two or three day, N900 has tendency to shut down suddenly (without LED pattern) in the middle of phone call. Or just say "cellular network not available". Or indicate that SIM isn't inserted. Makes phonecalls a pain, sometimes. Not always, fortunately. Is it hardware problem or software one? | 14:58 |
KotCzarny | dying modem? | 15:02 |
KotCzarny | did it ever boot with yellow 'cellular functions not available' ? | 15:02 |
L29Ah | Wikiwide: sounds like your battery is dead | 15:05 |
KotCzarny | that's also a possibility | 15:06 |
L29Ah | gsm voice calls are the biggest power hog if you don't compile gentoo on your n900 | 15:06 |
L29Ah | and voltage drops on an old liion cell with elevated internal resistance may be huge | 15:06 |
Wikiwide | Boot with "cellular functions not available"? No, I think. Dying battery? Probably, would need to check which one out of three (or so) correlates with these problems (modem is power hungry, did hear about this long ago somewhere). | 15:30 |
Wikiwide | And yes, I think that when I tire of such problems, I consistently switch to a different battery, and problems (however varied) go away. | 15:32 |
*** stryngs has quit IRC | 15:43 | |
*** stryngs has joined #maemo | 15:45 | |
*** spiiroin has quit IRC | 15:53 | |
buZz | man, i'd love to trade a n900 with working modem for one with 100% dead modem :) | 15:55 |
buZz | as long as wifi etc is still working | 15:55 |
* buZz tinfoil levels | 15:55 | |
KotCzarny | hmm, i have one, want it? no display though | 15:55 |
buZz | hmm i could transfer display of one of mine i guess :) | 15:56 |
KotCzarny | afair it was a donor for another n900 ;) | 15:56 |
buZz | poland eh? not too bad for shipping :) | 15:57 |
KotCzarny | i think shipping something to south africa was ~5usd | 15:58 |
KotCzarny | bubble envelope ;) | 15:58 |
*** cyteen has quit IRC | 15:59 | |
*** cyteen has joined #maemo | 16:00 | |
L29Ah | received a parcel from china yesterday | 16:00 |
buZz | pm'd ;) | 16:00 |
L29Ah | a couple of wires, paid $1 for it including shipping | 16:00 |
L29Ah | i wonder if china tries to ddos the global mail system | 16:01 |
buZz | i ordered a ~250 usd electromotor from china with UPS | 16:03 |
buZz | tracking was completely nonfunctional until it was in netherlands | 16:03 |
buZz | makes me suspect they brought it as handluggage on a plane, and just ship it inside .nl | 16:03 |
buZz | to avoid customs :P (was quite effective) | 16:03 |
*** Pali has joined #maemo | 16:03 | |
*** SpeedEvil has quit IRC | 16:53 | |
*** spiiroin has joined #maemo | 16:57 | |
*** BitEvil has joined #maemo | 16:59 | |
*** xy2_ has joined #maemo | 17:06 | |
*** spiiroin has quit IRC | 17:14 | |
*** jskarvad has quit IRC | 17:17 | |
*** dmth|intevation has quit IRC | 17:29 | |
*** eMHa has quit IRC | 17:41 | |
*** eMHa has joined #maemo | 18:42 | |
*** ecc3g has quit IRC | 19:33 | |
*** Kabouik has quit IRC | 19:34 | |
*** Cor-Ai has quit IRC | 19:34 | |
*** Cor-Ai has joined #maemo | 19:36 | |
*** ecc3g has joined #maemo | 20:09 | |
*** Wikiwide has left #maemo | 20:40 | |
*** geaaru has joined #maemo | 21:04 | |
Vajb | i have a dumb question. With tish command "echo "$response * 0.1" | bc" i get the result of multiplication of my set value, but im struggling to get that script to read and use that value | 21:42 |
Vajb | this* | 21:43 |
L29Ah | $() | 21:44 |
Vajb | i've tried > $result, but i just got complain of missing directory | 21:44 |
L29Ah | google about the posix shell syntax | 21:44 |
Vajb | ok | 21:44 |
*** spiiroin has joined #maemo | 21:45 | |
ravelo | buZz: my n900 has the sim not found error | 21:52 |
ravelo | otherwise i's working | 21:52 |
KotCzarny | ret=`echo "$response * 0.1"|bc` | 21:54 |
KotCzarny | echo $ret | 21:54 |
*** xy2_ has quit IRC | 22:00 | |
Vajb | KotCzarny: sleep: invalid number '9.0' | 22:01 |
Vajb | but at least it passes the number at the right place :) | 22:01 |
KotCzarny | want good solution or hacky solution? | 22:01 |
Vajb | well i would like to understand how this works | 22:02 |
KotCzarny | some sleep versions accept floats | 22:02 |
KotCzarny | if you have busybox you can try: busybox sleep 9.0 | 22:02 |
Vajb | so it seems maemo's version doesn't | 22:02 |
ravelo | buZz, I'd like to send you mine | 22:03 |
Vajb | hmm lemme try bash | 22:03 |
Vajb | same thing with bash | 22:03 |
KotCzarny | got busybox? | 22:04 |
Vajb | ok so float number is not supported | 22:04 |
Vajb | busybox is default? | 22:05 |
Vajb | it is 1.10 | 22:05 |
KotCzarny | then try: busybox sleep 1.5 | 22:06 |
Vajb | invalid number | 22:07 |
L29Ah | all the shells are notoriously bad at floating point math | 22:09 |
L29Ah | bc is the usual savior | 22:09 |
L29Ah | or dc if you're into rpn | 22:10 |
Vajb | im reading about rounding the number in bc | 22:11 |
KotCzarny | ret=`echo "$response * 0.1"|bc|sed -e 's/\..*$//'` | 22:12 |
*** florian has joined #maemo | 22:12 | |
*** florian has joined #maemo | 22:12 | |
KotCzarny | ;) | 22:12 |
L29Ah | https://img.pr0gramm.com/2017/05/21/ae9903e0241449da.jpg | 22:12 |
KotCzarny | that's hacky solution | 22:12 |
KotCzarny | equivalent to floor() | 22:12 |
L29Ah | KotCzarny: i was about to suggest this but you need to add 0.5 to the result first | 22:12 |
KotCzarny | yup | 22:13 |
KotCzarny | ret=`echo "0.5+($response * 0.1)"|bc|sed -e 's/\..*$//'` | 22:13 |
Vajb | why 0.5 needs to be added? | 22:16 |
KotCzarny | rounding | 22:16 |
KotCzarny | otherwise you get always floor() | 22:16 |
KotCzarny | ie 0.1..0.9 -> 0 | 22:16 |
Vajb | ah | 22:16 |
Vajb | k now it works | 22:18 |
Vajb | thanks | 22:19 |
Vajb | i spent few hours trying to figure this out on my own | 22:19 |
KotCzarny | that's good, you've learned much during that time | 22:20 |
KotCzarny | even if you didnt solve it | 22:20 |
Vajb | yeah i hope :D | 22:21 |
Vajb | so, what ret is about? | 22:23 |
KotCzarny | hmm? | 22:23 |
Vajb | or it is just used as in my case? | 22:23 |
Vajb | i mean does it have other funtions or use cases | 22:23 |
Vajb | functions* | 22:23 |
KotCzarny | it's just for showing how to populate a variable | 22:24 |
Vajb | aha | 22:24 |
KotCzarny | some_variable=$( echo "0.5+($response * 0.1)"|bc|sed -e 's/\..*$//' ) | 22:24 |
KotCzarny | you can also use it directly ie: sleep $( ... ) | 22:24 |
Vajb | oh, that's cool | 22:25 |
*** xy2_ has joined #maemo | 22:32 | |
*** florian has quit IRC | 22:37 | |
*** spiiroin has quit IRC | 22:57 | |
*** spiiroin has joined #maemo | 23:09 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!