00:00:03 I don't really like the way that pattern match failure can be caught in IO in Haskell. It should be a macro that changes a function to one resulting in IO and raising the proper exceptions for that, it makes more sense mathematically, this way, to me, at least 00:00:04 quintopia: oh hm reading the wp page, i doubt that. 00:00:27 * elliott would be happy with `class MonadZero m { where mzero :: m a; mzero = mfail (error "mzero"); mfail :: a -> m b; mfail _ = mzero }`. 00:00:41 shachaf: I don't want to give the same treatment to Nothing, though. 00:00:42 That's just wrong. 00:01:00 To Nothing? 00:01:19 You mean Maybe a = Nothing (exists b. b) | Just a? 00:01:21 Right. 00:01:29 That's how you told me about it. 00:01:31 How can it be wrong when it feels so right? 00:01:34 Right. 00:01:35 You mean Maybe a = Nothing (exists b. b) | Just a? 00:01:39 Maybe nothing exists? 00:01:49 Maybe nothing exists, just a. 00:01:51 Phantom_Hoover: FAR OUT, DUDE 00:01:58 What if, like, NOTHING EXISTED 00:02:02 Thus objectivism. 00:02:13 a=a 00:02:14 a=_|_ 00:02:19 Everything is bottom. 00:02:40 elliott: The real solution is to have GHC give that treatment to everything. 00:02:49 So any constructor has a hidden field for storing an optional _|_. 00:03:04 shachaf: You know, I might not object to 00:03:10 hide :: String -> a -> a 00:03:14 seek :: a -> IO (Maybe String) 00:03:23 :-( 00:03:26 I mean... it would work. 00:03:30 :-( 00:03:34 (It wouldn't.) 00:03:42 (Because it's not preserved under .) 00:04:00 (The trick for mfail works specifically because you have to pack it manually in your type.) 00:04:03 (So your (>>=) handles it.) 00:04:09 Right. 00:04:19 I... kind of support this solution now. 00:04:23 I wasn't expecting that to happen. 00:04:33 elliott: No you don't. 00:04:45 I mean, you like to think you do. But if you thought about it some more I'm sure you wouldn't. 00:04:45 But I kind of do? 00:05:00 Well, can *you* come up with a decent argument against it? 00:05:27 Other than "it's evil"? 00:05:40 shachaf: It's as evil as error and asynchronous exceptions. 00:05:54 That's a pretty low level of evil for Haskell. 00:06:14 Hmph. 00:06:32 Well, it has a certain charm to i. 00:06:44 That charm is imaginary. 00:06:45 Why don't you go propose it in #haskell? 00:06:55 ...Maybe later. 00:07:15 Why don't you write a proposal on SO? 00:07:17 I mean, I might think it's a good idea, but I'm also sane enough to know everyone will think I'm crazy. 00:07:18 Oh, wait. 00:07:34 shachaf: No discussion allowed, dude! You have to phrase it as "Would this be a good idea?". 00:07:38 And hope it's not closed for being non-constructive. 00:08:21 elliott: THOSE INTUITIONIST FASCISTS. 00:08:50 Huh, Google has one result for "intuitionist fascist". 00:08:57 -!- Klisz has quit (Quit: SLEEP, GLORIOUS SLEEP). 00:09:19 is it a band name 00:09:30 http://www.jstor.org/pss/1953935 00:09:31 riveting 00:09:57 elliott: It's just too abstract for you. 00:10:00 You can't handle it. 00:12:18 * Phantom_Hoover → sleep 00:12:19 -!- Phantom_Hoover has quit (Quit: Leaving). 00:12:37 shachaf: Did you actually sleep? 00:12:44 You said you were going to and then reappeared. 00:13:00 I did sleep! 00:13:31 Oh. 00:13:39 -!- zzo38 has quit (Remote host closed the connection). 00:15:48 quintopia: oh i have a hunch what your problem is. you may be confusing the polynomial and the arithmetic hierarchy. 00:16:21 being inside PSPACE applies to the former, being undecidable and stuff applies to the latter. 00:16:30 oh my god Acme::Comment 00:16:34 has so many comment styles... 00:16:34 shachaf: Can you make Stack Overflow's rankings update quicker? 00:16:37 that you can use. 00:16:43 it has unlambda comments 00:17:20 elliott: Well, I have insider information on what the rankings will be like on the next update. 00:17:26 RANKINGS: 00:17:29 #1 ehird 00:17:43 It stops there. 00:17:44 shachaf: Already is on at least one ranking: http://stackoverflow.com/tags/haskell/topusers 00:18:10 and while both can be thought of as alternating quantifiers, and so may have an algorithm such as tarski-kuratowski applies to them, they do it in a different way. iirc, in the polynomial hierarchy you want all the variables to be polynomially _bounded_, while in the arithmetic hierarchy bounded quantification is ignored. 00:18:10 http://stackoverflow.com/tags/monads/topusers 00:18:29 congratulations 00:18:45 * elliott is nomadic. 00:19:29 http://stackoverflow.com/tags/higher-rank-types/topusers 00:19:38 elliott: Man, you're just winning that popularity contest. 00:20:10 shachaf: Yessss 00:20:21 *applied 00:20:44 elliott: World Expert in Higher Rank Types in the last 30 days. 00:20:47 s/:/,/ 00:21:29 elliott: That ehird fellow on SO is really polite and well-spoken and what not. 00:21:37 You should try to be more like him/her. 00:22:02 shachaf: He's actually Don Stewart claiming the identity of another to deflect backlash against his aggressive Haskell evangelism. 00:22:03 :tinfoil: 00:22:22 shachaf: Anyway, the thing is that I'm polite in exchange for meaningless internet points. 00:22:27 People don't give me the right kind of meaningless internet points here. 00:22:34 My attempt to be gender-neutral there only sort of worked. 00:22:40 @google "gender-neutral there only sort of worked" 00:22:42 http://qdb.rawrnix.com/?top 00:22:42 Title: Top Quotes 00:23:14 * oerjan gives elliott a swat point -----### 00:23:41 oerjan: See, that's the wrong kind. 00:23:53 IMPOSSIBLE 00:23:53 elliott: Not so meaningless now, are they? 00:24:47 elliott: what if you could trade SO rep for bitcoins? 00:25:01 kallisti: Then I'd have *two* kinds of meaningless internet point. 00:25:19 well, as far as I know bitcoin translates to real money I think... 00:25:36 BITCOIN BITCOIN BITCOIN. 00:25:44 I'm sure I can buy drugs with SO rep too. 00:26:08 probably not. 00:26:32 I would sell elliott drugs for SO rep. 00:26:32 unless some drug user is looking to get some made SO rep. 00:26:35 s/made/mad/ 00:26:45 kallisti: s/user/dealer/ 00:27:05 it's not very difficult for a user to become a dealer in this situation. 00:27:27 shachaf: How much?!?!?!?!?! 00:27:30 how to become a drug dealer at least temporarily: 1) have drugs 2) want to sell drugs 3) someone wants to buy your drugs 00:27:43 OK maybe a Mac Lane party wouldn't be such a completely terrible idea? <-- it's a bit of a close call. 00:27:55 oerjan: OK where's the pun. 00:27:56 to Mac LAN party, that is. 00:28:00 elliott: Can you ever transfer SO karma? 00:28:02 I hate you. 00:28:04 shachaf: Bounties. 00:28:10 But abuse would get cracked down on pretty quickly. 00:28:22 especially abuse related to drug trafficking 00:28:26 (not really) 00:28:29 You don't want to mess with that Spolsky fellow. 00:28:32 elliott: yw 00:28:40 oerjan: I still don't get it. 00:28:51 MacLane party?! 00:28:53 I'm surprised Acme::Comment doesn't have brainfuck-style comments. 00:28:54 elliott: a LAN party, with Macs. 00:28:59 I should submit a patch 00:29:01 How is that a close call. 00:29:08 shachaf: Sorry, only me and PH are invited. 00:29:14 This is because neither of us know category theory. 00:29:19 :-( 00:29:22 Also, we're not working mathematicians. 00:29:27 You gotta do category theory at a MacLane party. 00:29:28 elliott: just one letter away, duh 00:29:31 elliott: Mac Lane -> Mac LAN ha ha ha ha ha ha ha ha ha ha ha ha ha 00:29:44 oerjan: I GET THAT PART 00:29:46 whats the close clal part 00:29:47 kallisti: Hey, that mockery should be directed at me. 00:29:57 shachaf: ha ha ha ha ha ha ha ha ha ha ha haha 00:30:01 Oh, wait. 00:30:05 I thought I made an original pun. 00:30:15 But I was making a pun on Mac LAN which was making a pun on Mac Lane. 00:30:19 but no really I'm going to see if I can patch brainfuck comments into Acme::Comment 00:30:22 it would be so good. 00:30:23 * shachaf is completely oblivious. 00:30:46 imagine brainfuck comments in perl source... yesssssss 00:30:52 "brainfuck comments" 00:31:00 yes 00:31:02 brainfuck comments 00:31:10 defined as anything that is not a valid brainfuck instruction 00:32:04 kallisti: i sense a bit of a problem there 00:32:09 oerjan: hmm 00:32:11 problem? 00:32:13 what do you mean? 00:32:44 kallisti: i don't think you can do much perl programming using only brainfuck instruction letters. 00:32:52 hmmm 00:32:55 I fail to see the importance 00:33:00 the import thing is comment syntax 00:33:00 O KAY 00:33:04 perl needs all the comments 00:33:22 i guess it _would_ improve readability a lot. 00:33:28 Acme::Comment even supports perl comments 00:33:36 use Acme::Comment type => 'Perl'; 00:33:51 not to be confused with Python and AWK comments 00:33:58 which are also supported 00:34:57 also: Haskell comments 00:35:19 though it doesn't document that it supports the {- -} form 00:35:23 it just mentions the -- form 00:38:10 awesome intercal comments 00:39:04 (100) DO NOTE THAT the following perl code uses intercal comments 00:40:16 it doesn't mention anything require just the right amount of PLEASE 00:40:19 +about 00:40:24 *requiring 00:45:49 hm is INTERCAL case sensitive 00:46:37 I usually see intercal commands written in uppercase form but I don't really know. 00:47:13 -!- elliott has quit (Ping timeout: 252 seconds). 00:48:12 !perl my %x = (1, 2, 3, $x{1}); print %x 00:48:15 123 00:48:24 heh. it would be cool if you could actually do that. 01:03:05 -!- Klisz has joined. 01:25:42 > [0..]>>-liftM2(,)"ab" 01:25:43 No instances for (GHC.Num.Num [a2], GHC.Enum.Enum [a2]) 01:25:43 arising from a u... 01:26:02 > [0..]>>-liftM(,)"ab" 01:26:03 Couldn't match expected type `[b]' 01:26:03 against inferred type `b1 -> (a1... 01:27:34 > [0..]>>-mapM(,)"ab" 01:27:35 [('a',0),('a',1),('b',0),('a',2),('b',1),('a',3),('b',2),('a',4),('b',3),('... 01:31:20 oerjan: congrats 01:31:40 what? 01:32:15 -!- Tinman-811 has joined. 01:33:12 -!- Tinman-811 has left. 01:33:15 * oerjan wonders what that was about 01:33:22 oerjan: it's a fancy zipWith 01:33:50 it's not zipWith 01:34:41 how so? 01:34:47 I mean other than cycle being applied to "ab" 01:36:01 no. it's closer to liftM2(,) but it's not that either, if you look carefully. 01:36:14 oh yes 01:36:45 isn't it like zipWith but slightly out of order? 01:37:14 not particularly. 01:40:40 variable `elem` [constant1, constant2] 01:40:53 I wonder if GHC unrolls this expression during compilation. 01:41:13 I guess it would be difficult to do generally but I feel that it's possible. 01:41:39 but you have to know that elem terminates. 01:45:44 perhaps if you had a special type of rule pragma, programmers could apply transformations at compile-time under the condition that an argument is a constant. 01:47:10 but... really for lists that could be handled automatically. If it's determined that a function has a terminating condition and is applied on a constant list 01:50:33 -!- testbot2 has joined. 01:50:33 -!- testbot2 has quit (Excess Flood). 01:53:24 -!- shi7brix has joined. 01:53:30 -!- testbot2 has joined. 01:53:30 -!- testbot2 has quit (Excess Flood). 01:53:47 -!- augur_ has joined. 01:54:32 -!- shi7brix has left. 01:55:06 -!- augur has quit (Read error: Connection reset by peer). 01:55:30 i sense that the test might not be entirely successful. 01:55:32 -!- testbot2 has joined. 01:55:32 -!- testbot2 has quit (Excess Flood). 02:01:00 -!- testbot2 has joined. 02:01:00 -!- testbot2 has quit (Excess Flood). 02:01:45 -!- augur_ has changed nick to augur. 02:08:46 -!- Klisz has quit (Quit: SLEEP, GLORIOUS SLEEP). 02:10:48 -!- testbot2 has joined. 02:12:28 -!- testbot2 has quit (Client Quit). 03:02:30 -!- yiyus has quit (Read error: Connection timed out). 03:16:23 -!- Frooxius has joined. 03:16:33 -!- yiyus has joined. 03:28:12 -!- azaq23 has quit (Quit: Leaving.). 03:35:46 -!- Klisz has joined. 03:36:32 `words --italian --eng-all 25 03:36:44 luciamoraca denun incrivald pungerait reto delanoscoute fiempt acorito buti adthroehoull pati syj nurerà sbile esis p6rime sobron coull's dillework instricaven prek ressimo getaskau schiger invivam 03:37:51 p6rime.. 04:00:18 -!- monqy has quit (Quit: hello). 04:03:47 -!- lambdabot has quit (Ping timeout: 240 seconds). 04:07:44 -!- lambdabot has joined. 04:47:06 -!- MDude has changed nick to MSleep. 04:48:21 -!- zzo38 has joined. 04:51:36 -!- oerjan has quit (Quit: Good night). 04:52:27 I added one idea to esolang list of ideas 04:59:02 I wrote this idea: If you use a variable where a specific type is expected, it is an implicit cast and it changes the actual value of the variable to that casted value too, rather than only reading it, and there isn't much other way to affect values of variables. 05:01:58 -!- qubital has joined. 05:04:07 -!- qubital has left. 05:12:35 -!- Klisz has quit (Quit: SLEEP, GLORIOUS SLEEP). 05:21:07 http://esolangs.org/wiki/List_of_ideas Now I moved some of the sections, and now I added one more thing which mentions the [[User:Zzo38/Astro-Q]] article so it is no longer completely irrelevant 05:23:55 Now there is one section for music, one section for mathematics, one section for physics, one section for implementation, etc 05:32:35 hmm 05:32:59 I now added a "Game" section too. 05:33:27 i like the reorganization 05:34:56 Good. 05:36:11 I have added two additiona entries to the page: 05:36:16 * Programming language using TeX DVI output as the program code. 05:36:26 * Physics of planets/astronomy tells the program what to do (possibly by using astrological signs or aspects or whatever). Possibly make such an esolang feature usable with User:Zzo38/Astro-Q 05:45:23 OK, now I have even done more reorganization to the list of ideas 05:48:11 Is it better now? 06:00:00 it looks the same as the last i looked 06:00:13 * quintopia too lazy to check history 06:00:50 -!- Guest554116 has quit (Quit: !). 06:41:51 -!- itidus20 has joined. 06:43:27 -!- sebbu2 has joined. 06:43:27 -!- sebbu2 has quit (Changing host). 06:43:27 -!- sebbu2 has joined. 06:46:36 -!- sebbu has quit (*.net *.split). 06:46:36 -!- MSleep has quit (*.net *.split). 06:46:36 -!- Madoka-Kaname has quit (*.net *.split). 06:46:36 -!- Sgeo has quit (*.net *.split). 06:46:36 -!- kmc has quit (*.net *.split). 06:46:36 -!- itidus21 has quit (*.net *.split). 06:46:36 -!- Deewiant has quit (*.net *.split). 06:46:36 -!- rodgort has quit (*.net *.split). 06:46:36 -!- Nisstyre has quit (*.net *.split). 06:46:36 -!- atehwa has quit (*.net *.split). 06:50:00 -!- kmc has joined. 06:50:00 -!- MSleep has joined. 06:50:00 -!- Madoka-Kaname has joined. 06:50:00 -!- Sgeo has joined. 06:50:00 -!- Deewiant has joined. 06:50:00 -!- rodgort has joined. 06:50:00 -!- Nisstyre has joined. 06:50:00 -!- atehwa has joined. 06:50:35 -!- Nisstyre has quit (Max SendQ exceeded). 06:52:22 -!- Nisstyre has joined. 07:05:06 -!- itidus20 has quit (Read error: Connection timed out). 07:06:15 -!- itidus20 has joined. 07:12:06 So,,, does it understand,,, now??? 07:30:17 -!- zzo38 has quit (Remote host closed the connection). 07:37:35 -!- pikhq_ has joined. 07:39:41 -!- pikhq has quit (Ping timeout: 240 seconds). 07:55:35 -!- Phantom_Hoover has joined. 07:57:08 http://docs.python.org/library/cookie.html#Cookie.SerialCookie it's great that the standard library has such a convenient function which is so incredibly dangerous 07:57:24 "Stores any Python value in a cookie! This will cut your balls off, 100% guaranteed." 08:03:42 Well, at least it's deprecated. 08:06:14 And gone in 3.x. 08:16:00 "pickle strings can be crafted to cause arbitrary code to execute on your server" 08:16:07 They make it sound difficult 08:17:34 Only the utmost expert criminals can craft such strings, and it takes months of meticulous work. 08:17:55 fizzie: I usually just buy a pre-crafted string on the black market. 08:18:05 Of course, once you use it, it can never be used again. 08:31:32 hand-crafted by loving artisans according to the traditional ways of a bygone era 08:35:23 shachaf, deprecating it is just a hilariously inappropriate response 08:35:51 it's good if upgrading Python breaks code using this function 08:36:13 because that code is almost certainly exploitable 08:36:46 We live in a world that deprecated gets, instead of redefining it to have semantics of "#error YOU ARE A MORON" 08:37:19 -!- nooga has joined. 08:37:20 i think that's not so bad 08:37:23 not as bad 08:37:41 Though I suppose it's *theoretically* possible to use gets securely... 08:37:45 there is a lot of C code which is never going to be run setuid or as a remotely accessible service 08:38:04 If you've redefined stdin to be a pipe, and your process is on the other end. 08:38:51 whereas most web services try to enforce some separation between "users who can submit unauthenticated HTTP requests" and "users who can execute arbitrary code as the server" 08:38:54 kmc: Or run by a end user? 08:39:06 pikhq_, ? 08:39:11 I don't want input to a program deleting ~ 08:39:21 yeah 08:39:28 running such a program on untrusted input would also be bad 08:40:25 also C has a standard saying you need to provide gets() 08:40:43 Python does whatever the fuck they want 08:41:02 anyway in both cases i'd support hiding it behind some flag that requires positive action to be enabled 08:41:24 C11 removed gets(), it seems. 08:41:27 Yup. 08:41:32 i hate the attitude that a vulnerability isn't a vulnerability if it's documented in some document nobody reads 08:41:53 Though POSIX still mandates it. 08:42:26 by the way in my Python 2.7.2+, SerialCookie does not raise a DeprecationWarning, and help(Cookie.SerialCookie) gives no warning about security 08:42:47 Though a strictly conforming POSIX app SHALL NOT use it. 08:43:03 but it does say "IF AN INCOMING VALUE IS NOT IN A VALID PICKLE, FORMAT, THEN AN EXCEPTION WILL BE RAISED. Note: Large cookie values add overhead because they must be retransmitted on every HTTP transaction. Note: HTTP has a 2k limit on the size of a cookie. This class does not check for this limit, so be careful!!!" 08:43:13 that's what's really important 08:43:19 OK, that's kind of ridiculous. 08:43:31 At least it ends in "be careful!!!". 08:43:35 be careful!!! of gasoline fumes (while you're taking a chainsaw to the groin) 08:43:36 So you know to be careful. 08:43:39 right 08:44:08 my software is 100% secure 08:44:15 because the documentation says "this program may have bugs, don't trigger them" 08:44:18 Once the user has been told that they should be careful, it's no longer the library author's fault if something bad happens. 08:44:28 if you have a security bug, then you have violated the software contract 08:45:26 Not to mention the law of least surprise. 08:46:18 i can't be held responsible for what happens if people use the software out of spec 08:46:36 I can't be held responsible for my actions against people who write unreasonable specs. 08:46:39 :) 08:47:07 it's a lot like secure programming in C 08:47:13 there's only one simple rule 08:47:19 don't make any mistake, ever. 08:47:22 kmc: Where would Ksplice be if people didn't write bugs? 08:47:41 shachaf, feature upgrades! 08:48:17 every day you could download new microoptimizations 08:48:38 (except that ksplice'd functions are slightly slower to call, but oh well) 08:49:00 Because of an added jump? 08:49:05 yeah 08:49:12 the beginning of the old function is overwritten with a jump to the new 08:49:16 shachaf: Broken window fallacy? :) 08:49:41 kmc: Clever solution. 08:49:50 kmc: Presumably if you patch a function multiple times, it will only ever get one extra jump, though, right? 08:49:52 (also other entry points to the old function, if there are any) 08:50:01 Probably also the only way of doing any hot-patching of a binary. 08:50:16 pikhq_, it's not that clever, it's probably the least interesting thing about how ksplice works 08:50:22 shachaf, I don't recall 08:51:19 What are the more interesting parts of Ksplice? 08:51:23 I should probably just read the paper. 08:51:41 more interesting is the fact that ksplice can patch a static function, or can patch in new code which calls a static function 08:51:46 so it's not relying on the exported symbols list 08:52:07 Oh, right, ksplice works automatically from basically whatever happens to be the running kernel. 08:52:19 not really 08:52:26 Which gives you a lot of work to do before you even have a hope of hot-patching... 08:52:40 you need a source tree for the kernel you're currently running 08:53:28 -!- xandy has left ("Leaving"). 08:53:29 when preparing a patch, you build the old and new code with gcc -ffunction-sections 08:53:31 -!- Jafet has quit (Quit: Leaving.). 08:54:03 the ksplice tools do a content-aware diff on the resulting object files 08:54:58 using -ffunction-sections means that you have a relocation for every call 08:56:42 for a given call instruction in the binary, you know by name which function is being called, even if it's non-exported 08:57:04 at runtime, you compare the pre-patched code you built with the actual running kernel, instruction by instruction 08:57:49 this is for safety but it also allows you to find the load addresses of those non-exported functions 08:59:22 because you see that same call instruction again, and decode its target 09:00:31 With inline functions I suppose you just patch the function calling it? 09:00:40 right 09:00:57 the tools work at the binary level, and so are mostly oblivious to inline functions etc. 09:01:16 if you change a function which is inlined to 20 callers, it looks like you changed those 20 functions 09:01:30 (which is awkward because patching more code => bad, but there's really no way around it) 09:02:15 also sometimes a change in the code for one function will cause gcc to change its mind about register allocation in an unrelated function 09:02:20 go figure 09:02:29 then you end up patching both 09:02:53 (though they were working on solutions to that problem, but I probably should not talk about them) 09:07:25 pikhq_, so yeah, it only works from whatever happens to be the running kernel, if you can replicate a build environment for that kernel 09:07:36 that's part of the value the commercial service added, versus the open-source tools 09:08:35 the admins at Billy Bob's Discount VPS and Fried Chicken probably don't have the time or skills to make a bug-compatible copy of the CentOS 5 kernel build environment 09:09:04 but it's true that it works on kernels which were built with no knowledge of ksplice 09:09:29 and we were proud of hot-patching machines which were last booted before the company or product existed 09:10:07 the other interesting thing about ksplice is the way it ensures that you're not splicing a function that's currently in use 09:10:22 which is basically, it scans every kernel stack 09:10:28 but there's a bunch of subtlety and trickiness to that 09:11:23 linux has this great feature called stop_machine which... does what it says on the tin 09:12:09 it gives your code complete control of the (OS-visible behavior of) processors 09:12:34 but of course it's tricky and buggy and double so if you're talking about supporting RHEL4 which means 2.6.9 09:14:00 How long did Ksplice make a machine unresponsive, in bad cases? 09:14:02 (Assuming it did.) 09:14:39 Virtuozzo 4 has a bug which makes stop_machine very slow 09:14:57 other than that, it's probably a few ms at worst 09:15:10 a lot of the prep work is done outside stop_machine 09:15:47 loading the update (which is itself a kernel module) and matching the code 09:16:44 if the stack check inside stop_machine fails, then it gives up the CPU before trying again 09:16:53 (obviously, because nothing's going to change if it doesn't) 09:23:54 -!- Deewiant has quit (Ping timeout: 240 seconds). 09:26:21 ... RHEL 4 is still supported oh my god why 09:30:33 -!- Deewiant has joined. 09:34:49 -!- Sgeo has quit (Read error: Connection reset by peer). 09:39:01 -!- Sgeo has joined. 09:42:23 -!- ais523 has joined. 09:43:57 What a smug yuppie kmc is. 09:44:24 haha 09:44:33 some people are wrong about trains on the internet 09:50:59 How did I not know about Hampture until now. 09:52:05 -!- itidus20 has quit (Quit: Leaving). 09:53:04 -!- itidus21 has joined. 09:54:48 pikhq_, why? because people would pay for it :D 09:59:53 -!- monqy has joined. 10:07:28 -!- atrapado has joined. 10:07:57 -!- myndzi has quit (Read error: Connection reset by peer). 10:11:02 -!- myndzi has joined. 10:15:24 do you prefer python style nesting or c style nesting: tabs or {} ? 10:17:10 Python doesn't use tabs, it uses indentation. 10:17:47 well, you can use tabs 10:18:24 -!- nooga has quit (Ping timeout: 252 seconds). 10:19:52 any preference? 10:21:18 i see that brackets are better for pasting code here 10:22:17 05:16 < shachaf> Python doesn't use tabs, it uses indentation. 10:22:30 shachaf wins the Pedantic Point of Year award. congratulations! 10:22:38 *the Year 10:22:48 I assumed you were just Russian. 10:23:10 kallisti wins generosity 2012 10:23:53 no doubt because of my revolutionary searchlog tool of the year. 10:31:34 -!- ais523 has quit (Ping timeout: 244 seconds). 10:38:03 -!- myndzi has quit (Read error: Connection reset by peer). 10:41:59 -!- myndzi has joined. 10:44:22 -!- ais523 has joined. 10:44:57 hmm… the department has been trying to persuade people (including me) to add "follow us on twitter: https://twitter.com/uobcompsci" to their signatures 10:45:12 so, umm, I'm going to discharge my CIVIC DUTY by mentioning it once in #esoteric 10:45:35 What's a UOB? 10:46:05 "Choosing to Study MSc Computer Science at Birmingham was a life transforming decision for me." 10:46:27 10 PRINT Tweets from the School of Computer Science at the University of Birmingham; 20 GOTO 10 10:47:01 I haven't actually read it; should I? 10:47:14 Not much point. 10:47:49 -!- Vorpal has joined. 10:48:01 I'm not actually entirely sure who runs that account 10:48:11 I /hope/ it's a consortium of staff, of which some are trolling the others 10:48:34 They followers/followees ratio isn't as good as mine. 10:48:38 ais523, I assume that you detest Twitter and all who use it because of some technical faux pas or other they've made? 10:48:39 It seems a reasonably active account, though. 10:48:52 Phantom_Hoover: I don't actually detest Twitter at all 10:49:00 although I'm annoyed at the way it uses JavaScript, that's about it 10:49:02 Latest own twat seems to be: "And so begins the countdown to the first personal hygiene related mail of the year." 10:49:11 this looks interesting *loads log* 10:49:28 Oh, it's a recently started thing, too. 10:49:33 Load slog. 10:49:53 shachaf, that too 10:50:12 They could retweet a couple of fungot tweets, that's always the sure road to success. 10:50:12 fizzie: like a very clear mirror to break, luckwise. it is a good idea. i will go and make a tent down a gas tank 10:50:53 fungot: You've got like 19 followers. (Most of them seem to want to sell something.) 10:50:53 fizzie: you try again. you feel stupid and hate yourself a very official? you'll be up to your first time either. 10:50:55 fizzie: it wouldn't even be entirely offtopic 10:50:57 only /mostly/ offtopic 10:51:36 Vorpal: context is that the university I work for are trying to persuade its employees to put a link to their twitter account in their signatures 10:51:55 Vorpal: Heh, fungot tweeted "cfunge may already work that way" 12 hours ago. 10:51:56 fizzie: to the left is that house shape you've seen everything! i just can't get a clear shot and killed some powerful monsters with his new hammer 10:52:07 OMG fungot has twitteR?? 10:52:07 Phantom_Hoover: a little later... a few minutes. wow he is so cool. two more large gizmos. it was once the island 10:52:10 *twitter 10:52:56 Phantom_Hoover: E's even customized eir page background to have the source code in it. 10:53:11 fungot: Aren't you just the cleverest bot. *pat* 10:53:11 fizzie: his birthday is in a few minutes. wow he is so cool. two more large gizmos. it was once the island, but honestly i've only read a few books on it. 10:53:17 There is no sense in which this is not the best. 10:53:55 ^style 10:53:55 Available: agora alice c64 ct darwin discworld europarl ff7 fisher fungot homestuck* ic irc iwcs jargon lovecraft nethack pa qwantz sms speeches ss wp youtube 10:54:01 Some day I should stick in more styles in the twitter-poster, it's only got four at the moment. 10:55:44 Use all the styles! 10:57:12 Vorpal: context is that the university I work for are trying to persuade its employees to put a link to their twitter account in their signatures <-- I saw that in the log 10:57:34 Vorpal: Heh, fungot tweeted "cfunge may already work that way" 12 hours ago. <-- hm, did it specify what way? 10:57:34 Vorpal: as a veteran of the game in the first place, so he can just button it 10:57:48 okay that made perfect sense. 10:57:56 fizzie, also got a link to the twitter page? 10:58:21 Vorpal: https://twitter.com/fungot -- and not really, though the previous "About IRC" tweet was: ":) i'll have none of that is not discrete. the server is in delphi right now" 10:58:21 fizzie: it is a hate so pure and... pumpkin seeds? 10:58:28 OMG fungot has twitteR?? <-- yes, I had forgot about it though. Was ages ago it was last mentioned 10:58:28 Vorpal: an old colonel lost, but a new brother gained. together they will ascend, each time you must be adventurin'. 10:58:46 fizzie, well, definitely not about cfunge then 10:58:46 So I guess it could be that cfunge is discrete? Or in Delphi? 10:59:10 fizzie, not the latter last I checked 10:59:17 The immediate preceding tweet was "About Chrono Trigger: him. and only the hero can wield your sword with you until then. would you mind if i walked around with you for a..." 10:59:18 -!- rupsbant has joined. 10:59:25 I'm not sure how that would be related to cfunge. 10:59:28 fizzie, and since it runs on a computer it is probably discrete yes 10:59:32 Do you wield swords in it often? 10:59:46 fizzie, in real life or in RPGs? 11:00:01 In cfunge. With cfunge. I don't know, somehow related to cfunge. 11:00:04 in real life I don't think I ever wielded a sword 11:00:06 nor in cfunge 11:00:19 It could be a metaphorical sword, I guess. 11:00:24 cfunge doesn't even implement SWORD (it could in 64-bit mode maybe?) 11:00:25 The sword of optimization, or something. 11:01:11 fizzie, that is probably one of those dual-edged things 11:05:41 Premature sword is bad. Sometimes it's best leave the sword to the compiler. It's often profitable to sword your algorithms instead of swording the implementation. A profile-guided sword can be more effective. Hmm. 11:07:30 quite 11:09:43 Ooh, from #nethack, an object lesson of "be careful what you wish for": 11:09:43 dingo (Tou Hum Fem Neu) wished for "blessed fireproof +2 Staff of Aesculapius", on turn 992 11:09:43 dingo (Tou Hum Fem Neu), 204 points, killed by touching The Staff of Aesculapius 11:10:00 * Vorpal tries to understand the point of these java API docs: "This protected field is implementation specific." Why even document that it exists if you can't use it in a sane way? 11:10:39 so I assume it says that protected field must exist just that you can't use it portably? 11:11:18 fizzie, hah 11:11:48 fizzie, gah I haven't played nethack for over a year, which class is that staff for? Was it priest? 11:12:09 Healer. 11:12:11 ah 11:12:52 "Asclepius (play /æsˈkliːpiəs/; Greek: Ἀσκληπιός Asklēpiós [asklɛːpiós]; Latin Aesculapius) is the God of Medicine and Healing in ancient Greek religion. -- The rod of Asclepius, a snake-entwined staff, remains a symbol of medicine today, --" 11:13:11 It's the snake-on-a-stick thing. 11:13:27 *One* of the snake-on-a-stick things. 11:13:47 Well, yes; but isn't the other one the snakes-on-a-stick? 11:13:55 fizzie, when I was small I used to think it was somehow related to doctors curing you from poisonous snake bites 11:14:06 (I wasn't very clear on the details of it) 11:14:29 -!- Jafet has joined. 11:14:38 fizzie, also that needs to be a movie 11:23:40 http://www.plasticbrickautomaton.com/?id=87 11:24:00 I have seen this comic before, a long time ago, but it is now 10,000 times better. 11:24:02 ais523, there still? 11:24:07 yes 11:24:42 ais523, I'm trying to make sense of java generics. If you have say Foo how do you say that T must be a class that implements interface Bar? 11:24:57 Foo 11:25:01 ah 11:25:13 ais523, there is no way to specify more than one interface there? 11:25:22 Foo 11:25:35 ah 11:27:56 ais523, also while java does seem to have enum a lot of stuff seems to use plain integer constants instead, were enums added recently or something? 11:28:08 Java's one of the few languages that actually has proper notation for covariance and contravariance in templates 11:28:20 the problems are a) nobody uses it, and b) the semantics are wrong 11:28:25 Vorpal: In 1.5 (5.0), so that's reasonably recently. 11:28:27 ah 11:28:39 that explains why stuff like BorderLayout doesn't use it 11:31:19 -!- kallisti has quit (Changing host). 11:31:19 -!- kallisti has joined. 11:31:58 hm are the docs just incomplete or can't you specify the value if a enum constant? Like you can in C. 11:32:34 fizzie, ^ 11:32:46 You're free to add a field for any custom manually specified data. 11:32:53 And then specify those in the constructors. 11:33:00 ouch 11:33:09 As for the "raw" integer values, I think those are always consecutive from 0..N. 11:33:29 fizzie, well I need to match external values here, and they happen to be sparse so. Meh. 11:33:43 Well, add a field for it, then. 11:34:29 for all: 0 is not a valid value for example. So either I would need a dummy value or just do it without enum 11:34:39 (or adding a field for every one) 11:34:46 No, I mean. 11:35:35 public enum Meh { ZONK(1), FLONK(42), BONK(1000); public final int zlorbvalue; Meh(int zlorb) { zlorbvalue = zlorb; } } .... Meh k = ZONK; ... dothezlorb(k.zlorbvalue); ... 11:35:37 That sort of thing. 11:35:45 oh you write it like that. Okay. 11:36:27 You can make the constructor populate a static Map if you want to have a static method so you can have Meh.fromZlork(42) == Meh.FLONK. 11:37:01 Uh, zlorb == zlork here. 11:37:08 hm 11:37:24 seems like a rather hackish solution to handle this. 11:40:27 The only built-in thing is the Meh.values() which returns a Meh[] where the indices correspond to the "ordinals" (i.e. the Meh.ZONK.ordinal() value); you can't really have a sparse set there. 11:40:37 Unless you put some dummies in. 11:41:01 I think it's slightly discouraged to care about the actual numeric values of the ordinals, anyway. 11:41:15 If you want something meaningful, you can put the meaningfulness in explicitly. 11:41:38 also an issue I have with swing is figuring out what exactly an event listener triggers on. For some it is obvious, like mouseClicked, but what does an actionPerformed do on a JButton? 11:41:58 I would assume it is when the button is activated either through the keyboard or the mouse? 11:45:31 When it gets twoggled, yes; I'm sure they've documented that stuff somewhere. 11:46:19 "An action event occurs, whenever an action is performed by the user. Examples: When the user clicks a button, chooses a menu item, presses Enter in a text field. The result is that an actionPerformed message is sent to all action listeners that are registered on the relevant component." 11:46:33 (Swing tutorial trail; I have no idea where it is in the reference docs.) 11:47:04 -!- myndzi has quit (Read error: Connection reset by peer). 11:48:25 -!- nooga has joined. 11:50:12 -!- atrapado has quit (Read error: Connection reset by peer). 11:51:08 -!- myndzi has joined. 11:54:36 -!- myndzi has quit (Read error: Connection reset by peer). 11:59:21 -!- myndzi has joined. 12:00:38 -!- rupsbant has quit (Remote host closed the connection). 12:07:39 -!- nooga has quit (Quit: Lost terminal). 12:10:59 fizzie, right, I was mainly searching the reference docs for JButton and the ActionListener 12:11:05 it would make sense if either of those had it 12:11:19 (I also did look at super classes, AbstractButton or whatever it was) 12:12:54 Well, JButton's main documentation does link to the whole 'Action' thing (where you can bind a single action into multiple controls, to have menu items and buttons that do the same thing and all get "configured" from one source); as well as the "How to Use Buttons" tutorial snippets. 12:13:04 So it's "incorporated by reference", like the lawyers say. 12:13:20 hm okay 12:14:29 fizzie, btw I realised that using enum is less convenient for another reason: I would end up casting to byte a lot then. 12:14:52 (unless you can set the backing type somehow) 12:15:33 Not the ordinal, but of course the "zlorbvalue" can be a byte easily, if you want to have manually set values. 12:16:08 right 12:18:36 Incidentally, if you want to follow the conventions, in my example above you should have a private field + public getter method instead. 12:19:32 fizzie, also "turn" is a somewhat confusing name in a turn based game where the players alternate making moves. You can either think of it as the period of one player making their move ("your turn" popping up on screen for that player) or as the period until the cycle between the player starts over 12:19:43 any good idea how to not confuse those two sense in naming 12:19:48 (of variables and so on) 12:20:38 Not really the best person to ask, given how I well and truly I confused those in the AI course framework. :p 12:20:49 heh 12:20:57 I mean, you *could* use the technical term "ply", but that's also liable to confuse some. 12:21:10 fizzie, also makes no sense in the case of tank wars 12:21:11 :P 12:21:15 brb food is ready 12:22:13 "ply: In two-player sequential games, a "half-turn", or one move made by one of the players." (Wiktionary.) 12:22:28 Vorpal: enums can have properties in Java 12:22:42 and even methods 12:22:49 ais523: As seen in my enum Meh example, perhaps? 12:22:50 so you could add your own getAsByte method on your enum 12:23:00 perhaps 12:23:05 it's quite a way back in scrollback, so I missed it 12:23:17 Oh, right; well, yes, you could return the ordinal as a byte, too. 12:23:19 I haven't been following the conversation, and was trying to weigh in from a screenful of scrollback 12:23:41 The example was about having a sparse set of externally-meaningful numbers associated with each enum constant. 12:24:17 Vorpal: Of course if you still use "turn" for the "whole thing", it's still sort-of confusing, and I'm not sure if there's a ply-like specifically specific word for that. 12:29:00 "ply: In two-player sequential games, a "half-turn", or one move made by one of the players." (Wiktionary.) <-- it is an n-player game though (for n up to suitable values on the current map, no restriction implemented in the server yet) 12:29:49 I haven't been following the conversation, and was trying to weigh in from a screenful of scrollback <-- don't. elliott is going to complain a lot if you do that. He certainly does when I try to. 12:30:59 Completely unrelated: they've installed a new coffee machine in our "new" (fsvo) coffee room, and it's... certainly... a thing... http://www.comparestoreprices.co.uk/images/ju/jura-impressa-z5-coffee-machine.jpg 12:31:40 I have a slight suspicion that they've been bribed by the chemistry department to run some experiments, or something. There's no way a coffee machine needs that much machine. 12:31:56 (Also it's not even network-connected.) 12:32:00 fizzie, for some values of coffee room? 12:32:15 -!- ais523 has quit (Ping timeout: 255 seconds). 12:32:34 fizzie, was the old one network connected? 12:32:43 For some values of "new". 12:33:06 And no, but it was just your regular water-heater/plate/pot thing. 12:33:41 ah 12:33:45 "Grinding selection wheel (9) is also below the bean container cover. Instructions for adjusting the fineness of the grind are inside the container cover." 12:34:09 There's also a PDF guide attached. 12:34:12 so it grinds the coffee bean on the fly? Impressive 12:34:25 Suddenly I'm delighted I don't drink coffee; now I don't need to learn this thing. 12:34:34 heh 12:34:57 You can get "ristretto" out of it. (Apparently it's like espresso, except more.) 12:36:07 I don't drink coffee either. I'm not terribly clear on what you would get if you increased the espresso-ness of espresso. 12:36:26 "The resultant shot could be described as bolder, fuller, with more body and less bitterness. All of these flavors are usually attributed to espresso in general, but are more pronounced in ristretto." 12:36:32 You get more "body" in it. 12:36:39 I see. 12:36:41 I suppose it's for mass-murderers instead of casual murderers? 12:36:46 possibly 12:37:58 I'm suspicious of fluids where people use anything more complicated than, say, "sweet" or "salty" or "like but sourer" or such to describe them. 12:38:24 Wines are probably the worst example of that phenomenon. 12:42:53 "This wine is among the less corpulent examples in the lineup. Citrusy, with a very distinct, snappy mineral character, it is round with good, well proprtioned acidity." 13:11:15 how do I do guards without indentation? 13:11:37 hint don't indent 13:11:42 ? 13:11:44 I mean 13:11:46 with { and } 13:14:32 fizzie, yeah that sort of stuff 13:15:15 fizzie, I question if whoever said that ever tried to eat a representative set of minerals for example. 13:15:49 fizzie, I'm okay with "Citrusy" though. 13:16:14 kallisti, why don't you want to indent? 13:16:19 IRC 13:16:30 hm no idea how you do that 13:16:52 I tried let f n { | blah = blah; | blah = blah } 13:16:55 but that didn't work 13:16:59 remove the {;} 13:16:59 I tried let f n { | blah = blah | blah = blah } 13:17:01 doesn't work either 13:17:13 shouldn't the {} be for the code after rather than for the guards there? 13:17:16 let f n | blah = blah | blah = blah 13:17:18 I would assume so at least 13:17:39 > let f n | n == True = 1 | n == False = 2 in f True 13:17:40 :t (=) 13:17:40 > let f n | n == 0 = 1 | n == 2 = 3; g = f in g 2 13:17:40 1 13:17:40 parse error on input `=' 13:17:41 3 13:17:44 oh... okay. 13:17:45 hm that saddens me 13:17:56 (makes sense of course) 13:33:46 > let fibs = 0 : 1 : zipWith (+) (tail fibs) (fibs); parfib n = last $ withStrategy (parList rwhnf) (take n fibs) in parfib 10000 13:33:47 207936082371334980721126489886428368250870360940159031196829458665285014234... 13:34:09 > let fibs = 0 : 1 : zipWith (+) (tail fibs) (fibs); parfib n = last $ withStrategy (parList rpar) (take n fibs) in parfib 10000 13:34:10 207936082371334980721126489886428368250870360940159031196829458665285014234... 13:34:18 I wonder if that actually does anything. 13:35:06 > let fibs = 0 : 1 : zipWith (+) (tail fibs) (fibs); parfib n = last $ withStrategy (parList rpar) (take n fibs) in parfib 100000000000000 13:35:07 *Exception: stack overflow 13:35:19 > let fibs = 0 : 1 : zipWith (+) (tail fibs) (fibs); parfib n = last $ withStrategy (parList rpar) (take n rwhnf) in parfib 100000000000000 13:35:20 Couldn't match expected type `[a]' 13:35:20 against inferred type `Control.P... 13:35:50 > let fibs = 0 : 1 : zipWith (+) (tail fibs) (fibs); parfib n = last $ withStrategy (parList rwhnf) (take n fibs) in parfib 100000000000000 13:35:52 *Exception: stack overflow 13:35:53 > let fibs = 0 : 1 : zipWith (+) (tail fibs) (fibs); parfib n = last $ withStrategy (parList rwhnf) (take n fibs) in parfib 1000000000000 13:35:55 *Exception: stack overflow 13:35:56 > let fibs = 0 : 1 : zipWith (+) (tail fibs) (fibs); parfib n = last $ withStrategy (parList rwhnf) (take n fibs) in parfib 10000000000 13:35:58 *Exception: stack overflow 13:36:00 > let fibs = 0 : 1 : zipWith (+) (tail fibs) (fibs); parfib n = last $ withStrategy (parList rwhnf) (take n fibs) in parfib 1000000 13:36:02 *Exception: stack overflow 13:36:03 lol 13:36:05 * kallisti is done. 13:37:49 I don't think that'd have worked anyway. 13:40:45 well it works on the smaller inputs. but maybe that's not what you mean? 13:40:50 * kallisti has never used parallell strategies before. 13:41:18 ARE YOU FIBBING BOY? 13:41:28 no 13:41:41 kallisti: I don't know that it's making any difference. 13:41:48 Anyway, I don't know. 13:42:28 I doubt it is. 13:44:40 what's the term for when you put "use caution but not too much;" or something in the beginning of all your code snippets even though you don't know what it means just because you've always done it and you don't want to break anything? 13:44:59 fizzie once told me a term for it i think 13:45:52 I doubt any actual parallelism is going on. the individual elements are evaluated too quickly. 13:46:41 if say, calculating the nth fibonacci element requires non-constant amount of work and also depending on the value of N-1 and N-2, then you could take advantage of parallism. but it's just.. addition. 13:47:40 fizzie: this is so very important 13:48:53 -!- ais523 has joined. 13:49:15 is this a good place to ask for help with homework questions? 13:49:19 yes 13:49:26 if they have to do with symbolic dynamics 13:49:31 hmm 13:49:40 what if they have to do with basic functional programming? 13:49:45 oh 13:49:51 that's trickier. 13:50:09 ais523, why would you need help on that? Or is it for dealing with marking such homework questions? 13:50:16 Vorpal: I can't solve one of them 13:50:21 which is tricky, given that I'm meant to mark it 13:50:24 ah 13:50:38 it's https://sites.google.com/site/focs1112/programming-assignments week 11 question 2 13:50:46 ais523, I'm quite interested to hear what it is then. And how students are expected to understand it 13:50:47 I'm not necessarily looking for the solution, just some pointers 13:50:51 (I /suspect/ the question is impossible) 13:51:05 oklofok: I don't know which term I might have told you. Unless you mean cargo cult programming. 13:51:17 ais523: that's very easy 13:51:25 amortized is the key term 13:51:26 oklofok: double-ended? that's what's stumping me 13:51:33 the problem is that it has to be based on an interaction net queue 13:51:40 hm 13:51:44 if you're allowed to do it in amortized constant time using any method you like, it's easy 13:52:00 I can do question 1, which asks for the same operations using a different underlying data structure 13:52:08 hmm 13:52:20 I'm not familiar with the term "interaction net queue". What is that? 13:52:23 what's an interaction net queue+ 13:52:25 right 13:52:27 Vorpal: do you know about difference lists in Prolog? 13:52:28 ? 13:52:32 ais523, nope 13:52:41 ais523, I don't really know any prolog 13:52:56 apart from a few basics things about the syntax 13:53:00 isn't the point of a difference lists exactly that you can make a queue with it? 13:53:00 well, let's see, the concept is that you represent a queue (front)1,2,3,4(back) as lambda x. cons(1, cons(2, cons(3, cons(4, x)))) 13:53:03 i once coded in prolog 13:53:05 oklofok: indeed 13:53:19 that's called an interaction net queue in the lists, for reasons I don't really understand 13:53:24 ais523, hm. That is just a linked list 13:53:39 well circular one 13:53:41 (also, it's not constant time or even amortized constant time in a language with OCaml's execution order, which is a more minor flaw in the question) 13:53:41 no? 13:53:46 Vorpal: err, no? 13:53:59 I don't see how you'd consider lambda x. cons(1, cons(2, cons(3, cons(4, x)))) to be a circular linked list at all 13:54:11 ais523, what does the last x mean then? 13:54:23 Vorpal: it's connected to the lambda x at the start 13:54:25 (this isn't scheme syntax, which language is it? 13:54:26 ) 13:54:29 Vorpal, a circular linked list would be Y (cons 1 . cons 2 . cons 3 . cons 4). 13:54:48 Vorpal, this is mind-bogglingly dense, even by your standards. 13:54:50 Phantom_Hoover, hm. Okay right, I see that 13:54:56 (the former not the latter) 13:55:25 so the usual way to write push-at-tail of x onto q would be lambda x'. q(cons(x, x') 13:55:32 s/$/)/ 13:55:36 ah okay, now it makes sense 13:55:46 push-at-tail is easy; push-at-head is easy; pop-from-head is easy 13:55:53 but pop-from-tail, I don't see how to get via that mechanism at all 13:56:15 other than popping the entire queue into a temporary data structure, which is of course not constant time even in a superstrict language 13:56:27 ais523, the naive solution is simple enough, and you just said it as I was writing it out... 13:56:42 yes, but the question specifically disallows that 13:57:54 hmm, I guess there's programmers here who would find week 11 question 3 easier than week 11 question 1 13:58:11 ais523, I assume you aren't allowed to use debugging modules or such to mutate the linked list? 13:58:14 it basically comes down to "implement an imperative doubly-linked list", which is something people here have done a lot 13:58:24 Vorpal: it's not really a linked list 13:58:29 well okay 13:58:31 as in, it /is/, but of lambda bodies 13:58:44 so it's not mathematically a linked list, even though it's going to be represented like that by an OCaml interp 13:59:03 ais523, which would be the relevant part for the debugging modules anyway 13:59:41 well, OCaml does allow mutation; that's what question 3's about 13:59:49 just that's not the underlying impl you're meant to use in question 2 13:59:56 hm 14:00:06 it is trivial to do this with mutation indeed. 14:00:28 trivial but ugly, IMO 14:00:34 well yes 14:00:43 I won't post my solution to that (and nor should you) in case some student of mine happens across it 14:01:00 ais523, I couldn't do it in ocaml, don't really know that language 14:01:05 I could do it in scheme though 14:01:08 but if you have stacks, it seems very easy to do this, just keep the list in two stacks, one for the left half, one for the right, and balance when necessary 14:01:28 oklofok: that's the answer to question 1 14:01:33 which asks you to do it like that 14:01:47 oh okay 14:02:14 hm. You could implement it with a balanced binary tree too. 14:02:41 well not exactly binary tree, it wouldn't be sorted as such based on keys 14:02:46 -!- Patashu has quit (Quit: MSN: Patashu@hotmail.com , Gmail: Patashu0@gmail.com , AIM: Patashu0 , YIM: patashu2 , Skype: patashu0 .). 14:02:56 Vorpal: there's nothing inherently sorted about a binary tree 14:03:07 although using them to maintain lists in sorted order is one of their main applications 14:03:28 indeed, I'm used to thinking about a key in a binary tree, this one wouldn't have one 14:03:33 but that is binary search tree 14:03:37 which is indeed different 14:03:56 btw trees are awesome 14:04:20 ais523: But if you *can* do a deque in amortized constant time with two stacks, *and* you can do a stack with constant-time push and pop with your "interaction net queue", why wouldn't a deque implemented with two "interaction-net-queue stacks" suffice for the question? 14:04:20 this one time i made a red-black tree visualization where the nodes would move to their new places by applying force in that direction 14:04:27 balancing looked awesome 14:04:32 oklofok, nice 14:04:54 i also made a binary heap, merge was like the best thing ever :D 14:04:58 fizzie: because you can make a queue from two stacks, but you can't make a stack from two queues 14:05:10 oklofok, you should try that on other tree variants to see which one looks coolest and then in the future decide which variant to use based on how it looks 14:05:16 oklofok, so AVL, AA and so on 14:05:24 (you had two windows for building heaps and you could then merge them) 14:05:37 oklofok: did the red-black tree visualisation actually use red and black? 14:05:44 ais523: yes 14:05:52 hmm, I should learn what a red-black tree is someday 14:05:55 i don't know what AA is 14:05:56 ais523: Yes, but you just said push-at-head and pop-from-head are both "easy". 14:05:58 I wonder if I know the concept already but not the name 14:06:00 ais523: learn 2,3 trees instead 14:06:04 unless you already do 14:06:17 do learn them, that is. whatever that means. 14:06:22 fizzie: right, but then you're not using the interactionnetiness at all 14:06:27 oklofok, what are 2,3-trees now again= 14:06:30 which probably doesn't count as a solution to the question 14:06:31 s/=/?/ 14:06:38 erm 14:06:51 when i said 2,3 trees i suppose i meant avl trees. let's see what's what... 14:07:11 ais523: I suppose, if you're debating intention; though literally speaking it just says "starting from the implementation", nothing else. Though wouldn't it be easier to just ask whoever made the question? 14:07:21 yeah i meant avl tree 14:07:32 avl trees are a sensible version of red-black trees 14:07:34 fizzie: I did ask, but I didn't get a useful answer 14:07:37 ais523, do you often see unusual and clever solutions to the questions that you didn't expect btw? 14:07:49 Vorpal: often, no 14:07:51 but I do occasionally 14:08:08 Vorpal: apparently 2,3 trees are essentially the same as aa trees. 14:08:13 ais523, when I got bored in basic programming courses I spent some time thinking up non-obvious and superior solutions to the expected ones. 14:08:21 oklofok, ah okay. How do they differ then? 14:08:29 Vorpal: you get bonus marks for shorter or faster solutions than the other students on this course 14:08:49 shorter in terms of token count, where whitespace and comments don't count as tokens 14:08:49 i have implemented pretty much every kind of balanced binary tree. i decided avl was the ost sensible (though splay trees are a cool idea nonetheless) 14:08:55 Vorpal: i don't know how they differ because i didn't quite check what they are. 14:09:02 ais523, that is strange. In Sweden at least I'm pretty sure the laws say that grading should not be competitive. 14:09:07 just that they aren't avl trees. 14:09:08 not so in UK I guess? 14:09:20 Vorpal: oh, the way it's done here is that the marks aren't binding 14:09:24 they're really points, rather than marks 14:09:28 I see 14:09:30 grading should totally be competitive 14:09:37 and they are competitive, but don't have any direct input into the final grade on the course 14:09:59 ais523, then what is the point? Making sure everyone passes a minimum level? 14:10:10 ais523, and doesn't this mean you encourages golfing btw? :D 14:10:12 trying to encourage people to get better at the course 14:10:14 and sure, I noticed that 14:10:23 and didn't at all try to discourage the people in charge of the course from doing it 14:10:38 -!- kallisti has quit (Ping timeout: 244 seconds). 14:10:53 someone sniped a bunch of marks early by using "float" rather than "float_of_int"; it's the same number of tokens, but the first executes marginally faster 14:10:53 oklofok, hm 14:10:54 Vorpal: Our AI course competition results have no bearing for grading either, but it doesn't stop it from being quite a fundamental motivational thing. 14:10:59 i think ais' exact words on the subject were "MWAHAHAHA" 14:11:18 ais523, what on earth is float_of_int? 14:11:26 Vorpal: a conversion routine 14:11:29 ah 14:11:31 takes an int as an argument, returns a float with the same value 14:11:40 fizzie, true 14:11:48 all OCaml's conversion routines are named like that, except for the ones that aren't (which may be an empty set, I can no longer remember) 14:12:05 float_of_float 14:12:31 ais523: Possibly you might encourage people even more if you called them "achievements". That seems to work in getting people to do completely pointless tasks. 14:12:43 fizzie: right, but achievements tend to be booleans 14:13:02 but you can have a hundred of them 14:13:19 ais523, and just using float does what? 14:13:35 Sometimes there's sort-of a grade. One achievement of "did X in one minute", one for "did X in 30 seconds", one for "did X in 15 seconds", and so on. 14:13:49 Vorpal: exactly the same thing 14:14:08 I think it's some older primitive, and I suspect float_of_int's implemented in terms of it 14:14:13 ah 14:14:13 i wish the people who make these horrible mmorpgs did something useful with their lives and made achievement unlocked 4 14:14:31 Did they make a 3? I must've missed that. 14:14:35 is there a third one? 14:15:01 google returned stuff for 3 so :D 14:16:34 fizzie: oh and yes, that's the term i meant. 14:17:09 can't get the third one to run. Weird. 14:17:36 try the next link 14:17:40 The first hit (at muchgames.com) seems to be just #2 titled as #3. 14:17:53 While the achievementunlocked3.com didn't work for me either. 14:18:02 indeed that was the one I looked at 14:18:03 i haven't played 2 so okay 14:19:37 hmm, And Yet It Moves, along with its achievement called Gregor, also has an achievement called Random 14:19:42 which I think just you get randomly 14:20:39 ais523, wait HashMap gives a syntax error on int? 14:20:41 wtf 14:20:44 it works with Integer 14:20:53 Yes, because Integer extends Object. 14:20:55 does it required a boxed type? 14:20:55 'int' doesn't. 14:20:57 I guess so 14:21:04 Vorpal: doesn't work with primitives 14:21:06 strange it is a /syntax/ error though 14:21:09 All generics need "real" objects. 14:21:15 Vorpal: int is a keyword 14:21:19 oh right, I forgot generics were just a compiler thing 14:21:24 and you generally can't use keywords in arbitrary contexts 14:21:28 as opposed to actually existing in the byte code. 14:21:32 @tell elliott Oh, damn, the Raspberry Pi has a minimum order quantity of one unit. I GUESS WE ALL HAVE TO GET ONE NOW. 14:21:33 Consider it noted. 14:21:37 THAT GOES FOR THE REST OF YOU 14:23:30 Vorpal: You can't put an "int" into an old-style non-generic ArrayList either. Primitives are very special. 14:24:56 It does do that autoboxing, though, so you can use an HashMap pretty much like you'd use a hypothetical HashMap, at least as long as you don't care about efficiency. 14:27:02 (Speaking of which: given enum Moo, then an EnumMap is likely to be fasterer than a HashMap, if you need to map that way.) 14:28:40 fizzie, I didn't need that here. I was mapping player ids to player objects 14:29:20 (this set might be sparse if a client disconnects btw) 14:33:14 hmm, it seems that there's a sort of self-balancing tree called a scapegoat tree 14:33:38 now I'm wondering if it'd be useful for the VCS, just due to the naming coincidence 14:33:54 (the problem is that self-balancing trees are one of those things that aren't obviously useless in any complex program) 14:34:32 -!- Frooxius has quit (Ping timeout: 252 seconds). 14:36:16 ais523, maybe if memory efficiency is important and you have a lot of very nodes with very small keys and data? 14:36:25 ais523, I remember looking that up and getting really confused when Scapegoat first turned up. 14:36:45 heh 14:36:58 s/very// 14:37:01 Vorpal: the main thing that self-balancing trees have to compete with is hash tables 14:37:25 ais523, the problem with hash tables is the worst case complexity is not very good 14:37:59 right, but the worst case also doesn't happen in practice, barring malicious input 14:38:02 sometimes even including malicious input 14:38:32 ais523, hm I guess a hash table with an self balanced tree per bucket might be a good compromise? 14:38:35 ais523: Perhaps you can invent some bogus reason why you need to iterate your map in sorted order too, and justify trees with that. 14:38:43 ais523, rather than the usual linked list per bucket 14:39:02 Vorpal: that's generally inferior to just rebuilding the hash table to have more buckets 14:39:24 "But what if the user wants to list all (anythings) in SHA-X order? It's important we have an efficient way to do that." 14:39:26 if you're ever getting a nontrivial number of keys in the same bucket, then either you've hit a pathological worst case or your hash table is more small 14:39:30 and in practice, usually the latter 14:39:35 ais523, well yes, but you have to be able to handle the case where both items hash to the exact same hash 14:39:57 Vorpal: right 14:40:08 IMO hashes should be infinitely long to allow for that issue 14:40:14 and truncated for use in hash tables 14:40:20 heh 14:41:22 (anyway this won't be an issue with, say, sha256, but that is kind of slow so depending on what you are using the hash table for a faster hash might be better) 14:42:18 I don't think hash tables normally use cryptohash 14:42:38 indeed 14:42:54 for that very reason too 14:43:08 I think Perl uses a fast hash operation with random parameters, so that collisions are hard to find due to not knowing precisely which hash function is being used 14:43:29 If you have objects for which you need to keep around SHA-256 hashes for other reasons, it's reasonably natural to use those as hash table keys too. 14:43:29 (and I assume, or at least hope, that there's no reasonable way to find a hash collision that works for all the possible hash functions) 14:43:56 ais523, selected per session or what? 14:44:12 per invocation of the perl(1) interpreter 14:44:25 right, that is what I meant 14:44:39 you can set the seed via env var if you need repeatability 14:44:50 (for, e.g., order of iteration over keys) 14:44:55 or just use wol 14:45:13 "just" 14:45:39 well okay 14:46:04 setting an env var seems easier than using a program nobody but me dares run 14:46:18 I keep expanding that to wake-on-lan. 14:46:22 true 14:46:38 fizzie, hah, yes 14:52:31 Heh, there's a WoWLAN; a wake-on-wireless-LAN thing. (Nobody does it.) 14:53:04 fizzie, nobody supports it hm. Well not strange 14:53:26 fizzie, actually I seem to remember seeing that as a BIOS option on some system at some point. 14:53:29 Some Intel chips can do it. 14:53:30 hm can't remember which one 14:53:36 my laptop? My dad's laptop? 14:53:37 hm 14:53:45 fizzie, I have intel wireless so... 14:56:41 How. Does. XKCDBucket. Know. About. Agora. 14:56:57 Also. Why. Am. I. Being. Overdramatic. About. This. 14:57:08 hi 15:03:23 I may require sleep 15:04:10 "IN NO IST LAT WHEY CRATICT FROURE BIRS GROCID PONDENOME OF DEMONSTURES OF THE REPTAGIN IS REGOACTIONA OF CRE." Claude E. Shannon, 1948. 15:05:38 `run words 15 # close kinship here 15:05:44 hun rungummimne exsto akesta lita dccclxivt erlayali thema brism gewa unspoii putobolle llle roninglobu idnen 15:06:21 *heuristic 15:07:39 "THE HEAD AND IN FRONTAL ATTACK ON AN ENGLISH WRITER THAT THE CHARACTER OF THIS POINT IS THEREFORE ANOTHER METHOD FOR THE LETTERS THAT THE TIME OF WHO EVER TOLD THE PROBLEM FOR AN UNEXPECTED." Shannon again, in the same paper. 15:07:47 fungot: Did you by any chance know this guy? 15:07:47 fizzie: a well mannered query to ask what your names are. probably as a special boon for being so great. 15:08:35 -!- sebbu has joined. 15:08:35 -!- sebbu has quit (Changing host). 15:08:35 -!- sebbu has joined. 15:08:51 -!- sebbu2 has quit (Ping timeout: 255 seconds). 15:14:54 ais523, In java: why is there both Color.BLACK and Color.black and which one is preferred? Neither is marked deprecated in the reference docs. 15:15:03 (same goes for the other predefined colours) 15:15:04 Vorpal: I don't know 15:15:08 hm okay 15:16:41 Vorpal: Color.BLACK: Since: 1.4. So that's why. 15:16:51 Okay, that's a reasonably poor "why", but anyway. 15:17:21 If they'd deprecate one, they'd probably deprecate the does-not-follow-the-conventions lowercase one. 15:21:20 ah 15:29:16 -!- ais523_ has joined. 15:29:22 -!- ais523 has quit (Disconnected by services). 15:29:23 -!- ais523_ has changed nick to ais523. 15:39:18 -!- ais523 has quit (Read error: Operation timed out). 15:40:06 -!- ais523 has joined. 16:13:57 -!- KingOfKarlsruhe has joined. 16:14:37 -!- kallisti has joined. 16:14:38 -!- kallisti has quit (Changing host). 16:14:38 -!- kallisti has joined. 16:18:05 so I've got about 2 hours between classes to do homework or study in the library. 16:18:21 I decided every day I'm going to come in here and, if I'm not too busy, pick up something and read it. 16:18:40 * kallisti currently has the Computer Music Journal. 16:42:06 -!- ais523_ has joined. 16:42:10 -!- ais523 has quit (Disconnected by services). 16:42:11 -!- ais523_ has changed nick to ais523. 16:43:09 This "predict words from initial prefixes" text input keeps trying to say "cocks" whenever I start something with "co". 16:44:57 "ct" it predicts as "cthulhu". I think it has some sort of a learning system. 16:45:25 well, how many words start with ct? 16:46:31 13 nouns, according to WordNet. 16:46:47 And one adjective. 16:47:00 All /proper/ nouns? And/or cocks? 16:47:04 But it's very generous with the definition of "word". 16:48:05 ais523, ctenophore. 16:48:35 -!- Gregor has set topic: Official revolting channel of the inverse femtobarn stupid topic change CP violation, the original Trilogy: A new PHP (now with cocksthulu) | http://codu.org/logs/_esoteric/. 16:48:37 http://sprunge.us/fgjP 16:49:41 fizzie, where is that predictive input btw? 16:49:52 It suggests "cc65" for plain "c", so I'm thinking I'm still justified in believing it learns. 16:50:10 Vorpal: N900. As far as they go, it's not the most impressive one. 16:50:23 fizzie, you write "cocks" a lot? And cc65? 16:50:59 I'm not sure I'd say "a lot", but I've no clue how it picks candidates. 16:51:16 what would cc65 even be? 16:51:16 I'm likely to have written both words at least once. 16:51:36 It's a silly C compiler for 6502 and others. 16:51:40 ah 16:52:02 I've used it's assembler as a standalone thing, there's not too much wrong with it. 16:52:27 The compiler itself, as far as I've understood, is not terribly impressive. 16:52:50 heh 16:53:03 fizzie, trying to think of things using 6502 atm... 16:53:11 C64. NES. 16:53:20 Well, NES is a close relative. 16:53:20 I meant modernish things 16:53:24 Ohhhh. 16:53:42 fizzie, I was going like "is it used in embedded things?" 16:53:47 and so on 16:54:08 -!- ais523_ has joined. 16:54:14 I think they make some related microcontrollers still. But those applications don't tend to advertise the CPU so much. 16:54:21 -!- ais523 has quit (Ping timeout: 252 seconds). 16:54:22 true 16:55:40 -!- ais523_ has changed nick to ais523. 16:55:46 I think some modernish thing used the 65C816, a 16-bit derivative. 16:56:07 Oh, and the Terminator (from the movie of same name) runs on a 6502. :p 16:56:08 heh 16:56:23 fizzie, what, do they say that in the movie? 16:56:29 if so that is just silly 16:56:39 You can see 6502 assembly scrolling down when they show its eye-cam thing. 16:56:45 hah 16:56:51 fizzie, what does the program in question do? 16:56:52 that doesn't mean it runs on a 6502 16:56:54 They probably just wanted something techy-looking. 16:56:57 just that it thinks in 6502 asm 16:57:31 Vorpal: Apparently it's an Apple DOS 3.3 disassembly. 16:57:58 "Also shown is the output from a run of an Apple checksum program called KEY PERFECT 4.0, published in Nibble magazine." 16:58:08 ais523, no it doesn't mean that at all. It might just as well mean that 6502 asm display is part of the output from the visual circuits. 16:58:25 Futurama's Bender is explicitly stated to have a 6502 for a brain. 16:58:30 ais523, not that it /thinks/ in that 16:59:12 -!- anders has left. 17:06:08 -!- sebbu2 has joined. 17:07:34 -!- sebbu has quit (Ping timeout: 240 seconds). 17:19:34 -!- anders has joined. 17:32:41 -!- sebbu2 has changed nick to sebbu. 17:47:00 fizzie, so the alcohol is actually for coolant? 17:47:26 And Bender is basically Project E.U.N.U.C.H. advanced 1000 years? 18:03:12 -!- pikhq has joined. 18:03:21 -!- pikhq_ has quit (Ping timeout: 248 seconds). 18:11:15 -!- ais523 has quit (Ping timeout: 240 seconds). 18:19:02 -!- ais523_ has joined. 18:28:11 -!- ais523_ has quit (Ping timeout: 258 seconds). 18:33:00 -!- pikhq_ has joined. 18:33:13 -!- pikhq has quit (Ping timeout: 248 seconds). 18:33:52 -!- ais523 has joined. 18:37:37 -!- Ngevd has joined. 18:37:54 Hello! 18:38:18 -!- MSleep has changed nick to MDude. 18:38:53 -!- elliott has joined. 18:39:43 Spam spam. 18:40:04 Evening, elliott 18:40:09 @JFritsch: No PRNG consults an external source for each number; you just get the seed from there. You can create values of type StdGen (an instance of RandomGen) from a seed, and there's a global generator in IO presumably seeded from an external source. – ehird yesterday 18:40:09 18:40:09 18:40:09 @ehird for P RNGs you are certainly right. Otherwise "no" is a bit strong :D sqrtech.com. Good randomness is an issue in a web2.0 world and IO plays a heavy role in it. – J Fritsch 10 hours ago 18:40:09 Unknown command, try @list 18:40:09 elliott: You have 1 new message. '/msg lambdabot @messages' to read it. 18:40:09 Unknown command, try @list 18:40:55 elliott: Did you see how I summoned conal? 18:41:02 21:37 < shachaf> rwbarton: Back in my day, reading a file *denoted* something! 18:41:02 21:38 < conal> shachaf: :) 18:41:07 shachaf: :D 18:41:19 I wonder if conal has "denote" on ping. 18:41:24 I asked him. 18:41:26 He claims not. 18:41:47 But he does have "*denote" on ping. 18:41:56 Whoops, I was only going to say "spam" today. 18:41:59 Maybe he always has #haskell open on one monitor, but the words don't mean anything most of the time. 18:42:00 Broke that rule pretty fast X_X 18:42:16 elliott: Remember how you asked me about 20 hours ago if I slept? 18:42:46 Yes. 18:43:00 Well, I'm sure you can guess what I haven't done since then. 18:43:09 Talked? 18:43:22 http://esoteric.voxelperfect.net/wiki/Special:Recentchanges holy CRAP, somebody teach atrapado about preview 18:46:38 elliott: Good lawd 18:46:41 Why 18:46:46 Why would you do that 18:46:58 hmm, can I add quotes from other channels? 18:47:18 `quote 1 18:47:21 1) I used computational linguistics to kill her. 18:47:35 ais523, I'm quoted from the MC server 18:47:40 hmm 18:47:43 I may as well not, anyway 18:47:44 "Functors are not very interesting by themselves" 18:47:44 `quote communism 18:47:48 487) This staircase is very good for correcting people's opininons about communism 18:47:52 ais523: what quote? 18:48:13 But yeah, as Gregor is implying, a bunch of old quotes are from elsewhere 18:48:41 Quote 1 turned out to be a bad example since that's exactly the kind of thing people would say in #esoteric ... 18:48:45 welcome to the internet its this this that the depatment of defense.... well, we'll skip that people look at kittens sometimes 18:49:00 Vorpal: "As of 2011, the W65C816S [that 16-bit 65(C)02 derivative] is available from WDC in a 40 pin PDIP or PLCC44 package, as well as a core for ASIC integration (for example Winbond's W55V9x series of TV Edutainment ICs)." So at least those they still make. Not sure if anyone's still using the 65C02 cores, maybe. 18:49:02 probably not good enough quality to add 18:49:12 but it's still surprisingly insightful 18:49:25 The quotes aren't supposed to be insightful. 18:49:28 Ex: 18:49:28 `quote 18:49:32 209) "* There is no scientifically-justifiable reason to exclude pornography, which is a vital part of the web ecosystem. However, bear in mind that we're tracing JavaScript, not MPEG and JPEG decoding." ^^^ This bullet-point is my crowning achievement as as a scientist. 18:49:41 how is that not insightful? 18:50:06 also, shouldn't it be <<< not ^^^ when the quote's collapsed into a single line like that? 18:50:14 ais523: "its this this that the depatment of defense...." what 18:50:27 elliott: an attempt to explain the Internet, before getting bored and summarising 18:50:35 X_X 18:50:38 implication's that it's starting with the history 18:50:40 elliott, put some commas in randomly 18:50:41 like summaries often do 18:50:42 You're on different wavelengths here. 18:50:50 hi Gregor 18:51:07 HELLIOTT 18:51:28 shachaf: My monad spiel is now my top SO answer. 18:51:44 I will have to kill the guy who asked it if he doesn't accept it, as currently it is my only top answer with a white background. 18:51:46 `quote 18:51:47 `quote 18:51:47 `quote 18:51:47 `quote 18:51:48 `quote 18:51:50 >_< 18:52:02 262) (the former is a very deep theorem, i'd have had to read the whole book to understand it, so i didn't.) 18:52:09 elliott: Does "white background" mean "not accepted"? 18:52:36 -!- cheater_ has joined. 18:53:39 shachaf: Yes. 18:53:51 168) < ais523> then running repeatedly until you get the right sequence of random numbers < ais523> and just completely ignoring the input <-- some people live their entire lives this way, i reckon 18:53:52 289) zzo38: you missed the point. the point was way stupider than that. 18:53:54 52) Maternal instincts? Don't you just leave the thing in a box until it starts crying, and then shake it until it stops? 18:53:54 641) sadhu: it's been said that boole is the crowning jewel perched precariously upon the perfect peak of programmer prowess, casting its limitless limpid light over the loathesome lands of those who scuff and wallow in the dreary dust of digital depravity and unbounded wilful ignorance of the testament of our lord jesus christ into your life. 18:54:09 kmc: In a discussion about GCing lazy I/O handles so that readFile doesn't fail when you have too many open files: 18:54:11 -!- Vorpal has quit (Ping timeout: 276 seconds). 18:54:20 21:49 < shachaf> You could fork when you're about to have too many FDs open. :-) 18:54:23 21:49 < rwbarton> yes! let's spawn a new process and hand it file descriptors over unix sockets! :D 18:54:26 21:49 < rwbarton> Too bad kmc isn't here, he'd love this. 18:55:11 Ow. 18:55:12 My brain. 18:55:20 `pastlog running repeatedly until you get the right sequence of random numbers 18:55:24 oh, is kmc also in #esoteric nowadays? 18:55:27 hmm, I want to know context for that 18:55:57 olsner: No, you're imagining things. 18:55:58 2010-09-17.txt:20:33:11: 220| < ais523> then running repeatedly until you get the right sequence of random numbers < ais523> and just completely ignoring the input <-- some people live their entire lives this way, i reckon 18:56:04 elliott: I see 18:56:09 fungot 18:56:09 Ngevd: his birthday is in a few minutes. wow he is so cool. two more large gizmos. it was once the island for the first time in i don't have a very exciting 24 hours or so. it'll just take a few tools out behind the woodshed and give it what the tablet asks, while the more recessive find less representation in the brood. especially strong matesprit? hahahaha! 18:56:15 Homestuck? 18:56:17 ^style 18:56:17 Available: agora alice c64 ct darwin discworld europarl ff7 fisher fungot homestuck* ic irc iwcs jargon lovecraft nethack pa qwantz sms speeches ss wp youtube 18:56:20 Knew it 18:56:29 It was "birthday" that clued me in 18:56:30 ^style europarl 18:56:31 Selected style: europarl (European Parliament speeches during approx. 1996-2006) 18:56:33 `pastlog then running repeatedly until you get the right sequence of random numbers 18:56:35 coppro: I like that style 18:56:36 It's been homestuck on that style for so long. 18:56:40 2010-09-11.txt:17:34:14: then running repeatedly until you get the right sequence of random numbers 18:56:41 fungot: tell me more 18:56:42 fizzie: HO HO HO HO HO HO HO HO 18:56:44 FireFly: HA 18:56:45 ais523: obviously, the name given to the contact and support network, one of the sectors which interest you. you do not need any new officials to do that successfully, our interests are better protected than the potential average national rates if they had their own pensions. since 1 july last year, but equally unable to prove it is not possible to get this far. i agree with this if the regions, of course, everything that conce 18:56:50 FireFly: I mistabbed you! 18:56:55 fizzie: HA. 18:56:57 Patter nmatches are the best kind of nmatches. 18:56:57 fizzie: HA HA HA 18:57:03 Ah ha. 18:57:08 Gregor, it happens. 18:57:27 elliott, I like your writing style, please write tutorials about everything you know 18:57:29 FireFly: I don't get mi-stabbed very often, in spite of "Gr" being a common-enough prefix. 18:57:56 Ngevd: No 18:58:00 :( 18:58:06 Hey shachaf, should I write a Haskell book? 18:58:24 elliott: Yes! 18:58:34 On this channel, only "co", "fi", "la" are suspectible to two-letter-mistabbings at the moment. 18:58:36 I should! 18:58:41 "Haskell: The C Perspective" 18:58:43 elliott: I'll give you magic meaningless Internet points for it. 18:58:49 Gregor: That already exists. 18:58:52 :( 18:58:52 "Haskell for C Programmers". 18:58:53 elliott: you should write a monad tutorial 18:58:54 It's super bad. 18:58:58 ais523: Fuck you!!! 18:58:58 -!- Gregor has changed nick to cofila. 18:59:01 Very very few people can even pronounce words starting with Ng 18:59:05 or, I know, "Haskell for Prolog programmers" 18:59:15 * elliott begins to worry that http://stackoverflow.com/questions/8777216/how-do-you-identify-monadic-design-patterns/8777358#8777358 counts as a monad tutorial. 18:59:16 Ngevd: well, it's a perfectly reasonable consonant for ending words on 18:59:19 so why not for starting words on? 18:59:23 elliott: You should write "Haskell for Haskell programmers" 18:59:26 And it should be empty. 18:59:31 Ngevd: ng is the most underused initial consonant in all languages I know 18:59:44 "Haskell for esoteric programmers" 18:59:45 but it's perfectly pronouncible 18:59:47 And olsner knows at LEAST twenty languages. 18:59:50 elliott: THAT'S TOTALLY A MONAD TUTORIAL 18:59:54 SCUM OF THE EARTH 19:00:02 olsner: hmm, I pronounce it by treating the n as a semivowel 19:00:05 I THOUGHT I COULD TRUST YOU 19:00:07 (which is totally a real category of letters) 19:00:18 but then, that's how I pronounce it at the end of a word too 19:00:41 I think ng is really a semivowel too 19:00:45 elliott: Did you know chat.stackoverflow.com has a Haskell channel? 19:01:06 shachaf: Yes. I looked at the logs ("transcripts") and it's filled with that J Fritsch guy being terrible at Haskell. 19:01:11 you can make the nnnnnnnnng (ngngngngng?) as long as you like 19:01:55 elliott: Anyway, if you wrote a Haskell book, I would read it and possibly provide classical criticism. 19:01:59 olsner, I just start humming 19:02:01 That is to say, non-constructive. 19:02:13 Ngevd: yeah, you can do that too 19:02:20 ŋŋŋŋŋŋŋ. 19:02:23 And maybe even the other kind! 19:02:27 ŋevd. 19:02:32 `addquote elliott: Anyway, if you wrote a Haskell book, I would read it and possibly provide classical criticism. That is to say, non-constructive. 19:02:33 УНИЦОДЕ? 19:02:34 fizzie: yes! 19:02:35 796) elliott: Anyway, if you wrote a Haskell book, I would read it and possibly provide classical criticism. That is to say, non-constructive. 19:02:57 shachaf: I'd have to spend a bunch of time explaining Haskell's flaws :-( 19:03:19 elliott: No need! Just ignore them! 19:03:23 Haskell is perfect, remember? 19:03:28 If a thing is a flaw, that means it's not Haskell. 19:03:49 -!- Ngevd has changed nick to one_minute_pleas. 19:03:54 Anyway, there is room in the world for a good free Haskell book. 19:04:05 The market demands it. 19:04:13 You'd make millions*! 19:04:13 -!- one_minute_pleas has changed nick to Ngevd. 19:04:31 *short scale millions 19:04:42 Which is to say, thousands. 19:04:52 Of pennies. 19:04:53 Of meaningless Internet points. 19:04:54 shachaf: Well, the first thing to do is to figure out what animal O'Reilly will use for it. 19:05:08 elliott: Are sloths taken? 19:05:19 I... doubt it. 19:05:28 Well then. 19:05:30 The Black Cat of Tynedale 19:05:30 That's done. 19:05:39 http://oreilly.com/animals.html 19:05:47 ^^^ actual cryptid 19:05:48 brb 19:05:57 the neanderthal. 19:06:17 cheater_, fuck off. 19:06:18 Weird that sloths aren't, they're such mainstream animals. 19:06:20 "MCSE in a Nutshell: The Windows 2000 Exams" -- Grand elephant 19:06:24 Seriously. 19:06:28 Phantom_Hoover: fuck on. 19:06:28 The *elephant*? 19:06:34 shachaf: X-D 19:06:46 Whoever chooses animals for O'Reilly books ought to be dot dot dot 19:06:49 The grandest elephant. 19:07:10 "ACCORDING to legend, the Black Cat of Tynedale lurks deep in the darkest woods of Northumberland." 19:07:15 Ngevd: How is this real. 19:07:22 "But when the Chronicle went to hunt the folklore creature, we discovered there might be truth to the sightings after all. During an early morning scour of the Tynedale countryside we found wildlife which, from a distance, could be mistaken as a big cat." 19:07:46 @where elliott 19:07:47 elliott is tumbling around Northumberland 19:07:58 COïNCIDENCE? 19:08:02 @where+ elliott elliott is thumbing around Northumberland 19:08:02 It is stored. 19:08:18 Hexhampture. 19:08:34 surely, from a sufficiently large distance, you can mistake anything for anything? 19:09:14 Also scotspeople, what's up with this http://en.wikipedia.org/wiki/Falkirk_Wheel thing, doesn't it look kinda awesome-silly? 19:09:14 ais523, consider an infinitely large, light-emitting piece of yellow card. 19:09:25 fizzie, I have been on that, it is the best thing ever. 19:09:28 (After Hampture.) 19:09:45 fizzie: the Falkirk Wheel is awesome 19:09:51 which totally makes up for it looking silly 19:11:11 oh, the Millenium Commision are responsible? that probably explains the awesomeness 19:11:15 *Commission 19:11:48 *Millennium 19:11:54 as far as I can tell, they used up all their mistakes on the Dome 19:11:54 is there a function in Haskell for doing an in-order traversal of a Data.Tree.Tree 19:12:03 and just filled the rest of their work with awesome 19:12:07 all the Foldable stuff is prefix order it would seem 19:13:00 Back 19:13:35 > [1,2,3] <*> [4,5,6] 19:13:35 [1,1,1,2,2,2,3,3,3] 19:13:49 > [1,2,3] *> [4,5,6] 19:13:50 [4,5,6,4,5,6,4,5,6] 19:13:56 > [1,2,3] <* [4,5,6] 19:13:57 [1,1,1,2,2,2,3,3,3] 19:14:03 @ping 19:14:04 pong 19:14:36 -!- saberman_ has joined. 19:14:38 I think the internet is dying 19:15:12 Oh no 19:15:13 that's a bold statement to make 19:15:17 rip 19:15:25 Who gets the inheritance? 19:15:35 Phantom_Hoover, ARPAnet 19:15:37 al gore 19:16:11 -!- saberman_ has quit (Remote host closed the connection). 19:16:55 Wow, Dynamic Earth is a Millennium Commission thing? 19:17:01 elliott: hi in-order traversal of DAta.Tree hlep 19:17:02 hpel 19:17:14 using liberries 19:17:21 kallisti: What? 19:17:24 -!- asiekierka has joined. 19:17:25 libraries 19:17:26 hey 19:17:28 using the funktions 19:17:36 i haven't been to this place for a long time, wow 19:17:39 There's this ex-professor at our university who was Finland-famous (that's like the real thing except in Finland) for his in-the-major-newspaper comments on how the Internet is going to collapse real soon. I think last estimate was that it'll happen in 2006. 19:17:44 You were here like two months ago. 19:17:54 kallisti: Dude, it's just 19:17:56 :t Node 19:17:57 forall a. a -> Forest a -> Tree a 19:18:01 :i Forest 19:18:04 @src Forest 19:18:04 Source not found. 19:18:06 Oh come on. 19:18:10 Forest a = [Tree a]. 19:18:10 @src Tree 19:18:11 Source not found. stty: unknown mode: doofus 19:18:13 elliott: that is not an in-order traversal of a tree using the given library functions. 19:18:20 elliott: yes I know how to write an in-order traversal recursively 19:18:22 elliott in internet time that's a long time 19:18:31 elliott: you must submit to my constraint system. 19:18:41 When was cpressey last here? 19:18:48 Ngevd: Many months. 19:18:50 preflex: xseen cpressey 19:18:52 PyCon, I think. 19:18:54 Wait. 19:18:59 "Many moons" is I think what you say? 19:19:00 Useless channel. 19:19:29 2011-05. 19:19:30 Is the answer. 19:19:42 Before my time... 19:19:50 I came here 2011-08? 19:20:10 * shachaf has never been here. 19:21:32 elliott: I take it you've given up as there's no easy solution 19:22:07 at least elliott hasn't had to write an interaction net deque 19:26:31 kallisti: I gave up because I'm not here to write your code for you 19:26:35 However 19:26:38 > Node 42 [] 19:26:39 Node {rootLabel = 42, subForest = []} 19:26:43 kallisti: Use the library functions rootLabel and subForest. 19:27:27 Simon Jenkins has a knighthood?? 19:27:30 ha ha ha ha ha 19:27:42 For what, services to shooting his mouth off? 19:27:49 who's that? 19:28:01 @hoogle [a] -> Maybe a 19:28:02 Data.Maybe listToMaybe :: [a] -> Maybe a 19:28:02 Data.List find :: (a -> Bool) -> [a] -> Maybe a 19:28:02 Prelude head :: [a] -> a 19:28:17 ah 19:28:24 > find (const True) [1,2,3,4] 19:28:25 Just 1 19:29:43 2010's Computer Music Journal is lame 19:29:46 olsner, one of the Guardian's main columnists, notable among other things for being stupidly anti-science. 19:29:54 most of it is just people coming up with timbre-spaces 19:30:39 there's only one publication about actual audio synthesis. 19:30:49 cf. http://www.guardian.co.uk/commentisfree/2008/jun/06/maths.alevels 19:31:03 It's a very wide-topic journal. 19:31:53 I don't find timbre-spaces very interesting. 19:32:26 Additionally, http://www.guardian.co.uk/commentisfree/2010/jun/24/rees-makes-religion-out-of-science 19:33:02 "too bad if science wrecked the case for nuclear power by its hypersafe radiation limits, or failed properly to defend GM foods." 19:33:27 "GOD why can't you people effortlessly dispel people's irrationality?" 19:35:42 fizzie: what's a good year to read? there's a lot of them to search through. :P 19:38:29 kallisti: I have zero clue. There's a lot of interesting stuff also in the IEEE journals that have "audio" in the name, but those are even worse if you have a single topic in mind. Browsing them non-physically may be best for efficiency. 19:38:58 bbl 19:40:11 (Also some that have "audio" in the name also have "speech" in there, and just physically picking an issue up subjects you to elliott's industrial-strength scorn ray.) 19:43:12 -!- kallisti has quit (Ping timeout: 252 seconds). 19:43:36 fizzie: SCOOOOOOOOOOOOOOOOOOOOOOOOOOOOORN 19:43:44 It's voice-activated. 19:44:09 Does it use SPEECH RECOGNITION to pick up the activation commands? 19:44:31 Precisely! That's why this is the first time it's activated. 19:44:42 You hit the incredibly unrealistic and precise conditions required for speech recognition to be feasible. 19:46:03 Well scorned. 19:46:37 It is probably a subconscious adjustment you have made to your manner of speech in an attempt to convince yourself that speech recognition is good. 19:46:48 -!- Klisz has joined. 19:46:56 elliott: we really need more powerful, and more open to the masses, brainwave readers 19:47:01 technology is getting there, luckily 19:47:12 ais523: Yes. Then fizzie will be even more obsolete. 19:48:02 elliott: incidentally, you have a huge Haskell bias in your SO answers 19:48:12 ais523: That's because I only look at the haskell tag. 19:48:22 I answered one (1) non-Haskell question, though. 19:48:26 heh 19:48:27 And that purity one wasn't really Haskell-related. 19:48:36 I was wondering if you were just looking for haskell tags 19:48:48 hmm, someone should ask INTERCAL questions on there 19:48:54 ais523: Well, I would look at other tags, but the popular ones are terrible: http://stackoverflow.com/questions/tagged/c 19:48:55 then point me to them so I can answer them 19:49:17 ais523: I would ask one, but I think that would be rep laundering. 19:49:23 ah, I see 19:49:33 (That was a joke.) 19:49:40 hmm, it looks just like comp.lang.c would look if the regulars didn't try so hard to scare people away 19:49:42 (The real reason is I have no INTERCAL questions to ask.) 19:49:49 when they asked that sort of question 19:51:49 elliott: wow, those C questions are bad 19:51:54 they really are 19:52:10 I'm amused at the person who was worried that unsigned integers would overflow into the next bit of memory when they overflowed 19:52:15 ais523: http://stackoverflow.com/questions/tagged/c%23 is possibly worse 19:52:19 as the most popular tag on the site 19:52:21 and was asking for reassurance, but fearing the worse 19:52:25 elliott: c#, I take it? 19:52:31 yep 19:53:17 I've been searching for a Linux version of the Conio Header file, but haven't found any... I'm using gcc and the Text-Editor "Geany" to compile my C-Code. 19:53:28 I'd have forgiven em if e didn't mention the editor he was using 19:53:48 hmm... that's the only thing he quoted 19:53:52 clearly, he's using the editor '"Geany"' 19:53:57 rather than the editor 'Geany' 19:54:10 *e, w/e 19:54:11 and the answers are actually useful, mostly referencing Linux reimpls of the library functions prototyped in conio.h 19:54:19 The freenode ##c is quite bad at times. 19:54:23 fizzie: At times? 19:54:36 Sometimes it's just quiet. 19:54:47 Sometimes PoppaVic isn't there, I guess. 19:55:02 Well, that is very rare. 19:55:17 hmm, top INTERCAL result: http://stackoverflow.com/questions/2862785/is-there-an-intercal-mode-for-gnu-emacs 19:55:28 I love the people answering "no" without checking 19:55:43 people, plural? 19:56:00 the other intercal results seem to be people mentioning it in passing 19:56:01 well, one and a half 19:56:49 Recently I accidentally "emacs blah.pdf"d instead of "evince blah.pdf"ing, and it took me at least ten seconds to notice, since Emacs went and rendered that PDF. 19:56:58 :D 19:57:12 fizzie: that would be even better if you used emacs in a terminal 19:57:21 terminal emacs doesn't render PDFs, though 19:57:24 " I'm amused at the person who was worried that unsigned integers would overflow into the next bit of memory when they overflowed" if you think about numbers in text format like "1234" = 4 chars long, and, on this basis you suppose a max unsigned int "4294967296" is 10 chars long.. then it would be possible to concieve it 19:57:44 itidus21: nah, they just thought that C would ignore types when incrementing numbers 19:58:04 they were worried that integer overflow worked like every other type of overflow, just going into the next bit of memory 19:58:07 which is a plausible misconception 19:58:26 -!- zzo38 has joined. 19:58:57 it should work like that :) 19:59:17 ais523: But it's useful when you have an all-ones bitmap, want to clear it with a simple operation, and have some writable memory after. Just "++" it and the carry will keep going. 19:59:23 *NULL -= 1; /* now my memory is full of ones rather than zeroes */ 19:59:37 That, too. 19:59:49 That's useful. 19:59:56 (anyone who points out that NULL is not necessarily 0 is missing the point) 20:00:04 fizzie: It'll even run in one cycle. 20:00:19 Possibly one very long cycle. 20:00:21 Sure, it's just an increment. 20:00:59 [[ 20:01:03 ]] never mind 20:01:08 I think it's possible to make a memory that can manage arbitrary length increment in O(log n) time, O(n log n) silicon, where n is the number of bits in memory 20:02:00 i think of overflow in a literal sense of like icecube trays being filled with water 20:02:45 each icecube cell's volume of water being a byte of some kind 20:02:51 ais523: did you know: dwarffortress is in Arch Linux's repositories? 20:02:53 take that, Debian! 20:02:57 elliott: I didn't 20:03:11 it strikes me as the sort of thing that Debian wouldn't want in their main repos, though 20:03:15 so.. the increment operator on an icecube tray would be a drop of water 20:03:34 increment too many times and the water leaks into neighbouring cells 20:03:42 ais523: it even installs a menu entry 20:04:11 elliott: but that's easy 20:04:16 my Jettyplay package installs a menu entry 20:04:33 ais523: well, DF doesn't come with a menu entry file 20:04:43 Do you like new way of arranging esolang list of ideas? 20:04:54 hmm, isn't this the second kernel update in two days 20:04:58 I even added three new entries as well, as making new sections 20:05:05 elliott: nor does jettyplay, I wrote one for the package 20:05:26 zzo38: I didn't see it because of all the spam 20:06:00 ais523: atrapado spam, you mean? 20:06:01 I think I'll yell at em on eir talk page 20:06:18 zzo38: I think it's an improvement 20:06:34 elliott: actually, regular spambot spam 20:06:42 while I'm clearing it, I don't open other pages to avoid deleting them by mistake 20:07:38 heh 20:07:55 (I've got pretty close to that beforen ow) 20:08:00 * 20:11:52 -!- asiekierka has quit (Remote host closed the connection). 20:12:23 Are you going to try to implement or write additional comment/question about any of these esolang ideas? 20:14:38 ais523: the year categories look nicer now 20:14:48 (yearcat2 was getting excessively wide) 20:15:24 http://esoteric.voxelperfect.net/wiki/Category:Before_1993 hmm... Forth shouldn't be in this category 20:15:24 zzo38: probably not in the near future, at least 20:15:43 elliott: because it's more recent than or equally recent as 1993, or because it isn't an esolang? 20:15:43 nor should PROLAN/M, arguably 20:15:47 ais523: latter 20:15:55 Forth dates back to the 70s 20:16:10 there's not an esolang with the same name, right? always worth checking that 20:16:17 well, the article doesn't describe one 20:16:19 feel free to decategorise nonesolangs from esolang categories, anyway 20:16:55 I did that for one of them, then got bored :) 20:18:37 Oh, here's a story of competence. The ISP installing the VDSL2 link was supposed to terminate the old ADSL contract (with another ISP); we faxed them a permission paper for that. 20:18:41 They told me explicitly the VDSL2 order would not proceed until they had gotten that paper; also in the paper I told them the installation date. Well, they went ahead and installed it on the requested day and everything seemed to be fine. 20:18:45 Then a bit over week ago I got a bill for January from the old ISP. So I sent the new one a question, something like "is this just because the old contract had a grace period for termination, or did something go wrong?" 20:18:50 And their answer was that "we never got the permission form from you and therefore didn't terminate the old contract". But apparently didn't think of telling me about it. 20:18:53 So I called the old ISP and asked; they said their records show the termination notice from the new ISP, and the permission form that they "never got" was attached; and that the January bill was due to one-month termination grace period thing. 20:18:57 I suppose the take-home message from all this is: never trust the words of my current ISP. 20:19:45 :D 20:20:18 why would the new ISP lie about that, anyway? 20:20:27 it seems a thing counterproductive to lie about 20:20:30 umm, * 20:20:31 ais523: Incompetence, I suppose. 20:21:07 Malice, probably not, since it doesn't really benefit them. 20:21:15 ais523: where does that umm go? 20:21:28 I suppose it could be just nastiness for its own sake, though. 20:21:35 elliott: it doesn't 20:21:41 the * by itself is the correction 20:21:44 ais523: oh 20:21:47 what is it correcting? 20:21:56 I've decided that as it's typically obvious enough what the correction is, there's no need to put it after the * 20:21:59 and word order 20:22:05 ah 20:22:07 well, it failed utterly 20:22:11 since I didn't notice the original mistake 20:22:40 -!- KingOfKarlsruhe has quit (Quit: ChatZilla 0.9.88 [Firefox 9.0.1/20111220165912]). 20:24:29 Sound devices available: 20:24:29 No Output 20:24:29 Picking No Output. If your desired device was missing, make sure you have the appropriate 32-bit libraries installed. If you wanted a different device, configure ~/.openalrc appropriately. 20:24:29 Hmph 20:24:38 I'm guesstimating their overworked customer service drone just went "oh, uh, I don't know whether we sent the termination notice, can't be arsed to check, I'd probably have to call other people and whatever, I'll just blame the customer for not delivering the necessary forms and ask him to take care of it, that's easier". 20:25:53 so why did you change ISP? 20:26:23 They are, after all, the same customer service people who said it's impossible to change the realname field of my Unix account from "null Kallasjoki", and that I should just live with it since it's not externally visible. 20:26:32 :D 20:26:36 I'd be proud to be null Kallasjoki. 20:26:40 (My first name is not "null", in case anyone was wondering.) 20:26:49 Indeed, it's fizzie. 20:27:24 fizzie: is Kallasjoki your name either? 20:27:29 ais523: The new one is faster and significantly cheaper, since they went and dug some fibre to the basement of this building. 20:27:36 The surname is correct. 20:28:48 It's hard to put a monetary price on the frustration; but on the other hand they seem to be a good supply for IRC anecdotes. 20:29:04 Let's hope they keep screwing up. (Or maybe not.) 20:29:22 as long as they screw up in harmless ways, it's just fun 20:30:09 They have a web forum for users. Some of the stories are... colorful. (In Finnish only, sadly.) 20:34:09 semantics of Finnish depend on color? 20:35:08 -!- zzo38 has quit (Remote host closed the connection). 20:35:18 2. (3) colorful, colourful -- (striking in variety and interest; "a colorful period of history"; "a colorful character"; "colorful language") 20:36:10 Oh god, I'm now talking on ##latin 20:36:31 Ngevd: Excuse me you cannot avoid my questions. 20:43:34 -!- kallisti has joined. 20:43:35 -!- kallisti has quit (Changing host). 20:43:35 -!- kallisti has joined. 20:45:59 -!- cofila has changed nick to Gregor. 20:46:35 fizzie: I'm looking for statistical analysis of music/audio, and combinatorial logic for musical arrangement. so any topics related to that. 20:47:56 -!- oerjan has joined. 20:49:02 -!- GreaseMonkey has joined. 20:49:02 -!- GreaseMonkey has quit (Changing host). 20:49:02 -!- GreaseMonkey has joined. 20:50:37 "music/audio" 20:50:38 lol 20:51:00 Since we don't currently have anywhere near the technology to take audio and extract the music, those are wholly different questions. 20:51:25 music is all in your head, man 20:52:39 i thought you were saying that was a MIME type 20:52:42 oerjan: Need more 'a's, maaaaaaaaaan. 20:52:50 Gregor: Just because we can't do it doesn't mean there are not articles about it. 20:52:56 Gregor: aaaaaaaaaaaaaaaaaaaaaaah 20:52:56 "oh yeah what format is it in" "music/audio" "ok what plays that" "music and audio players" 20:54:29 And anyway, there are sort-of working things for subproblems, like extracting tempo curves automagically from audio. 20:55:49 Gregor: the division was intentional 20:55:55 Gregor: I'm looking for information on either. 20:55:58 Or separating polyphonic music to instruments up to some degree, or whatever. 20:56:17 fizzie: Also getting near to the technology to do such a thing requires writing papers about it. :p 20:56:35 SCIENCE AS SHE IS PLAYED 20:56:36 using statistics to figure out parameters of the "music" is something we can kind of do to an extent. 20:56:46 I just don't know how. :P 20:58:10 I think we should start simple. you can't go analyzing the most complex works ever written. 20:58:18 start with something like... Justin Bieber. or Rebecca Black. 20:58:20 I few terms ago a student here implemented beat detection for waveform audio. 20:58:34 We concluded that it works for music terrible enough that beat detection would work. 20:58:44 we don't have the tech to extract music from audio? thats amazing :o 20:59:06 itidus21: we had to pipe it to our hears in order to extract it. 20:59:08 *have 20:59:19 itidus21: Given a waveform sample of any real instrument, no matter how perfectly recorded, we can barely tell you what note it is. 20:59:20 kallisti: *ears 20:59:22 subvocalization is fun anyway 20:59:33 Gregor: inverse pun? 20:59:36 i am currently subvocalizing foo fighters 20:59:45 inverted typo pun. 21:00:11 I bet you can apply beat detection to most foo fighters songs. 21:00:25 (wicked burn) 21:00:28 -!- DCliche has joined. 21:00:30 yeah let it go to waste. i love it but i hate the taste 21:00:45 no. quoting foo fighters lyrics is banned. 21:01:08 http://www.facebook.com/ go here instead 21:01:23 good news is i have never sampled a justin bieber song with my ears 21:01:29 so i can't subvocalize it 21:01:35 i feel this slight urge to ban quintopia for privmsg'ing me and then immediately going away. but it may just be the hunger... -> 21:02:13 From what I've understood, "it" in general works not really that badly, but that's just a vague impression. 21:02:15 fizzie: so really just any kind of book on statistics would be good too I guess. but I'm mostly concerned with audio (oh and the anti-latency time sync prediction stuff I mentioned previously) 21:02:30 Gregor: thats a good sign for instruments 21:02:55 Gregor: real musicians don't play notes. 21:02:58 notes are just symbols, man. 21:03:03 Whoaaaaaaaaaaaaaaaaaah 21:03:04 Like 21:03:05 Whoaaaaaaaaaaaaaaaaaah 21:03:22 especially in electronic music... 21:03:29 it actually does become somewhat irrelevant. 21:03:55 unless you want to sound tonal. you know, if that's your thing. 21:03:58 -!- Klisz has quit (Ping timeout: 252 seconds). 21:04:42 kallisti: Anyhoo, sometimes a good way to find stuff is to go to Google Scholar and add "review" to your search terms, and hope you find something new enough. Like for tempo tracking, "A review of automatic rhythm description systems", F. Gouyon, Computer Music Journal, 2005, sounds relevant. (Not going to dig deeper with this phone.) 21:05:00 review review 21:05:23 so today in intro to advanced math we learned about: BASIC SET THEORY 21:05:41 Hurrah 21:05:51 Today we learnt about me not handing in homework... 21:05:52 :/ 21:05:54 and he kind of hinted at how natural numbers can be constructed with the null set and powerset operator but he didn't really explain it he just used the example as a way to teach what powerset and subset means. 21:06:07 by hinted I mean he didn't say anything about it, but that's what he was doing. 21:06:44 kallisti: Also Bishop's "Machine Learning and Pattern Recognition" is a nice textbook about things in general (IIRC); it probably won't mention audio signals or music many times, if at all, though. 21:06:53 fizzie: that's fine 21:06:59 general knowlege will be helpful, of course. 21:07:29 We use it as a coursebook on some courses. Of course there are many similar books. 21:07:51 I need to find some more synthesis books. "Computer Music: Synthesis, Composition, and Performance" was a good intro but it doesn't go into more advanced topics. 21:09:20 @tell quintopia i am going to ignore you for pretending you were about to start an interesting conversation and then immediately going away. 21:09:21 Consider it noted. 21:10:03 I'm going to be going to library so often it's going to be awesome. 21:10:08 oerjan: sometimes i can't tell whether your @tells are serious or not 21:10:10 +the 21:10:17 elliott: that was not serious 21:10:19 hope that helps. 21:11:13 ...it was. 21:11:34 but don't worry, even i can't tell sometimes. 21:12:06 you know what kind of blows my mind. 21:12:29 Diet Mountain Dew (sry mtn dew) has concentrated orange juice as the second ingredient listed 21:12:34 but apparently has no Vitamin C 21:13:25 "brominated vegetable oil" lol wuht 21:13:46 You, sir, are about to enter the BROminator. :) 21:14:26 -!- saberman_800 has joined. 21:14:43 kallisti: it's like hydrogenated vegetable oil, but with bromine instead 21:14:47 -!- Ngevd has quit (Quit: Goodbye). 21:14:56 of hydrogen 21:15:29 ais523: I figured, but I'm still startled that it's in this drink, even if in very small quantities (less of it than the actual caffeine) 21:15:57 kallisti: halogen atoms bound to hydrocarbons tend to be incredibly safe for humans 21:16:08 CFCs are not poisonous in any way, that's why they became so popular 21:16:13 rather worse for the environment, though 21:16:31 I see. 21:16:44 I was mainly just not expecting the "vegetable oil" part and was less focused on the "bromine" part. 21:17:38 does anyone have a list of every pharmecutial brand name ever invented? 21:17:41 I'd like to add that to word. 21:17:48 I bet Wikipedia does. 21:17:56 kallisti: the US Trademark Office probably does, more seriously 21:18:04 well, US Patents & Trademarks Office 21:18:39 ah oaky. I'll just shoot them an email. 21:18:54 -!- saberman_800 has quit (Remote host closed the connection). 21:19:32 elliott: that was not serious 21:19:32 hope that helps. 21:19:32 ...it was. 21:19:35 kallisti: see what i mean 21:20:11 elliott: no 21:20:19 that was also not serious. 21:20:45 big help 21:20:51 hmmm their trademark search doesn't appear to have a category search 21:21:00 most helpful 2012 21:21:05 "a real winner" 21:21:08 oerjan: ps don't ignore quintopia for having things to do other than irc 21:21:08 best monqy 2012 21:21:10 unless you want to i guess 21:21:31 -!- saberman_1000 has joined. 21:21:38 -!- saberman_1000 has quit (Remote host closed the connection). 21:21:39 `searchlog helpful most 2012 21:21:54 2012-01-09.txt:21:21:39: `searchlog helpful most 2012 21:21:59 uh oh 21:21:59 true searchlog quality 21:22:05 now you'll be even less likely to find it 21:22:16 what's the difference between log and searchlog? 21:22:27 searchlog is the best. 21:22:33 `ls 21:22:37 bin \ canary \ karma \ lib \ main \ paste \ quotes \ searchlog.hi \ searchlog.hs \ searchlog.o \ share \ wisdom 21:22:45 `paste searchlog.hs 21:22:48 http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/paste/paste.14186 21:23:11 oh wait it's still the bad one. 21:23:21 is it? 21:23:24 somehow 21:23:25 ah yes 21:23:30 wait, why do we have an implementation of grep in Haskell? 21:23:30 bad bad 21:23:38 ais523: i 21:23:43 we don't? 21:23:43 lol 21:23:45 -!- saberman_300 has joined. 21:23:51 any software is better if it's written in haskell 21:24:02 the highest goal of humanity is to rewrite all existing software in haskell 21:24:12 implemenation of grep in haskell: call out to another grep wrapper 21:24:15 "real good" 21:24:45 shachaf, it's true, I do love handing file descriptors through UNIX sockets 21:24:56 Every now and then I feel like working on package management again. It really doesn't take long before I stop feeling like that. 21:24:56 I don't actually think the ^.*....*$ is needed 21:24:59 I just put it there to be safe. 21:25:08 I don't *wanna* do topological sort! 21:25:13 c any software is better if it's written in haskell 21:25:14 the highest goal of humanity is to rewrite all existing software in haskell 21:25:18 You misspelled "@"!!!! 21:25:23 Or constraint solving! 21:25:24 pikhq_: meh, tsort's a really important algo 21:25:37 pikhq_: have you read about how Oz does constraint solving. 21:25:39 ais523: Doesn't make me want to do it any more. :P 21:25:50 it's come up naturally at least twice, which beats any other not-known-everywhere situation but priority queues 21:25:57 (in the biased ais523 way of looking at things) 21:26:02 oh, and parsers, but that doesn't count 21:26:11 I'm from the future and "@" and "haskell" look exactly the same it's very confusing 21:26:14 kallisti: No. 21:26:38 because with haskell you're one step closer to incorporating the software into mathematical proofs :D 21:26:45 -!- saberman_300 has quit (Remote host closed the connection). 21:26:49 what 21:26:50 no 21:26:51 you're not 21:26:57 pikhq_: if that's a thing you want to do you might want to look at it. I don't know if it's "state-of-the-art" or whatever but it's a constraint programming language so I assume it's pretty good. 21:27:01 oh damn 21:27:15 itidus21: Haskell is very informal. 21:27:24 not even 1 step closer? 21:27:31 depends on what you're writing I guess. 21:27:33 a step sideways at least 21:27:41 hehe 21:27:42 ok 21:27:49 well coq can extract to haskell 21:27:52 :p 21:28:01 that's kind of the opposite ;P 21:28:06 your web server written in Haskell is not going to be more mathematically sound than Apache. 21:28:08 the next genius will incorporate I/O into mathematics directly 21:28:14 you're one step backwards from incorporating mathematical proofs into software 21:28:18 true geniouse 21:28:28 kallisti, it depends what you mean by "mathematically sound" 21:28:28 Haskell is about as formally specified as C. Fairly well for a programming language, but not very in an absolute sense. 21:28:56 kmc: a constructive proof about web servers or something. 21:29:03 I don't really know. 21:29:12 elliott: it was also partially that he had obviously not read my answer to him yesterday. 21:29:12 http://stackoverflow.com/questions/8648354/do-monads-do-anything-other-than-increase-readability-and-productivity 21:29:20 ugh 21:29:22 i'm not gonna click that 21:29:25 kmc: :) 21:29:27 * kallisti clicks it. 21:29:33 web servers theory "theory of the future" 21:29:34 monads are useless because C is turing-complete 21:29:40 kmc: no it's not 21:29:48 the answer is not that great either. 21:29:49 if evolution is true then why are there still monkeys, HMMMMM?!?!?!? 21:29:50 elliott: mostly it was low blood sugar, though. 21:30:23 oerjan: blood sugar is the best kind of sugar 21:30:27 * oerjan may return to near human behavior in a minute or so 21:30:27 `fetch http://sprunge.us/Ceae 21:30:32 2012-01-09 21:30:31 URL:http://sprunge.us/Ceae [510] -> "Ceae" [1] 21:30:41 kmc: qed 21:31:17 C is good if you want to do imperative programming 21:31:34 `run mv Ceae searchlog.hs; ghc -O2 --fllvm -o bin/searchlog searchlog.hs; chmod +x bin/searchlog 21:31:38 *low-level imperative programming 21:31:43 ghc: unrecognised flags: --fllvm \ Usage: For basic information, try the `--help' option. 21:31:53 oh 21:31:57 hmm 21:32:03 `run mv Ceae searchlog.hs; ghc -O2 -fllvm -o bin/searchlog searchlog.hs; chmod +x bin/searchlog #real programmers use LLVM 21:32:20 mv: cannot stat `Ceae': No such file or directory \ Linking bin/searchlog ... 21:32:37 ? 21:32:41 you already moved it 21:32:43 in the past 21:32:45 oh right 21:32:48 yes paste me. 21:33:10 I sometimes forget that I exist in a mutable world. 21:33:19 i think C is the best imperative language which doesn't rely on an interpreter 21:33:21 mutation is hard times 21:33:30 itidus21: what does best mean 21:33:42 itidus21: what does "doesn't rely on an interpreter" mean. 21:33:45 itidus21: no language relies on an interpreter 21:33:45 and what does "rely on an interpreter" mean 21:33:49 yes that 21:33:49 it means, in practice, c# and java don't get implemented without interpreters 21:33:56 what 21:33:58 C, C#, Java: the only imperative languages 21:34:06 nearly :D 21:34:07 also, C# and Java are OOP 21:34:10 which isn't the same thing as imperative 21:34:33 also they're not "interpreted" in the sense that "interpreted" usually means. 21:34:36 also they're compiled to bytecode and run on virtual machines "totally rely on interpreters" 21:34:39 at least 21:34:41 monqy: JITs, even 21:34:45 their common implementations aren't 21:34:45 oh yes that too 21:35:16 * kallisti imagines what java would be like if interpreted 21:35:19 C brought you linux 21:35:21 so. bad. 21:35:24 so bad 21:35:39 itidus21: ok 21:35:49 itidus21: is that supposed to make it the best 21:35:53 yup 21:35:59 :o 21:36:04 itidus21: yes, it's true. as soon as the first implementation of C was created, it sprang linux into existence. 21:36:13 and then it was the best 21:36:16 C brought you unix 21:36:20 * kallisti imagines what perl would be like if just in time compiled. 21:36:21 so. good. 21:36:38 sadly C also brought me windows 21:37:29 itidus21: but yes C# and Java are not really interpreted. did you know that? 21:37:42 itidus21: windows is mostly C++ 21:38:06 i see the mistake i made 21:38:16 C brought you C++ 21:38:20 that means it's the worst 21:38:37 i was probably trolling 21:38:45 oh 21:38:45 ok 21:38:59 itidus21, C is good if you want to do imperative programming with buffer overflows 21:39:07 @tell quintopia my insanity appears to be diminishing; also blue cheese is good 21:39:07 Consider it noted. 21:39:21 oh hm 21:39:35 Isn't this true of almost all language constructs? You can write every program using the four simple instructions of a Universal Register Machine, but you wouldn't want to. – arx 21:39:40 subleq would have been a way better example. 21:39:49 i lack the education to make serious mistakes in statements about languages 21:39:57 i sure would love to program in this "Haskell" language with the proofs and the automatic memoization and parallelization 21:39:57 kmc: You have 1 new message. '/msg lambdabot @messages' to read it. 21:40:00 too bad it doesn't exist 21:40:12 i can only make trivial mistakes 21:40:13 you might be thinking of: Hacksell 21:40:20 maybe if reddit believes in something long enough, then it comes true 21:40:22 like christmas 21:40:45 kmc: what's up in curmudgeon land 21:40:59 Haskell is great because it lets me prove that Integers exist, in an inconsistent logic 21:41:00 @remember kmc i sure would love to program in this "Haskell" language with the proofs and the automatic memoization and parallelization 21:41:00 Done. 21:41:03 kmc: is the automatic memoization thing at least partially true? 21:41:08 kallisti: no 21:41:20 i mean, laziness is *kind* of like memoization 21:41:22 but only barely 21:41:23 right 21:41:28 it's not memoization of function (argument, result) pairs 21:41:42 sharing is kind of like memoisation, rather 21:41:43 it just means if you write «let x = big_complicated in (x + x)», it doesn't compute big_complicated twice 21:41:58 and technically / pedantically, that's not part of Haskell, it's an implementation detail shared by pretty much any Haskell implementation 21:42:01 i mean they're related more than "kind of" with all the memocombinators stuff and everything 21:42:07 elliott: I was under the impression that lazy evaluation = non-strict evaluation + sharing 21:42:07 but that's not automatic :P 21:42:18 kallisti: lazy evaluation has both of those properties 21:42:22 but the spec does not mandate lazy evaluation or sharing 21:42:34 elliott: so I guess you were just being more specific then... 21:42:43 but it's an interesting bit of trivia that memoization is easier in a lazy pure language than a strict pure language 21:42:55 -!- oerjan has set topic: Official revolting channel of the inverse femtobarn stupid topic change CP violation, the original Trilogy: The Eodermdrome Strikes Back | http://codu.org/logs/_esoteric/. 21:43:11 memoizing a function requires mutating a cache data structure 21:43:17 laziness gives you implicit mutation of just the sort you need 21:43:30 you'll start kallisti again 21:43:43 elliott: no, only you have the power to make arguments out of nothing. 21:44:15 -!- atrapado has joined. 21:45:01 at first I used where exclusively 21:45:05 yesterday i tried to figure out why BART is broad-gauge 21:45:08 i think nobody knows 21:45:11 but as I write more Haskell I find myself liking let in more situations. 21:45:17 i think they were drunk when they designed it 21:45:20 kallisti, me too 21:45:29 * elliott doesn't. 21:45:32 where is good too though. they're both good. 21:45:35 one mistake i made is confusing the terms language and implementation.. 21:45:54 i like things to flow logically from top to bottom (even if that's not the true order of evaluation) 21:46:04 so "let" with the "top-level" expression at the end, is more natural than "where" 21:46:05 kmc: this is also why I think I actually prefer >>> to . 21:46:07 and another mistake i made is only considering PC computers 21:46:20 kallisti, yeah, unfortuantely (>>>) is less common and uglier 21:46:33 eh it's not uglier 21:46:36 it even shows you the direction 21:46:39 it's just more typing 21:46:40 sometimes "where" is good because the "top-level" expression can be understood by itself, and the helpers are self-contained details 21:46:51 right 21:46:51 * elliott doesn't think "flow logically" is meaningful like that. 21:47:00 If not the order of evaluation, what /do/ you go by? 21:47:08 kmc: federal law influenced by earthquakes down south? 21:47:08 I prefer using "let" when I just need to extract some values within a particular case or something. 21:47:12 that doens't need to go in where. 21:47:15 or even regulation 21:47:26 cheater_, interesting 21:47:33 btw the transbay tube is not earthquake-safe 21:47:57 kmc: another possibility: attempt to disable use of existing trains. someone got smeared by a train factory. 21:48:00 oerjan, oi, can you get anything interesting from regarding lines between points in R^n as morphisms in a category, or is this not something you'd know in any case? 21:48:11 cheater_, yeah, it's great for vendor lock-in for sure 21:48:21 they can't buy trains from the same suppliers as the other subways in the country 21:48:21 okay so... sharing is literally just a mechanism of let binding (and equivalent sugars) 21:48:23 not really, you can always change a vendor 21:48:26 but they can buy trains from india, lol 21:48:26 ? 21:48:30 (except not, because BUY AMERICAN!!!) 21:48:33 (that was a question. oops) 21:48:59 kmc: i think it's probably that there was a fleet of trains already, but the people building the bart wanted to earn extra, so they made sure the trains had to be new too. 21:49:05 *probable 21:49:10 yeah 21:49:12 er, let me clarify. I know what the concept of sharing is, but I'm asking specifically where it occurs in Haskell. 21:49:12 that's a good theory 21:49:24 kallisti, let bindings, where bindings, module top-level bindings 21:49:34 ..."variables"> :P 21:49:36 *? 21:49:38 profit is a reliable motive 21:49:43 kmc: sharing is caring 21:49:44 not counting function arguments I guess. 21:49:49 yeah 21:49:55 or case-bound variables 21:50:09 those are more passing through existing sharing 21:50:18 to really answer your question I think you need a very detailed operational semantics 21:50:27 yes this is would be a good thing to know about. 21:50:27 and then you ask, where does thunk allocation occur, and where does forcing occur 21:50:37 -!- centrinia has joined. 21:50:40 have you read "Implementing lazy languages on stock hardware: the spineless tagless G-machine"? 21:50:41 `welcome centrinia 21:50:45 centrinia: Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: http://esolangs.org/wiki/Main_Page 21:50:48 kmc: noep 21:50:57 elliott: Did you automate that? 21:51:12 I understand that Haskell doesn't maintain a single call stack, but instead has a stack for each level of pattern matching? or something to that extent. 21:51:15 kallisti, well, they have a very simple desugared Haskell-like language where these questions are relatively clear 21:51:23 kallisti, do you mean GHC? 21:51:28 er, yes. 21:51:33 i don't think it's a true statement about GHC, but I don't think it's a sensical statement about Haskell 21:51:41 GHC has a stack *of* pattern-matchings 21:51:50 the elements of the stack are "case continuations" 21:51:57 oh so just one. but it's not really a "call stack" either. 21:52:09 they look like "case (hole) of Foo x -> ...; Bar y -> ..." 21:52:17 kmc: any idea how much those techno goggles would cost to make? i was thinking of making a pair here 21:52:27 meaning "once you've finished evaluating whatever you're currently evaluating, branch on these cases 21:52:36 except some of the elements are "update frames" 21:52:49 which mean like "before you continue, plz overwrite this thunk with the answer you just computed" 21:52:54 -!- ais523 has quit (Remote host closed the connection). 21:53:31 centrinia: No. 21:53:50 kmc: your definition of case continuations seems backwards from what I was envisioning. 21:54:11 how so? 21:54:34 kmc: it seems that each continuation is moving further down a data structure? I was thinking it was a way to "go back up".... if that makes sense. 21:54:34 the expression currently being evaluated is implicit in the program counter 21:54:46 kmc: do you have a BOM for those? 21:54:46 the thing you need to remember is, what do you do after evaluation completes 21:54:49 cheater_, no 21:54:56 03:00:12: if you teach someone C and tell them it's how the computer "really works" then they will probably become an insufferable douchebag 21:54:56 Doesn't that apply to every language? 21:54:59 kmc: do you know nothing about how much they could cost? 21:55:01 Phantom_Hoover: well it wouldn't contain more information than the pair of points itself, since two points always have exactly one line between them. 21:55:08 elliott, yes, but people usually don't tell that lie about other languages 21:55:12 cheater_, ballpark of $30 21:55:14 elliott: what about assembly? 21:55:19 it depends what parts you have, and what you're making exactly 21:55:21 i've just spent more on pizza 21:55:23 kallisti: Indeed. 21:55:27 that's fine then 21:55:34 kallisti: As in, 21:55:37 kallisti: Indeed the same applies to that. 21:55:53 cheater_, browse these and maybe comment or contact the guy http://wealoneonearth.blogspot.com/search/label/goggles 21:56:05 he has some detailed build instructions 21:56:13 kmc: oh right lazy evaluation kind of happens in reverse when compared to strict evaluation. 21:56:16 I think? 21:56:16 oerjan, yeah, but that doesn't preclude something interesting coming from it. 21:56:20 kmc: thx4u 21:56:35 kallisti, maybe? 21:57:01 well, no. 21:57:09 I think I understand the case continuation bit though. 21:58:38 (by the way "evaluate" means "evaluate to whnf") 21:58:44 right. 21:59:01 if you have a deep pattern in Haskell, it will translate to many nested 'case's in STG-language 21:59:04 also another question: isn't beta-reduction and inlining the same thing in Haskell? 21:59:05 each once forces to whnf 21:59:11 kallisti, is it? 21:59:28 you're saying that inlining is a special case of compile-time partial evaluation? 21:59:35 it seems like when you inline a function you would also be beta-reducing it. 21:59:58 beta-reducing its application 21:59:58 rather 21:59:59 i think it's best to treat those as separate 22:00:01 but i don't really know 22:00:28 you could say that «(\x -> x + 2) 2» is already "inline" but you might want an optimization which reduces it to 4 22:00:28 -!- Jafet has quit (Quit: Leaving.). 22:00:28 I ask because Wikipedia's article on GHC mentions that it does inlining, and then also mentions that it performs beta-reduction. 22:00:32 maybe it's referring to different intermediate representations. 22:00:38 you could read "secrets of the GHC inliner" 22:01:22 193 amazing sex tips to satisfy your GHC inliner 22:02:04 btw spineless tagless G-machine is the best name for a thing ever. 22:02:39 I don't think people would consider something inlining if it skipped the beta-reduction. 22:02:40 Phantom_Hoover: well it means it's isomorphic to the obvious category of pairs of points. which i think is sort of a trivial partial preorder category. 22:02:50 It would just increase the size of code and not save the cost of a call. 22:02:58 Although I guess the jump could be smaller? 22:03:16 or equivalently, every object is a zero object. 22:03:27 elliott: well you would still get the benefits of some rewrite rules if you inlined without beta-reduction 22:04:17 but... you would get more if you beta-reduced 22:04:43 oerjan: I'M GOING TO UNDERSTAND ALL THIS WHEN I READ C4TWM I'M SURE 22:04:51 * elliott convincing. 22:05:14 > iterate (filterM (const [True, False])) [] 22:05:15 Occurs check: cannot construct the infinite type: a = [a] 22:05:24 NOOOOOOO 22:05:24 cabinets for ten wacky monkeys 22:05:36 * shachaf shachaf shachaf * 22:05:45 shachaf: hi 22:05:45 elliott: you _do_ know what a category is, don't you. this is a rather trivial example. 22:05:52 :t filterM 22:05:53 forall a (m :: * -> *). (Monad m) => (a -> m Bool) -> [a] -> m [a] 22:05:54 oerjan: well on a good day, yes. 22:06:04 It's been almost thirty minutes away from IRC. I was starting to sweat. 22:06:24 > iterate(group>=>show.length++tail)"1" 22:06:26 ["1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1... 22:06:31 wtf 22:06:31 oh 22:06:54 > iterate(group>=>(:)<$>length<*>take 1)"1" 22:06:55 Couldn't match expected type `GHC.Types.Int' 22:06:56 against inferred type ... 22:07:01 > iterate(group>=>(:)<$>length<*>take 1)[1] 22:07:02 [[1],[1,1],[2,1],[1,2,1,1],[1,1,1,2,2,1],[3,1,2,2,1,1],[1,3,1,1,2,2,2,1],[1... 22:07:13 that's one way to look at it. 22:08:07 > iterate (toDyn . filterM (const [True, False])) [] 22:08:08 Couldn't match expected type `Data.Dynamic.Dynamic' 22:08:09 against inferre... 22:08:12 noooooooooo 22:08:13 > iterate(group>=>show.length++take 1)[1] 22:08:14 No instance for (GHC.Num.Num GHC.Types.Char) 22:08:15 arising from the literal `1... 22:08:19 :t fromDyn 22:08:21 forall a. (Typeable a) => Dynamic -> a -> a 22:08:34 oh duh 22:08:38 > iterate(group>=>length++take 1)[1] 22:08:38 :t fromDynamic 22:08:39 Couldn't match expected type `GHC.Types.Int' 22:08:40 against inferred type ... 22:08:40 forall a. (Typeable a) => Dynamic -> Maybe a 22:08:56 i guess you really needed that. 22:09:09 > fromDyn (toDyn 2) undefined -- ???????? 22:09:10 *Exception: Prelude.undefined 22:09:15 -!- Jafet has joined. 22:09:16 > iterate(group>=>return.length++take 1)[1] 22:09:18 [[1],[1,1],[2,1],[1,2,1,1],[1,1,1,2,2,1],[3,1,2,2,1,1],[1,3,1,1,2,2,2,1],[1... 22:09:19 kallisti: defaulting 22:09:26 oerjan: (:[]). is shorter 22:09:39 > iterate(group>=>(:[]).length++take 1)[1] 22:09:39 * elliott is just trying to get it even shorter somehow 22:09:40 [[1],[1,1],[2,1],[1,2,1,1],[1,1,1,2,2,1],[3,1,2,2,1,1],[1,3,1,1,2,2,2,1],[1... 22:09:56 > iterate(group>=>flip[length,take 1])[1] 22:09:56 Couldn't match expected type `GHC.Types.Int' 22:09:57 against inferred type ... 22:10:08 > iterate (toDyn . filterM (const [True, False]) . (`fromDyn` [])) [] 22:10:09 Couldn't match expected type `Data.Dynamic.Dynamic' 22:10:09 against inferre... 22:10:10 > iterate(group>=>flip[(length++),take 1])[1] 22:10:11 Couldn't match expected type `[a]' 22:10:11 against inferred type `[a1] -> G... 22:10:25 I have a feeling Dynamic is not the way to go about this :P 22:10:36 -!- saberman_101 has joined. 22:10:40 saberman_101: hi 22:10:45 :t count 22:10:46 Not in scope: `count' 22:10:49 :/ 22:10:53 @hoogle (a -> Bool) -> [a] -> Int 22:10:54 Data.List findIndex :: (a -> Bool) -> [a] -> Maybe Int 22:10:54 Data.List findIndices :: (a -> Bool) -> [a] -> [Int] 22:10:54 Data.List find :: (a -> Bool) -> [a] -> Maybe a 22:10:57 @hoogle a -> [a] -> Int 22:10:57 > iterate (toDyn . filterM (const [True, False]) . (`fromDyn` [])) (toDyn []) 22:10:57 Data.List elemIndex :: Eq a => a -> [a] -> Maybe Int 22:10:57 Data.List elemIndices :: Eq a => a -> [a] -> [Int] 22:10:58 Network.BufferType buf_concat :: BufferOp a -> [a] -> a 22:10:58 > iterate(group>=>flip[length,head])[1] 22:10:58 Ambiguous type variable `a' in the constraint: 22:11:00 `Data.Typeable.Typeable a... 22:11:02 [[1],[1,1],[2,1],[1,2,1,1],[1,1,1,2,2,1],[3,1,2,2,1,1],[1,3,1,1,2,2,2,1],[1... 22:11:07 elliott: ^ 22:11:14 oerjan: huh 22:11:16 is that shorter? 22:11:43 > iterate (\xs -> if length (filter id xs) > length (filter not xs) then xs++[False] else xs++[True]) [] 22:11:45 [[],[True],[True,False],[True,False,True],[True,False,True,False],[True,Fal... 22:11:46 1 char shorter i think 22:11:52 Hey, all y'all should golf a Pascal's triangle generator. 22:11:54 oh, predictable 22:12:09 That was brought up on a mailing list I'm on. 22:12:11 :t flip[?x] 22:12:12 forall a b. (?x::a -> b) => a -> [b] 22:12:25 > iterate(\f->zipWith(+)f(0:f)++[1])[1] 22:12:26 [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1],[1,5,10,10,5,1],[1,6,15,20,15,6,1]... 22:13:04 -!- saberman_101 has quit (Remote host closed the connection). 22:13:26 > iterate ((++[1]).(\f -> zipWith (+) f (0:f))) [1] 22:13:27 [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1],[1,5,10,10,5,1],[1,6,15,20,15,6,1]... 22:13:38 Yay, that's much shorter. 22:13:40 > iterate ((++[1]).(zipWith (+) <*> (0:))) [1] 22:13:41 [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1],[1,5,10,10,5,1],[1,6,15,20,15,6,1]... 22:13:47 is there a way to get a structure like that? arbitrarily deep nestings of empty elements or whatever. 22:13:48 > iterate ((++[1]).zipWith (+) <*> (0:)) [1] 22:13:48 Couldn't match expected type `a1 -> a' against inferred type `[t]' 22:13:56 > iterate(foldr(\v(p:q)->v:(p+v):q)[0])[1] 22:13:57 [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1],[1,5,10,10,5,1],[1,6,15,20,15,6,1]... 22:14:00 I think zzo made something like that. 22:14:07 the "ordered multiset" :P 22:14:13 -!- centrinia has quit (Read error: Connection reset by peer). 22:14:26 -!- centrinia has joined. 22:14:27 > iterate((++[1]).ap(zipWith(+))(0:))[1] 22:14:29 [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1],[1,5,10,10,5,1],[1,6,15,20,15,6,1]... 22:14:48 -!- centrinia has quit (Client Quit). 22:14:58 -!- saberman_1 has joined. 22:15:03 newtype T = T [T] 22:15:14 kallisti: Mu [] 22:15:20 wassat 22:15:26 newtype Mu f = Mu (f (Mu f)) 22:15:37 oh good 22:15:45 Moo. 22:15:47 :t Mu 22:15:48 Not in scope: data constructor `Mu' 22:15:51 NOOOOOOOOOOOOOOOOOOOOOOOOOOO 22:15:54 @ty In 22:15:55 forall (f :: * -> *). f (Mu f) -> Mu f 22:16:01 @ty fold 22:16:02 Not in scope: `fold' 22:16:02 @src Mu 22:16:03 newtype Mu f = In { out :: f (Mu f) } 22:16:03 @ty mu 22:16:04 Not in scope: `mu' 22:16:06 @ty cata 22:16:07 forall (f :: * -> *) a. (Functor f) => (f a -> a) -> Mu f -> a 22:16:11 @src cata 22:16:11 Source not found. This mission is too important for me to allow you to jeopardize it. 22:16:19 :t cata out 22:16:20 Couldn't match kind `(* -> *) -> *' against `* -> *' 22:16:20 @google type level fix and generic folds 22:16:21 When matching the kinds of `Mu :: (* -> *) -> *' and `f :: * -> *' 22:16:21 Expected type: f a 22:16:21 http://mainisusuallyafunction.blogspot.com/2010/12/type-level-fix-and-generic-folds.html 22:16:23 "cata" is WoW slang for Cataclysm 22:16:38 -!- saberman_1 has quit (Remote host closed the connection). 22:16:38 "WoW" is NetHack slang for Wand of Wishing. 22:16:53 "NetHack" is internet slang for hacking. 22:17:06 "internet" is internet slang for internet. 22:17:12 *internetworking 22:17:47 I sure hope 3 people upvote me in the next date 22:17:48 ... 22:17:55 I sure hope 3 people upvote me in the next 2 hours. 22:18:06 * elliott is good at switching windows. 22:18:26 Is that how dating sites work these days? 22:18:49 Totally. 22:18:50 Jafet: Dating is all about SO reputation these days. 22:19:43 SO is all about whores 22:20:13 elliott is all "have you seen how large my SO reputation is", and all the ladi^Wpersons-of-interest are all "ooh!" 22:21:01 He can even give to them out of his large... reputation 22:21:11 elliott's reputation overflows the stack. 22:21:59 fizzie: It's true! That's how I met lax. 22:22:12 elliott: We tried to find your SO reputation number the other day by searching for "elliott", and then was all "hey the search found a Haskell question, this must be the right thing" and then it was just that that Conal dude was mentioned in the text. (But don't worry, we did think of searching for "ehird" too when that didn't pan out.) 22:22:25 > iterate(filterM(const[True,False]).In)[] 22:22:26 Couldn't match expected type `[a]' against inferred type `L.Mu []' 22:22:30 fizzie: You tried to find my SO reputation as a group activity? 22:22:41 elliott: Well, you see, my wife was interested in your reputation. 22:22:50 * elliott is famous. 22:22:55 elliott's reputation precedes him. 22:23:04 You know you've made it when fizzie's wife knows about your reputation. 22:23:11 fizzie is married?! 22:23:15 Way to crush my dreams. 22:23:23 Your reputation had just passed five thousand at that point; I see it's over six thousand already now. 22:23:30 > iterate(In . filterM(const[True,False]))[] 22:23:31 Couldn't match expected type `L.Mu []' against inferred type `[a]' 22:23:38 :t In 22:23:39 forall (f :: * -> *). f (Mu f) -> Mu f 22:23:50 @ty InR 22:23:51 forall a. (Rec a -> a) -> Rec a 22:24:05 > iterate(In . filterM(const[True,False])) (In []) 22:24:06 Couldn't match expected type `L.Mu []' against inferred type `[a]' 22:24:23 @src Rec 22:24:24 newtype Rec a = InR { outR :: Rec a -> a } 22:24:24 -!- saberman_1 has joined. 22:24:27 fizzie: Conal also has a Stack Overflow account! He has less reputation than me. 22:24:35 Soon everybody will forget about THAT Elliott. 22:24:52 -!- saberman_1 has quit (Remote host closed the connection). 22:24:57 fizzie, why on earth did your wife care about elliott's SO rep. 22:25:06 > iterate(In . filterM(const[True,False]) . \(In xs) -> xs) (In []) 22:25:07 Couldn't match expected type `L.Mu []' against inferred type `[a]' 22:25:22 Phantom_Hoover: Who wouldn't? 22:25:23 shachaf: Why isn't Rec defined as type Rec = Mu :. Flip (->) 22:25:26 UNFORGIVABLE 22:25:41 fizzie, HELP AM I THE ONLY ONE WHO WISHES HE WOULD STOP 22:26:10 elliott: WHY AREN'T *YOU* DEFINED AS type You = Mu :. Flip (->)??? 22:26:11 Phantom_Hoover: Anyway, she often asks of #esoteric happenings, and it has been a PROMINENT TOPIC lately, has it not? We've certainly had some SO weather, eh? 22:26:16 shachaf: I AM 22:26:31 > iterate(filterM(const[True,False]).map out)[] 22:26:32 Couldn't match expected type `[t (L.Mu t)]' 22:26:32 against inferred type `... 22:26:34 fizzie: What is it with everybody talking about #esoteric IRL? 22:26:39 hmph 22:26:41 @src Mu 22:26:41 newtype Mu f = In { out :: f (Mu f) } 22:26:45 WHAT HAPPENS IN #ESOTERIC STAYS IN #ESOTERIC. 22:26:59 Except for the bits that leak out into the logs. 22:27:05 Well, we redact most of those. 22:27:44 > iterate(map In . filterM(const[True,False]))[] 22:27:46 [[],[In []],[In [In []],In []],[In [In [In []],In []],In [In [In []]],In [I... 22:27:54 * oerjan does a victory dance 22:27:57 -!- saberman_1 has joined. 22:28:01 @ is the ASCII CHARACTER THAT COMES AFTER ? 22:28:05 fizzie: Searching "elliott" also finds a Haskell question where Trevor Elliott is mentioned. :/ 22:28:10 I need to assassinate the other Elliotts. 22:28:39 "assassinate" is like "murder" except the target is important, right? 22:28:44 oerjan: Now rewrite everything with Mu [] and you'll be an Ursula user. 22:28:51 shachaf: Yes. 22:29:01 -!- saberman_1 has quit (Remote host closed the connection). 22:29:38 It is probably not worth noting that "splat" and "big money" are the official pronunciations specified for the * and $ operators in the original INTERCAL Reference Manual, which is most certainly an authoritative source if I've never heard of one. – C. A. McCann Apr 29 '11 at 20:23 22:29:47 SO Haskellers know what's *really* important. 22:30:32 -!- saberman_1 has joined. 22:30:39 :t ana 22:30:40 Not in scope: `ana' 22:30:43 -!- cheater_ has quit (Quit: leaving). 22:30:45 Lame. 22:30:53 I'll tell cheater_ you want him back. 22:31:11 How kind. 22:31:31 @let ana f = fix (\g -> In . fmap g . f) 22:31:32 Defined. 22:31:35 :t ana 22:31:35 -!- saberman_1 has quit (Remote host closed the connection). 22:31:36 forall a (f :: * -> *). (Functor f) => (a -> f a) -> a -> Mu f 22:31:50 > ana (:[]) 42 22:31:51 In [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In ... 22:33:05 > fix(out<$>) `asTypeOf` Nothing 22:33:06 Couldn't match kind `* -> *' against `(* -> *) -> *' 22:33:13 @src Mu 22:33:14 newtype Mu f = In { out :: f (Mu f) } 22:34:10 > fix(In . pure) `asTypeOf` Nothing 22:34:11 Couldn't match expected type `L.Mu f' 22:34:11 against inferred type `Data.M... 22:34:17 wat 22:34:22 oh hm 22:34:31 > fix(pure.In) `asTypeOf` Nothing 22:34:32 Just (In (Just (In (Just (In (Just (In (Just (In (Just (In (Just (In (Just ... 22:34:38 this just in 22:34:42 > fix(pure.In) `asTypeOf` [] 22:34:43 [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In [In... 22:34:54 > fix(pure.In) `asTypeOf` (Left "") 22:34:56 Right (In (Right (In (Right (In (Right (In (Right (In (Right (In (Right (In... 22:36:29 :t showList 22:36:30 forall a. (Show a) => [a] -> String -> String 22:37:16 -!- saberman_1 has joined. 22:37:21 :t \f -> fix (In . f) 22:37:22 forall (f :: * -> *). (Mu f -> f (Mu f)) -> Mu f 22:37:27 -!- saberman_1 has quit (Remote host closed the connection). 22:37:38 :t \f -> In (fix (f . In)) 22:37:38 forall (f :: * -> *). (Mu f -> f (Mu f)) -> Mu f 22:37:47 ...duh :P 22:37:57 oerjan: oh it's the asTypeOf that broke yours 22:38:04 > fix (In . Just) 22:38:06 In (Just (In (Just (In (Just (In (Just (In (Just (In (Just (In (Just (In (J... 22:38:24 yeah 22:38:50 !perl "sup" =~ // 22:38:53 No output. 22:39:10 !perl "sup" =~ m// 22:39:11 No output. 22:39:22 > iterate(map var.filterM(const[True,False]))[] 22:39:23 Couldn't match expected type `Data.Number.Symbolic.Sym a' 22:39:23 against i... 22:39:48 I wish I had GHC 7.4. 22:40:42 shachaf: What system are you on? 22:40:53 :t \f -> (map f .) 22:40:54 forall a b (f :: * -> *). (Functor f) => (a -> b) -> f [a] -> f [b] 22:41:03 :t \f -> (map f Prelude..) 22:41:04 forall a b a1. (a -> b) -> (a1 -> [a]) -> a1 -> [b] 22:41:19 shachaf: Wait, you realise there are GHC 7.4 binaries, right? 22:41:26 elliott: Yes, but I'm too lazy to install them. 22:41:32 And also, they're release candidates. 22:41:38 @hoogle (a -> b) -> (a1 -> f a) -> a1 -> f b 22:41:38 Control.Parallel.Strategies ($|) :: (a -> b) -> Strategy a -> a -> b 22:41:39 Control.Parallel.Strategies ($||) :: (a -> b) -> Strategy a -> a -> b 22:41:39 Control.Parallel.Strategies (.|) :: (b -> c) -> Strategy b -> (a -> b) -> (a -> c) 22:41:39 I'm waiting until one of them gets voted in. 22:41:50 Democracy, you know. 22:42:09 shachaf: wget http://www.haskell.org/ghc/dist/7.4.1-rc1/ghc-7.4.0.20111219-x86_64-unknown-linux.tar.bz2 && tar xf ghc* && cd ghc* && ./configure --prefix=~/ghc-7.4 && make install 22:42:14 @hoogle (a -> b) -> (a1 -> [a]) -> a1 -> [b] 22:42:15 No results found 22:42:28 "I believe the Show superclass constraint has been removed from Num." PRAISE THE LORD 22:43:45 ALL PRAISE LORD ØRJÄÑ 22:43:56 > iterate(map(var.show).showfilterM(const[True,False]))[] 22:43:56 Not in scope: `showfilterM' 22:44:01 > iterate(map(var.show).filterM(const[True,False]))[] 22:44:02 [[],[[]],[[[]],[]],[[[[]],[]],[[[]]],[[]],[]],[[[[[]],[]],[[[]]],[[]],[]],[... 22:46:08 judging by my programming, if i become lord i will solve all your problems, although not without accidentally obliterating a few countries in the process. 22:46:56 all the problems that don't require real work, that is. 22:47:40 `perl @a = (undef); print @a // 1 22:47:43 Can't open perl script "@a = (undef); print @a // 1 ": No such file or directory 22:47:44 !perl @a = (undef); print @a // 1 22:47:45 1 22:47:56 !perl @a = (undef); print $a[0] 22:47:57 No output. 22:48:07 !perl @a = (undef); print scalar @a 22:48:08 1 22:48:51 !perl @a = (1,2,3); print @a // 3 22:48:52 3 22:48:54 :( 22:49:27 so // is not entirely equivalent to a ?: as the docs suggest. 22:50:08 @hoogle (a -> b) -> (a1 -> [a]) -> a1 -> [b] 22:50:14 oh, wait, you already wrote that 22:50:35 @hoogle a -> b -> a -> b -> a -> b -> a 22:50:36 Data.List zipWith6 :: (a -> b -> c -> d -> e -> f -> g) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] 22:50:37 Data.List zipWith7 :: (a -> b -> c -> d -> e -> f -> g -> h) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h] 22:50:40 oerjan: it's fmap . fmap 22:55:12 elliott: i was hoping for an operator so i could just write var.show ... filterM(const[True,False]) 22:55:59 oh hm 22:56:00 :t (.:) 22:56:00 forall a b (f :: * -> *) (g :: * -> *). (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b) 22:56:29 :t (.:) `asTypeOf` fmap fmap fmap 22:56:30 forall (f :: * -> *) a b (f1 :: * -> *). (Functor f, Functor f1) => (a -> b) -> f (f1 a) -> f (f1 b) 22:56:36 yay 22:56:50 > iterate(var.show.:filterM(const[True,False]))[] 22:56:51 Couldn't match expected type `GHC.Types.Char' 22:56:51 against inferred type... 22:56:57 I pretty much have one response to questions in #haskell these days. 22:56:58 now what :( 22:57:06 "You should understand why blah blah blah." 22:57:10 I could make a shachafbot. 22:57:13 oerjan: Sym has a type parameter 22:57:51 kallisti: that didn't matter with map(var.show). 22:58:11 also can you powerset a Sym [a] ? 22:58:16 er 22:58:23 > iterate((var.show).:filterM(const[True,False]))[] 22:58:25 [[],[[]],[[[]],[]],[[[[]],[]],[[[]]],[[]],[]],[[[[[]],[]],[[[]]],[[]],[]],[... 22:58:32 oh 22:58:34 ..okay 22:58:37 ah the problem was precedence 22:58:47 or associativity, rather 22:58:55 I'm kind of confused as to how [] types as Sym [a] 22:59:04 it doesn't 22:59:13 it types as [Sym [a]] 22:59:29 :t vat 22:59:30 Not in scope: `vat' 22:59:32 :t var 22:59:33 forall a. String -> Sym a 22:59:41 okay then var is not that 23:00:44 @let varr :: Arrow a => String -> Sym (a b c); varr = var 23:00:44 Defined. 23:00:49 var.show is just a trick to get something of a fixed type that shows the same as whatever 23:02:09 wat 23:02:13 :t iterate 23:02:14 forall a. (a -> a) -> a -> [a] 23:02:19 :t var 23:02:20 forall a. String -> Sym a 23:02:44 :t mapAccum 23:02:45 Not in scope: `mapAccum' 23:02:47 [Sym [a]] /= Sym a 23:02:48 @hoogle mapAccum 23:02:49 Data.List mapAccumL :: (acc -> x -> (acc, y)) -> acc -> [x] -> (acc, [y]) 23:02:49 Data.Traversable mapAccumL :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c) 23:02:49 Data.List mapAccumR :: (acc -> x -> (acc, y)) -> acc -> [x] -> (acc, [y]) 23:02:59 Hmm. 23:03:01 What's the difference? 23:03:14 Between mapAccumL and mapAccumR? 23:03:19 Similar to foldl/foldr. 23:03:20 kallisti: so? that's why it's .: not . 23:03:32 mapAccumL is often the one you want, I think. 23:03:51 oerjan: oh, er... I don't know what's that doing here then 23:04:28 as elliott would say, I don't understand function composition 23:04:57 kallisti: (var.show).: converts a list's elements to Sym a without changing what their printed as 23:05:04 kallisti: So, like, you know functions? Imagine that you had, like, a function, and, like, another function. 23:05:12 And then you had a value. 23:05:14 shachaf: not what I meant. :P 23:05:32 And so you applied one function to the value, and then applie the other function to the result of that. 23:05:33 So far so good? 23:05:33 shachaf: also poor explanation 23:05:38 oh right, it's a function on the right producing a list, too 23:05:49 Function composition is the same thing, but WITHOUT THE VALUE. 23:06:11 so it's.... 23:06:33 var( show ( (filterM (const [True, False])) x) 23:06:35 ) 23:06:44 -) 23:06:53 ) 23:06:54 :) 23:06:55 > mapAccumL f a [x,y,z] 23:06:56 No instance for (SimpleReflect.FromExpr (SimpleReflect.Expr, y)) 23:06:57 arising... 23:07:04 shachaf: Lame? 23:07:17 kallisti: no, it's fmap (var . show) ((filterM (const [True, False])) x) 23:07:30 elliott: Expect f to return a tuple and expecting SimpleReflect to Do The Right Thing with it is going a bit far. 23:07:43 I mean, there's nothing reasonable you could even do there by hand. 23:07:49 There Is No Right Thing. 23:07:55 oerjan: oh caleskell okay 23:08:15 shachaf: Well, SimpleReflect isn't The Right Thing. :p 23:08:16 .: is caleskell 23:08:16 > mapAccumL (\a b -> (a ++ show b, b+1)) "init" [5,6,7,8,9] 23:08:18 ("init56789",[6,7,8,9,10]) 23:08:24 > mapAccumR (\a b -> (a ++ show b, b+1)) "init" [5,6,7,8,9] 23:08:25 ("init98765",[6,7,8,9,10]) 23:08:27 elliott: There you go. 23:08:29 Work it out. 23:08:31 oerjan: I'm aware of .: but I forget that it's a functor thing and not a function thing. 23:08:37 Actually the example I gave there is kind of terrible. 23:08:45 shachaf: accumE' x (Cons fs fss) = Cons xs $ accumE' x fss 23:08:45 where (x', xs) = instant x fs 23:08:47 > mapAccumL (\a b -> (a ++ show b, b+length a)) "init" [5,6,7,8,9] 23:08:49 ("init56789",[9,11,13,15,17]) 23:08:50 I'm trying to figure out which one I want to port to Stream. :p 23:08:52 > mapAccumR (\a b -> (a ++ show b, b+length a)) "init" [5,6,7,8,9] 23:08:54 ("init98765",[13,13,13,13,13]) 23:09:00 I suspect it's L. 23:09:03 elliott: You probably want to port mapAccumL to stream. 23:09:34 mapAccumL is, if I'm understanding correctly, the reasonably-lazy one for lists. 23:10:56 shachaf: yo, you've got this shit right? and you've got some shit you wanna do followed by some other shit, right? but maybe you wanna do the two shits to more than one shit, you know? well you can just put a . between the two shits you wanna do and it becomes this new shit you can do where one shit that gets done becomes the shit that gets done by the other shit 23:11:33 That's not how function composition works, kallisti. That's how laxatives work. 23:12:11 shachaf: Right. 23:12:24 `addquote shachaf: yo, you've got this shit right? and you've got some shit you wanna do followed by some other shit, right? but maybe you wanna do the two shits to more than one shit, you know? well you can just put a . between the two shits you wanna do and it becomes this new shit you can do where one shit that gets done becomes the shit that gets done by the other shit That's not how function composition works, kallisti. 23:12:24 That's how laxatives work. 23:12:25 Aw. 23:12:27 797) shachaf: yo, you've got this shit right? and you've got some shit you wanna do followed by some other shit, right? but maybe you wanna do the two shits to more than one shit, you know? well you can just put a . between the two shits you wanna do and it becomes this new shit you can do where one shit that gets done becomes the shit that gets done by the other shit That's not how function composition works, kallisti. 23:12:29 `delquote 797 23:12:34 ​*poof* shachaf: yo, you've got this shit right? and you've got some shit you wanna do followed by some other shit, right? but maybe you wanna do the two shits to more than one shit, you know? well you can just put a . between the two shits you wanna do and it becomes this new shit you can do where one shit that gets done becomes the shit that gets done by the other shit That's not how function composition works, kallisti. 23:12:37 > mapAccumR (\acc x -> (x:acc, x)) [] [1..] 23:12:37 HAH. 23:12:37 ([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,2... 23:12:42 Too long for your quote database. 23:12:45 > mapAccumL (\acc x -> (x:acc, x)) [] [1..] 23:12:51 mueval-core: Time limit exceeded 23:12:51 mueval: ExitFailure 1 23:12:52 shachaf: Well, no, I could hack it in, but HackEgo would chop it off on reproduction. 23:13:03 oerjan: shachaf is lies. :( 23:13:08 Right. Which is good enough for me. 23:13:12 I like when stalker mode gets messages before irssi gets messages 23:13:25 *Main> takeStream 10 $ simulate (\e -> accumE 0 ((+1) <$ e)) (pure (Just ())) 23:13:25 [Just 1,Just 1,Just 1,Just 1,Just 1,Just 1,Just 1,Just 1,Just 1,Just 1] 23:13:27 :( 23:13:44 * shachaf has never used stalker mode. 23:13:53 I use it to verify that my line did not get cut off 23:14:08 I'm sure there's a better way I could be handling that. 23:14:14 Wow, this is just like reading IRC. 23:14:44 > snd $ mapAccumR (\acc x -> (x:acc, x)) [] [1..] 23:14:48 irssi handles line-wrapping, doofus. 23:14:49 mueval-core: Time limit exceeded 23:14:52 > snd $ mapAccumL (\acc x -> (x:acc, x)) [] [1..] 23:14:56 mueval-core: Time limit exceeded 23:14:58 shachaf: yep except no one knows you're there 23:14:58 If only I had a way of reading IRC... 23:15:18 perfect for humorous ragequits that you want to read the reaction to 23:15:24 kalliti: Unlike the normal situation, where no one cares you're there? 23:15:29 yes. 23:15:36 but maybe you're banned and you want to ruminate? 23:15:40 stalker mode has lots of possibilities. 23:16:21 i have a hunch one of mapAccumL and mapAccumR _ought_ to take the function flipped. 23:16:49 also you can pretend to be really angry and quit IRC and then when someone keeps talking you log in to reply and then leave again 23:16:49 oerjan: NO THAT'S RIDICULOUS 23:16:53 I think elliott has done this. 23:17:06 with numerous join/parts 23:17:22 by foldl / foldr analogy 23:18:00 @hoogle traverse 23:18:00 Data.Traversable traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b) 23:18:01 Data.Foldable traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f () 23:18:01 Control.Parallel.Strategies parTraverse :: Traversable t => Strategy a -> Strategy (t a) 23:18:13 -!- Patashu has joined. 23:18:14 elliott: hi have you ever used Control.Parallel.Strategies? 23:18:18 oerjan: Well, foldl/foldr are wrong. 23:18:24 And so are mapAccumLmapAccumR. 23:18:27 Everybody is wrong. 23:18:34 I'm wrong. 23:18:37 You're wrong. 23:18:49 elliott is wrong. 23:18:56 But if elliott is wrong, I don't want to be right, man. 23:19:06 kallisti: Yes. 23:31:09 "I believe the Show superclass constraint has been removed from Num." PRAISE THE LORD 23:31:16 yeah, fuck standards compliance! 23:31:21 fuck software which does what it's specified to do! 23:31:37 we'll bow to the whims of the pitchfork mob any day 23:33:29 unless GHC removes monomorphism restriction I will capsize five tankers in the ellingson fleet 23:34:37 GHC progresses way too slowly. 23:34:39 The Grassgrow Haskell Compiler. 23:34:57 the Glorious Glasgow Haskell-except-Num-has-no-superclasses Compiler 23:35:09 itym "Haskerr" 23:35:21 ? 23:35:25 nm 23:35:40 see, I'd be fine with a solution where -XHaskell98 and -XHaskell2010 do what they're supposed to 23:35:56 They don't? 23:36:00 nope 23:36:12 even with -XHaskell98, Show and Eq are not superclasses of Num 23:36:18 which breaks existing Haskell code 23:36:19 What about the fancy new superclass default constraint kind variable polymorphism inference thing? 23:36:21 some in standard libraries even 23:36:40 you'll need generalized abstract superclass default constraint kind variable polymorphism inference synonym families to do that 23:36:46 I thought that had something to do with them being able to removing superclasses without breaking compatibility. 23:36:52 but only a Java Monkey would fail to understand those 23:37:13 shachaf, there was discussion of ways to do that, but I don't think it's in GHC HEAD yet 23:37:14 * Phantom_Hoover → sleep 23:37:15 -!- Phantom_Hoover has quit (Quit: Leaving). 23:38:48 kmc: Oh. 23:38:52 So why did they remove that? 23:38:56 remove what 23:39:01 The superclass constraint. 23:39:13 I mean, I'm all for fixing the Num hierarchy, but removing a single constraint seems like the worst of all worlds. 23:39:13 i dunno man 23:39:26 it's dumb because it breaks existing code 23:39:28 Someone ought to do something! 23:39:33 like, it can turn a module which typechecks into one which doesn't 23:39:39 * shachaf goes to upvote a Reddit post. 23:39:49 if you have «f :: (Num a) => ...», and you use Eq or Show constraints within f 23:40:20 Right. 23:50:36 yeah, fuck standards compliance! 23:50:37 fuck software which does what it's specified to do! 23:50:37 we'll bow to the whims of the pitchfork mob any day 23:50:50 Right, GHC would be so much better if it just implemented Haskell 2010 and didn't deviate or extend upon it in any way. 23:51:06 elliott: That sounds like a strawman. 23:51:09 BTW, I think Eq is still a superclass, or pattern-matching would break. 23:51:11 elliott, I'm fine with extensions that need to be enabled, or at least can be disabled 23:51:15 shachaf: It is, but so is kmc's. 23:51:31 elliott: I think it adds Eq when you pattern-match. 23:51:39 elliott: Just like for OverloadedStrings. 23:51:41 in this case, i don't think there's any way to change the non-compliant behavior 23:51:46 Since Eq is certainly not a superclass of IsString. 23:51:59 and it's not an "extension", it's breakage which already broke standard library code 23:52:00 Unless it is. 23:52:01 @src IsString 23:52:02 Source not found. Maybe you made a typo? 23:52:23 kmc: The option to be standards-compliant is nice until you realise that you don't really have that option because all the libraries that everybody uses depend on tons of extensions. 23:52:40 So it's kind of a non-option anyway. 23:52:47 elliott: That doesn't mean you have to break packages that only depend on the standard. 23:53:29 elliott, those libraries document the extensions they use 23:53:34 shachaf: No, but how many of those really exist? 23:54:02 part of my objection is that the Haskell 2010 language is better specified and better documented than the "what GHC accepts this week" language 23:54:15 elliott: Enough for actual breakage to happen. 23:54:20 but even when you deviate from Haskell 2010, you note those deviations with explicit LANGUAGE flags 23:54:22 kmc: My point is that the vast majority of code out there doesn't work in a strict Haskell 2010 compiler because of dependencies; indeed, it perhaps cannot because of interfaces that are only implementable with such extensions. 23:54:31 I'm not saying standards aren't nice things. 23:54:33 i think your point is irrelevant to my point 23:54:41 I'm just saying that the Haskell report is already kind of irrelevant. 23:54:44 no 23:54:53 this is a common fallacy in #haskell 23:55:02 that, since people only use GHC, we shouldn't care about the spec 23:55:06 there are many reasons to still care about the spec 23:55:09 I care about the spec. 23:55:18 one is that it specifies what your programs mean 23:55:24 at a level of detail which the GHC manual does not 23:55:28 I'm not talking about what the ideal situation is, just what the actual situation is in my opinion. 23:55:37 As I said, I totally agree that specifications are good things. 23:55:47 for most extensions, the GHC manual has a couple of informal paragraphs and a link to a paper about a vaguely related research project 23:57:14 I'm just saying that while the situation is like it is, the vast, vast majority of code can't work with just Haskell 2010 anyway, so breaking Haskell 2010 compatibility isn't itself a reason not to do something. 23:57:23 "Breaking a lot of code" might be, though, and this change might. 23:57:57 I have the feeling that the two of you aren't going to come to an agreement. 23:58:05 * elliott also. 23:58:16 -!- Jafet1 has joined. 23:58:36 i just think it's really bad that this change can't be controlled with a -X flag 23:58:42 not only because you can't opt out 23:58:50 but because code which relies on this new behavior will not document itself 23:58:58 GHC has had a number of changes that couldn't be controlled with a -X flag. 23:58:59 you can't even test whether you're relying on it 23:59:07 Most of these were considered bugs, though, and fixed eventually. 23:59:13 shachaf, notable examples? 23:59:14 E.g. PostfixOperators. 23:59:22 -!- Jafet has quit (Disconnected by services). 23:59:24 -!- Jafet1 has changed nick to Jafet. 23:59:30 There were some others in that vein. 23:59:36 perl doesn't have a standard and it works just fine. :> 23:59:37 yeah, it's also not in the class of "GHC accepts some programs which technically should be rejected" 23:59:39 kmc: Well, if it makes you happier, the next standard is practically guaranteed to include this change now GHC's done it, making it standard once more. :p 23:59:44 elliott, oh? 23:59:54 i'm not convinced 23:59:58 kallisti, ;P