--- Log opened Thu Dec 10 00:00:27 2015 |
00:21 | | Turaiel[Offline] is now known as Turaiel |
00:24 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
00:24 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
00:25 | | Meatyhandbag [sebastianfe@Nightstar-8gp.3s1.224.136.IP] has quit [Client exited] |
00:56 | | catadroid` [catalyst@Nightstar-m1vnh4.dab.02.net] has joined #code |
00:58 | | catadroid [catalyst@Nightstar-c6s3d5.dab.02.net] has quit [Ping timeout: 121 seconds] |
01:12 | | Derakon [chriswei@Nightstar-5mvs4e.ca.comcast.net] has joined #code |
01:12 | | mode/#code [+ao Derakon Derakon] by ChanServ |
01:35 | | mode/#code [-bbbbb *!*h@*.rev.poneytelecom.eu wowaname!*@*.* *!*@*.grem.ru *!*@*.ip-92-222-38.eu *!*@wowana.me] by macdjord |
01:50 | <&Derakon> | Anyone know how many times I need to swap two values from a length-5 list before the list is randomized? |
01:52 | | Vornotron [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
01:53 | | * Derakon repeats for Vorn's benefit. |
01:53 | <&Derakon> | Anyone know how many times I need to swap two values from a length-5 list before the list is randomized? |
01:55 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
01:59 | <@Alek> | well, it may depend on which values you're swapping - if you're just constantly swapping the same ones, infinity won't be enough. >_> |
02:00 | <@[R]> | Derakon: http://blog.codinghorror.com/the-danger-of-naivete/ |
02:00 | <&McMartin> | Derakon: Don't shuffle that way |
02:00 | <&McMartin> | The shuffling algo is something like: |
02:01 | <&McMartin> | for i = 0 to n-1 |
02:01 | <&Derakon> | R: not the same algo I'm proposing. |
02:01 | <&McMartin> | randomly swap ith element with random(0..i)th element |
02:01 | <&Derakon> | I'm talking "pick i at random; pick j at random, j != i; swap values at i and j". |
02:01 | <&McMartin> | Right |
02:01 | <&McMartin> | And Alek is saying "if you keep getting the same values on i and j, never" |
02:01 | <&McMartin> | That's why you make each target be written once; O(n) and a perfect shuffle. |
02:02 | | Vornotron is now known as Vornicus |
02:02 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
02:02 | <@[R]> | Derakon: I suspect you're XY problem'ing hard. |
02:02 | <&Derakon> | Ehh, no. |
02:02 | <&Derakon> | McM's reasonably right. |
02:02 | <&Derakon> | And my actual problem really is "I want to randomize a length-5 list as lazily as possible"~ |
02:03 | <~Vornicus> | random.shuffle(list) |
02:03 | <&Derakon> | I mean, the list is the statistics of a character in Angband. |
02:03 | <&Derakon> | So I can't use Python. :( |
02:03 | <@[R]> | Fisher-Yates |
02:03 | <&Derakon> | I was just hoping to be able to do it by slapping a for loop onto the existing "swap two stats at random" code. |
02:03 | <&McMartin> | A thousand will probably do, but really, the algo I gave is not very hard. |
02:04 | <&Derakon> | Yeah. |
02:05 | <&McMartin> | The other nice bit of it is that it builds on itself, so you're shuffling the first N elements all the way up |
02:08 | <@Alek> | actually, why force i/=j? |
02:09 | | * Vornicus hms |
02:09 | <&Derakon> | In the original code I was looking at? |
02:09 | <&Derakon> | Because when a nexus attack swaps your stats, you shouldn't come out identical to how you were when you went in. |
02:19 | <@Alek> | mm. still a chance for it to happen anyway, I think. |
02:21 | <&Derakon> | If you pick two distinct values and swap them once then the player is guaranteed to be modified somehow. |
02:21 | <&Derakon> | If you do this iteratively then there is a chance that the random state you end up matches your starting state though, yes. |
02:31 | <~Vornicus> | Oh. |
02:31 | <~Vornicus> | shit, duh |
02:31 | <~Vornicus> | It will *never* be in a situation you can call it fully shuffled |
02:32 | <~Vornicus> | Because after n swaps, it will be an even permutation if n is even, and an odd permutation if n is odd. |
02:33 | <~Vornicus> | So after any defined number of swaps, only at most half of the possible permutations will be possible. |
02:45 | <~Vornicus> | (note: if you don't force i != j it will eventually be indistinguishable from a real shuffle but why would you do that) |
02:50 | | * Derakon does some tests with his new stat scrambler, accidentally ends up with a warrior with a WIS score of -12920 and a CON of -4726. |
02:56 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
02:56 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
02:56 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
03:01 | <@macdjord> | Derakon: A mote of dust lands on you. *YOU DIE* |
03:19 | | ion [Owner@Nightstar-gmbj85.vs.shawcable.net] has quit [Ping timeout: 121 seconds] |
03:22 | <&Derakon> | I think at that point your own circulatory system rips your body apart with each heartbeat. |
03:40 | | ion [Owner@Nightstar-gmbj85.vs.shawcable.net] has joined #code |
04:35 | | Turaiel is now known as Turaiel[Offline] |
04:39 | | Reiv_ [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds] |
05:05 | | Derakon is now known as Derakon[AFK] |
05:17 | <@Alek> | ha, no. your own neural impulses electrocute you. >_> |
05:39 | | mode/#code [+v catadroid`] by macdjord |
05:41 | | mode/#code [-m] by macdjord |
05:53 | | * Vornicus pokes catalyst until she registers her nick |
06:05 | | Crossfire [Z@Nightstar-pdi1tp.customer.tdc.net] has quit [Ping timeout: 121 seconds] |
06:23 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
06:36 | | celticminstrel [celticminst@Nightstar-uce74q.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
06:38 | <+catadroid`> | :e |
07:26 | | catadroid [catalyst@Nightstar-gp2lu7.dab.02.net] has joined #code |
07:29 | | catadroid` [catalyst@Nightstar-m1vnh4.dab.02.net] has quit [Ping timeout: 121 seconds] |
07:31 | | catadroid [catalyst@Nightstar-gp2lu7.dab.02.net] has quit [[NS] Quit: Bye] |
08:08 | | Kindamoody is now known as Kindamoody|afk |
09:28 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Ping timeout: 121 seconds] |
11:46 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
11:52 | <@abudhabi> | Any regex wizards around? |
11:53 | <@abudhabi> | I need to match a string like: "sometext:number:UUID". |
11:53 | <@abudhabi> | sometext is static, UUID is a standard UUID that Java generates. |
11:53 | <@abudhabi> | number is an integer. |
11:55 | <@abudhabi> | Nevermind! By the amazing process of randomly replacing various bits, I found something that works. |
12:14 | <&ToxicFrog> | Should just be /sometext:\d+:\x{8}-\x{4}-\x{4}-\x{4}-\x{12}/ |
12:14 | <&ToxicFrog> | Where \x is actually [0-9a-fA-F], I just didn't want to type that out each time. |
12:28 | <&McMartin> | ToxicFrog: I poked a tiny bit at KDE Plasma 5, incidentally, and it looks much more like a desktop I can guess how to use than whatever it was I used before (possibly KDE4 pre-Plasma 4?) |
12:32 | <&ToxicFrog> | My money would be on pre-plasma KDE4 or maybe KDE3, yeah |
12:33 | <&ToxicFrog> | I vaguely remember KDE2 being Like Gnome But Uglier and then KDE3 just going completely off the rails |
12:33 | <&ToxicFrog> | I still don't understand the KDE "activity" stuff -- I think it's predefined sets of applications or something like that? -- but I also haven't had to touch it at all, so. |
12:49 | | You're now known as TheWatcher[d00m] |
12:56 | <@gnolam> | KDE3 was the good one. The one that was intuitive and actually usable. |
12:56 | | catadroid [catalyst@Nightstar-cvonm9.dab.02.net] has joined #code |
12:57 | <@Tamber> | kde4.0 was the "ooh shiny" rewrite that didn't really have any substance, right? |
12:57 | <@gnolam> | Yeap. |
12:57 | <@gnolam> | Threw all the usability out the window for shininess and shit like "integrated microblogging". |
12:57 | <@gnolam> | And where shininess == zero understanding of contrast. |
12:59 | <@gnolam> | "You want to be able to distinguish one interface element from another? And to see what you can interact with and what you can't? What on Earth for?" |
12:59 | <&ToxicFrog> | Aah, ok, I had an off-by-one |
13:56 | | catadroid` [catalyst@Nightstar-6qgfp0.dab.02.net] has joined #code |
13:59 | | catadroid [catalyst@Nightstar-cvonm9.dab.02.net] has quit [Ping timeout: 121 seconds] |
14:00 | | You're now known as TheWatcher |
16:23 | | Emmy is now known as Emmy-afk |
17:30 | | catadroid` is now known as catadroid |
17:40 | | Emmy-afk is now known as Emmy-Noms |
17:55 | | Crossfire [Z@Nightstar-ev6.6um.94.83.IP] has joined #code |
17:55 | | mode/#code [+o Crossfire] by ChanServ |
17:59 | | Crossfire [Z@Nightstar-ev6.6um.94.83.IP] has quit [Connection closed] |
17:59 | | Crossfire [Z@Nightstar-ev6.6um.94.83.IP] has joined #code |
17:59 | | mode/#code [+o Crossfire] by ChanServ |
18:16 | | Emmy-Noms is now known as Emmy |
18:46 | | celticminstrel [celticminst@Nightstar-uce74q.dsl.bell.ca] has joined #code |
18:46 | | mode/#code [+o celticminstrel] by ChanServ |
18:46 | | Kindamoody|afk is now known as Kindamoody |
18:54 | | Crossfire [Z@Nightstar-ev6.6um.94.83.IP] has quit [Ping timeout: 121 seconds] |
18:55 | | Crossfire [Z@Nightstar-ev6.6um.94.83.IP] has joined #code |
18:55 | | mode/#code [+o Crossfire] by ChanServ |
19:01 | | gizmore [kvirc@Nightstar-qvrd5r.dip0.t-ipconnect.de] has joined #code |
20:27 | | catadroid` [catalyst@Nightstar-8ba46f.dab.02.net] has joined #code |
20:30 | | catadroid [catalyst@Nightstar-6qgfp0.dab.02.net] has quit [Ping timeout: 121 seconds] |
20:45 | | catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code |
20:46 | | catadroid` [catalyst@Nightstar-8ba46f.dab.02.net] has quit [[NS] Quit: Bye] |
21:07 | | Crossfire [Z@Nightstar-ev6.6um.94.83.IP] has quit [Ping timeout: 121 seconds] |
21:47 | | Crossfire [Z@Nightstar-pdi1tp.customer.tdc.net] has joined #code |
21:48 | | mode/#code [+o Crossfire] by ChanServ |
22:08 | | gizmore [kvirc@Nightstar-qvrd5r.dip0.t-ipconnect.de] has quit [[NS] Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/] |
22:09 | | Alek [Alek@Nightstar-n7s.4qg.15.24.IP] has quit [Connection closed] |
22:14 | | Alek [Alek@Nightstar-n7s.4qg.15.24.IP] has joined #code |
22:14 | | mode/#code [+o Alek] by ChanServ |
22:25 | | Emmy is now known as Emmy-zZz |
22:34 | | Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code |
22:34 | | mode/#code [+o Reiv] by ChanServ |
22:47 | | macdjord is now known as macdjord|out |
22:48 | | Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
22:49 | | Syloq [Syloq@Nightstar-hco.fem.152.204.IP] has joined #code |
22:49 | | mode/#code [+o Syloq] by ChanServ |
22:54 | | Kindamoody is now known as Kindamoody[zZz] |
23:01 | | * McMartin notices something from an Ars Technica comment |
23:01 | <&McMartin> | This is still sourced via "a comment on the Internet", but I didn't hear about this case |
23:01 | <&McMartin> | "I mean, we are talking about a website where tens of thousands of users misidentified a blog post about Facebook as the Facebook login page and posted their account name and password as comments on the blog (along with complaints that they don't like the new design) because it was the top Google result for "facebook login"." |
23:01 | <@Tamber> | Honestly, that wouldn't surprise me. :( |
23:02 | <&McMartin> | Yeah, that's partly why I'm suspicious~ |
23:22 | | catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: ] |
23:28 | <@Reiv> | ?? |
23:31 | | catadroid [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code |
23:49 | <&McMartin> | Reiv: Which bit? |
23:50 | <@Reiv> | Why are you suspicious |
23:52 | <&McMartin> | It smacks of a story that is, as they say, "too good to check" |
23:58 | <@Reiv> | ah yes |
--- Log closed Fri Dec 11 00:00:44 2015 |