00:00:19 -!- oerjan has joined. 00:11:39 Rust 1.0.0 alpha! <-- ooh 00:11:56 Hmm 00:12:01 "cajole" doesn't look right 00:12:10 for what? 00:12:12 -!- not^v has joined. 00:12:19 oerjan, to be an English word 00:12:22 -!- not^v has quit (Client Quit). 00:12:35 But it's fine when it's spoken? 00:12:41 it looks correctly spelled to me, but of course it might be borrowed 00:13:46 cajowl 00:14:19 It's from French 00:14:51 naturally 00:15:15 it could have been spanish but then it would have been pronounced like caholey 00:16:13 It was used in English as early as 1645 00:17:49 -!- scoofy has joined. 00:21:21 Why do I have exactly the same IRC open on two different computers 00:21:34 So I can swap between the two by turning a little 00:21:43 But no-one can tell any different? 00:22:36 schrödineb 00:26:12 tough should be spelled tuff 00:26:52 I think I ought to go to bed soon 00:26:59 -!- hjulle has quit (Ping timeout: 252 seconds). 00:30:26 hmm, I guess #esoteric is an odd channel to ask this question, but it's possibly more ontopic than half the stuff that normally gets posted here? 00:30:38 the NetHack DevTeam have apparently woken up, or at least, they're asking for advice about Unicode 00:30:46 http://bilious.alt.org/rgrn/?131319 00:30:53 does anyone here have advice for them? 00:31:28 "Follow your heart!" 00:31:35 "Believe in yourself" 00:32:39 "Sleep for at least 6 hours a day" 00:32:42 On which note, goodnight 00:32:57 only 6? are you trying to kill people 00:33:03 (goodnight) 00:39:48 -!- scoofy has quit (Ping timeout: 265 seconds). 00:53:07 -!- scoofy has joined. 00:55:19 -!- Atala has joined. 00:55:26 -!- Atala has left. 00:55:45 -!- oren has quit (Ping timeout: 265 seconds). 01:01:58 -!- copumpkin has quit (Ping timeout: 244 seconds). 01:02:10 If the language is known to provide sane Unicode support, that should probably be preferred. But it's C. 01:02:17 *using that 01:04:44 -!- copumpkin has joined. 01:07:23 I think NetHack does not need Unicode especially if it can confuse the character width 01:10:42 -!- copumpkin has quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…). 01:15:32 -!- S1 has quit (Quit: S1). 01:22:12 "There are times when ipecac is unsafe. It shouldn't be given to someone who swallowed chemicals that cause burns on contact or medicines that can cause seizures very quickly. " 01:22:43 Never really thought about how the latter could contraindicate vomiting. Although apparently vomiting doesn't actually help poisoning in general? 01:22:45 -!- skj3gg has quit (Quit: ZZZzzz…). 01:22:48 http://www.poison.org/prepared/ipecac.asp 01:23:05 Or at least, not enough to make ipecac considered useful tokeep at home 01:23:46 (Saw some Reddit thread about Yahoo Answers and apparently someone answered to drink ipecac to someone who thought they were a witch, which is why I'm reading this now) 01:23:47 -!- copumpkin has joined. 01:25:05 Oh, maybe no one actually answered that, it's a hypothetical answer someone made up to someone hypothetically asking how to learn magic 01:25:55 Inspired by https://i.imgur.com/DR9rJCE.jpg which is worse 01:27:00 what if there were no hypothetical answers 01:28:27 Sgeo: it stands to reason that transformation to a different species would be by darwin award. 01:30:10 -!- glguy has joined. 01:51:40 -!- oren has joined. 01:52:59 -!- drdanmaku has joined. 01:54:51 -!- bb010g has joined. 01:56:27 -!- Sprocklem has joined. 02:00:34 -!- Tritonio has quit (Remote host closed the connection). 02:13:06 -!- Tritonio has joined. 02:15:31 [wiki] [[Sclipting]] http://esolangs.org/w/index.php?diff=41647&oldid=41599 * Oerjan * (+5) Clarify previous edit; presumably shl = shift left 02:17:53 By 2030, almost 80 percent of the ocean will be underwater. 02:19:37 -!- Sprocklem has quit (Ping timeout: 264 seconds). 02:20:00 shocking 02:20:46 -!- glguy has left ("Leaving"). 02:20:51 i guess it's good they found out how to transform into mermaids, then 02:21:49 [wiki] [[Special:Log/delete]] delete * Oerjan * deleted "[[User talk:Crewjony]]": Spam: content was: "0x29A is an esoteric programming language, invented by David Lewis in 2004 http://www.topwedding.com/cheongsam" (and the only contributor was "[[Special:Contributions/Crewjony|Crewjony]]") 02:22:11 http://www.clickhole.com/article/18-incredible-ways-world-will-change-during-your-l-1676 02:23:00 [wiki] [[Special:Log/block]] block * Oerjan * blocked [[User:Crewjony]] with an expiry time of indefinite (account creation disabled, cannot edit own talk page): Spamming links to external sites 02:24:06 i assume disabling editing own talk page is reasonable when that's what they spammed to start with 02:25:05 -!- ais523 has quit. 02:25:06 Did the bot pick up a piece of a different page? 02:25:53 it first did that, then added the spam link a while after 02:30:07 Sgeo: i vaguely suspect your link is to a humor site hth 02:30:11 -!- Solace has quit (Quit: Connection closed for inactivity). 02:30:18 although 1 and 2 might technically be true already 02:30:40 by some interpretations 02:31:18 oerjan: have you ever accomplished 2 02:31:19 6 might be half true? 02:31:41 Wait, no, oil being anything dinosaur related is a myth, I think? 02:31:50 birds do sometimes run on cars 02:31:52 shachaf: as a child i showered in a bathtub, does that count? 02:32:10 Sgeo: i'm all sorts of losing at prismata vs. the computer now :'( 02:33:00 Sgeo: http://what-if.xkcd.com/101/ 02:33:30 15 is correct according to Wikipedia 02:35:59 oerjan: neat 02:43:45 > let isP b n = (\x -> x == reverse x) $ showIntAtBase b toEnum n "" in all (`isP` 32456836304775204439912231201966254787) [2,3] 02:43:47 True 02:43:48 -!- adu has quit (Quit: adu). 02:44:04 [wiki] [[Iexp]] M http://esolangs.org/w/index.php?diff=41648&oldid=41611 * Oerjan * (+10) /* Iexo reference */ Prevent line break by using nbsp's in widest row 02:53:15 [wiki] [[Lisp2d]] http://esolangs.org/w/index.php?diff=41649&oldid=41614 * Oerjan * (-1197) wikify, and alas I don't think the example is PD 02:55:49 [wiki] [[Truth-machine]] http://esolangs.org/w/index.php?diff=41650&oldid=41618 * Oerjan * (+0) Order 02:56:10 suddenly i find myself starting to use ctrl-X... 02:58:29 [wiki] [[Hello world program in esoteric languages]] http://esolangs.org/w/index.php?diff=41651&oldid=41626 * Oerjan * (+0) Ditto 03:00:11 -!- mitchs has quit (Quit: mitchs). 03:00:25 [wiki] [[LLLL]] M http://esolangs.org/w/index.php?diff=41652&oldid=41640 * Oerjan * (+0) /* External Resources */ A capital mistake 03:02:13 -!- Bike has joined. 03:02:46 Hello, nerds. Anyone know where I can ask about doing horrible things to my motherboard firmware? 03:02:52 [wiki] [[Special:Log/move]] move * Oerjan * moved [[Calculator fuck/Example]] to [[Calculator fuck]]: This needs a main article and then a separate example article is overkill 03:02:54 How important are existential types to good abstraction? Rust seems like it has a trickier time of it, and would use its equivalent of typeclasses in a lot of places where Haskell might use existentials 03:05:18 -!- Sprocklem has joined. 03:10:57 -!- Bike has left. 03:14:52 -!- GeekDude has changed nick to GeekAfk. 03:44:22 -!- mitchs has joined. 03:45:48 -!- Tritonio_ has joined. 03:48:51 -!- Tritonio has quit (Ping timeout: 244 seconds). 03:51:21 -!- MoALTz_ has joined. 03:52:05 -!- copumpkin has quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…). 03:54:35 -!- MoALTz has quit (Ping timeout: 265 seconds). 03:54:37 -!- GeekAfk has changed nick to GeekDude. 04:03:03 -!- Tritonio_ has quit (Remote host closed the connection). 04:05:09 -!- Phantom_Hoover has quit (Ping timeout: 252 seconds). 04:06:54 -!- adu has joined. 04:17:46 -!- adu has quit (Quit: adu). 04:31:13 -!- bb010g has quit (Quit: Connection closed for inactivity). 04:48:26 -!- PinealGlandOptic has joined. 05:18:24 -!- oerjan has quit (Quit: Gah!). 05:23:52 -!- adu has joined. 05:29:26 -!- GeekDude has quit (Quit: {{{}}{{{}}{{}}}{{}}} (www.adiirc.com)). 05:30:43 -!- adu has quit (Quit: adu). 05:35:42 -!- copumpkin has joined. 05:37:25 -!- nys has quit (Quit: quit). 05:59:45 -!- vanila has joined. 06:16:33 -!- PinealGlandOptic has quit (Quit: leaving). 07:21:50 [wiki] [[Special:Log/move]] move * Esowiki201529A * moved [[Truth-machine]] to [[Talk:111]]: ignored confusing vandalism 07:22:22 umm 07:22:59 [wiki] [[Special:Log/move]] move_redir * Ehird * moved [[Talk:111]] to [[Truth-machine]] over redirect 07:24:52 Accurate edit summaries 07:26:12 [wiki] [[User talk:Esowiki201529A]] http://esolangs.org/w/index.php?diff=41657&oldid=41638 * Ehird * (+528) /* Disruptive edits */ 07:29:47 [wiki] [[User talk:Esowiki201529A]] http://esolangs.org/w/index.php?diff=41658&oldid=41657 * Ehird * (+233) /* Disruptive edits */ 07:31:49 [wiki] [[Special:Log/delete]] delete * Ehird * deleted "[[Test cyclic redirect]]": doesn't belong in article space -- feel free to use [[Esolang:Sandbox]] for things like this 07:48:54 Valid C++: fun(decltype(f) f): f(f) {} 07:50:25 Jafet: Aw, that decltype(f) doesn't refer to the f it's declaring. 07:50:29 disappointing imo 08:21:33 * int-e admires elliott's patience 08:23:13 int-e: *shrug* it's only been twice and they're making contributions clearly not intended as vandalism too 08:23:28 they are an esoteric wiki editor 08:23:33 I used to be the weird, vaguely disruptive autistic kid on the internet; I'm inclined to sympathy for behaviour that reminds me of that 08:23:49 vanila: ha 08:23:52 yeah honestly I think you rea really good, I would have smashed him immediately 08:23:59 but I think that is not good 08:24:38 haha I kind of freaked the when NSQX joined in like 2012 and I woke up to the main page having all this weird stuff on it and recent changes flooded 08:24:49 what is NSQX 08:24:53 it took me a few minutes to be like ok this isn't actually that big a deal 08:25:06 um. an editor who did really strange suff like this a few years ago 08:25:06 oh wow 08:25:50 up to, like, running an unauthorised bot to put the entirety of unicode on the wiki and then running it again from an IP after getting blocked for it. 08:25:58 I'm still pretty sure they were just misguided because they also made a bunch of random esolangs and stuff 08:26:08 oh well, administering a wiki is fun 08:26:34 oh I jsut realised their username is like 08:26:38 esowiki2015 + 0x29A 08:26:40 because of the captcha 08:26:42 good. 08:26:43 *just 08:38:29 -!- glguy has joined. 08:38:42 -!- glguy has left ("Leaving"). 09:28:48 -!- SopaXorzTaker has joined. 09:48:57 -!- FourOhFoured has joined. 10:03:33 -!- FourOhFoured has quit (Read error: Connection reset by peer). 10:08:19 @tell ais523 It occurred to me that engraving éééé should take maybe 20% longer than engraving eeee but I'm not sure if any Unicode database contains "stroke count" or "ink required" or the like 10:08:19 Consider it noted. 10:12:30 Deewiant: do you want d to take longer than . too 10:12:56 elliott: That would be the idea yes 10:13:39 this seems a bit realism-over-gameplay :P 10:14:01 Who engraves anything except Elbereth anyway :-P 10:21:58 Deewiant: The Unihan database is indexed by stroke count. 10:22:07 Deewiant: Not very useful in terms of e vs. é. 10:23:10 Yes of course the info exists for Chinese characters but you'd need all of Unicode 10:24:59 "Ink required" is probably undefined, since Unicode doesn't define the actual glyph shapes. 10:25:20 You could compute it from a reference font that best matches what you get by sampling engravings made by people in dungeons. 10:26:04 (Uh, and also covers the whole of Unicode.) 10:28:14 -!- SopaXorzTaker has quit (Ping timeout: 244 seconds). 10:31:29 The consortium has reference glyphs 10:33:05 The real question is 10:33:16 How would you implement fading letters 10:34:16 -!- burper has joined. 10:34:17 -!- burper has left. 10:36:22 From what I recall, the reference glyphs in code charts are explicitly not reference glyphs. 10:37:00 They are just "representative glyphs". 10:38:04 (I guess it's a subtle distinction.) 10:38:50 -!- burper has joined. 10:38:50 -!- burper has left. 10:40:52 "Consistency with the representative glyph does not require that the images be identical or even graphically similar; rather, it means that both images are generally recognized to be representations of the same character." (Unicode 7.0, chapter 3.3, clause D2.) 10:41:34 (From the realism perspective, I don't think they've considered dungeon-engravingness when selecting the representative glyphs.) 10:45:30 -!- burper has joined. 10:45:31 -!- burper has left. 10:46:11 is there a brainfuck benchmark site? 10:46:19 i want to see a comparison of all brainfuck implementations 10:47:55 I don't remember where the big one was. 10:48:04 There's a small one in http://esolangs.org/wiki/User:David.werecat/BFBench 10:48:41 thanks very much! :D 10:49:36 Fast brainfuck interpreter using GNU lightning 10:49:38 http://lvogel.free.fr/bf.html 10:49:41 this seems to be the winner 10:49:53 There's a bigger one that I'm sure I've seen, I think on the page of some optimizing implementation. 10:50:00 Of course given the source, that might be biased. 10:52:24 how is bf-li so much faster for mandelbrot? 10:52:27 it looks like a mistake 10:52:27 The page I've linked hasn't been updated in a while -- this was something more current. Bah, my head is a sieve. It might even have been a page on esolangs. 10:53:47 -!- Phantom_Hoover has joined. 10:54:54 MediaWiki should offer some way of searching for the pages with the biggest tables on them. 10:57:23 vanila: http://esolangs.org/wiki/User:Rdebath#Performance_Matrix here you go 10:58:04 great, thanks so much! 11:00:29 hmm i dont understand this table 11:00:54 What is "Zombie8" bitwidth 11:01:05 Comparing bf speed is tricky because I can write eg. a decompiler for c2bf specifically, then it would run c2bf-generated programs exponentially faster 11:01:06 vanila: To be honest, probably only its creator understands it. 11:01:21 Deewiant: I knew that. I don't know that. 11:01:38 Also I think it was asked on-channel. 11:02:06 Yep, by you in September 11:02:14 Yes, I see that. 11:02:23 No answer that I can see, though 11:02:59 I was sure I got an answer, but I don't see one either. 11:03:17 Maybe you just figured it out and didn't write it down 11:04:42 "The bitwidth column is the result of a cell size detecting BF program, it can fail like any other test but does not normally provide a run time. As it also runs some basic functionality tests so a major failure of this test means the interpreter is not run for the others. The test is in two parts so buggy or slow interpreters may lose the second part." 11:04:52 I may have located the program. 11:05:35 Have to go now. Good luck duplicating the work. :) 11:05:59 Unfortunately I'm not that interested and also going shortly 11:34:36 [wiki] [[Truth-machine]] http://esolangs.org/w/index.php?diff=41659&oldid=41656 * Rdebath * (+4) Page exists 11:50:18 what simple 'vm' like languages could I try to implement? 11:50:31 I have a brainfuck already 11:52:41 Befunge? 11:52:46 FALSE? 11:58:14 yeah I think false would be good! 12:02:20 [wiki] [[StackFlow]] http://esolangs.org/w/index.php?diff=41660&oldid=38324 * B jonas * (+0) typo 12:02:47 -!- stuntaneous has joined. 12:08:41 [wiki] [[StackFlow]] http://esolangs.org/w/index.php?diff=41661&oldid=41660 * B jonas * (-2) error: "inactive player" where you meant "active player" 12:21:58 -!- drdanmaku has quit (Quit: Connection closed for inactivity). 12:23:15 [wiki] [[Onecode (GermanyBoy)]] M http://esolangs.org/w/index.php?diff=41662&oldid=39748 * GermanyBoy * (-12) /* Operators */ 12:48:13 idea: instead of (a+b)*c do a+*cb 12:48:37 i call it "inside out notation" 12:53:08 xy*+*yx instead of x*x+y*y 12:55:41 hmmm... stillnot totallly ambiguous without some rules 12:56:16 [wiki] [[Talk:StackFlow]] N http://esolangs.org/w/index.php?oldid=41663 * B jonas * (+631) /* M:tG implementation */ new section 13:01:43 it doesnt make sense! 13:01:44 i'll make a wiki page 13:01:56 i've figured it out 13:02:05 13:01:43 it doesnt make sense! 13:02:06 13:01:44 i'll make a wiki page 13:02:06 hah 13:02:37 xy+*z -> y+(x*z) 13:03:11 x+*yz -> (x+z)*y 13:03:40 consider the subexpression +*y as saying multiply y by the result of + 13:04:37 then + takes its arguments from the next inside 13:05:13 that is x and z 13:07:48 now consider x---yzw the last - must be the outermost because only the first has a non-symbol argument 13:09:28 ((x-w)-z)-y 13:10:28 [wiki] [[Inside-out notation]] N http://esolangs.org/w/index.php?oldid=41664 * Orenwatson * (+318) initial explanation and examples 13:11:48 xy---zw -> (y-z)-(x-w) 13:14:08 i'm not sur whether the rule of availability of arguments would always cause the innermost operator to be the last evaluated 13:17:31 [wiki] [[Inside-out notation]] M http://esolangs.org/w/index.php?diff=41665&oldid=41664 * Orenwatson * (+125) 13:21:20 [wiki] [[Inside-out notation]] http://esolangs.org/w/index.php?diff=41666&oldid=41665 * Orenwatson * (-99) actually, not the case. see example 13:24:34 now let's build a language based on this notation! 13:29:09 something J-esque? 13:29:41 i suppose it would need to be functional... 13:35:12 -!- sebbu has joined. 13:35:49 -!- sebbu has quit (Changing host). 13:35:50 -!- sebbu has joined. 13:37:31 [wiki] [[Inside-out notation]] http://esolangs.org/w/index.php?diff=41667&oldid=41666 * Orenwatson * (+44) 13:46:40 -!- burper has joined. 13:46:41 -!- burper has left. 13:51:44 -!- SopaXorzTaker has joined. 13:51:44 -!- SopaXorzTaker has quit (Changing host). 13:51:44 -!- SopaXorzTaker has joined. 13:56:02 -!- SopaXorzTaker has quit (Read error: Connection reset by peer). 13:58:45 -!- SopaXorzTaker has joined. 14:04:41 -!- SopaXT has joined. 14:04:46 -!- SopaXT has quit (Remote host closed the connection). 14:04:46 -!- SopaXorzTaker has quit (Quit: Leaving). 14:05:07 -!- SopaXorzTaker has joined. 14:05:34 -!- oren has quit (Quit: Lost terminal). 14:16:06 -!- arjanb has joined. 14:23:52 Dang, I'm now one of those silly people who want to sort a bunch of ints really fast 14:28:25 Jafet: how large a bunch? fits in memory, or doesn't? 14:30:51 Well, as many as possible. 14:31:18 The previous run of this program resulted in a 92GB file with ~4*10^9 records 14:35:00 -!- zemhill_ has quit (Ping timeout: 276 seconds). 14:35:07 -!- zemhill_ has joined. 14:39:09 OREN 14:39:12 oren?? 14:39:24 @tell oren use http://en.wikipedia.org/wiki/Bijective_numeration 14:39:24 Consider it noted. 14:41:23 so more than would fit in the memory, ok 14:41:32 are they 64-bit integers/ 14:45:54 Yes, though I don't think that's important 14:46:24 (They're effectively ~36-bit integers.) 14:47:48 hmm, if it's 36 bits, then 92 GB has a lot of them 15:11:48 -!- boily has joined. 15:14:23 -!- drdanmaku has joined. 15:22:56 -!- oerjan has joined. 15:24:38 -!- shikhin has joined. 15:29:17 I think I figured out the simplest solution. 15:29:32 I should just go out and buy a flash drive for this. 15:29:45 -!- S1 has joined. 15:36:30 You know, without exams to worry about I am pretty darn bored 15:38:36 why don't you find a cool project to wokr on 15:39:03 I don't know 15:39:10 I think I will just read though 15:41:40 exams in January? 15:46:35 we have/had that in norway too 15:46:55 some december, some january 15:47:18 to ensure that nice christmas spirit 15:48:36 -!- vanila has quit (Quit: Leaving). 15:49:44 bleh. 15:50:07 yes, that's the common reaction i think 15:51:04 -!- GeekDude has joined. 15:57:55 -!- Tritonio has joined. 15:58:00 http://www.xorpd.net/pages/xchg_rax/snip_00.html 16:00:21 J_Arcanello. ??? 16:22:08 -!- nys has joined. 16:29:30 -!- Tritonio has quit (Remote host closed the connection). 16:29:58 -!- Tritonio has joined. 16:39:49 -!- Tritonio_ has joined. 16:42:49 -!- Tritonio has quit (Ping timeout: 244 seconds). 16:43:55 -!- Tritonio has joined. 16:44:22 -!- Tritonio_ has quit (Ping timeout: 244 seconds). 16:44:33 -!- Tritonio has quit (Remote host closed the connection). 16:45:01 96 GB is not automatically "more than would fit in the memory" these days. 16:45:32 The cluster at the university had a couple of "fat nodes" with 1TB of RAM for memory-hungry tasks. 16:45:40 fizzie: sure 16:45:42 s/96/92/ 16:45:47 given that Jafet is trying to expand an OEIS sequence, we can safely assume he _will_ run out of resources eventually. 16:46:32 And I think our January exams were mostly for those who wanted to retake something they screwed up in December. 16:59:01 I think it's still automatically "more than would fit in the memory of a PC" 16:59:12 (Haswell chipsets go up to 64GiB?) 17:01:35 oh, this is about that problem! 17:01:58 Jafet: doesn't it have a sane enough distribution that you could use a binned sort or hashing rather than a usual sort? 17:02:10 um, a bucketed sort 17:02:13 or something 17:02:25 You need RAM to do that. 17:03:02 yeah, it probably doesn't help much for an external (disk) sort over a regular merge sort 17:03:39 but even then, if you just use a few gig of ram, shouldn't some ordinary merge sort on the disk or whatever other sort run fast enough to finish in an hour? 17:05:28 Jafet: doesn't 96 GB of 36 bit numbers mean that say one in every four or eight number is present? 17:06:01 On average. (They're fairly well-distributed.) 17:06:46 Jafet: could you get a machine with 16 GB RAM and fit a bitmap of 2**36 bits in the ram? would that be enough? 17:07:05 machines with 16 GB of ram are actually accessible these days 17:07:22 I mean, borrow time on such a machine from a friend or something 17:07:25 I've already searched this space. The next search size will create ~200GB 17:07:34 Jafet: ah... 17:08:02 and that's after you've traded some of the space for time, right? because you can run this for days 17:09:04 Assuming I don't run out of disks, equal space/time is probably the optimal tradeoff on this machine 17:09:25 what does "equal space/time" mean? 17:10:08 do you mean spending about the same time for creating the tables as for the rest of the computation? 17:10:33 The algorithm searches a space of 2^n by creating a "table" of size ~2^(n/2) and matching the other 2^(n/2) half on it 17:11:14 However, the only reasonable way to implement this is to make two lists of size ~2^(n/2) and sort them, because the table doesn't fit into memory 17:11:27 ah, I see! 17:11:41 hmm, let me think 17:12:20 but they're distributed mostly uniformly, right? 17:12:32 I don't think that helps. 17:12:50 how fast is it to generate the unsorted lists? 17:13:30 As fast as the disk can write them 17:13:43 instead of sorting, could you generate the first list 100 times over and over, keeping numbers from 1/100 of the sorted list in memory, never writing anything on the disk, and after each time, generate the second list? 17:13:58 as in, would it be faster than generating both once and sorting them? 17:14:12 (or vice versa with the second disk if that's faster) 17:14:50 That would only be better if the disk is 100 times slower than memory, right? 17:15:07 Jafet: no, 17:15:17 also if the disk is 10 times slower but you need 10 passes on the disk to sort 17:16:45 and the actual numbers might come up different, because again you can keep a bitmap instead of a list of numbers, so you can keep quite a large portion of your numbers as a bitmap in memory I think 17:18:18 These are just keys, so I can't use a bitmap 17:18:31 hmm... ok 17:18:38 I dunno 17:18:56 of course, buying a faster sold state drive and ram might help as well 17:18:58 > 9e9 / (32*86e6) 17:18:59 3.270348837209302 17:19:11 The current sort uses 3 passes, apparently 17:19:32 (or 3 passes worth of disk I/O) 17:19:40 ok 17:22:02 Also memory is pretty slow if you use a lot of it. A RAM lookup is, what, 100 cycles? 17:22:34 Jafet: yes (depending on like everything), but that's the latency, the throughput is a bit better, isn't it? 17:22:51 but you can't really help using a lot of memory here 17:22:52 These are table lookups, as far as I know they are random 17:28:41 -!- AndoDaan has joined. 17:31:57 Nevermind that, apparently linux cached more than it should have 17:32:58 never mind what? 17:34:33 linux didn't swap out the file (even with ulimit -m), so the disk I/O amount was too low 17:35:01 oh, just re-create the file from scratch and measure time that way 17:36:13 As in, I expected linux to swap out the file as the program was sorting it 17:37:17 usually linux decides correctly on what to keep in memory, but if it doesn't, you can force it 17:37:31 it's just that usually you don't know better 17:37:41 your guesses are just as bad as linux's in such cases 17:38:01 Well, I want to pretend this computer has less RAM so that I can benchmark I/O efficiency on a smaller file. 17:38:27 oh, you want to pretend it has less ram continuously? 17:38:50 then start another program that allocates and mlocks lots of memory so only a little remains 17:39:06 (but then don't complain if your computer becomes slow) 17:39:28 linux I/O scheduling is taking care of that part already 17:39:46 Fun, it turns out that linux does not implement -m 17:39:51 if you just want to swap out the file once, then fadvise it 17:41:41 You mean madvise? 17:41:58 madvise or posix_fadvise 17:42:06 madvise works on mmapped regions, which may or may not be files, 17:42:37 In this case, I am sorting the file through mmap 17:42:45 posix_fadvise works on files which may or may not be mmapped 17:45:02 what about ones which neither may nor may not be files? 17:46:09 ioctl 17:48:42 -!- SopaXorzTaker has quit (Read error: Connection reset by peer). 18:13:21 @metar ENVA 18:13:22 ENVA 101750Z 10021G31KT CAVOK M02/M09 Q0967 RMK WIND 670FT 11039G51KT 18:41:56 -!- oerjan has quit (Quit: leaving). 18:51:59 -!- shikhin_ has joined. 18:54:53 -!- shikhin has quit (Ping timeout: 240 seconds). 18:56:41 https://dl.dropboxusercontent.com/u/113389132/Misc/20150104-buzzwords.jpg so buzzwordy 18:57:55 I expected a webring banner at the end 18:58:05 is that what google's working on 19:00:35 Unfortunately I am not able to comment on what Google may or may not be working on. 19:00:38 Or at least I think that's what I'm supposed to say. 19:01:02 (The photo's actually a day before I started, anyway.) 19:01:31 (It's from the Hyde Park "Winter Wonderland" thing, which had its last weekend... well, last weekend.) 19:05:14 I am increasingly unimpressed with the quality of CodeWars' Haskell exercises. 19:05:34 -!- bb010g has joined. 19:06:44 J_Arcane: Isn't it all crowdsourced? 19:07:10 The current one, for instance, appears to involve calculating the factorial of 1,000,000,000, with an execution window of 6s. 19:10:13 > 10^9 * (log (10^9) - 1) 19:10:14 1.972326583694641e10 19:10:59 Now, I think the problem can probably be simplified to only finding the relevant factors of ten, perhaps, but I'm not sure I know how to do the math there. 19:11:04 > 10^9 * (log (10^9) - 1) / log 256 19:11:06 3.556832226637162e9 19:11:58 -!- drdanmaku has quit (Quit: Connection closed for inactivity). 19:12:14 fizzie: Mostly; I think they have some inhouse people writing some as well, and there is a peer review and voting process for it though. 19:14:57 (the problem in this case is to find the number of trailing zeroes in a factorial solution, with the test cases extending up into 10-digit numbers.) 19:15:54 > minimum $ sum . map (\q -> 10^9 `div` q) . takeWhile (<=10^9) . (iterate =<< (*)) <$> [2,5] 19:15:55 249999998 19:16:11 J_Arcane: you don't have to calculate the factorial to tell how many trailign zeros it has. there's a well-known trick that makes it much easier. 19:16:39 b_jonas: Yeah, my guess was that you can just find the powers of ten in the list of factors? 19:17:39 -!- adu has joined. 19:18:38 -!- shikhin_ has changed nick to shikhin. 19:19:02 It may be easier if you try to calculate the number of zeroes at the end of (10^1000)!. 19:21:14 don't you basically just have to devide x by 5? 19:21:25 divide even 19:22:43 myname: no, by 4 approximately, I think 19:22:54 why that? 19:23:23 > sum . takeWhile (>0) . iterate(`div`5) $ 10^9 19:23:25 1249999998 19:23:39 > sum . takeWhile (>0) . tail . iterate(`div`5) $ 10^9 19:23:40 249999998 19:23:43 Yeah, apparently the trick is just counting the factors of 5. 19:30:22 The slight hitch is that 25 counts twice (because it's the product of two fives. 19:30:58 > [ last.show. sum . takeWhile (>0) . tail . iterate(`div`5) $ 10^n | n <- [0..99] ] 19:30:59 "024999899877778765556754352242002432203110901019999877860635778564586554555... 19:31:23 Jafet: well, that's why i would divide 19:31:47 ah 19:31:53 okay 19:33:24 > [ read.dropWhile(=='9').drop 2.show. sum . takeWhile (>0) . tail . iterate(`div`5) $ 10^n | n <- [3..99] ] :: [Integer] 19:33:25 [*Exception: Prelude.read: no parse 19:33:45 > [ read.dropWhile(=='9').drop 2.show. sum . takeWhile (>0) . tail . iterate(`div`5) $ 10^n | n <- [5..99] ] :: [Integer] 19:33:46 [*Exception: Prelude.read: no parse 19:33:53 read.return 19:33:54 > [ read.dropWhile(=='9').drop 2.show. sum . takeWhile (>0) . tail . iterate(`div`5) $ 10^n | n <- [7..99] ] :: [Integer] 19:33:55 [*Exception: Prelude.read: no parse 19:34:11 > [ read.('0':).dropWhile(=='9').drop 2.show. sum . takeWhile (>0) . tail . iterate(`div`5) $ 10^n | n <- [0..99] ] :: [Integer] 19:34:12 [0,0,0,0,0,0,8,0,0,8,7,7,7,7,8,7,6,5,5,5,6,7,5,4,3,5,2,2,4,2,0,0,2,4,3,2,2,0... 19:34:25 Jafet: why you no read.return? 19:34:37 :t read.return 19:34:38 Read c => Char -> c 19:35:01 return makes a String out of the Char 19:35:07 What Char? 19:35:21 hatever you put in there 19:35:24 ah 19:35:27 nvmd 19:35:42 i just start understanding what you are doing 19:36:51 -!- drdanmaku has joined. 19:39:51 Ahhh! I see what you're doing now. (mainly because I have a page open in another window explaining the 'divide by 5` now. 19:40:41 If you divide by progressive powers of five, until you get less than 1, and add the results, you get t he number of leading zeroes. 19:46:30 > let zeros n = let r = n `div` 5 in if r == 0 then 0 else r + (zeros r) in zeros 1000000000 19:46:32 249999998 19:49:39 -!- adu has quit (Quit: adu). 20:01:46 http://torrentfreak.com/chilling-effects-dmca-archive-censors-itself-150110/ 20:02:06 -!- AndoDaan has quit (Ping timeout: 264 seconds). 20:08:55 -!- adu has joined. 20:39:49 -!- reynir has changed nick to gunslinger. 20:40:08 -!- gunslinger has changed nick to reynir. 20:54:02 https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-xap1/t31.0-8/10924282_1542646042642323_7050022283664213488_o.jpg 21:12:07 -!- hjulle has joined. 21:13:54 -!- S1 has changed nick to S0. 21:25:23 -!- adu has quit (Quit: adu). 21:35:17 -!- oerjan has joined. 21:57:09 * oerjan wonders if it can get more complicated if your base isn't a product of distinct primes, like e.g. 12 = 3 * 2^2 21:57:52 also, comfort pizza 22:03:03 > let sumIDiv p 0 = 0; sumIDiv p n | p' <- div n p = p' + sumIDiv p' in sumIDiv 5 1000000000 22:03:05 Occurs check: cannot construct the infinite type: a1 ~ a1 -> a1 22:03:05 Relevant bindings include 22:03:05 p' :: a1 (bound at :1:36) 22:03:08 wat 22:03:33 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in sumIDiv 5 1000000000 22:03:35 249999998 22:03:43 anyone wants a slightly broken, used brain 22:04:33 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in [(sumIDiv 2 n `div` 2,sumIDiv 3 n)| n<-[1..]] 22:04:34 [(0,0),(0,0),(0,1),(1,1),(1,1),(2,2),(2,2),(3,2),(3,4),(4,4),(4,4),(5,5),(5,... 22:05:25 that looks pretty close 22:05:53 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in [compare(sumIDiv 2 n `div` 2)(sumIDiv 3 n)| n<-[1..]] 22:05:54 [EQ,EQ,LT,EQ,EQ,EQ,EQ,GT,LT,EQ,EQ,EQ,EQ,EQ,LT,GT,GT,EQ,EQ,GT,EQ,EQ,EQ,GT,GT,... 22:09:15 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in map (_2 ^. (last &&& length)) . groupBy((==)`on`fst)$sort[(compare(sumIDiv 2 n `div` 2)(sumIDiv 3 n),n)| n<-[1..]] 22:09:16 Couldn't match type ‘([(GHC.Types.Ordering, b1)] -> b) 22:09:16 -> Control.Applicative.Const 22:09:17 ([(GHC.Types.Ordering, b1)] -> b) 22:09:28 no way that was going to work on first try 22:11:06 what is the goal, for those arriving in medias res? 22:11:20 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in map last . groupBy((==)`on`fst)$sort[(compare(sumIDiv 2 n `div` 2)(sumIDiv 3 n),n)| n<-[1..1000]] 22:11:22 [(LT,1000),(EQ,998),(GT,971)] 22:12:10 quintopia: J_Arcane brought up the question of calculating the number of trailing zeros of n factorial 22:12:57 Yes. There's a simple solution, but it seems I've sparked an obfuscation contest by accident. ;) 22:13:11 then i thought, the method used depends on 5 being larger than 2, and each prime only occurs once as a factor of 10. 22:13:24 *occuring 22:13:55 so i wondered if it could be more complicated in a base where the smaller prime factor _doesn't_ occur just once 22:14:11 12 being the smallest example. and afaict the answer is yes 22:14:36 so the answer is just the quotient of n /5? 22:14:54 quintopia: n/5 + n/25 + n/125... 22:15:13 well yeah 22:15:19 quintopia: REcursive integer division is the easiest way. `div` by 5, then divide that by 5, etc etc until it doesn't go. 22:15:34 ah 22:15:47 so 22:15:48 > let zeros n = let r = n `div` 5 in if r == 0 then 0 else r + (zeros r) in zeros 1000000000 22:15:50 249999998 22:16:05 basically, the digital sum base 5 22:16:33 does that deserve a frying pan 22:16:49 anyway, looking in base 12 for n up to 1000 the contributions from 2 and 3 switch between dominating, even up to 971. 22:17:34 wow 22:17:41 although i think 3 does so most often 22:18:15 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in map (fmap length) . groupBy((==)`on`fst)$sort[(compare(sumIDiv 2 n `div` 2)(sumIDiv 3 n),n)| n<-[1..1000]] 22:18:16 Couldn't match type ‘(b0, b1)’ with ‘[a0]’ 22:18:16 Expected type: [a0] -> b0 22:18:16 Actual type: (b0, b1) -> b0Couldn't match expected type ‘[a0]’ 22:18:19 oops 22:18:33 what about 5 dominating? 22:18:39 I'm kind of a Lisper at heart, so I started off with a list mangling approach, ie. flip the result of n! and do takeWhile until I stop getting 0s, then count. 22:18:42 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in map (fst &&& length) . groupBy((==)`on`fst)$sort[(compare(sumIDiv 2 n `div` 2)(sumIDiv 3 n),n)| n<-[1..1000]] 22:18:43 Couldn't match type ‘[(GHC.Types.Ordering, b1)]’ with ‘(c, b0)’ 22:18:43 Expected type: [(GHC.Types.Ordering, b1)] -> c 22:18:43 Actual type: (c, b0) -> c 22:18:46 gah 22:18:54 -!- Tritonio has joined. 22:19:08 but the codewars execution window is only 6s, and one of the test cases was a ten-digit number. 22:19:23 quintopia: for 10 5 never dominates because the 2's count singly 22:19:45 i meant in bases like 20 or 40 22:20:28 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in map (fst.head &&& length) . groupBy((==)`on`fst)$sort[(compare(sumIDiv 2 n `div` 2)(sumIDiv 3 n),n)| n<-[1..1000]] 22:20:29 [(LT,228),(EQ,343),(GT,429)] 22:20:52 there you go. oh i was wrong about which dominates most often. 22:21:42 what about 5 22:21:58 lessee 22:22:07 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in map (fst.head &&& length) . groupBy((==)`on`fst)$sort[(compare(sumIDiv 2 n `div` 2)(sumIDiv 5 n),n)| n<-[1..1000]] 22:22:08 [(EQ,4),(GT,996)] 22:22:27 20 doesn't work 22:22:35 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in map (fst.head &&& length) . groupBy((==)`on`fst)$sort[(compare(sumIDiv 2 n `div` 3)(sumIDiv 5 n),n)| n<-[1..1000]] 22:22:36 [(EQ,9),(GT,991)] 22:22:36 huh 22:22:47 nor does 40 22:23:04 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in map (fst.head &&& length) . groupBy((==)`on`fst)$sort[(compare(sumIDiv 2 n `div` 4)(sumIDiv 5 n),n)| n<-[1..1000]] 22:23:06 [(LT,108),(EQ,422),(GT,470)] 22:23:15 so 80 22:23:17 ah 80 has a reasonable spread 22:23:30 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in map (fst.head &&& length) . groupBy((==)`on`fst)$sort[(compare(sumIDiv 2 n `div` 5)(sumIDiv 5 n),n)| n<-[1..1000]] 22:23:31 [(LT,986),(EQ,14)] 22:23:50 and then it gets clearcut the other way for 160 22:24:02 damn i would love to see a general result here 22:25:07 could you define "dominatr" rigorously? 22:26:11 well in general the number of zeros at the end of n! in base b is the _minimum_ of same for each prime power factor of b 22:26:22 so i'm asking which gives the most zeros 22:26:40 which is actually backwards for finding the minimum 22:26:48 ah 22:28:14 and if b = p^i, then it's the number of zeros for p divided by i, naturally 22:28:40 so for so. 22:28:52 and for a prime base you calculate it by the iterated division trick 22:28:59 okay yeah i get it 22:30:03 so presumably the sumIDiv function is "jumpy" in a way that allows different bases to overtake each other by not too large constant multiples 22:30:30 probably involving a logarithm somewhere... 22:31:54 lessee 22:32:06 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in map (fst.head &&& length) . groupBy((==)`on`fst)$sort[(compare(sumIDiv 2 n `div` 4)(sumIDiv 5 n),n)| n<-[1..10000]] 22:32:07 [(LT,803),(EQ,3068),(GT,6129)] 22:32:58 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in map last . groupBy((==)`on`fst)$sort[(compare(sumIDiv 2 n `div` 4)(sumIDiv 5 n),n)| n<-[1..10000]] 22:33:00 [(LT,10000),(EQ,9981),(GT,9999)] 22:33:19 ok LT is rarer, but never completely extinct 22:38:55 ah they're both n/4 - O(log n). 22:45:38 um 22:46:19 -!- Solace has joined. 22:46:42 ok so 1/p + 1/p^2 + ... = 1/(1-1/p) - 1 = p/(p-1) - 1 = 1/(p-1) 22:47:24 ;-; 22:47:28 so indeed for 5, approximately division by 4, for 3, approximately division by 2, for 2, approximately the original 22:47:58 oerjan: "they" were base 16 and 5, specificially, as in your last example. 22:48:12 (or 10) 22:48:16 int-e: it works to explain both 12 and 80 which were tested 22:48:31 to have constant fluctuations 22:49:16 well for 12 you have that both 3 and 4 are n/2 - O(log n), presumably 22:50:04 this means it might be a more fragile phenomenon than i suspected 22:50:15 ah, that's what you did there. 22:50:19 there will probably be _no_ combination with 7 which works 22:50:52 What are you persons talking about 22:51:04 oerjan: 49*13? 22:51:22 int-e: i meant with the primes 2,3 and 5 22:51:29 but yeah that should work 22:51:49 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in map last . groupBy((==)`on`fst)$sort[(compare(sumIDiv 7 n `div` 2)(sumIDiv 13 n),n)| n<-[1..10000]] 22:51:49 why wouldnt 7 work 22:51:50 [(LT,9841),(EQ,10000),(GT,9996)] 22:51:52 also things like 7*3^3 22:52:08 int-e: oh right duh 22:52:12 2^n gives you 1/n. 22:52:35 quintopia: i wasn't thinking, you can always adjust the exponent to match 22:53:06 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in map last . groupBy((==)`on`fst)$sort[(compare(sumIDiv 3 n `div` 3)(sumIDiv 7 n),n)| n<-[1..10000]] 22:53:07 [(LT,9998),(EQ,10000),(GT,9995)] 22:53:46 oh that's last found, not amount. oh well good enough probably 22:53:47 What am I looking at. And where can I learn it? 22:54:22 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in map (last &&& length) . groupBy((==)`on`fst)$sort[(compare(sumIDiv 3 n `div` 3)(sumIDiv 7 n),n)| n<-[1..10000]] 22:54:23 [((LT,9998),691),((EQ,10000),4046),((GT,9995),5263)] 22:54:34 i also dont see how 2^3 gives n/4 22:54:41 > let sumIDiv p 0 = 0; sumIDiv p n | n' <- div n p = n' + sumIDiv p n' in map (last &&& length) . groupBy((==)`on`fst)$sort[(compare(sumIDiv 3 n `div` 3)(sumIDiv 7 n),n)| n<-[10001..20000]] 22:54:43 [((LT,19943),1025),((EQ,20000),3272),((GT,19998),5703)] 22:54:45 Solace: the code is in haskell, although we're using it to calculate final zeroes of factorials in strange bases 22:54:49 erm 2^4 22:55:00 Oh 22:55:08 quintopia: it gives n/6, just like 7. 22:55:25 lol well I've heard of that But I kinda gave up on haskell last week. 22:55:26 err 22:55:37 sorry, messed that up. 22:55:45 quintopia: you need to count factors of 2^4 22:55:52 Solace: haskell is a language many people give up on. some try again later until they get it. 22:56:06 quintopia: which is the same as counting factors of 2 (and you get n - O(log n) of those), and then dividing by 4. 22:56:10 * Solace is taking a break 22:56:32 For like maybe a month I Want to try something else 22:56:42 Or just take a vacation from coding 22:57:29 quintopia: (the n/p + n/p^2 + ... formula relies on p being a prime.) 22:58:57 huh 22:59:01 Also lots of Divs and im no where near that level of Haskelling oerjan I'm still getting stuff to print messages 23:00:59 -!- Tritonio_ has joined. 23:02:01 -!- Tritonio has quit (Ping timeout: 265 seconds). 23:02:07 Solace: div is integer division. we're doing number theory after all. 23:02:24 I know 23:02:36 -!- AndoDaan has joined. 23:02:40 I'm just saying a lot of divisiob in there 23:02:50 division* 23:04:18 > nubBy(((>1).).gcd)[2..] -- obligatory haskell chestnut 23:04:20 [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,... 23:04:37 wtf nubBy 23:05:03 myname: we discussed yesterday how that is technically not guaranteed portable 23:05:15 > (zip`ap`tail)[1..] 23:05:16 [(1,2),(2,3),(3,4),(4,5),(5,6),(6,7),(7,8),(8,9),(9,10),(10,11),(11,12),(12,... 23:05:33 because nubBy is supposed take an equivalence relation as argument 23:05:37 *+to 23:06:33 but at least (((>1).).gcd) is symmetric and hence robust against differences between ghc's implementation and the Haskell language report. 23:06:46 > fix(scanl(+)0.(1:)) -- other obligatory chestnut 23:06:47 [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,... 23:07:02 int-e: yeah 23:07:31 @quote zip`ap 23:07:32 quicksilver says: zip`ap`tail the aztec god of consecutive numbers 23:09:45 > let f = nubBy(((>1).).gcd) in f[6,5..2] 23:09:46 [6,5] 23:10:10 int-e: hm the O(log n) comes just from the rounding down of division, right 23:10:12 > let f = nubBy(((>1).).gcd) in f[2..6] 23:10:13 [2,3,5] 23:10:26 mpiler verbietet 23:10:33 damn lag 23:11:20 oh hm 23:11:43 and for powers of p that adjustment becomes O(1) instead 23:12:22 while for powers of p-1, you get a maximal discrepancy. 23:12:37 ... err 23:12:42 (powers of p)-1 23:12:51 that explains those frequent 9999 and 10000 in my tests above 23:13:59 and that should be enough to imply that if b = p^i * q^k has the right asymptotics to fluctuate in which prime dominates, then it will 23:14:22 i.e. if 1/i(p-1) == 1/k(q-1) 23:15:04 * oerjan suddenly feels sinful for not putting extra parens on the denominators 23:15:29 let's pretend it was p^k * q^i ;-) 23:15:38 gah 23:17:45 -!- AndoDaan has quit (Quit: bbl). 23:17:55 mind you giving / a lower precedence is perfectly logical 23:19:16 or giving juxtaposition a higher precedence than * 23:20:16 In practice, on IRC, I treat 1/ab as ambiguous. 23:24:44 -!- GeekDude has changed nick to GeekAfk. 23:35:33 Heresy can now do recursive lambdas. 23:44:00 -!- arjanb has quit (Quit: zzz). 23:51:55 -!- adu has joined.