IRC log of #maemo for Wednesday, 2019-07-10

*** povbot has joined #maemo10:11
*** eMHa__ has joined #maemo10:20
*** florian has joined #maemo10:25
*** Kabouik has joined #maemo10:33
*** geaaru has joined #maemo10:41
*** Venemo has joined #maemo10:44
*** eMHa__ has quit IRC11:05
*** eMHa__ has joined #maemo11:09
*** jskarvad has joined #maemo11:52
*** Kabouik has quit IRC12:52
*** Oksana_ has joined #maemo13:13
*** Oksana_ has quit IRC13:14
*** Oksana_ has joined #maemo13:14
*** LauRoman has quit IRC13:41
*** LauRoman has joined #maemo13:42
*** cyteen has joined #maemo13:43
*** idwrqd has joined #maemo14:06
*** saidinesh5 has quit IRC14:14
*** saidinesh5 has joined #maemo14:14
*** troulouliou_div2 has joined #maemo14:16
*** Cor-Ai has quit IRC14:32
*** Cor-Ai has joined #maemo14:34
*** idwrqd has quit IRC14:38
*** idwrqd has joined #maemo14:39
*** Kabouik has joined #maemo14:40
*** xes has quit IRC14:42
*** idwrqd has quit IRC14:45
*** idwrqd has joined #maemo14:47
*** idwrqd has quit IRC14:48
*** idwrqd has joined #maemo14:48
*** xes has joined #maemo14:49
*** idwrqd has quit IRC14:49
*** Cor-Ai has quit IRC14:49
*** idwrqd has joined #maemo14:50
*** idwrqd has joined #maemo14:51
*** idwrqd has joined #maemo14:54
*** xes has quit IRC14:54
*** idwrqd has quit IRC14:54
*** idwrqd has joined #maemo14:55
*** idwrqd has joined #maemo14:55
*** idwrqd has quit IRC15:00
*** saidinesh5 has quit IRC15:08
*** saidinesh5 has joined #maemo15:09
sixwheeledbeastcan random be used in a loop on the shell without having the same number come up15:15
KotCzarny?15:17
KotCzarnytry: echo $RANDOM15:17
KotCzarnyworks in bash15:17
sixwheeledbeastto avoid xy I need to pull a random list of say 50 integers from a pool of 01-99 . I beleive RANDOM will repeat them if in a loop15:17
KotCzarnyit returns 0-32767 i think15:17
KotCzarnyup to you to scale it to range you need15:18
sixwheeledbeasti want no duplicates15:18
KotCzarnythats not random then15:18
KotCzarnywhat you need is to create an array with 99 elements, then shuffle it15:18
sixwheeledbeastwell I suppose so but that's what i am looking for15:18
sixwheeledbeasti see is array the best way you think?15:19
KotCzarnyotherwise you have to keep different array with 'used' numbers anyway15:19
KotCzarnyand having to scan through it on every new return15:19
sixwheeledbeastI suppose so. I didn't think of it like that. i was hoping for a shell function already there :)15:20
KotCzarnyi havent seen such functionality in bash15:21
KotCzarnyanyway, your problem is 'shuffle deck of cards then deal them'15:21
KotCzarnytaught in schools often15:21
KotCzarnyso there should be lots of examples for different languages15:22
sixwheeledbeastnp array it is then. school?15:22
KotCzarnyya, it10115:22
sixwheeledbeastschool is long behind me we where lucky to have working ones in my era15:23
KotCzarnybut as i've said, google: deal shuffled deck of cards in bash15:23
Maxdamantusor a more interesting way of looking at it: find an information densitity preserving encryption, and encrypt all possible inputs in a predictable sequence.15:26
KotCzarnyor basically: shuffle in bash15:27
Maxdamantusbasically, encrypt(0), encrypt(1), encrypt(2), .. encrypt(n)15:27
sixwheeledbeastyep i am waiting for something to render so can't open a browser at the moment, hence I thought I'd ask the question having used random before.15:27
KotCzarnyswb: but it's better to use any scripting lang, perl/php/python15:27
KotCzarnywhichever you are best in15:28
KotCzarnyat some point you will have to switch to it when adding functionality15:28
Maxdamantusanyway, if you want a sequence of numbers in a random order: seq 99 | sort -R | head -5015:28
KotCzarnywow15:29
sixwheeledbeastonly ever used bash for most things but i can have a look in python if necessary.15:29
KotCzarnyi forgot sort has shuffle15:29
Maxdamantus(`seq 99` is a bit weird; I suspect what you really want is either `seq 0 99` or `seq 100`, which both emit 100 numbers (`seq 99` emits 99 numbers))15:29
sixwheeledbeastoh useful ty :)15:30
KotCzarnyseq -f '%02.0f' 1 99|sort -R15:30
KotCzarnydone15:30
KotCzarnyif you want only 50 of them, add |head -5015:31
sixwheeledbeastoh i see you have used the format flag to have 2sf nice15:33
*** Cor-Ai has joined #maemo16:13
*** Venemo has quit IRC16:20
*** saidinesh5 has quit IRC16:30
*** saidinesh5 has joined #maemo16:30
*** Venemo has joined #maemo17:02
*** cyteen_ has joined #maemo17:10
*** cyteen has quit IRC17:11
*** troulouliou_div2 has quit IRC17:13
*** cyteen__ has joined #maemo17:17
*** cyteen_ has quit IRC17:18
*** Oksana__ has joined #maemo17:20
*** Oksana__ has quit IRC17:21
*** Oksana__ has joined #maemo17:21
*** Oksana_ has quit IRC17:24
*** Oksana__ is now known as Oksana_17:24
*** cyteen_ has joined #maemo17:25
*** saidinesh5 has quit IRC17:25
*** saidinesh5 has joined #maemo17:26
*** cyteen__ has quit IRC17:27
*** Oksana_ is now known as Oksana17:28
*** remarc has joined #maemo17:50
*** remarc_ has joined #maemo17:51
*** remarc has quit IRC17:55
*** saidinesh5 has quit IRC18:20
KotCzarnyMangy_Dog: pink screen on hdmi means hdmi pixel format failed18:20
KotCzarnyerm, wrong chan18:20
*** saidinesh5 has joined #maemo18:20
*** remarc__ has joined #maemo18:25
*** remarc_ has quit IRC18:28
*** remarc_ has joined #maemo18:32
*** remarc__ has quit IRC18:36
*** remarc has joined #maemo18:43
*** remarc_ has quit IRC18:47
*** remarc_ has joined #maemo18:50
*** remarc has quit IRC18:53
*** remarc_ has quit IRC19:04
*** remarc has joined #maemo19:08
*** remarc_ has joined #maemo19:12
*** saidinesh5 has quit IRC19:14
*** saidinesh5 has joined #maemo19:14
*** remarc__ has joined #maemo19:15
*** remarc has quit IRC19:16
*** idwrqd has joined #maemo19:16
*** remarc_ has quit IRC19:19
*** remarc__ has quit IRC19:21
*** remarc__ has joined #maemo19:22
*** remarc_ has joined #maemo19:30
*** remarc__ has quit IRC19:34
*** remarc__ has joined #maemo19:41
*** saidinesh5 has quit IRC19:41
*** saidinesh5 has joined #maemo19:41
*** remarc_ has quit IRC19:44
*** remarc_ has joined #maemo20:02
*** remarc has joined #maemo20:05
*** remarc__ has quit IRC20:06
*** remarc__ has joined #maemo20:06
*** remarc_ has quit IRC20:08
*** remarc has quit IRC20:10
*** remarc has joined #maemo20:12
*** remarc__ has quit IRC20:13
*** Kabouik has quit IRC20:14
*** eMHa__ has quit IRC20:20
*** remarc_ has joined #maemo20:22
*** remarc__ has joined #maemo20:23
*** eMHa__ has joined #maemo20:25
*** remarc has quit IRC20:25
*** remarc_ has quit IRC20:27
*** florian has quit IRC20:30
*** saidinesh5 has quit IRC20:35
*** saidinesh5 has joined #maemo20:35
*** jskarvad has quit IRC20:37
*** tm has quit IRC20:50
*** Pali has joined #maemo20:51
*** Venemo has quit IRC20:57
*** tm has joined #maemo21:00
*** remarc__ has quit IRC21:03
*** remarc has joined #maemo21:11
*** remarc_ has joined #maemo21:13
*** remarc has quit IRC21:16
*** remarc__ has joined #maemo21:16
*** florian has joined #maemo21:19
*** remarc_ has quit IRC21:20
*** remarc has joined #maemo21:29
*** saidinesh5 has quit IRC21:29
*** saidinesh5 has joined #maemo21:30
*** remarc__ has quit IRC21:32
*** remarc has quit IRC21:39
*** remarc has joined #maemo21:42
*** parazyd has quit IRC21:58
*** parazyd has joined #maemo22:00
*** parazyd has joined #maemo22:00
*** Kabouik has joined #maemo22:03
*** remarc has quit IRC22:17
*** remarc has joined #maemo22:18
*** remarc has quit IRC22:27
*** eMHa__ has quit IRC22:47
*** xmn has joined #maemo23:08
*** TheKit has quit IRC23:12
*** TheKit has joined #maemo23:14
*** LauRoman has quit IRC23:22
*** LauRoman has joined #maemo23:23

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