00:06:30 * SimonRC goes to bed 00:08:00 hmm to implement this i need a type checker.... 00:08:20 Hindley-Milner! 00:09:42 hmmm defining application for something that isn't a function makes this unnice 00:16:05 ok i need recursive types or a builtin fixed point operator :/ 00:16:49 just compile to haskell :p 00:16:56 haskell lacks recursive types 00:17:18 at least without some extension... not sure about that 00:17:56 jix_: haskell has a built-in fixed point operator 00:17:59 jix_: you could compile to ocaml 00:18:01 using -rectypes 00:18:06 ofc then you lose type safety 00:18:21 ehird: yeah but doing a fixed point operator is trivial 00:18:29 (when writing an interpreter) 00:18:32 jix_: for recursive types in haskell, use newtype 00:19:26 i could of course use runtime typechecking.... 00:19:30 but that sucks 00:19:31 * ehird decides to implement something in ocaml. 00:19:35 an esolang that is 00:25:23 One idea for non-tc tarpit language: Bounded-loop language with conway arrow operator. :-) 00:30:42 And Conway arrow gets some crazy large numbers fast. Especially if you chain them. Three-arrow chains rapidly produce values bigger than even Graham's number (or even "xkcd number"). 00:37:31 -!- Arrogant has joined. 00:40:21 Ilari: A(g64,g64) arrow chains, bitch! 00:40:24 Hi Arrogant. 00:40:51 hey 00:41:03 I haven't been here for like a year 00:41:09 what's the hot stuff nowadays 00:41:49 Arrogant: the usual, most likely 00:43:10 so... brainfuck and like 50 variations? 00:43:17 cool 00:43:33 alas, yes 00:43:49 Arrogant: we may have more of a functional bent nowadays, although perhaps not as recently as a year ago 00:44:09 I think a year might've been an optimistic estimate 00:44:17 Also GCC-BF. 00:44:21 -!- Dewio has joined. 00:44:30 which doesn't work yet. 00:44:36 Arrogant: ah :P 00:44:36 Oh, and EgoBot has been rewritten. 00:44:43 also the occasional befunge, right fungot? 00:44:44 oerjan: and you have to learn more about scheme and he muttered it again, this is neither politics nor fnord. 00:45:04 (Arrogant: in case you don't know who fungot is, here's a file that no man should wot of: http://zem.fi/~fis/fungot.b98.txt) 00:45:04 ehird: the structure is assumed to mean fnord)? i 00:45:47 ^ul (and underload!)S 00:45:47 and underload! 00:46:00 fungot: Yes fungot, the structures IS assumed to mean fnord). i 00:46:01 GregorR: go and ping riastradh already said that 00:46:01 oerjan: can you do mutually recursive functions in ocaml without an .mli? 00:46:07 !slashes And \/\/\/! 00:46:09 And ///! 00:46:24 !slashes /foo/bar/foobar 00:46:24 barbar 00:46:30 ehird: put them in the same val rec block with and between, iirc 00:46:33 !slashes /foo/bar/foo/bar/foo/bar 00:46:41 er, let rec 00:46:43 'sat an infinite loop ey? 00:47:09 hmm 00:47:15 /foo/bar/foo/bar/foo/bar → 00:47:21 -> bar/bar/bar/bar 00:47:25 right 00:47:31 → (output bar) 00:47:34 → /bar/bar/bar 00:47:37 → bar 00:47:39 → (output bar) 00:47:39 no 00:47:40 → end 00:47:43 oerjan: no? 00:47:51 /bar/bar/bar -> inf loop 00:47:54 ah 00:47:58 wait, why? 00:48:00 ehird, that is a rather horrific file to be sure 00:48:02 a replacement doesn't consider itself 00:48:02 Arrogant: So. 00:48:08 Arrogant: it's fungot's source! 00:48:08 ehird: he's french, jcowan. they can't type much with qwerty without suffering pain.) 00:48:09 sure it does 00:48:13 it does? 00:48:14 kay 00:48:35 I like it 00:50:33 at least in my implementation. it's not like it checks for any special cases.... 00:50:44 oerjan: mine scanned after, you see 00:50:46 as per the optimization 00:50:50 iirc 00:51:15 note that /bar/barf/bar is _definitely_ an infinite loop 00:51:25 trying to back up this ssd sucks 00:51:46 by the specification, the substitution is repeated on the first instance until the source string no longer occurs 00:52:16 bsmntbombgirl: why 00:52:16 just rsync 'er up 00:52:27 oerjan: yes 00:52:37 ehird: because i can read from it 3 times faster than i can write to anything! 00:52:51 bsmntbombgirl: buy one of the crappy-random-access-but-large-storage ssds 00:52:55 they have fast sequential speed :P 00:55:50 -!- Dewi has quit (Read error: 101 (Network is unreachable)). 00:59:04 [[“C programmers” really program not in C, but in the purely functional language cpp. As with any purely functional language, cpp consists only of (nestable) expressions, not statements. Now here’s the clever part: when evaluated (not executed), a cpp expression yields a (pure) value of type C, which is an ADT (abstract type) that represents imperative programs. That value of type C is then executed (not evaluated) by the cpp language’s RTS (run- 00:59:07 time system). As a clever optimization, cpp’s RTS actually includes a code generator, considerably improving performance over more naïve implementations of the C abstract data type. ]] 01:01:17 :P 01:02:58 I didn't know that CPP was purely functional. 01:03:04 pikhq: modulo #undef :) 01:03:27 Well, if you ignore undef, then yes, yes it is. 01:03:29 :) 01:04:25 http://conal.net/blog/posts/the-c-language-is-purely-functional/ 01:04:30 "or char *, for you type theorists, using a notation from Kleene" 01:04:46 hilarious 01:05:42 ehird: i think thats actually the origin of the * notation. not that it matters, since a char* is not a kleene star of chars but 01:06:11 :-P 01:06:46 also 01:06:48 i have to say 01:06:56 if C is purely functional, then why bother with haskell? 01:07:04 augur: the post's a joke yo. 01:07:14 is it? 01:07:14 -!- inurinternet has quit (No route to host). 01:07:16 ehird: Your MOM is a joke, yo. 01:07:18 are you sure? 01:07:22 augur: read the conclusion 01:07:26 it's argumentum ad absurdum 01:07:46 -!- Dewio has changed nick to Dewi. 01:08:07 oh i see. 01:08:19 but i dont agree with his argument in the first place! D: 01:08:26 his argument is technically true 01:08:31 unsubjectively 01:08:31 is it? 01:08:35 yes 01:08:36 because people dont code in cpp 01:08:38 they code in C 01:08:45 I beg to differ. 01:08:50 really? 01:08:50 * ehird hands augur an "I Didn't Read The Post!" badge 01:09:00 ehird, i read the post when it was first posted. 01:09:12 Someone wrote "Hunt the Wumpus" in CPP for IOCCC, IIRC. 01:09:21 so did your mom, though 01:09:26 how do people code in cpp? 01:09:28 Of note: CPP isn't TC, so this is all silliness :P 01:09:33 GregorR: Nor did you! 01:09:53 GregorR: It is if you assume iterated executions. 01:09:58 * Warrigal hands himself an "I Didn't Read The Post!" badge. 01:10:12 pikhq: Which you don't, because that's not how it's used. 01:10:13 The post fails to specify what a value of type cpp returns upon execution. 01:10:28 ehird 01:10:42 Warrigal: C. 01:10:46 As it said. 01:10:48 In particular, there's quite a lot that can't be bothered to finish this sentence, so I'm going to do something else. 01:11:05 ehird 01:11:18 GregorR: Anyways, CPP is still purely functional. It just doesn't allow recursion. :P 01:11:34 what 01:11:34 (making it the single most useless purely functional language I know of) 01:11:41 Yeah, it's purely function and non-TC. 01:11:45 So is algebra. 01:11:49 *functional 01:11:55 -!- upyr[emacs] has quit (Remote closed the connection). 01:12:07 Algebra is TC! 01:12:07 oh i see what you mean. 01:12:16 slereah_: only some algebras! 01:12:35 My computer algebra system is TC! 01:12:37 "Algebra", in the usual formulation of the word, does not include functions, and so cannot include recursion. 01:12:44 actually, i dont think any algebra is TC, since an algebra is a formal system, not an algorithm for computation 01:12:44 Algebra has infinite storage space. 01:12:44 (it is in fact a Lisp!) 01:13:00 augur : Same thing 01:13:00 Formal systems can be TC or not, surely. 01:13:10 Your mom can be TC or not, surely. 01:13:24 YOUR FACE CAN BE JFHIUDwh5iu3oi 6o56opsai35f893q90-[[[q 01:13:25 My mom doesn't have infinite memory 01:13:29 Like if there's a function from Turing machine to sentence computable by an FSA where the sentence is derivable if and only if the machine halts. 01:13:30 Slereah_: not really. First order and second order logic are not "turing complete". its meaningless to apply that phrase to them. 01:13:38 GregorR: There is some confusion, though, since most people are introduced to functions in their "Algebra" course. 01:14:08 augur : But you can define algorithm in logic :o 01:14:13 That was Godel's paper! 01:14:19 I was introduced to calculus in my Pre-Calculus course. That was weird. 01:14:21 im pretty sure it wasnt 01:14:30 the incompleteness theory isnt about algorithms 01:14:35 ... 01:14:42 he's right you know 01:14:43 Warrigal: I was introduced to the calculus of derivatives in my pre-calc class, as well. 01:14:47 Half of the paper is about them 01:15:00 With recursive functions and shit 01:15:04 But for some reason, we were only taught how to take the derivative of polynomials. 01:15:16 We were taught the definition of a derivative. 01:15:17 I guess they wanted to cover the trivial case? 01:15:24 -!- inurinternet has joined. 01:15:26 My disdain for this conversation brings about many childish "your mom" jokes. But then again, your MOM'S disdain for this conversation brings about many childish "your mom" jokes. 01:15:30 So, how do you take the derivative of x^2 + 3x + 4, everyone? 01:15:44 In my ass 01:16:01 Define "definition". Formal defintion involving either infinitisimals or \lim? 01:16:02 With milk and two scoops of sugar. 01:16:12 Or just "It's the slope of the tangent line"? 01:16:22 Plug it into the definition: lim_(h->0) ((x+h)^2 + 3(x+h) + 4 - x^2 - 3x - 4)/h 01:16:30 *Oh*. 01:16:40 pikhq : Or open sets :o 01:16:49 Slereah_: ... Open sets? Really? 01:17:03 Multiply it out: lim_(h->0) (x^2 + 2xh + h^2 + 3x + 3h + 4 - x^2 - 3x - 4)/h 01:17:04 I seem to recall analysis stuff defined with topology 01:17:18 * pikhq doesn't know much of set theory; I just got through calc 3, man! 01:17:19 Of course, the definitions are pretty much the same as limits 01:17:27 Except it employs the local vocabulary 01:17:27 Cancel: lim_(h->0) (2xh + h^2 + 3h)/h 01:17:41 Warrigal: Ouch. 01:17:43 Cancel: lim_(h->0) (2x + h + 3) 01:17:53 Plug in 0: 2x + 3 01:18:35 I didn't do that. I used the calculus I knew that everyone else didn't. 01:19:31 Don't blame you. 01:19:53 How to take the derivative of (x^2 + 3x + 4) for lazies: 01:19:54 In[11]:= D[x^2 + 3 x + 4, x] 01:19:54 Out[11]= 3 + 2 x 01:20:12 Unfortunately, Mathematica isn't allowed on the AP test. 01:20:24 Hmm, will Mathematica take a Lagrange error bound? 01:20:49 Use infinitesimals 01:20:53 They're easy to use 01:21:03 Infinitesimals are great! 01:21:03 It's like derp derp 01:21:06 there we go 01:21:07 it'll take your mom Warrigal 01:21:16 * oerjan uses monads 01:21:26 nonstandard analysis monads, that is 01:21:27 They let you show that the derivative of dy/dx with respect to x is d^2y/dx^2 - dy/dx. 01:22:30 Y'know, I'd really like to learn Haskell. Unfortunately, it seems that I don't know enough math to understand it. 01:22:34 infinitesimals don't exist ;_; 01:22:44 not in mah real number system! *hugs* 01:22:51 They're still great. 01:23:46 pikhq: you don't need any math... 01:24:15 Haskell is just functional programming. 01:24:20 It just happens to have parallels to category theory. 01:24:41 i'm pretty much mathtarded and i grok haskell 01:24:47 * pikhq is coming from a heavy string of imperative languages. Mind blowing begin now 01:25:04 pikhq: may I interest you in the airline food, Scheme? 01:25:11 (Note: is not disgusting like airline food) 01:25:13 Fine, I'll struggle through it. Mind-blowing can't be too bad for me, can it? 01:25:28 Have another analogy: 01:25:38 Mind blowing is definitely good for a person. 01:25:42 Scheme. It's Haskell's gateway drug. 01:25:43 Mind-blowing, on the other hand, is an adjective. 01:25:59 pikhq: when brain juice starts pouring out of your nose, it may be time to take a break 01:26:57 it's a fairly rare side-effect of haskell, though. not to be confused with nose-bleeding. 01:27:50 pikhq: but... 01:27:50 (all haskell side-effects are rare) 01:28:05 pikhq: http://learnyouahaskell.com/ is probably the best tutorial for an imperativer 01:28:17 (if you can stand the style, i love it) 01:28:40 pikhq: but yeah, it uses basically no mathematics and doesn't tell you false rubbish only to correct it later 01:32:31 oerjan: I thought it was purely functional? :P 01:33:15 ^ul ((monads )S:^):^ 01:33:15 monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads monads mo ...too much output! 01:33:36 !swedish monads 01:33:37 muneds 01:33:47 monads monads monads monads monads monads monads monads monads monads monads monads IO IO 01:34:02 IO IO! shub niggurath 01:34:05 or something 01:34:56 !swedish !swedish 01:34:56 !svedeesh 01:35:07 !svedeesh svedeesh 01:35:11 !help 01:35:11 help: General commands: !help, !info, !bf_txtgen. See also !help languages, !help userinterps. You can get help on some commands by typing !help . 01:35:17 !help userinterps 01:35:17 userinterps: Users can add interpreters written in any of the languages in !help languages. See !help addinterp, delinterp, show | !userinterps. List interpreters added with !addinterp. 01:35:30 !show swedish 01:35:30 sh chef | fmt -w500 01:35:59 !addinterp svedeesh sh chef | fmt -w500 01:35:59 Interpreter svedeesh installed. 01:36:04 !svedeesh svedeesh 01:36:04 sfedeesh 01:36:05 pikhq: btw, visit #haskell. we don't bite. 01:36:08 ugh. removing accidentally mutually recursive directories is annoying 01:36:14 !addinterp sfedeesh sh chef | fmt -w500 01:36:14 Interpreter sfedeesh installed. 01:36:19 !sfedeesh sfedeesh 01:36:19 sffedeesh 01:36:25 That's enough. 01:36:26 Gracenotes: ... creating mutually recursive directories sounds like quite the hat tric. 01:36:30 *hat trick >_< 01:36:36 simple as rm -rfv, but still, the log is quite verbose 01:36:46 removed directory: 'a/b/a/b/a/b/a/b/a/b' 01:36:48 removed directory: 'a/b/a/b/a/b/a/b/a' 01:36:50 etc. 01:36:53 removed directory: 'a/b' 01:36:55 removed directory: 'a' 01:37:12 I'm guessing there's a maximum recursion depth that made the whole thing terminate okay 01:37:29 Gracenotes: How did you accomplish this feat in the first place? 01:37:36 ln? 01:37:52 Linux+ext3 doesn't let you hardlink directories IIRC 01:38:15 (Where by "you" I mean "even root") 01:38:18 GregorR: not sure. I think I accidentally dragged a directory in nautilus into a folder in its directory 01:38:20 Well, then, use a different filesystem. 01:38:33 hfs 01:38:35 by "directory in nautilus", I mean a part of its gui 01:38:54 the bar at the top. I'm using ext3 by the way 01:39:17 but it's all gone 01:39:20 a = mkDirectory "a" [mkDirectory "b" [a]] 01:39:45 okay, I did it again 01:40:12 If, using some filesystem that allows you, you create two mutually recursive directories, can you unlink the top one from its original path and allow them to exist, both with one reference, defying your filesystem's simple reference counting garbage collector? :P 01:40:50 okay. Doing find on these directories does terminate 01:41:02 I'd assume this is why you can't hardlink directories. :P 01:41:13 Yeah, I'm thinkin' it just is copying into itself at some arbitarily silly depth. 01:41:47 oh.. so it must be nautilus then 01:42:00 according to Haskell, the number of slashes in the longest path is 994 01:42:06 ln: `a': hard link not allowed for directory 01:42:11 Fuck you. 01:42:13 ...hm. 01:42:19 can you morph a file into a directory in-place? 01:42:29 Uh, no? Not without a hexeditor :P 01:42:39 why not 01:42:59 Because there's no interface in the filesystem's API to allow you to? 01:43:05 Maybe with libext2? 01:43:05 there should be. 01:43:10 pikhq: for HFS+ :P 01:43:18 Hex editor. 01:43:22 I vote you use a hexeditor. 01:43:22 [ehird:~/Junk] % cd a/b/a/b/ 01:43:23 DOIT 01:43:23 my_cd:pushd: too many levels of symbolic links: a/b/a/b/ 01:43:24 DOIT NOW 01:43:26 Ridonkulous. 01:43:28 okay, first of all 01:43:36 I'm not opening a 256GB file in any editor then searching it 01:43:37 second 01:43:46 can you even do that to a mounted filesystem? 01:43:49 third 01:43:52 i don't have any backups so fuck that 01:43:53 third, why is cd redefined to pushd? 01:44:08 okay, here's the rm log. http://67.223.225.106/weird.txt 01:44:13 my_cd() { dirs=($(dirs)); if [[ ! -z $1 && $1 != $dirs[1] ]]; then pushd $*; fi } 01:44:13 setopt pushd_silent 01:44:14 alias cd=my_cd 01:44:16 alias bk=popd 01:44:18 nothing too exciting. but rm did produce it 01:44:21 pikhq: So I can jump around my "directory history". 01:44:22 $ pwd 01:44:22 /home/gregor/test/loopy/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a 01:44:45 although i should add a fwd 01:44:46 can you do that? 01:44:54 [ehird:~/Junk/a/b] % cd a 01:44:54 my_cd:pushd: too many levels of symbolic links: a 01:44:56 pushd is sweet, btw 01:44:59 oh wiat 01:45:00 wait 01:45:04 i mislinked it 01:45:18 so i herd u mislinked it 01:45:21 ehird: Perhaps by having bk pop to some other stack. :P 01:45:21 [ehird:~/Junk/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b] % 01:45:33 but it's so soft. 01:45:52 HOLY SHIT 01:45:54 pikhq: GregorR: Gracenotes: 01:45:56 [ehird:~/Junk/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b/a/b] % cd a/b/a/b/a/b/a/b/a/b/a/b/a/b 01:45:59 WHAT 01:45:59 [ehird:~/Junk/a/b] % 01:46:02 WHAT DOES IT MEAN???????????? 01:46:10 I WAS TRANSPORTED ALL THE WAY BACK! 01:46:11 APORKALYPSE NAO 01:46:20 % find a 01:46:20 a 01:46:21 a/b 01:46:23 a/b/a 01:46:25 lam 01:46:27 e 01:46:30 bda 01:46:49 ls: a/b/a: not listing already-listed directory 01:46:50 ur a fagt 01:46:58 `run ln -s ../ a 01:46:58 No output. 01:47:06 `minifind a 01:47:09 `run for i in $(seq 1000); do cd a; done 01:47:18 No output. 01:47:22 lawl :P 01:47:24 `ls 01:47:25 a \ bin \ paste \ quotes \ share \ tmpdir.8746 01:47:28 `pwd 01:47:29 /tmp/hackenv.8787 01:47:33 Lame 01:47:38 `run for i in $(seq 10); do cd a; done 01:47:39 No output. 01:47:40 `pwd 01:47:41 /tmp/hackenv.8872 01:47:43 No output. 01:47:44 Oh. 01:47:45 One env. 01:47:48 `run for i in $(seq 10); do cd a; done; pwd 01:47:49 /tmp/hackenv.8915/a 01:47:51 -!- augur has quit ("Leaving..."). 01:47:52 laaaaaame 01:48:07 `run ( while true; do cd a; done ) 2>&1 | tail -n 2 01:48:22 * GregorR just assumes that'll fail at some point :P 01:48:26 % for i in $(seq 1000); do mkdir a; cd a; done 01:48:33 i can has break my filesystem? 01:48:57 * ehird twiddles thumbs 01:49:07 $ while true; do mkdir a; cd a; done 01:49:17 (That makes me more hardcore than you) 01:49:18 Now that's dumb 01:49:27 :P 01:49:31 Uh, I think I'm running out of disk. 01:49:43 /home/gregor/test/baddir/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a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/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/ 01:50:53 a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a] % 01:50:54 No output. 01:50:55 I thought there was a maximum path length limit :P 01:50:56 * ehird runs it again 01:51:30 mkdir: cannot create directory `a': File exists 01:51:32 WTF :D 01:51:35 oh well 01:51:37 its still going 01:51:37 $ pwd | wc -c 01:51:37 3301 01:51:40 GregorR: 2.6 eliminated it. 01:51:51 The maximum path length is 'how much memory can be allocated'. 01:51:56 Sweet. 01:51:58 $ find . -name a | wc -l 01:51:58 1757 01:52:09 mine is going slowly 01:52:11 i wonder if i can... 01:52:13 MULTITHREAD IT 01:52:21 Uh ... no? 01:52:24 :( 01:52:25 * pikhq just got to list comprehensions 01:52:32 pikhq: in LYAH? 01:52:37 Yeah. 01:52:46 pikhq: just wait for the culture shock :) 01:52:56 Hasn't hit yet. 01:53:12 This is just "OMFG. Sweet." so far. 01:53:13 Argh, I tried to stop it at exactly 2000 01:53:17 $ find . -name a | wc -l 01:53:17 2001 01:53:19 SO CLOSE 01:53:23 A SPACE ODDYSEY 01:53:25 ODDESY 01:53:26 THING 01:53:38 $ pwd | wc -c 01:53:38 4027 01:54:00 WTF 01:54:01 * ehird types cd a/ and holds down tab. 01:54:04 it gets progressively slower XD 01:54:05 $ time rm -rf a 01:54:05 0.00user 0.04system 0:00.05elapsed 96PU (0avgtext+0avgdata 0maxresident)k 01:54:05 0inputs+0outputs (0major+252minor)pagefaults 0swaps 01:54:14 Now THAT'S fast! 01:54:18 :P 01:54:22 It seems to actually be gone D-8 01:54:37 I guess the filesystem does all its GC in the background. 01:54:55 Your filesystem, remember, is insanely optimized :P 01:55:18 Whereas yours was intended for m68k-based systems that used "\r" for newlines? :P 01:55:29 P:\BadDir\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a>cd a\a\a\a\a\a\a\a\a\a\a\a\a\a\ 01:55:31 The name of the file cannot be resolved by the system. 01:55:34 :( 01:55:46 GregorR: Yes, because OS X totally uses the OS Classic codebase :P 01:55:56 Asztal: WINDOWS FAG 01:56:29 ehird: "Filesystem" is an ambiguous term, I was using it to refer to the definition of the data format, not the driver. 01:56:34 GregorR: ext3 is reference counted. ;) 01:56:50 Yeah, but so's your face. 01:56:58 I count one reference to it RIGHT NOW 01:56:58 Also, HFS+ has little to do with OS Classic. 01:56:59 * ehird listens to his disk spin. 01:57:33 Oh, it was first used for OS 8.1. Never mind. 01:57:48 Nothing to do with m68k, though. ;) 01:57:49 I was about to say ... 01:58:03 Well, it's based on HFS (at least in spirit) *shrugs* 01:58:05 HFS+ rocks, anyway. 01:58:19 So does your MOM. ... in bed? 01:58:27 XD 01:58:56 God this is slow 01:59:03 I give up 01:59:07 ^C% [ehird:~/Junk/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a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a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a] % 01:59:45 FLOOD YEAH 01:59:47 [ehird:~/Junk] % time rm -rf a 01:59:49 rm -rf a 0.07s user 0.35s system 83% cpu 0.507 total 02:03:33 i don't get it 02:03:43 what 02:04:35 bsmntbombgirl: what 02:04:48 -!- CESSMASTER has joined. 02:06:05 bai 02:06:11 what comes after dichotomy and trichotomy? 02:06:17 tetrachotomy? 02:06:22 yes 02:06:23 → 02:06:46 * oerjan wondered about that yesterday 02:07:15 darn net is molasses again 02:07:38 I always confuse the ordinal prefixes. for four, there's both tetra and quad 02:07:57 then there's twice, thrice, and quarce 02:07:59 "di" is greek, so you use"tetra" 02:08:00 tetra is greek, like di 02:08:07 oerjan: great minds 02:08:12 and what's quad and everything in its sequence? 02:08:19 and slow net 02:08:20 latin 02:08:53 once, twice, thrice, quarce, quince, sense, septence, octence, novence... 02:09:01 sence? 02:09:27 octo, novem , decem 02:09:40 iirc 02:10:06 undecim, duodecim, tredecim 02:10:23 but that's not of the same ordinal forms twice/thrice are :) 02:10:33 something like, decence 02:10:47 hm. http://en.wiktionary.org/wiki/Wiktionary_talk:List_of_protologisms#More_number_words 02:10:56 true, but those were weirdly germanic/romance mixes? 02:11:03 wtf, baikce 02:11:52 I like weirdly germanic/romance mixes 02:11:57 TELEVISION. HAH 02:12:27 ... >_> 02:15:06 * oerjan wonders who in the neighborhood is downloading HD movies 02:15:13 or something 02:16:19 ..neighborhood 02:20:56 hm. time to shred a 500-MB directory with 150-something files, just for the fun of it 02:21:28 -vuz, of course 02:22:05 hm. this isn't very fun so far. 02:24:00 -!- GreaseMonkey has joined. 02:24:28 at least spider solitaire is not slow... 02:26:39 alright, successful installation of a 500gb seagate hard drive into my macbook pro 02:26:42 hooray 02:26:58 only took an hour and a half 02:30:12 omfg 02:31:27 Okay, so far I have gone from "that's kinda cool" to "Haskell is the manifestation of all that is good". 02:31:37 Brain breaking should set in soon, I think. 02:32:55 if it doesn't, http://hackage.haskell.org/cgi-bin/hackage-scripts/package/category-extras might help 02:34:05 That'd do it. 02:35:12 edwardk sometimes used to come here, iirc 02:36:04 his languages were a little more advanced than the usual discussion ;) 02:50:18 * pikhq almost has a Haskell interpreter. 02:50:21 :P 02:52:43 hm? 02:53:52 GHC takes a while to build. 02:54:01 ^help 02:54:01 ^ ; ^def ; ^show [command]; lang=bf/ul, code=text/str:N; ^str 0-9 get/set/add [text]; ^style [style]; ^bool 02:55:32 GregorR gave up adding ghc to EgoBot 02:55:53 :( 02:56:04 lambdabot is where you want to go for that 02:56:06 Aaaaw. 02:56:22 I couldn't figure out how to make it just run code and give the effing output, no header, no prompt, just output. 02:56:49 GregorR: (1) runhaskell (2) ghc -e 02:56:58 runhaskell??? 02:57:05 or runghc 02:57:21 i think it's a script, anyway it comes with ghc 02:58:01 runhaskell takes a whole Main module, ghc -e takes an expression 02:58:04 Oh right, but that requires you have a main function. You can't just give it arbitrary code. I'd like to have it work either way, ideally. 02:58:09 Ah 02:58:14 CANCEL PREVIOUS STATEMENT 02:58:39 Say, is there a haskell-mode? 02:58:54 almost certainly 02:59:19 i hear haskell is a bit hard on automatic indentation though 02:59:35 iirc you sometimes have to cycle between alternatives 03:00:55 * GregorR has never had any issues with vim's automatic indentation WRT Haskell. 03:02:02 * oerjan has never tried to set vim to do anything more clever than the default for haskell (same indentation as previous line, except automatic comment continuation afaict) 03:03:13 !haskell putStr "Hello, world!\n" 03:03:15 Hello, world! 03:03:20 !haskell main = putStr "Hello, world!\n" 03:03:22 Warning: ignoring unrecognised input `/tmp/input.9739' 03:03:25 but i understand it trips up emacs users who are used to return always ending in the right spot 03:03:28 ah right 03:03:31 >_< 03:03:47 Is the input unrecognized because it doesn't have a fekking .hs or what? 03:03:51 GregorR: i think you need a flag for it to recognize anything not ending with .hs .lhs 03:04:01 X_X 03:04:31 lemme check 03:04:42 * GregorR can't find it. 03:08:33 hi 03:11:51 "Causes all files following this option on the command line to be processed as if they had the suffix suffix. For example, to compile a Haskell module in the file M.my-hs, use ghc -c -x hs M.my-hs. 03:11:55 -x it is 03:12:22 !haskell main = putStr "Hello, world!\n" 03:12:55 Failed to load interface for `Main': 03:12:55 Use -v to see a list of the files searched for. 03:12:57 Whaaa? 03:13:56 what's the actual command line? 03:14:33 runhaskell -- -x hs -- /tmp/input.$$ 03:14:43 that option is under "batch compilation", maybe it only applies to that 03:14:50 Hrm >_> 03:15:10 lemme see 03:15:31 !haskell module Main where { main = putStr "Hello, world!\n" } 03:15:40 nah, same 03:15:51 !haskell main = putStr "Hello, world!\n" 03:15:53 Hello, world! 03:15:57 Fixtlawl 03:16:07 (I forced it to rename the file. Bloody annoying :P 03:16:09 ) 03:16:14 oh 03:17:02 It was easier than calling ghc and then running the resultant binary manually, although that also worked. 03:17:16 ic 03:18:00 !haskell 2+2 03:18:02 4 03:18:28 !sh echo '2 2 + p' | dc 03:18:28 4 03:19:12 !haskell product [1..100] 03:19:14 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 03:19:25 Sweet 03:19:35 !haskell product [1..200] 03:19:37 788657867364790503552363213932185062295135977687173263294742533244359449963403342920304284011984623904177212138919638830257642790242637105061926624952829931113462857270763317237396988943922445621451664240254033291864131227428294853277524242407573903240321257405579568660226031904170324062351700858796178922222789623703897374720000000000000000000000000000000000000000000000000 03:19:38 Can it do that? :P 03:19:39 Wow 03:19:43 !haskell product [1..1000] 03:19:58 Strugglin' a bout now, aren't ye Haskell! :P 03:21:03 !haskell length . show $ product [1..1000] 03:21:04 40238726007709377354370243392300398571937486421071463254379991042993851239862902059204420848696940480047998861019719605863166687299480855890132382966994459099742450408707375991882362772718873251977950595099527612087497546249704360141827809464649629105639388743788648733711918104582578364784997701247663288983595573543251318532395846307555740911426241747434934755342864657661166779739666882029120737914385371958824980812686783837455973174613608537953452422 03:21:28 * oerjan finds that unlikely to be his answer 03:21:37 lawl 03:22:00 strange how it would take so long, it finishes in 0.05s here 03:22:16 !haskell () 03:22:17 () 03:22:43 It has to set up the secure execution environment *shrugs* 03:22:44 well that was definitely mine 03:24:48 Is it normal for "Compiling Main" to take forever in ghci? 03:24:58 Or have I done something really screwy? 03:25:34 * oerjan doesn't actually know, still uses winhugs 03:25:48 Hahaha, a last bastion of HUGS :P 03:26:14 * pikhq suspects that mergesort was not necessarily the best choice of 'First Haskell program'. :P 03:26:17 (The original author of hugs endorses GHC in his Haskell class. True story, I was there, lawl :P ) 03:26:38 whtspc also used it when i made the ferNANDo interpreter for him 03:27:01 What I meant was that winhugs is a last bastion of hugs. 03:27:01 builtin sort in ghc is mergesort, actually 03:27:37 Yes, but that's beside the point. 03:27:43 !haskell sort [-5, -4 .. 10] 03:27:49 ... This has been taking *quite* some time. 03:28:01 parse error? 03:28:10 Well that certainly ought to have produced a result :P 03:28:14 No parse error. 03:28:19 [1 of 1] Compiling Main ( merge.hs, interpreted ) 03:28:20 no, mine 03:28:21 That's it. 03:28:26 Ah. 03:28:51 i expected a possible missing import, but not parse error... 03:29:02 If this were right, I would have implemented merge sort in 7 lines. 03:29:23 Which is, of course, purdy. 03:29:27 hm it worked fine in winhugs 03:30:03 !haskell [-5 .. 10] 03:30:04 [-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10] 03:30:12 * pikhq suspects it's his merge algorithm that's giving troubles 03:30:39 !haskell [10, 9 .. -5] 03:30:40 [10,9,8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5] 03:30:49 !haskell sort [10, 9 .. -5] 03:31:24 !haskell length [10, 9 .. -5] 03:31:25 16 03:31:28 huh 03:31:47 oh wait 03:32:18 GregorR: i think when the expression gives an error, it tries the file, and then that gives a parse error 03:32:27 that was confusing 03:32:36 It does in fact do that, yes. 03:32:53 I didn't want to make it intelligently guess whether it's an expression or a full file. 03:33:16 !haskell import Data.List; main = print $ sort [10, 9 .. -5] 03:33:19 [-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10] 03:34:01 !haskell main = print $ sort [10, 9 .. -5] 03:34:26 so it was the import error that was the actual cause 03:34:57 Note to self: infinite recursion is bad, mmkay? 03:35:22 depends ... 03:35:48 Especially in a language in which tail recursion is rewritten as iteration, and so it'll never fail with a stack overflow or similar :P 03:35:49 For a merge algorithm operating on finite lists. 03:36:01 !haskell let l = 1:l in l 03:36:16 !haskell let 1 + 1 = 3 in 1 + 1 03:36:21 3 03:36:41 one might say that's corecursion 03:36:49 i guess that might not print anything because there is no newline 03:36:59 oerjan: It should give output with or without a newline. 03:37:08 it's an infinite list 03:37:09 !haskell putStr "Where's mah newline?" 03:37:11 Where's mah newline? 03:37:18 .......... orrrrrr ... not? 03:37:22 Ah, there 'tis :P 03:37:33 Oh, in that case it won't, because it'll get killed with everything on the buffer. 03:38:08 !haskell take 1000 $ let l = 1:l in l 03:38:09 [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 03:38:33 !haskell take 1000 $ fix error 03:38:47 i don't think fix is imported 03:39:04 !haskell import Control.Monad.Fix; main = print . take 1000 $ fix error 03:39:47 not immensely promising, that 03:39:49 oh, it wouldn't work anyway, because fix error doesn't actually yield a value 03:40:04 of course 03:40:36 i ought to write some code 03:40:52 !haskell take 100 $ let fib = 1:1:zipWith (+) fib (tail fib) in fib 03:40:53 [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368,75025,121393,196418,317811,514229,832040,1346269,2178309,3524578,5702887,9227465,14930352,24157817,39088169,63245986,102334155,165580141,267914296,433494437,701408733,1134903170,1836311903,2971215073,4807526976,7778742049,12586269025,20365011074,32951280099,53316291173,86267571272,139583862445,225851433717,365435296162,591286729879,956722026041,1548008755920,25 03:41:40 !haskell take 100 $ the cookie jar 03:41:49 !haskell import Control.Monad.Fix; main = print . take 1000 $ fix show 03:41:53 "\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 03:42:16 One-line Haskell is a force to be reckoned with :P 03:43:54 !haskell main = putStr s; print s where s = "main = putStr s; print s where s = " 03:44:12 duh 03:44:25 !haskell main = putStr s >> print s where s = "main = putStr s >> print s where s = " 03:44:27 main = putStr s >> print s where s = "main = putStr s >> print s where s = " 03:44:42 EVIL 03:45:58 -!- Arrogant has quit ("Leaving"). 03:48:40 * pikhq should not be having trouble getting half the length of a list. /me really shouldn't. 03:51:58 !haskell hl l = hl_p l + 1; hl_p l = hl l; main = print . hl [1, 2, 3, 4] 03:52:25 Something like that :P 03:52:26 * pikhq figured that bit out 03:53:45 * oerjan suspect it was an Int vs. / problem 03:53:47 *s 03:54:12 !haskell hl h:t = hl_p t + 1; hl_p h:t = hl t; main = print $ hl [1, 2, 3, 4] 03:54:16 oerjan: Correct. 03:54:27 Bleh, it's been too long since I've done Haskell X-D 03:54:44 needs more parens 03:55:37 !haskell hl (h:t) = hl_p t + 1; hl [] = 0; hl_p (h:t) = hl t; hl_p [] = 0; main = print $ hl [1, 2, 3, 4] 03:55:39 2 03:55:47 !haskell hl (h:t) = hl_p t + 1; hl [] = 0; hl_p (h:t) = hl t; hl_p [] = 0; main = print $ hl [1..1000] 03:55:49 500 03:57:36 !haskell foldr id 0 . zipWith (cycle [(+1), id]) $ [1..1000] 03:57:53 bah 03:59:12 !haskell foldr id 0 . zipWith const (cycle [(+1), id]) $ [1..1000] 03:59:13 500 04:00:54 !haskell main = putStr . take 500 $ "BW" ++ cycle "AH" 04:00:57 BWAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA 04:07:19 * pikhq notes that Haskell is hard. 04:09:35 WARNING: BRAIN EXPLOSION IMMINENT 04:11:07 !haskell import Control.Monad; main = print . liftM product . replicateM 10 $ [-1,1] 04:11:49 hm 04:12:37 !haskell main = putStr s >> print s where s = "03:12 < Warrigal> !haskell main = putStr s >> print s where s = " 04:12:39 [1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1 04:12:46 Wait, what? 04:12:49 huh 04:13:01 sometimes it looks like it waits for the next command 04:13:03 Hey, it's Thue-Morse. 04:13:07 !haskell u suck 04:13:07 yes 04:13:29 !haskell main = putStrLn "u suck?" 04:13:31 u suck? 04:13:36 -!- coppro has quit (Read error: 104 (Connection reset by peer)). 04:13:37 Aww. 04:13:37 someone (Zzo38?) suggested calculating it with tensor product 04:13:54 I should figure out what a tensor product is one of these days. 04:14:01 Is it precisely what you jsut did? 04:14:04 oerjan: Brain explosion. 04:14:19 pikhq: anything i did? :D 04:14:30 @haskell main = print (replicateM 10 [-1,1]) 04:14:34 !haskell main = print (replicateM 10 [-1,1]) 04:14:45 Meh. 04:14:50 you need the import 04:15:01 !haskell import Control.Monad; main = print (replicateM 10 [-1,1]) 04:15:18 [[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[-1,-1,-1,-1,-1,-1,-1,-1,-1,1],[-1,-1,-1,-1,-1,-1,-1,-1,1,-1],[-1,-1,-1,-1,-1,-1,-1,-1,1,1],[-1,-1,-1,-1,-1,-1,-1,1,-1,-1],[-1,-1,-1,-1,-1,-1,-1,1,-1,1],[-1,-1,-1,-1,-1,-1,-1,1,1,-1],[-1,-1,-1,-1,-1,-1,-1,1,1,1],[-1,-1,-1,-1,-1,-1,1,-1,-1,-1],[-1,-1,-1,-1,-1,-1,1,-1,-1,1],[-1,-1,-1,-1,-1,-1,1,-1,1,-1],[-1,-1,-1,-1,-1,-1,1,-1,1,1],[-1,-1,-1,-1,-1,-1,1,1,-1,-1],[-1,-1,-1,-1,-1,-1,1,1,-1,1],[-1,-1,-1,-1,-1,-1,1,1,1,-1],[- 04:15:28 Wow. 04:15:37 That makes sense. 04:16:07 Oh, that's the boring straightforward way of doing it. 04:16:28 I thought you were doing it the other way. 04:16:35 oerjan: The monad stuff did it. 04:16:47 I myself have yet to try anything brain-breaking. 04:16:52 Which is probably the tensor product way. 04:16:54 I'm just finding merge sort hard. 04:17:11 Something brain-breaking would be nice. 04:17:20 Warrigal: um this is essentially tensor product 04:17:30 * pikhq might need to paste that code for help 04:17:42 once you apply liftM product to it 04:18:00 oerjan: what part is the tensor product part? 04:18:02 it's simply the tensor product of 10 copies of [-1,1] 04:18:06 I see. 04:18:56 lambdabot, get in here. 04:19:37 it _is_ a little awkward to have to do imports explicitly 04:19:53 otoh it can run files from URLs 04:20:51 * Warrigal gets lambdabot in here. 04:21:04 It's currently copying patch 739 of 1860. 04:21:10 I could add a predetermined set of imports if you'd like. 04:21:14 I do with includes for C. 04:21:28 That sounds kind of inefficient, for C. 04:21:46 !c printf("The alternative sucks.\n"); 04:21:47 Anyway, now it's copying patch 1677 of 1860, so we should be done pretty quickly. 04:21:48 The alternative sucks. 04:22:06 Hey, look, now it's applying patch 703 of 1860. 04:22:35 Data.List and Control.Monad are sort of minimal for mind-boggling stuff 04:22:55 but of course the list is never-ending 04:24:31 Delimited continuations are probably a good idea. 04:24:55 does lambdabot have that? 04:25:02 Probably. 04:25:29 i don't recall that being a "standard" library 04:25:42 lambdabot has lots of fancy stuff. 04:25:51 Then again, I guess the standard library has lots of fancy stuff nowadays. 04:26:42 * Warrigal attempts to run GHCi on Slicehost. 04:26:49 -!- Warrigal has changed nick to DungeonMaster. 04:26:50 i guess the Haskell Platform is about to become the standard library 04:26:53 * DungeonMaster rolls a d20 04:26:58 You rolled a 1. 04:27:02 CRITICAL FAIL! 04:27:04 DungeonMaster: "Attempts"? 04:27:04 -!- DungeonMaster has changed nick to Warrigal. 04:27:08 DungeonMaster: It's not exactly inefficient to do includes in C. 04:27:10 Warrigal: "Attempts"? 04:27:29 All the includes do is hand the CPP some macros and C some function declarations. 04:27:35 (oh, and typedefs) 04:27:41 Has that bug that makes it impossible to run GHCi on Slicehost been fixed yet, I wonder. 04:27:54 Really doesn't take more than half a second extra. 04:27:55 !haskell import System.Random; main = print =<< randomRIO (1,20) 04:27:58 Ah yes, THAT bug :P 04:28:02 eek 04:28:31 !sh head -c 12 /dev/urandom 2>&1 | hexdump -C 04:28:31 00000000 2f 75 73 72 2f 62 69 6e 2f 68 65 61 64 3a 20 63 |/usr/bin/head: c| 04:28:41 Bleh :P 04:28:45 !haskell import System.Random; main = print =<< randomRIO (1,20::Int) 04:28:48 10 04:29:35 i thought failing to default Random was a hugs-only bug :( 04:30:01 Ticked #2063. Opened one year ago. Milestone: 6.12.1. 04:30:23 Now to undo everything I did. Namely... 04:30:44 Remove GHC, remove lamdabot, remove darcs. 04:32:44 !haskell putStr "I'm a little monad, short and stout. Here is my handle (arguments), here is my spoutput." 04:32:45 I'm a little monad, short and stout. Here is my handle (arguments), here is my spoutput. 04:44:20 What's the etymology of "spoutput"? 04:44:30 spout + output 04:44:48 `etymology spout 04:44:49 spout (v.) \ c.1330, related to M.Du. spoiten "to spout," N.Fris. sptji "spout, squirt," Swed. sputa "to spout," and probably M.Du. spuwen "to spit" (see spew). Meaning "to talk, declaim" is recorded from 1612. The noun is first recorded 1392. It was the slang term for the lift in a pawnbroker's shop, up which articles were 04:44:51 `etymology output 04:44:52 output (n.) \ 1839, from out and put. Till c.1880, a technical term in the iron and coal trade. The verb is attested from c.1300, originally "to expel;" meaning "to produce" is from 1858. \ \ monophonic \ of recordings, broadcasts, etc., "having only one output signal," 1958, coined to be an opposite of stereophonic (q.v.). 05:13:33 -!- coppro has joined. 05:17:11 Every time you log in, I think "crapppy's here!" 05:18:04 -!- sebbu has joined. 05:29:31 thanks for the encouragement 05:29:50 I CAN'T HELP IT 05:29:51 also, boo Alberta 05:30:09 Besides, "crappy" (and to a lesser degree, "crapppy") would be an IRC nick that /exudes/ confidence. 05:30:25 Like, "I'm so awesome I can call myself 'crappy' and still have awesome to spare" 05:31:12 lol 05:34:34 -!- sebbu2 has quit (Read error: 110 (Connection timed out)). 05:37:18 Like the time I used the nick DogFace. 05:37:46 Someone said something about it. I don't remember what. 05:40:56 what, you mean that wasn't your real name? 05:49:09 Gosh, I guess it is. I never realized that. 05:50:54 `addquote what, you mean that wasn't your real name? Gosh, I guess it is. I never realized that. 05:50:55 10| what, you mean that wasn't your real name? Gosh, I guess it is. I never realized that. 05:51:05 * GregorR wurves out-of-context statements. 06:00:49 `quote 06:00:50 10| what, you mean that wasn't your real name? Gosh, I guess it is. I never realized that. 06:00:58 `quote 06:00:59 7| that's where I got it rocket launch facility gift shop 06:01:10 `quote 06:01:11 5| Hmmm... My fingers and tongue seem to be as quick as ever, but my lips have definitely weakened... More practice is in order. 06:03:12 * GregorR strokes his pussy. 06:03:26 Awww, she's purring. 06:07:18 -!- oerjan has quit ("leaving"). 06:24:11 oh i fucking love that pun 06:26:28 That's not a pun, that's a euphemism used in its original sense. 06:29:31 it's a pun 06:29:42 the meanings are intentionally confused 06:31:01 Yes, but that's not a pun, that's a euphemism used in its original sense. 06:31:17 Though I guess it's also a pun. 06:32:11 If I say, "Hah, that Oedipus sure is a motherfucker!" that's not a pun. 06:32:18 (That's not really an example, I just found it funny) 06:33:30 We should insult people by calling them Oedipus. 06:39:19 Oedipusing sons of Cerberus. 06:41:47 Go create the universe the way Atum did! 06:49:11 Regarding Atum: "As the original creator God, he made the world and everything in it by performing a certain self-pleasuring act. (Those of an innocent disposition can take this to mean he was chewing gum.)" 06:50:18 Those mother-chewing idiots can go chew gum. 06:52:27 -!- Warrigal_ has joined. 06:53:01 * Warrigal disconnects in a sentient manner. 06:53:04 -!- Warrigal has quit ("leaving"). 06:53:58 -!- coppro has quit (Read error: 110 (Connection timed out)). 07:13:30 -!- kar8nga has joined. 07:28:50 -!- immibis has joined. 07:39:33 -!- Warrigal_ has changed nick to Warrigal. 07:47:56 "Turn your grave accent into a BACKSLASH!" 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:06:37 warrie@lunch.normish.org??? 08:08:47 are you the rootnomic admin or something, that you get your own dns there? 08:13:32 -!- kar8nga has quit (Remote closed the connection). 08:15:37 I own the domain name normish.org, which is registered with GoDaddy. 08:23:58 -!- immibis_ has joined. 08:24:15 ouch 08:24:20 godaddy is the worst thing ever 08:24:36 ..at least their email service is 08:31:21 It does everything I want it to do. 08:33:28 -!- augur has joined. 08:40:50 -!- immibis has quit (Read error: 110 (Connection timed out)). 08:42:39 -!- pikhq_ has joined. 08:47:33 -!- pikhq has quit (Read error: 60 (Operation timed out)). 09:16:03 http://www.flickr.com/photos/passiveaggressive/3642661392/sizes/o/ 09:20:02 -!- immibis_ has changed nick to immibis. 09:21:40 i am trying to make an online mud (raw socket sort of thing) client at http://normish.org/home/immibis/mudclient/connect.php 09:21:49 but it just randomly disconnects 09:22:31 it uses a separate background process to communicate with the server (did i mention this was server-side + ajax) which is stopping for no apparent reason 09:22:55 source code is at http://normish.org/home/immibis/mudclient/ if anyone wants to help me debug ir 09:22:57 it* 09:49:57 -!- tombom has joined. 10:10:58 -!- Corun_ has joined. 10:25:47 -!- immibis has quit ("Some folks are wise, and some otherwise."). 10:31:27 -!- Corun_ has quit. 10:32:56 -!- MigoMipo has joined. 10:42:52 -!- augur has quit (Read error: 104 (Connection reset by peer)). 11:06:02 ehird, damn you, you added that quote back still 12:12:26 -!- augur has joined. 12:12:37 part 5 is up: http://www.spinnoff.com/zbb/viewtopic.php?p=689452#689452 12:12:40 http://www.wellnowwhat.net/blog/?p=224 12:12:42 there you go 12:12:44 direct link 12:12:45 <3 12:13:37 -!- deveah has joined. 12:38:30 -!- Sgeo has joined. 12:42:23 -!- bsmntbombgirl has quit (Read error: 110 (Connection timed out)). 12:45:17 -!- GreaseMonkey has quit ("HydraIRC -> http://www.hydrairc.org <- Nobody cares enough to cybersquat it"). 12:53:41 -!- jix_ has quit (Read error: 113 (No route to host)). 13:01:16 -!- bsmntbombdood has joined. 13:47:50 hm what would be a good name for an optimisation pass that transform code like this: 13:47:51 p[1]=255 + 255*p[8]; 13:47:51 p[8]=p[1]; 13:47:51 p[1]=0; 13:47:56 into code like this: 13:47:58 p[8]=255 + 255*p[8]; 13:47:58 p[1]=0; 13:49:20 that is, when value is used only once and then overwritten, remove the pointless store and propagate the calculation to the node that use the pointless store. 14:45:34 -!- upyr[emacs] has joined. 14:54:30 -!- augur has quit (Read error: 104 (Connection reset by peer)). 14:56:28 -!- augur has joined. 14:57:21 -!- FireyFly has joined. 15:10:40 18:50:18 * pikhq almost has a Haskell interpreter. 15:10:43 Compiler! 15:10:49 18:53:52 GHC takes a while to build. 15:10:51 That's because you have to have GHC to compile GHC yo dawggggggggg. 15:10:52 AnMaster: alpha transformation followed by beta transformation, I believe. 15:10:54 Your distro probably downloads a binary to compile the sources. 15:11:00 !haskell 2+2 15:11:01 4 15:11:04 18:58:04 Oh right, but that requires you have a main function. You can't just give it arbitrary code. I'd like to have it work either way, ideally. 15:11:09 you just need an expr 15:11:12 declarations can be 'foo where ...' 15:11:15 or 'let ... in foo; 15:11:17 ' 15:11:26 AnMaster: alpha transformation turns it into this: 15:11:26 !haskell putStrLn "you did disable IO right" 15:11:28 you did disable IO right 15:11:36 or not :P 15:11:49 18:58:39 Say, is there a haskell-mode? 15:11:51 yes, there's two ones 15:11:52 temp=255 + 255*p[8]; p[8]=temp; p[1]=0; 15:11:54 a good one and a shit one 15:12:00 And then beta transformation takes it the rest of the way. 15:12:03 fyi, you have to press tab multiple times a lot 15:12:08 since haskell indentation is ambiguous 15:12:12 Why would I disable IO? 15:12:23 GregorR: well, you wouldn't due to root-ness 15:12:29 GregorR: btw you don't need the decl style 15:12:37 !haskell main=putStrLn "this is just more verbose than using where or let" 15:12:39 this is just more verbose than using where or let 15:12:48 a=b;c=d;main=foo 15:12:48 → 15:12:52 foo where a=b;c=d 15:12:52 or 15:12:55 let a=b;c=d in foo 15:12:59 Oh yeah, that's true. 15:13:04 The first of those is the shortest. 15:13:08 i guess it doesn't matter since you already have it 15:13:11 Warrigal: well yeah, but whatever 15:13:21 GregorR: ofc, "import" can only be done in the first style 15:13:22 Anyway, it's good to be able to just throw in full programs. 15:13:40 Warrigal, hm thanks 15:13:44 Where's my foo where import Shit; 15:13:45 :P 15:13:45 (sorry was afk) 15:13:47 !haskell import System.IO.Unsafe; main = unsafePerformIO (putStrLn "im in ur type system, breaking it") `seq` return () 15:13:49 im in ur type system, breaking it 15:14:23 -!- bsmntbombdood has quit (Read error: 110 (Connection timed out)). 15:15:00 !haskell import System.IO.Unsafe; import Data.IORef; lol :: a -> b; lol x = let bitch = unsafePerformIO (newIORef undefined) in unsafePerformIO (writeIORef bitch x >> readIORef bitch) main = print (lol main :: Int) 15:15:07 eh, make that 15:15:08 !haskell import System.IO.Unsafe; import Data.IORef; lol :: a -> b; lol x = let bitch = unsafePerformIO (newIORef undefined) in unsafePerformIO (writeIORef bitch x >> readIORef bitch); main = print (lol main :: Int) 15:15:10 2199023255808 15:15:16 !haskell import System.IO.Unsafe; import Data.IORef; lol :: a -> b; lol x = let bitch = unsafePerformIO (newIORef undefined) in unsafePerformIO (writeIORef bitch x >> readIORef bitch); main = print (lol main :: String) 15:15:18 "" 15:15:27 !haskell import System.IO.Unsafe; import Data.IORef; lol :: a -> b; lol x = let bitch = unsafePerformIO (newIORef undefined) in unsafePerformIO (writeIORef bitch x >> readIORef bitch); main = print (lol 3 :: String) 15:15:29 "" 15:15:32 >:) 15:15:46 !haskell import System.IO.Unsafe; import Data.IORef; lol :: a -> b; lol x = let bitch = unsafePerformIO (newIORef undefined) in unsafePerformIO (writeIORef bitch x >> readIORef bitch); main = print (lol 3 :: Either [String] [String]) 15:15:49 Left 15:15:59 GregorR: That's "Left **Segmentation fault" 15:16:03 You should make it print segfaults :P 15:16:17 You should make your mom print segfaults. 15:16:27 I thought that was your job. 15:16:38 ... in bed? 15:17:08 Yes. 15:17:15 00:31:21 It does everything I want it to do. 15:17:19 also your argument for using Windows. 15:17:41 Also an argument for RealDolls. 15:19:55 AnMaster: Please don't revert over a week of changes just to settle a silly feud with ehird. 15:20:03 don't encourage him :P 15:20:10 (OK, two days, whatever :P ) 15:20:32 GregorR, sure, but please make ehird respect your decision then. 15:20:58 AnMaster: He reverted it including my quote, plus after you said that the first time he explicitly stated he wasn't giving any sort of "official opinion" on it. 15:21:04 Nice appeal to authority, but seriously, just drop it. 15:21:18 ehird, I suggest you drop it too then 15:21:40 I have no official opinion except that blood-feuds should be fought with minimal collateral damage to unrelated commits :P 15:25:31 -!- bsmntbombdood_ has joined. 15:26:48 -!- BeholdMyGlory has joined. 15:28:39 19:24:48 Is it normal for "Compiling Main" to take forever in ghci? 15:28:40 19:24:58 Or have I done something really screwy? 15:28:42 Really screwy. 15:28:45 Or your module is gigantic. 15:28:54 GregorR, how is that done then? 15:29:14 `cat bin/quote 15:29:14 #!/bin/bash \ DB="sqlite3 quotes/quote.db" \ \ if [ "$1" ] \ then \ ARG=$1 \ ID=$((ARG+0)) \ if [ "$ID" = "$ARG" ] \ then \ $DB 'SELECT id,quote FROM quotes WHERE id='$ID \ else \ ARG=`echo "$ARG" | sed 's/'\''/'\'\''/g'` \ $DB 'SELECT id,quote FROM quotes WHERE quote LIKE 15:29:15 SQL, enjoy. 15:29:25 heh. 15:29:46 AnMaster: Please drop it... 15:29:48 Er. 15:29:50 not that DROP. 15:29:53 ehird, :P 15:30:10 ehird, but seriously, please stop adding it back, it isn't very funny even. 15:37:36 -!- jix has joined. 15:42:16 -!- deveah has quit ("MUHAHAHAH!!!1111"). 15:46:51 -!- bsmntbombdood_ has quit (Read error: 110 (Connection timed out)). 15:47:29 -!- bsmntbombdood_ has joined. 15:52:37 -!- CESSMASTER has quit ("☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃"). 16:01:07 -!- GregorR-L has joined. 16:02:06 you know what's really stupid? 16:02:09 dongles. 16:02:14 no, not dongs. dongles. 16:02:18 -!- KingOfKarlsruhe has joined. 16:02:42 -!- KingOfKarlsruhe has left (?). 16:05:09 -!- FireyFly has quit ("Later"). 16:23:58 -!- bsmntbombdood_ has quit (Read error: 110 (Connection timed out)). 16:31:36 -!- CESSMASTER has joined. 16:33:33 -!- pikhq_ has changed nick to pikhq. 16:33:35 -!- inurinternet has quit (Read error: 60 (Operation timed out)). 16:33:51 ehird: Yeah, it was really screwy. 16:34:05 pikhq: i recommend grabbing a binary of ghc, painful as that may sound 16:34:14 building it is a non-trivial affair, you might have messed up 16:34:16 or your module was 16:34:23 depends :P 16:34:27 ehird: Emerge built it. 16:34:32 that's true 16:34:39 pikhq: what version is it 16:34:40 ? 16:34:46 6.8.2 16:34:54 pikhq: !!!!! 16:35:01 Kio? 16:35:19 pikhq: The latest version is *6.10.3*. 6.8.2 is years old and 6.10 has new language extensions and the like. 16:35:28 If it's still on such an ancient version I'm not sure I trust whoever made that buildfile... 16:35:32 Jebus. 16:35:44 i think 6.8.2 was released in like may 08 16:35:51 * pikhq wonders if there's a haskell overlay 16:36:49 There is 16:37:03 Right then, use that :-P 16:37:29 When I last checked gentoo, 6.10.1 was out and 6.6.something was still in the main repo 16:37:56 And Gentoo users complain about Debian dinos—ahem—stable! 16:37:59 6.4.2 is still in the repo. 16:38:05 Wow. 16:38:16 6.4 was released in March 2005. 16:38:20 s/still in the main/still the latest in the main/ 16:38:24 6.4.2 April 2006. 16:39:11 pikhq: just checked; 6.8.2 was released December 2007. 6.8.3 was released in June 2008, so Gentoo has a version that's been out of date for a year and 7 months :P 16:39:23 Way to go, Gentoo, way to go. 16:39:38 If it were ion, they'd be sued already! 16:39:43 ehird: Eh? It's been out of date since June 2008, so a year. 16:39:53 Erm. 16:39:54 Right. 16:40:03 Well, the version is a year and 7 months old. 16:40:09 fizzie: lol@tuomov 16:40:50 Many things are older than that but not at all out of date :-P 16:41:57 Which reminds me for some reason, a vim bug I reported has apparently been fixed: http://www.mail-archive.com/vim_dev@googlegroups.com/msg05850.html 16:42:43 A three line patch. Exciting 16:42:52 "I'll look into it later." - Bram 2008-11-26 16:42:58 Later indeed 16:43:02 cool, his signature is way giganticer than McQ limit 16:43:15 and is as obnoxious about aid as the vim start screen :D 16:46:37 Yes, one line saying "help me help" is obnoxious indeed... er, no it's not? 16:47:00 Deewiant: i'm just irritated that every time I start up vim I get his soapbox 16:47:14 also, it's 3 lines in vim 16:47:32 Two 16:47:35 "", "Help poor chi...", "type :help icc..." 16:47:42 Deewiant: the extra newline wouldn't be there if it were removed 16:47:44 "" doesn't count 16:47:50 ehird: It could be, though. 16:47:51 yes it does, it's added space due to it 16:47:54 Wouldn't look any worse. 16:48:03 It's around 10 lines and centered anyway 16:48:05 Deewiant: but the line under the "VIM - Vi IMproved" doesn't 16:48:08 * Sgeo reported a bug in NetHack 16:48:13 so we can only assume... 16:48:39 ehird: Anyway, that is somewhat more annoying than the signature, yes. 16:48:52 McQ bitch 16:49:52 -!- inurinternet has joined. 16:49:57 I seem to recall that there's a way of disabling that startup screen but not what it is. 17:13:17 [[please watch remarks like "only" and "obviously". they give an impression of close-mindedness.]] 17:13:32 ↑ after I said you obviously won't find non-iphone app store apps in the app store :-P 17:13:47 -!- tombom has quit ("Peace and Protection 4.22.2"). 17:15:19 Clearly it is better to use "clearly" instead. 17:15:41 It stands to reason that $tautology. 17:15:54 (to be fair, afterwards: [[oh -- you're right. i didn't read your "obvious" remark carefully]] ) 17:27:48 It stands to reason that if 1 + 1 = 2, then 1 + 1 = 2. 17:29:19 It stands to reason that if succ 1 == 2, then succ 1 == 2. 17:30:01 (except in cases of languages with this pesky 'state' thing) 17:35:30 pikhq: this is the smoothest haskell indoctrination i've ever witnessed 17:35:41 are you sure you weren't a closet functional weenie to start with? 17:36:13 Pretty sure. 17:36:21 I, uh, am fond of math. 17:36:29 That's about it. 17:37:10 pikhq: btw by the end of this you'll be unable to code in any other language without swearing every 5 minutes... 17:37:27 just a warning. 17:37:46 ehird: *Any* other? I'd hope I could at least code in languages that encourage functional programming. 17:38:05 pikhq: But Haskell is the only widely-used lazy language... 17:38:15 You might get by in OCaml until you try to do some operations on every integer ;-) 17:39:17 But, man. powers_of_two = map (2^) [1..] 17:39:36 I feel like I have achieved nirvana. :P 17:39:51 pikhq: "powersOfTwo" is the convention, fwiw. 17:40:07 camelCase? Mmkay. 17:40:25 pikhq: ThisIsCamelCase, thisIBelieveIsStudlyCaps 17:40:39 StudlyCaps (or perhaps StUdLyCaPs, also known as StickyCaps) is a variation of CamelCase in which the individual letters in a word (or words) are capitalized and not capitalized, either at random or in some pattern. 17:40:42 okay, no 17:41:00 lowerCamelCase, I guess. 17:41:03 thisIsAVariantOfCamelCase. 17:41:03 -!- MizardX- has joined. 17:41:16 UpperCamelCase, lowerCamelCase. 17:41:21 you-are-now-thinking-of-lisp 17:41:23 snake_case. 17:41:47 deewiant, your UpperCamelCase is i thin called PascalCase 17:41:49 ccase 17:41:58 comex: no no 17:42:04 augur: no 17:42:06 that's a ridiculous nam 17:42:06 e 17:42:09 czrqcase 17:42:18 ehird: im just telling it like it is! 17:42:30 ehird: no 17:42:37 It is, yes, also called that. 17:42:37 (just to complete the cycle) 17:44:09 * pikhq wonders why his mergesort is returning an empty list. Probably screwed something up. 17:44:16 pikhq: show the source? 17:44:23 Just a sec. 17:44:28 perhaps you asked it to sort an empty list 17:44:37 mergesort [10,9..1] 17:44:44 Urm. 17:44:47 The mergesort source. 17:44:54 pikhq: holy shit, that works 17:44:55 Yes. Pastebinning. 17:45:14 sometimes I love haskell 17:46:09 Sometimes not? 17:46:39 http://pastebin.ca/1471359 17:47:05 Wow, that's way better code than I ever write as a new Haskeller. 17:47:11 -!- bsmntbombdood has joined. 17:47:26 mergesort (x:xs) = let halfLength xs = truncate $ (fromIntegral . length) xs / 2 17:47:26 (left, right) = splitAt (halfLength (x:xs)) (x:xs) 17:47:33 pikhq: you only call halfLength once 17:47:34 why not say: 17:47:49 halfLength = truncate $ (fromIntegral . length) (x:xs) / 2 17:47:49 ? 17:47:52 pikhq: Your mergesorts will always return []. 17:48:06 Deewiant: Yes, that is the bug. 17:48:08 hm 17:48:10 Your mergesort returns either [], or mergesort foo `merge` mergesort bar 17:48:10 pikhq: (btw you can do foo@(bar:baz) and foo=(bar:baz)) 17:48:22 what other identifier naming conventions are there? 17:48:24 And [] `merge` _ = _ `merge` [] = [] 17:48:30 So it can't return anything other than []. 17:48:38 -!- coppro has joined. 17:48:46 Mmm. Hooray, thinko. 17:48:48 -!- MizardX has quit (Read error: 145 (Connection timed out)). 17:48:51 ehird: Oh? 17:48:54 I have a recommended solution unless you want to figure it out yourself 17:49:01 augur: ptsSystemsHungarian (pointer to struct :P) and scvsAppsHungarian (spelling convention) 17:49:02 -!- MizardX- has changed nick to MizardX. 17:49:05 pikhq: yah, as a pattern match 17:49:16 (Other stuff might still be broken but that should explain your issue) 17:49:19 ehird: true. 17:49:29 that's not really a case_convention though 17:49:32 Deewiant: Gimme a bit. 17:49:36 yeah 17:49:39 augur: 'case convention' (for bizarro languages) 17:49:39 but thats ok 17:49:46 its a naming convention 17:49:52 if we allow method names, then we have like 17:50:14 thisIs:someAbsurdly:longMethod:nameLikeYouFind:inSmallTalk:andObjectiveC: 17:50:23 that's a badly factored method. 17:50:35 actually its very often a very correctly factored method 17:50:43 atleast it can be 17:50:52 Clearly, merge _ [] and merge [] _ are freaking wrong. ;) 17:51:00 they tend to be complex construct-like things 17:51:04 or complex query things 17:51:07 or what not 17:51:14 complex constructor-like things** 17:51:21 pikhq: Heh, that's true too, but I don't think it'll solve the issue. 17:51:23 merge xs [] = xs and merge [] ys = ys ought to do it. 17:51:34 Hrm. Lemme test and see what I'm thinking of wrong now. 17:51:43 Test first; maybe I'm wrong, although I don't think so. 17:52:00 pikhq: Prove it correct in Coq! 17:52:43 for instace, you might have something like NSWindow's window:shouldDragDocumentWithEvent:from:withPasteboard: 17:52:55 Cocoa isn't very good Smalltalk. 17:53:02 or dragImage:at:offset:event:pasteboard:source:slideBack: 17:53:03 (If it were Smalltalk, that is.) 17:53:06 Can has stack overflow! Yay! 17:53:13 :-) 17:53:14 right, i know, but smalltalk has big method names too 17:54:05 pikhq: The fix to that is the same as the fix I was thinking of earlier. 17:54:59 for instance, ehird, take the MenuMorph method add:subMenu:target:selector:argumentList 17:55:12 spose. 17:55:26 Deewiant: Hint? 17:55:29 or addWithLabel:enablementSelector:target:selector:argumentList: 17:55:30 hey, I like that practice 17:55:40 pikhq: What happens with lists of length 1? 17:55:49 [foo addWithLabel:lbl enabelementSelector:... 17:55:52 is a lot more clear than 17:55:59 foo.addWithLabel(lbl, es, tgt, sl, al) 17:56:08 as long as I have autocompletion so I don't have to actually type that shit out :p 17:56:25 sans autocompletion, give me the latter any time 17:56:27 Currently? ... Infinite recursion. Yay? 17:56:46 Can you figure out why? :-) 17:56:48 comex: yes, thats why its useful 17:56:53 its easier to remember 17:56:56 but its a lot more verbose 17:57:09 Because mergesort calls mergesort for all lists greater in size than 0. 17:57:30 but its also more proselike 17:57:38 and a lot of times it makes your code self-documenting 17:57:47 pikhq: does it reduce the amount of work it has to do for such lists? 17:57:53 if not, you're always going to loopinf. 17:58:00 Fixed with mergesort [x] = [x] 17:58:06 Bada! 17:58:06 You win! 17:58:29 Now, I've just got it returning the reverse of the sorted list, because I screwed up the comparisons in merge. 17:58:37 // add a menu morph with a label, enablement selector, target, selector, and argumentlist 17:58:37 MenuMorph new addWithLabel: label enablementSelector: ls targer: targ selector: sel argumentList: arglist. 17:58:44 kind of redundant to have the comment! 17:59:04 pikhq: surely that is a bad basecase. 17:59:16 uhh 17:59:19 why is that a bad base case 17:59:21 mergesort [x] = [y] is much better, yes 17:59:23 mergesort [] 17:59:31 he has more than one base case........... 17:59:34 lame 17:59:39 you only need the one! 17:59:42 and | length xs (compare blah), 17:59:45 scans the whole list 17:59:47 → slow 17:59:52 mergesort x | null x || null (tail x) = x 17:59:59 Deewiant: smells like lisp. 18:00:04 for backend peephole optimiser, how insane is it to use regular expressions on the generated output to implement that :D 18:00:19 ehird: mergesort x | liftM2 null (null.tail) x = x 18:00:22 Note: this is my first vaguely non-trivial Haskell. 18:00:39 Deewiant: lawl 18:00:43 Deewiant: smells like bad haskell :) 18:00:52 pikhq: it's very good 18:01:12 http://pastebin.ca/1471386 Final result. 18:01:37 haskell haskell haskell haskell haskell haskell haskell haskell haskell haskell haskell haskell HASKELL, HASKELL 18:01:40 mergesort x | uncurry (||) . join (***) null . (id &&& tail) $ x = x 18:01:45 A HASKELL!!! A HASKELL!! 18:01:49 Deewiant: Oh boy. 18:01:57 pikhq: btw: 18:02:16 18:02 ehird: @type div 18:02:16 18:02 lambdabot: forall a. (Integral a) => a -> a -> a 18:02:20 mergesort x | (id &&& tail) >>> join (***) null >>> uncurry (||) $ x = x 18:02:21 pikhq: truncate $ (fromIntegral . length) xs / 2 18:02:23 → 18:02:28 length xs `div` 2 18:02:41 Deewiant: honestly what the fuck. that's beautiful. does it work? 18:03:08 pikhq: additionally, your "halfLength xs = ..." should become "halfLength = length (x:xs) `div` 2" since you only use it once 18:03:09 ehird: Kthx. 18:03:11 lament: Of course it does. :-P 18:03:14 apart from that, good code 18:03:34 pikhq: although I'd do oxs@(x:xs) and oys@(y:ys) everywhere 18:03:39 since you do a lot of (x:xs) stuff 18:03:41 Certainly not bad for your first vaguely non-trivial Haskell. 18:03:41 merge shadows the outer x:xs 18:03:47 very much so 18:03:48 Run it through -Wall 18:03:53 -!- bsmntbombdood has quit (Connection timed out). 18:03:54 just some general stylistic suggestions 18:03:57 Deewiant++ 18:04:00 maybe hlint too 18:04:11 My first vaguely non-trivial Haskell was essentially an imperative program 18:04:16 It wasn't pretty 18:04:24 (Still isn't) 18:04:28 ("cabal install hlint"; if you don't have cabal(1), install your distro's cabal-install package) 18:04:40 or get hlint from your package manager if it offers it 18:05:10 my every non-trivial haskell program (well, both of them) is essentially an imperative program :( 18:05:32 i highly suspect pikhq of knowing haskell for years 18:05:35 well no, i have a chord parser that's just parsec stuff 18:05:58 Mine uses clever types like type Result = (Mapping, String, (Int, Int, Int, Bool, Bool), String) -- (program, title, (GOODs, BADs, UNDEFs, END?, N/A?), output) 18:06:18 * ehird stabs Deewiant 18:06:23 Unsurprisingly, it devotes 18 lines to defining fst,snd,trd,frth,ffth for tuples up to size 5 18:07:10 ("Program", wrapThCol . htmlEscape . fst . fst . fst3), 18:07:18 Beats me what fst . fst . fst3 means here. 18:07:18 * ehird kills Deewiant with a fork 18:07:43 case ((snd $ fst3 p) `elemIndex` (map (snd.fst4.snd) fr)) of 18:07:53 Deewiant: Eeeew? 18:08:06 eghtnth? 18:08:14 pikhq: Yeah, eeeew. 18:08:26 ehird: Good call with oxs@(x:xs). That's nice. 18:08:38 Hey, this program is important: it parses my custom-type files which have the mycology comparison data 18:08:54 pikhq: I'm not sure "oxs" is the best name, but I couldn't think of anything better :P 18:08:54 Incidentally, it could also use a rewrite, but that's besides the point 18:09:13 buildTable' _ _ _ _ [] _ [] = "" 18:09:23 There's some kind of Zen to this, I'm sure. 18:09:36 Man, pastebin that program, pronto. 18:09:38 I've only had to fix one bug in it, I think. 18:09:38 ehird: Well, it's certainly cleaner than using (x:xs) everywhere. 18:10:19 Yah 18:10:53 Now if only I could remember how ti install Emacs Lisp packages so I could have Haskell mode. 18:11:01 * pikhq gets out his dead-tree manual 18:11:14 http://deewiant.pastebin.com/f3306916 18:11:41 pikhq: Package manager? 18:11:47 pikhq: BTW, you want the "haskell-indentation" mode too. 18:11:54 Also inferior-haskell, if you're into that sort of thing. 18:11:59 Deewiant, that green background thingy for strings. Unusual. 18:12:19 Yes, it is. 18:12:35 Deewiant: jeez that program sucks 18:12:45 (jeez that syntax highlighting sucks) 18:12:54 anyone tried leksah? 18:12:56 That program rocks, it does exactly what it should. 18:13:13 i was completely unable to install lexah :( 18:13:17 leksah 18:13:32 lament: gtk + os x is like ... two things that don't go together without a lot of pain. 18:13:41 like... like gtk and os x. 18:13:52 yeah 18:13:55 i'm stuck doing haskell in vim 18:13:58 Deewiant, nice definition of rocks 18:14:01 i haven't used leksah but I don't like how it changes 'beta' to the greek symbol and thus encourages you to use it 18:14:04 which only sort of works 18:14:06 vs say "a" or "b" 18:14:09 (it also does "gamma") 18:14:13 since that's not typically used in haskell. 18:14:17 AnMaster: :-P 18:14:22 also i don't really like IDEs 18:14:30 Deewiant, it isn't clean or such though. 18:14:30 I'm with ehird 18:14:42 No, it isn't. 18:14:43 if textmate was open source, worked on more stuff, and had a port of haskell-indentation.el, I'd be all over it 18:14:59 "if textmate was emacs I'd be all over it" 18:14:59 atm i just use it anyway and manually indent haskell since it's the easiest 18:15:06 Sweet. Haskell mode FTW. 18:15:09 Deewiant: no, emacs is mostly shit :P 18:15:15 i want a few specific things, i.e. 18:15:19 being open source — not emacs-specific 18:15:27 worked on more stuff — nor this 18:15:34 a port of haskell-indentation.el — nor this. 18:15:36 QED. 18:15:41 but the total result is emacs :P 18:15:42 pikhq: yah, it is nice. 18:15:54 AnMaster: for definitions of emacs that are willfully ignorant and ignore a huge portion of emacs. 18:16:06 emacs is pretty horrible 18:16:12 ehird, I thought those were included in "worked on more stuff"? 18:16:25 stuff includes irc for example clearly 18:16:26 also haskell is different enough from everything else that it easily deserves a dedicated editor 18:16:41 AnMaster: stuff = platforms. 18:17:00 ehird, that wasn't clear from the context. Could have been "more file formats" or such 18:17:07 lament: meh; the only hard part that you can't do with a general language mode is indentation 18:17:10 make a plugin :P 18:17:23 AnMaster: you're the only person who could see it as ambiguous.. 18:17:27 *... 18:17:43 ehird: I thought it meant file formats. 18:17:43 ehird, err, have you asked everyone else in the channel? 18:17:51 there, I wasn't alone 18:17:52 :P 18:17:54 It's the thing I associate emacs with. 18:17:54 ok, everyone who's a dirty foreigner 18:17:56 * pikhq notes that Gentoo's haskell mode package installs haskell-mode, haskell-indent-mode, and inferior-haskell. 18:18:07 pikhq: Haskell-indent-mode? 18:18:08 ehird: Right, everybody native understands "stuff == OSs" :-) 18:18:12 ehird: Erm. 18:18:15 Haskell-indent. 18:18:17 maybe that's haskell-indentation's mode name 18:18:29 ehird: indentation, prettification (like leksah does), automatic documentation, "go to definition", "find usages", refactoring, interface with hoogle, automatic completion 18:18:33 If it's a mode, it's a minor mode. 18:18:38 you do know how inferior-modes work right, pikhq? :P 18:18:41 Yeah, it's a minor mode. 18:18:46 pikhq: it's automatic 18:18:52 it hooks into haskell-mode 18:18:58 ehird: listing of stuff in a module 18:19:12 Ooookay... That doesn't exactly come up much in Emacs, now does it? :P 18:19:22 ehird: hooks with GHC obviously 18:19:26 -!- augur has quit (Read error: 104 (Connection reset by peer)). 18:19:30 ehird: including debugging and profiling 18:19:35 -!- augur has joined. 18:19:44 lament: indentation — the only hard part; prettification — leksah just does some alpha/gamma shit and :: and ->, meh; automatic documentation — meh; "go to definition" — should go in the language mode; "find usages" — ditto, editors should support this stuff; refactoring — meh, make a plugin; hoogle — meh; completion — language mode 18:19:48 listing — language mode 18:19:51 ghc hooks — meh. 18:20:04 huh. 18:20:11 that's a lot of mehs. 18:20:21 five. 18:20:26 prettification is quite hard, i suspect 18:20:31 out of 9 18:20:38 lament: yes, but it isn't all that valuable 18:20:41 ehird: yes, but your mehs are unjustified 18:20:46 !haskell main = print (repeat 5 "meh") 18:20:46 also, leksah just does a few boring adjustments 18:20:49 ehird: so?- 18:20:54 !haskell repeat 5 "meh" 18:20:57 i'm not saying how awesome leksah is, i've never even used it 18:20:58 lament: so your mom 18:21:01 GregorR-L: hey it broked. 18:21:05 lament: try yi. 18:21:10 ? 18:21:13 (note: its cocoa ui is unusable) 18:21:15 !sh echo foo 18:21:16 foo 18:21:16 !sh echo hi 18:21:16 hi 18:21:21 ehird: i suspect i'm going to hate anything that has a vim mode and an emacs mode. 18:21:21 !haskell repeat 5 "GregorR-L it is broke" 18:21:22 !haskell printStr "Foo?" 18:21:26 !haskell wat 18:21:33 !swedish printStr "Foo?" 18:21:34 preentStr "Fuu?" 18:21:34 lament: Like bash? 18:21:36 lament: ok, if you prefer to spend your time arguing on irc :P 18:21:36 Erm, 18:21:40 !haskell putStr "Foo?" 18:21:42 Foo? 18:21:46 Yeah, it's not broken. 18:21:50 !haskell print (repeat 5 "meh") 18:21:58 Deewiant: no Data.List 18:22:00 i think is the issue 18:22:05 GregorR-L: it used to print out the expression automatically if you didn't yourself 18:22:06 !haskell 2+2 18:22:07 That's not in Data.List 18:22:07 4 18:22:09 ↑ this used to work 18:22:10 errrrrr 18:22:11 wtf 18:22:14 !haskell print (replicate 5 "meh") 18:22:15 ["meh","meh","meh","meh","meh"] 18:22:17 oh 18:22:17 That'd help 18:22:19 there's no such thing as repeat 18:22:22 Yes there is 18:22:26 GregorR-L: make it give us the error messages then :P 18:22:28 Deewiant: well right 18:22:29 but not for that 18:22:29 It just has type :: a -> [a] 18:22:37 !haskell repeat "lol" 18:22:39 !haskell repeat "meh" 18:22:43 ugh 18:22:55 egobot sucks due to not having rate limiting and line cutoff and shit; can we get lambdabot in here? 18:22:57 ehird: Make it give your mom the error messages. 18:22:58 who owns lambdabot these days, Cale? 18:23:03 !haskell sequenceM_ (repeat (print "lol")) 18:23:07 ehird: Don't respond to the DCC... 18:23:17 Deewiant: client. 18:23:31 Well duh 18:23:35 Configure your client properly, or switch to another. 18:23:49 your mom 18:23:51 oh, it's sequence 18:23:57 anyway i don't want a bunch of shitty dcc windows :P 18:24:01 !haskell sequence_ (repeat (print "lol")) 18:24:02 "lol" 18:24:07 ... what? 18:24:10 "shitty dcc windows"? 18:24:19 Deewiant: tabs. in my irc client. 18:24:20 lament: One per line. 18:24:20 with dcc chats. 18:24:22 do not want. 18:24:30 ehird: And what does this have to do with anything? 18:24:44 ............... 18:24:53 I mean 18:24:59 i don't want to switch to a dcc-doing client because i don't think it's a reasonable way for EgoBot to do things anyway 18:25:02 Is your current situation not a billion shitty DCC windows 18:25:13 *yawn* 18:25:19 no, my current situation is nothing because my client doesn't support dcc. 18:25:20 ehird complains endlessly about EgoBot DCC'ing. 18:25:36 I'm playing the world's smallest violin for you, ehird. 18:25:44 -!- ChanServ has set channel mode: +o lament. 18:25:45 Ah, I thought you were complaining about how you get DCC spammed without cutoff and shit 18:25:56 -!- lament has set channel mode: -o lament. 18:26:02 GregorR-L: what about the world's smallest pianist? 18:26:07 lament: THREATENING OPS OF DOOM 18:26:12 lol 18:26:27 threatening, yet completely impotent 18:26:39 quick everyone, be on your best behaviour for lambdabot coming in here. 18:26:47 -!- gwern has joined. 18:27:04 * ehird looks professional. 18:27:05 -!- lambdabot has joined. 18:27:22 Do we really need to bring "the" lambdabot here? 18:27:27 a parade, in honour of lambdabot!! 18:27:30 > repeat "yes" 18:27:31 ["yes","yes","yes","yes","yes","yes","yes","yes","yes","yes","yes","yes","y... 18:27:33 Deewiant, good question 18:27:34 As opposed to GregorR or somebody just running their own 18:27:37 I mean 18:27:38 @vixen do we really need you here? 18:27:38 yes, still here 18:27:42 Deewiant: why bother? 18:27:44 @vixen or would you rather go away? 18:27:45 what did i say to upset you? 18:27:46 this is simpler :-P 18:27:51 This is the kind of place where people try to DOS bots and break them 18:28:00 naw 18:28:01 lambdabot is broken enough as-is :-P 18:28:04 @vixen baby, wanna get DOSed? 18:28:05 no 18:28:14 @vixen what about hot sex? 18:28:14 i dunno, what about? 18:28:15 lambdabot's in too many channels, we're too responsible (← wishful thinking) ;-) 18:28:18 For instance, I don't know if it has protection against bot-loops 18:28:20 lament: get a room 18:28:26 In fact, I seem to recall it doesn't 18:28:28 Deewiant: it doesn't do any commands 18:28:29 @vixen do you have protection? 18:28:30 i do occassionally, i guess 18:28:32 it prefixes output with a space 18:28:44 so unless your bot's prefix is " " 18:28:44 That used to be circumventable 18:28:44 no, my current situation is nothing because my client doesn't support dcc. <-- what a stupid client. 18:28:46 loops are an important point 18:28:53 we can pretty much guarantee people will try to make them 18:28:55 Not sure it is anymore. 18:28:58 > let s x y z = x z (y z); k = x y = x; i = s k k;in i [1..10] 18:28:59 : parse error on input `=' 18:29:01 -!- labo has joined. 18:29:05 I FAIL! YAY! 18:29:11 pikhq: k = x y = x 18:29:15 = fail 18:29:21 > "\o/" 18:29:21 Hahah. 18:29:21 | 18:29:21 >\ 18:29:22 Yes. 18:29:22 : 18:29:22 lexical error in string/character literal at chara... 18:29:24 That would be fail. 18:29:29 > "\\o/" 18:29:29 | 18:29:29 > let s x y z = x z (y z); k x y = x; i = s k k;in i [1..10] 18:29:29 /| 18:29:31 "\\o/" 18:29:31 | 18:29:31 [1,2,3,4,5,6,7,8,9,10] 18:29:31 |\ 18:29:35 lament: ais523 and me are the most common loopers and ais is probably too responsible to botloop lambdabot, and i'm too lazy :) 18:29:35 Gah. 18:29:35 ..... 18:29:42 Thas more like it. 18:29:50 Well, it's good to see a regular day in #esoteric is progressing. 18:30:03 -!- lament has set topic: David slowed his pace slightly as his ears, which had been tingling painfully, burst forth off of his head, leaving two bleeding gashes. "Ouch," he sputtered, pulling hair wet with blood off of his scalp. But there was no time to bandage the wound, as he quickly regained his running stride as the pirate alligator bear mutants waddled after him. | http://tunes.org/~nef/logs/esoteric/?C=N;O=D | Don't botloop lambdabot.. 18:30:04 pikhq: s = ap, k = const, i = id 18:30:15 :t ap 18:30:16 forall (m :: * -> *) a b. (Monad m) => m (a -> b) -> m a -> m b 18:30:24 * ehird scares pikhq with the scary type signature. 18:30:40 Deewiant: Doesn't surprise me, but I just want SKI for a bit. 18:30:47 -!- lament has set topic: David slowed his pace slightly as his ears, which had been tingling painfully, burst forth off of his head, leaving two bleeding gashes. "Ouch," he sputtered, pulling hair wet with blood off of his scalp. But there was no time to bandage the wound, as he quickly regained his running stride as the pirate alligator bear mutants waddled after him. | http://tunes.org/~nef/logs/esoteric/?C=N;O=D | Be nice to lambdabot!. 18:30:47 ehird: The monads! The monads! 18:31:04 I am a pitiful Haskell noob! 18:31:10 ?ty (((ap *** join) <*) &&&) 18:31:11 forall (m :: * -> *) a b (m1 :: * -> *) a1 b1 c'. (Monad m, Monad m1) => (((m (a -> b), m1 (m1 a1)) -> b1) -> c') -> ((m (a -> b), m1 (m1 a1)) -> b1) -> ((m (a -> b), m1 (m1 a1)) -> (m a -> m b, m1 18:31:11 a1), c') 18:31:11 pikhq: MORPHISM 18:31:23 @src flipM 18:31:23 Source not found. That's something I cannot allow to happen. 18:31:25 er 18:31:27 pikhq: Sure, just saying that they're all available under standard names. 18:31:30 whcih was I thinking about. 18:31:35 flipM? 18:31:55 somethngM 18:31:59 tip of my tongue 18:32:01 There's a lot of thoseM 18:32:04 Cleaned up my merge sort, BTW> 18:32:05 http://pastebin.ca/1471435\ 18:32:10 http://pastebin.ca/1471435 , even. 18:32:28 pikhq: that's pretty much how I'd write it 18:32:30 Still shadows oxs, x, xs. Better, though. 18:32:31 pikhq: btw 18:32:33 @quote 18:32:33 YHC says: There is currently no debugging system available. Please write correct programs. 18:32:37 pikhq: | x < y, | x >= y 18:32:37 can be 18:32:39 @ghc 18:32:40 ghc says: PArse error (possibly incorrect indentation) 18:32:42 | x < y, | otherwise 18:32:44 (otherwise = True :-)) 18:32:46 @ghc 18:32:46 ghc says: Use -fglasgow-exts to allow multi-parameter classes 18:32:51 @ghc 18:32:52 ghc says: PArse error (possibly incorrect indentation) 18:32:55 Meh! 18:32:57 @ghc 18:32:57 ghc says: jump island out of range 18:32:58 Deewiant: is shadowing those really a big deal? 18:32:59 ehird: True, true. One last C-ism. :P 18:33:02 merge is separate from the main mergesort body 18:33:07 pikhq: wouldn't you say "else" in C? 18:33:13 not if (x < y) { ... } else if (x >= y) { ... } 18:33:14 ... Yes. 18:33:15 isn't that merge definition a line too long? 18:33:16 :-P 18:33:19 ehird: Since they have the same type, if you change the inner to z:zs you might still reference x:xs accidentally 18:33:24 gwern: eh? 18:33:31 Deewiant: that's true. 18:33:36 merge xs [] = xs; merge [] ys = ys == merge xs ys = xs ++ ys ? 18:33:38 Or you want to reference the outer, or something 18:33:44 gwern: My first Haskell, so... Maybe. 18:33:54 Just ()? 18:33:58 :t Just () 18:33:59 Maybe () 18:34:10 gwern: "erge [] ys = ys == merge xs " 18:34:10 wat 18:34:12 :t Just Nothing 18:34:13 forall a. Maybe (Maybe a) 18:34:20 I mean, those can only differ if there are 2 full-list args, but you've defined no case for that 18:34:23 ehird: mapM, forM, filterM, foldM, replicateM, liftM, off the top of my head 18:34:44 one of those :P 18:34:46 gwern: eh? 18:34:59 ?ty mfix 18:35:01 forall a (m :: * -> *). (MonadFix m) => (a -> m a) -> m a 18:35:08 so you could put the third merge clause first, and then fall back on merge a b = a++b 18:35:09 :t iterate 18:35:10 forall a. (a -> a) -> a -> [a] 18:35:18 :t take 100 (iterate Just Nothing) 18:35:19 Occurs check: cannot construct the infinite type: a = Maybe a 18:35:19 Expected type: a 18:35:19 Inferred type: Maybe a 18:35:22 oh, duh 18:35:23 I'm somewhat against putting base cases last 18:35:36 gwern: "erge [] ys = ys == merge xs" 18:35:38 does that make any sense to you? 18:35:43 merge doesn't return a boolean. 18:35:45 s/"erge/"merge/ 18:35:53 pikhq: shushest thou 18:36:03 :t (>>=) 18:36:03 ehird: I was being informal 18:36:04 forall (m :: * -> *) a b. (Monad m) => m a -> (a -> m b) -> m b 18:36:19 :t (=<<) 18:36:20 forall a (m :: * -> *) b. (Monad m) => (a -> m b) -> m a -> m b 18:36:21 gwern: kay :P 18:36:27 :t (>>=) . (=<<) 18:36:28 forall b a (m :: * -> *) b1. (Monad m) => (a -> m b1) -> (m b1 -> m a -> b) -> m a -> b 18:36:29 ehird: He meant that 'merge xs [] = xs; merge [] ys = ys' == 'merge xs ys = xs ++ ys' 18:36:34 ah 18:36:42 yeah, that works if you put the base case last 18:36:45 but is imo a bit confusing 18:36:45 (>>=).(=<<) 18:36:56 ?ty (>).(<) 18:36:57 forall a. (Ord (a -> Bool), Ord a) => a -> (a -> Bool) -> Bool 18:37:06 * ehird attempts to find a use for (>>=).(=<<) 18:37:11 what kind of type is (m b1 -> m a -> b) 18:37:16 a crappy one 18:37:21 unless it involves unsafePerformIO ;-) 18:37:34 -!- augur has quit (Read error: 104 (Connection reset by peer)). 18:37:41 -!- augur has joined. 18:37:44 ?ty const.const 1 -- this kind of type 18:37:45 forall b b1 a. (Num b) => a -> b1 -> b 18:38:08 ?djinn (a -> mb1) -> (mb1 -> ma -> b) -> ma -> b 18:38:08 -- f cannot be realized. 18:38:31 ?unpl (>>=) . (=<<) 18:38:31 (\ c -> (>>=) (\ f -> f >>= c)) 18:38:40 !djinn does lambdabot listen on !s? 18:38:44 nope 18:38:45 ? and @ 18:38:46 Have I ever mentioned that Haskell scares me? 18:38:47 no EgoBot conflict then :P 18:38:50 @bf ,[.,] 18:38:50 fd:7: hClose: resource vanished (Broken pipe) 18:38:54 cool, still broken 18:38:59 Of course. :-P 18:39:03 coppro: why? 18:39:05 it's warm and fluffy! 18:39:22 also got more weird syntax than shafuck 18:39:23 Warm, fuzzy things 18:39:57 haskell's syntax is perfectly regular 18:39:57 weird? haskell syntax is lovely 18:40:03 it just has a lot of operators bolted on ;-) 18:40:11 (ok, it's not regular in the formal sense; shut up) 18:40:23 I can understand why somebody might not see (>>=).(=<<) as lovely. 18:40:24 although I sometimes wonder if $ doesn't cause more problems than it solves 18:40:56 Having just started learning Haskell last night, Haskell seems to allow for some really lovely and elegant code. 18:41:13 oh, probably 18:41:16 (oh, and Haskell is the first functional language I've really bothered trying to learn) 18:41:17 @unpl (>>=).(=<< 18:41:17 Unbalanced parentheses 18:41:19 @unpl (>>=).(=<<) 18:41:19 (\ c -> (>>=) (\ f -> f >>= c)) 18:41:24 And it allows for really horrible and unreadable code too - a true general-purpose language! 18:41:26 also arcane and not even remotely comprehensible to anyone not familiar with it 18:41:43 Deewiant: sounds like C++! 18:41:50 that applies to all languages, coppro 18:41:50 erm 18:41:53 how is haskell syntax arcane? 18:41:54 Except less awful. 18:41:54 I don't consider being comprehensible to someone not familiar with a language an inherent merit of the language 18:42:05 huh http://esolangs.org/wiki/ redirects to voxelperfect but http://esolangs.org/wiki/Main_Page doesn't 18:42:28 ehird: precedence and parsing can be confusing, especially when multiple things get involved like ., $, [], and function application 18:42:46 -!- ehird has set topic: David slowed his pace slightly as his ears, logging the channel to http://tunes.org/~nef/logs/esoteric/?C=N;O=D, noted that lambdabot was in their midst and decreed that everyone shall be nice to it. They also noted that the wiki is at http://esolangs.org/wiki/.. 18:42:50 ehird: Some spam today, in http://esolangs.org/wiki/Special:Recentchanges 18:43:01 i'm just wondering about the odd redirection 18:43:15 I will say that haskell seems to get strings and chars right; I was flummoxed when I was learning scheme and saw characters weren't 'a', but #\a or something weird like that 18:43:45 because ' is quote. 18:44:02 foldl' 18:44:09 -!- kar8nga has joined. 18:44:16 Deewiant: too ambiguous for scheme's tastes. 18:44:22 ehird: yeah, I eventually realized that, but still 18:46:24 ehird: Anyways, I think that Haskell will only break my brain when I get to monads... 18:46:36 monads just clicked with me first time 18:46:50 Hmm. Well, we'll see when I get there. 18:47:12 i just used, like, IO and State with do notation, then I saw their definition and how you can use the operators to write IO/State stuff, then I saw the definition of the list monad and worked out how it worked and /shrug 18:47:30 :p 18:48:50 Anyways, so far, just the whole 'purely functional' thing seems to... Make sense. 18:49:00 -!- bsmntbombdood has joined. 18:49:06 Was not expecting that. 18:49:13 -!- deveah has joined. 18:49:32 purely functional languages, i think, are obvious from strong type systems 18:49:45 Purely functional can be good 18:49:45 as side-effecting vs not is another type distinction to be made 18:49:50 Purely OO can be good 18:49:52 and you don't actually need impurity to do side-effects. 18:50:03 coppro: OO-only is never good. 18:50:22 indeed 18:50:26 See Java. 18:50:39 I think 'never' is too strong 18:50:46 Java's a bad example because it's so terrible besides. 18:51:18 It also depends to what extent you consider something to be OO - do anonymous delegates count as OO? 18:51:46 NOM NOM NOM 18:51:54 heck, even purely imperative programming is sometimes most appropriate for a task 18:52:17 @faq Can Haskell do purely imperative programs? 18:52:17 The answer is: Yes! Haskell can do that. 18:52:41 most languages can 18:52:53 ehird: The list monad still serves mostly to confuse me :-) 18:53:16 Deewiant: It's just "amb". 18:53:23 amb = id. :-P 18:53:36 Oh, it's just id. No, wait, it's not. :-P 18:53:52 -!- bsmntbombdood has quit (Read error: 60 (Operation timed out)). 18:54:35 Deewiant: It's id in the list monad: 18:54:45 I just don't think that anything nontrivial with it is very intuitive. 18:54:59 filterM (const [True,False]) [1,2,3] -- quick, what does this do? 18:55:10 OK, that's confusing. 18:55:10 But. 18:55:35 > do a <- [1,2,3]; b <- [4,5,6]; when (x*y /= 8) []; return (a,b) 18:55:37 [] 18:55:40 Err. 18:55:46 Whatever, it used to work :P 18:55:58 Anyway, the list monad can be useful. 18:55:59 Soemtimes. 18:56:00 Sometimes. 18:56:13 Plus, it IS a monad, so omitting the instance is just silly. 18:56:14 for generating permutations, for example 18:56:29 (useful in my scripts) 18:56:51 ehird: a*b, not x*y. 18:56:57 Or that. 18:57:14 -!- inurinternet has quit (Read error: 60 (Operation timed out)). 18:57:14 > (map f [x,y],foldr (f.g) [1,2,3]) 18:57:15 Add a type signature 18:57:19 Oh, not that rubbish. 18:57:27 > do a <- [1,2,3]; b <- [4,5,6]; when (a*b /= 8) []; return (a,b) 18:57:28 [(2,4)] 18:58:04 > (map f [x,y] :: [Expr],foldr f 0 [1,2,3] :: Expr) 18:58:05 ([f x,f y],f 1 (f 2 (f 3 0))) 18:59:06 > (map f [x,y],foldr (f.g) 0 [1,2,3]) 18:59:07 Add a type signature 18:59:11 Meh. 18:59:16 > map f [x,y] 18:59:17 Add a type signature 18:59:26 ?ty map f [x,y] -- this is why 18:59:27 forall b. (SimpleReflect.FromExpr b) => [b] 18:59:40 i know 19:02:31 GregorR-L: Hey, you should add a !mathematica. 19:02:38 Although that'd require you to have a Mathematica license. 19:02:42 doesn't `wolfram do that? 19:02:45 I could install octave *shrugs* 19:02:50 or sage 19:02:50 Octave is not mathematica :P 19:02:55 coppro: no, `wolfram is Alpha 19:03:05 yes, but that runs things through mathmatica 19:03:05 Alpha is close enough for most purposes. 19:03:33 Oh, that's MATLAB-y, not MATHEMATICA-y, forgot :P 19:03:43 Deewiant: erm, no 19:03:50 ehird: erm, yes 19:03:54 you can't even define functions and then use them in an alpha line 19:04:03 As I said, most purposes 19:04:09 and no, you're simply wrong; i use mathematica all the time for shit alpha would splutter on 19:04:21 Deewiant: for definitions of most purposes limited to "what I use"? ic 19:04:36 ehird: Of course, what other purposes are there 19:04:50 On a more serious note, are those 'all the time' things oneliners? 19:05:02 yes 19:05:09 or few-liners 19:05:10 Meh, then you're just weird 19:06:39 Bah. Maxima is awesome and you know it. :P 19:07:18 mathematica's syntax is a lot nicer 19:07:24 and it has a bigger stdlib 19:13:29 * ehird writes MathematicaBot. 19:14:15 I hope mathematica can't write files. Crap, it can. 19:16:06 yay for chroot? 19:16:08 pola-run ftw? 19:16:36 pula-run 19:16:37 GregorR-L: does it work on Darwin? 19:16:50 I doubt it. 19:16:54 gwern: man, I have no idea how many thousands of dependencies Mathematica has 19:17:01 In fact, I know it doesn't, as it includes a glibc patch. 19:21:51 A *Glibc* patch? 19:22:13 I hereby resolve to never use Mathematica. 19:22:25 ....... 19:22:28 He's talking about. 19:22:31 Pola-run. 19:22:35 Oh. 19:22:45 pikhq: Oops, you can't retract vows :-P 19:22:57 (Well, plash, but pola-run is part of plash) 19:23:07 -!- gwern has left (?). 19:23:10 I'll just have to scam Agora's contract rules, won't I? 19:23:24 With Haskell. (Somehow.) 19:23:29 i wanna write a mathematica replacement in haskell sometime 19:26:46 -!- kar8nga has quit (Remote closed the connection). 19:30:38 -!- inurinternet has joined. 19:32:57 Challenge: communicate with only verbs. 19:33:26 in russian there's a phrase consisting of six infinitives in a row 19:33:53 oh, five :( 19:33:59 собраться встать пойти купить выпить 19:34:24 "to decide to get up to go to buy (something) to drink" 19:34:32 "verbing weirds communicating" 19:34:36 ↑ one. 19:34:44 lament: lol 19:35:21 of course it's about drinking in the morning 19:36:31 get up in the sense of stop sitting 19:39:36 ehird: Go die. 19:40:23 pikhq: i was about to be offended for a second 19:40:39 Hahah. 19:41:21 lol@guy in #haskell asking for C# help 19:43:32 lol 19:47:50 Hey GregorR-L 19:47:51 "19:47 jmcarthur_work: Baughn, if the universe is infinitely large, there is a 100% probability of exactly our portion of the universe existing somewhere" 19:47:53 Get angry 19:48:07 "19:47 jmcarthur_work: assuming it is random, i mean" 19:48:10 Stop getting angry 19:48:17 There is a 100% probability of exactly our portion of the universe existing somewhere. 19:48:18 Right here. 19:48:21 We're in it. 19:49:01 And also, "random" isn't /quite/ sufficient, it could be random over a range not including us. 19:49:33 e.g. if I take the number "7" and append a series of infinite random numbers between 1 and 5, it's infinite and random but still doesn't include a 7. 19:49:53 GregorR-L: Well, yeah, but that's a formality. 19:50:00 :P 20:05:07 > lines "a\n\nb" 20:05:08 ["a","","b"] 20:07:18 Things I hate: two people with the same name 20:07:47 -!- GregorR-L has changed nick to ehurd. 20:24:31 > map (2^) [0..] 20:24:32 [1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,... 20:24:42 Infinite lists! :D 20:25:03 Yes. 20:25:05 Infinite lists. 20:25:10 pikhq: may I break your mind? 20:25:16 ehird: Please. 20:25:37 > let isprime n = not . any ((==0) . (n `mod`)) . takeWhile ((<= n) . (^2)) $ primelist; primelist = 2 : [x | x <- [3,5..], isprime x] in primelist 20:25:38 [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101... 20:25:43 Mutually recursive primes :-) 20:25:49 And infinite lists. 20:25:53 Two for the price of laziness! 20:26:06 That is awesome. Also, I knew there was a way to do that, I just wasn't sure exactly what that way was. 20:26:35 * pikhq will have to make his own mutually recursive prime stuff sometime. Possibly later tonight. 20:26:56 -!- asiekierka has joined. 20:26:57 Hi 20:27:45 > let isprime n = not . any ((==0) . (n `mod`)) . takeWhile ((<= n) . (^2)) $ primelist; primelist = 2 : [x | x <- [3,5..], isprime x] in primelist 20:27:47 [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101... 20:27:49 Hi. 20:27:55 Hai. 20:28:05 pikhq: did you actually change anything there? :P 20:28:27 No. Isn't that how you greet people? With a list of all the primes? 20:29:17 Oh. 20:29:18 Clearly. 20:29:29 > let isprime n = not . any ((==0) . (n `mod`)) . takeWhile ((<= n) . (^2)) $ primelist; primelist = 2 : [x | x <- [3,5..], isprime x] in drop 1000 primelist 20:29:30 [7927,7933,7937,7949,7951,7963,7993,8009,8011,8017,8039,8053,8059,8069,8081... 20:29:33 > let isprime n = not . any ((==0) . (n `mod`)) . takeWhile ((<= n) . (^2)) $ primelist; primelist = 2 : [x | x <- [3,5..], isprime x] in drop 10000 primelist 20:29:36 [104743,104759,104761,104773,104779,104789,104801,104803,104827,104831,1048... 20:29:44 GHC. It's like raw speed in a sufficiently smart can. 20:29:54 > let isprime n = not . any ((==0) . (n `mod`)) . takeWhile ((<= n) . (^2)) $ primelist; primelist = 2 : [x | x <- [3,5..], isprime x] in drop 100000 primelist 20:29:59 mueval-core: Prelude.read: no parse 20:30:00 mueval: ExitFailure 1 20:30:21 Hmm. 20:30:23 Whut. 20:30:28 Oh. 20:30:32 drop takes an Int, doesn't it. 20:30:35 @hoogle genericDrop 20:30:35 Data.List genericDrop :: Integral i => i -> [a] -> [a] 20:30:43 pikhq: there's a wart for you, btw. 20:30:46 Int vs Integer 20:30:50 > let isprime n = not . any ((==0) . (n `mod`)) . takeWhile ((<= n) . (^2)) $ primelist; primelist = 2 : [x | x <- [3,5..], isprime x] in genericDrop 100000 primelist 20:30:55 mueval-core: Prelude.read: no parse 20:30:55 mueval: ExitFailure 1 20:30:58 Hmm. 20:31:04 ehird: Where Int is C's int, and Integer is a bignum, basically? 20:31:10 Yeah, that there is a wart. 20:31:12 pikhq: Integer is either an int or a bignum. 20:31:17 But I think it's long or something actually. 20:31:34 pikhq: It's just in there for efficiency; I'd prefer it was named e.g. MachineWord so people didn't use it much. 20:31:48 But there's genericX for most X list functions, which sucks. 20:32:02 And the 'drop' function, 'take', etc. take Ints, and genericFoo does Num, IIRC. 20:32:15 Definitely counts as a wart. 20:33:23 * pikhq tries to decipher that isprime function. 20:33:55 I'm bored 20:33:59 any esoteric-related ideas? 20:34:14 pikhq: Here's a de-pointlessified version: 20:34:18 @unpl not . any ((==0) . (n `mod`)) . takeWhile ((<= n) . (^2)) 20:34:18 (\ g -> not (any (\ m -> (mod n m) == 0) (takeWhile (\ q -> (q ^ 2) <= n) g))) 20:34:34 ((I'm hopefully getting a portable computer with a 8086 and a programming app onboard so I can make interpreters for esolangs everywhere I am (if i have it and have 2 AA baterries))) 20:34:37 and a $ b, as you probably know, is a (b). 20:34:44 ehird: But the pointless one is clear; I'm just taking time to type it out. 20:34:49 yah :P 20:36:36 @pl \x -> foo `fmap` bar x 20:36:37 (foo `fmap`) . bar 20:36:43 There should be an operator for that. 20:36:48 Or rather, a nicer name. 20:37:34 Of the numbers in primelist, square all the ones less than or equal to n, and check if n is divisible by any of them? 20:37:51 pikhq: Yep. 20:38:09 And since this only depends on numbers strictly less than primelist is calling on us to prime-check, it only ever looks at those we've already considered. 20:38:13 In other words, functional Sieve of Eratosthenes. 20:38:15 And thus never gets into an infinite loop. 20:38:22 pikhq: — with worse time complexity. 20:38:31 It's more of a zen koan than a useful algorithm :P 20:38:39 Because it was implemented like that, yes. 20:38:47 But it is basically that sieve. 20:38:52 Right. 20:39:32 According to wikipedia, a more elegant implementation: 20:40:05 (.).(.) 20:40:06 > let sieves (p : xs) = p : sieve [x | x <- xs, x `mod` p > 0] in primes = sieves [2..] 20:40:08 : parse error on input `=' 20:40:18 Mistyped FTW. 20:40:36 > let sieve (p : xs) = p : sieve [x | x <- xs, x `mod` p > 0] in primes = sieve [2..] 20:40:37 : parse error on input `=' 20:40:44 ... Anyways. 20:40:46 pikhq: No, that one is pretty much the most elegant due to the infiniteness of the infinite list asking isprime, which then looks at elements of primelist, which would cause it to get trapped in a loop, except we only consider ones we've already done. 20:40:48 Can't beat that :-P 20:40:55 @hoogle Int->[a]->[a] 20:40:56 Prelude drop :: Int -> [a] -> [a] 20:40:56 Prelude take :: Int -> [a] -> [a] 20:40:56 Data.List drop :: Int -> [a] -> [a] 20:41:04 Grr, there's no dropFromEnd. 20:41:06 -!- deveah has quit ("MUHAHAHAH!!!1111"). 20:41:14 Well, reverse . drop n . reverse :-) 20:41:16 ehird: It's pretty nice that isprime is point-free, though. 20:41:19 ^_^ 20:41:28 Quite. 20:41:43 take =<< subtract n . length 20:42:13 munge = unlines . reverse . drop 2 . reverse . drop 4 . lines 20:42:14 >:) 20:43:11 > iterate (unwords . reverse . drop 2 . reverse . drop 4 . words) (unwords $ replicate 100 "foo") 20:43:12 ["foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo f... 20:44:03 > unwords . reverse . drop 2 . reverse . drop 4 . words `iterate` unwords $ replicate 100 "foo" 20:44:05 Precedence parsing error 20:44:05 cannot mix `GHC.Base..' [infixr 9] and `GHC.L... 20:44:05 I hate clarity. 20:44:14 And correct Haskell. I hate that, too. 20:45:41 * pikhq needs to figure out the freaking precedence of operators. XD 20:46:46 Deewiant: Say, do you think "unlines . foo . lines . unlines . bar . lines" will turn into "unlines . foo . bar . lines"? 20:47:14 Yes, I do think. 20:47:17 Yay. 20:47:39 "unlines . foo . lines . unlines . bar" might not, though. 20:47:52 mm 20:47:54 I'm not sure if lines . unlines is always id, but if the input came from lines it should be. 20:48:07 @check (\x -> (lines . unlines) x == x) 20:48:08 "Falsifiable, after 164 tests:\n[\"\\44389\\596659\\562239\\498043\\591429\... 20:48:17 Real helpful cutoff there, lambdabot 20:48:17 > lines "\n\n" 20:48:18 ["",""] 20:48:23 > unlines $ lines "\n\n" 20:48:24 > unlines "\n\n" 20:48:25 "\n\n" 20:48:25 Couldn't match expected type `[GHC.Types.Char]' 20:48:30 > unlines ["",""] 20:48:31 "\n\n" 20:48:35 > unlines $ lines "" 20:48:36 "" 20:48:43 > unlines $ lines "\n" 20:48:44 "\n" 20:48:48 > unlines $ lines "\na\n" 20:48:49 "\na\n" 20:48:52 It is unbreakable! 20:49:02 ehird: ... Check. Really. 20:49:09 @check \x -> (lines . unlines . map (filter ((< 127).ord)) x == x 20:49:09 Unbalanced parentheses 20:49:15 pikhq: QuickCheck, bitch. 20:49:17 @check \x -> (lines . unlines . map (filter ((< 127).ord))) x == x 20:49:19 "Falsifiable, after 1 tests:\n[\"\\45210\",\"\\268475\"]\n" 20:49:20 I don't know if that is merely a good idea or a stunning idea. 20:49:23 It's like testing for cool people that don't think up their own lame test data 20:49:26 COOL. PEOPLE 20:49:34 lambdabot: hey, you're here too! 20:49:48 SimonRC: Yeah, I gave gwern sexual favors and in return e gave us lambdabot. 20:49:52 @check \x -> let y = filter ((< 127).ord)) x in (lines . unlines) y == y 20:49:52 Unbalanced parentheses 20:49:56 *Story is not strictly historically accurate 20:49:59 @check \x -> let y = filter ((< 127).ord) x in (lines . unlines) y == y 20:50:00 Couldn't match expected type `[GHC.Types.Char]' 20:50:06 ehird: "e"? 20:50:08 @check \x -> let y = map (filter ((< 127).ord)) x in (lines . unlines) y == y 20:50:10 "Falsifiable, after 441 tests:\n[\"\\1009600\\673308\\917019\\918751\\10136... 20:50:11 SimonRC: spivak pronouns 20:50:16 Grr 20:50:22 SimonRC: Spivak gender-neutral. 20:50:29 As per Nomic. 20:50:34 I guessed it was genter-neutral 20:50:35 As per Spivak. 20:50:44 Jes. 20:50:47 aspers 20:50:52 @check \x -> (all.all) ((< 127). ord) ==> (lines . unlines) x == x 20:50:53 Not in scope: `==>' 20:50:59 I have heard people say that English has perfetly good gender-neutral pronouns 20:50:59 comex: Autistic, actually. 20:51:02 Bah, lamecheck. 20:51:02 Although Spivak changed to ey and emself instead of e and eirself. 20:51:11 comex: ?? 20:51:20 fuck 'ey' 20:51:21 @check \x -> not ((all.all) ((< 127). ord) x) || (lines . unlines) x == x 20:51:22 "OK, passed 500 tests." 20:51:28 @check \x -> not ((all.all) ((< 127). ord) x) || (lines . unlines) x == x 20:51:29 "OK, passed 500 tests." 20:51:32 20:50 comex: aspers 20:50 pikhq: comex: Autistic, actually. -- is this meant to make sense? 20:51:32 @check \x -> not ((all.all) ((< 127). ord) x) || (lines . unlines) x == x 20:51:33 "OK, passed 500 tests." 20:51:36 @smallcheck \x -> not ((all.all) ((< 127). ord) x) || (lines . unlines) x == x 20:51:37 Unknown command, try @list 20:51:40 @scheck \x -> not ((all.all) ((< 127). ord) x) || (lines . unlines) x == x 20:51:41 "OK, passed 500 tests." 20:51:47 ehird on phone 20:51:49 -!- bsmntbombdood has joined. 20:51:50 @list 20:51:50 http://code.haskell.org/lambdabot/COMMANDS 20:52:01 comex: ?! 20:52:04 comex: Ooh, I remember you loling at me for typing badly on that shit keyboard. 20:52:05 @scheck \x -> (lines . unlines) x == x 20:52:07 "Falsifiable, after 464 tests:\n[\"\\879457\\149834\\895607\\903638\\981580... 20:52:11 WHO'S HIM THE SUBJECT NOW 20:52:22 Deewiant: I like how it double-escapes everything 20:52:44 mueval: it sucketh 20:52:52 ehird: the message begins with a " for a reason 20:53:04 dunno 20:53:12 SimonRC: it begins with a space, actually. 20:53:20 well, after than 20:53:21 *t 20:53:22 > text "Actually, don't blame \"mueval\"" 20:53:23 Actually, don't blame "mueval" 20:53:27 SimonRC: Why? 20:53:31 I know it's a stirng. 20:53:34 But that's STUUUUUUUUUUUUUUUUUUUUUUUUUUPID 20:53:35 *string 20:53:38 I blame the mueval plugin, it's the same thing. 20:53:44 Deewiant: See "text". 20:53:50 ehird: Yes, and? 20:53:58 The plugin doesn't do it. It should. 20:54:04 Meh :P 20:54:10 that'd break > 20:54:16 > > 20:54:17 : parse error on input `>' 20:54:52 >2>2 20:55:31 > 2 > 2 20:55:32 False 20:56:14 -!- Judofyr has joined. 21:05:09 -!- asiekierka has quit. 21:05:43 -!- myndzi has quit (Read error: 113 (No route to host)). 21:08:41 -!- myndzi has joined. 21:09:36 -!- bsmntbombdood has quit (Success). 21:21:42 -!- labo has quit ("leaving"). 21:31:07 > ['\0'..] 21:31:08 "\NUL\SOH\STX\ETX\EOT\ENQ\ACK\a\b\t\n\v\f\r\SO\SI\DLE\DC1\DC2\DC3\DC4\NAK\S... 21:31:13 -!- tombom has joined. 21:31:15 > reverse ['\0'..] 21:31:17 "\1114111\1114110\1114109\1114108\1114107\1114106\1114105\1114104\1114103\1... 21:31:18 -!- Judofyr_ has joined. 21:31:21 pikhq: FEAR THE UNICODE. 21:32:02 ehird: Hooray. 21:32:23 pikhq: Disclaimer: default IO methods don't do Unicode because they're crap, so use utf8-strings when it matters. 21:33:16 ... It makes Unicode require effort? 21:33:17 * coppro wants a language where the basic character type is a true unicode character 21:33:34 I may have to go back to Tcl, which has done Unicode for everything for 10 years. 21:33:37 :P 21:33:40 coppro: Tcl. 21:33:58 Everything is a string, and all strings are Unicode. 21:33:59 coppro: Uh, that's Haskell. 21:34:00 pikhq: No, no. 21:34:06 Just import utf8-strings's modules. 21:34:11 They act exactly like the regular IO. 21:34:15 But they do UTF-8. 21:34:22 And the actual "Char" type is Unicode, through and through. 21:34:23 ehird: no. if it's a utf8-string, it's not a true unicode character 21:34:28 coppro: No. 21:34:31 I doubt Tcl has it either 21:34:31 Char is a true unicode character. 21:34:32 Bu,but that is one line of code that shouldn't be there! 21:34:43 coppro: if you like dynamic types, try factor, whose string are sequences specialised to one type (1-cell integers) 21:34:44 ehird: including combining characters? 21:34:51 coppro: 21:34:55 > reverse ['\0'..] 21:34:57 "\1114111\1114110\1114109\1114108\1114107\1114106\1114105\1114104\1114103\1... 21:34:58 Tcl uses an internal representation of UTF-16 for convenience. 21:34:59 It is the full unicode character set. 21:35:02 factor strings are just sequences of codepoints 21:35:05 The default IO stuff just doesn't handle it. 21:35:06 ehird: code set 21:35:08 SimonRC: ditto w/ haskell 21:35:09 not character set 21:35:10 String = [Char] 21:35:17 pikhq: in ghc head SPJ added a new io system thing, btw, that does unicode 21:35:21 so it'll be fixed in N time 21:35:34 ehird: Okay, then. Sanity shall preval. 21:35:35 ehird: is Char one character or one code point 21:35:36 Prevail, even. 21:35:40 coppro: code point. 21:35:45 then it fails 21:35:51 UTF-16 is a great anti-compromise... you can't make the assumtions that a 32-bit encoding allows, but it still takes up loads of space 21:36:04 it fails in the sense that it's predictable and not kooky like using characters would b 21:36:08 eh, 32-bit doesn't allow those assumptions either 21:36:12 combining characters made sure of that 21:36:22 coppro: um, one character can be a sequence of hundreds of codepoints 21:36:25 characters aren't important 21:36:30 for storage 21:36:33 code points are 21:36:35 and what *is* a character anyway? 21:36:35 that's the reason they are code points 21:36:39 yep 21:36:41 SimonRC: exactly 21:36:41 a character is ill-defined 21:37:10 coppro: so, you want a computer to do something you know is ill-defined? 21:37:15 I'm sure that I could come up with an adequate definition 21:37:15 as a basic part of the anguage 21:37:18 but I'm too lazy 21:37:43 well, one could have a language in which strings aren't sequences 21:37:54 http://omploader.org/vMXZoMw <-- nice graph. Long live graphviz! 21:37:57 coppro: it's not a useful definition though. 21:38:00 strings can be divided into substrings, which can be of zero length, etc 21:38:11 SimonRC: ehhhhhhhh 21:38:12 red is IO, blue is "dummy to make everything go from start" 21:38:13 that's just sublists 21:38:14 and [] 21:38:17 and you can't index them, because that will eventually cause problems 21:38:21 working with normalized uncomposed strings is the next-best thing 21:38:23 (I forgot the fancy name for it) 21:38:23 like python strings XTREME 21:38:57 the plan is to convert this into some sort of SSA form next 21:39:11 AnMaster: CPS bitch. 21:39:16 ehird, for BF? 21:39:22 AnMaster: CPS = SSA. 21:39:25 They are equivalent. 21:39:33 ehird, true. but SSA is simpler to think in 21:39:59 at least when working on a imperative language 21:40:00 AnMaster: what is that graph? 21:40:12 SimonRC, dependency graph inside a basic block. 21:40:15 from bf code 21:40:18 the input was: 21:40:25 +>,<[>]>[-]+++>++>[-]>,<<<[->++>+++>+<<<].>.>>>,.<<.>.>,[->+++<]>. 21:40:27 -!- Judofyr has quit (Nick collision from services.). 21:40:31 AnMaster: no, they're equivalent 21:40:32 -!- Judofyr_ has changed nick to Judofyr. 21:40:37 and it cut off the first 21:40:37 just a trivial syntactic transformation 21:40:44 since it can't represent [>] 21:40:53 so that is in a separate graph 21:41:00 cool 21:41:11 you're taking this BF thing seriously 21:41:15 currently I can't do any sort of loops or ifs inside graphs, but I plan to change that 21:41:22 at least if should be possible 21:41:26 when converting to SSA. 21:41:27 does it go at a not-ridiculously-slow speed now? 21:42:04 SimonRC, it takes about a minute to compile LostKing on my 2 GHz Sempron 3300+ running x86_64 code 21:42:18 SimonRC, that is without HIPE 21:42:23 "HIPE"? 21:42:26 with HIPE you save maybe 10 seconds 21:42:33 "HIgh Performance Erlang" 21:42:42 ah, the compiler is in Erlang? 21:42:43 basically compiles stuff to native code instead of byte code 21:42:46 SimonRC, yes 21:43:15 SimonRC, and no, it isn't very optimised for fast compilation 21:43:20 make it in bf instead. 21:43:23 but rather, for best possible output 21:43:28 ehird, you do that. 21:43:30 is it a very thready compiler? 21:43:37 no, go to hell :P 21:43:59 is the output much faster? 21:44:00 SimonRC, no, and since I have a single core, I can't really test where there may be gains from that. 21:44:12 and yes, it is much faster than non-optimised C output 21:44:14 and does it spot things that a human wouldn't? 21:44:17 and yes it outputs to C 21:44:28 SimonRC, err what do you mean " and does it spot things that a human wouldn't?"? 21:44:36 exactly what he said 21:44:37 possibly. 21:44:44 does it optimise better than a human 21:44:49 I would probably miss stuff in lostking if I tried to hand-compile to C 21:44:58 SimonRC, well I doubt that. 21:44:59 (except when the human has figured out what the program does) 21:45:12 SimonRC, I can see some cases it could do better. 21:45:19 on the other hand it surprised me today 21:45:23 how? 21:45:43 SimonRC, "how could that while loop turn into that much shorter if?, Doesn't make sense, must be yet another bug" 21:45:50 but it turned out it was right 21:45:59 what had it spotted? 21:46:07 let me find it 21:47:26 http://pastebin.ca/1471632 21:47:27 there 21:47:38 that is a diff between "what it produced before, what it produced after" 21:47:44 a certain change 21:47:46 that diff format is really useless for comparison. 21:48:03 ehird, I can read it just fine 21:48:07 just pipe it into colordiff 21:48:14 so you see some bits in red and other in blue 21:48:20 it helps 21:48:27 colordiff is a very very very nice tool 21:49:05 but the two things aren't semantically related 21:49:11 ehird, ? 21:49:15 matching lines are purely coincidental, it's not a patch to what it says 21:49:15 they are the same code 21:49:19 it's a fundamental restructuring 21:49:19 um 21:49:23 yes it is 21:49:28 sigh 21:49:29 but that is what a single code change did 21:49:34 the thing that caused that diff was adding graph-based DCE 21:49:43 pointless talking to someone so literally minded 21:49:45 so it can see "if this is never used, remove it" 21:49:54 and that was the bit that surprised me 21:50:03 ehird, I have no idea how else to show this 21:50:10 since it is near the middle of listking 21:50:13 lostking* 21:51:31 SimonRC, so yes, I guess it sometimes spot stuff humans wouldn't 21:51:40 but sometimes it is extremely dumb 21:51:50 side-by-side is the best way to compare two fundamentally different statings of the same thing 21:51:59 not a diff that happens to match up some lines in them 21:52:16 ehird, so convert it. I don't know how to generate a side by side diff using diff(1) 21:52:29 give me the command line 21:52:32 AnMaster: ... if it's side by side it's not a diff 21:52:36 it's just the two pieces of code side by side 21:52:48 so just undiff it,. Easy enough from that code 21:53:12 take one containing those line starting with space or minus, another those lines starting with space or plus 21:53:18 put them side by side 21:53:20 done 21:53:23 * SimonRC spereated it easily 21:53:29 i was merely questioning the efficacy of distributing it in a less-suitable format 21:53:40 SimonRC, example of it not so smart: p[1]=~p[8];\np[8]=p[1];\np[1]=0; 21:53:46 though it handles that one now too 21:54:10 cool 21:54:10 but I still see "stupid" stuff. 21:54:12 ~ is used in bf? 21:54:14 ehird, I didn't have a problem with it 21:54:18 i thought generally just 0→1,1→0 was coded 21:54:21 BTW, the last two lines of what you shoed me can be moved out of the if 21:54:40 ehird, no, that is the C backend seeing y=-1-x and peepholeing it into y=~x 21:54:45 moving outside of a conditional ain't gonna help performance 21:54:49 it just makes you execute more stuff... 21:55:05 but it might help other optimisations 21:55:07 AnMaster: any C compiler that can't do that is really rubbish 21:55:14 SimonRC: true 21:55:15 and p[113] must have been a hell of a lot of >>>> <<<< 21:55:29 SimonRC, um, other optimisations know very well that p[0]=0; after already. 21:55:46 http://pastebin.ca/1471637 separated 21:56:10 they know that because for loops the loop doesn't exit if index cell != 0; or for if because they ask the introspection code about it. 21:56:33 p[113]+=p[0]; though, hm 21:56:35 good question 21:56:35 Deewiant: you are like unto a flower. 21:56:50 p[113]=p[1]; too 21:57:01 oh 21:57:03 that's just in the other one 21:57:09 SimonRC, worth investigating if it will help or not. 21:57:22 AnMaster: ok, um 21:57:26 "p[0]+=255;" 21:57:34 i'm not sure why you're so surprised that it optimized it :p 21:57:38 ehird, I don't use negative numbers. 21:57:41 Read: p[0] -= 1; 21:57:50 oh, misthought 21:58:06 If it were 256 it'd be an infinite loop anyways, not an if. 21:58:46 p[113]+=p[0]; is easy to explain. Once that loop was simplified enough to not have deps on cells written in the previous iteration, it was turned into a set of polynomials inside an if 21:59:04 the if was required due to the sets there 21:59:17 what does "polynomials" mean here? 21:59:25 god I'm tire 21:59:26 d 21:59:29 SimonRC: what it normally does 21:59:37 In mathematics, a polynomial is a finite length expression constructed from variables (also known as indeterminates) and constants, using the operations of addition, subtraction, multiplication, and constant non-negative whole number exponents. 21:59:44 SimonRC, [{Coeff,[{Offset,Exponent},...]},...] 21:59:51 although really, it's just used to mean "a bunch of mathematical relationships on variables" in the bf compiler world. 21:59:52 ok 22:00:05 ehird, in this case it is actually stored as a polynomial 22:00:13 AnMaster: well that's pointless. 22:00:16 (probably) 22:00:17 ehird, it is a lot easier to simplify 22:00:21 kay 22:00:39 AnMaster: might it be a good optimisation to keep bit vectos of what values each singly-assigne variable could have at each point? 22:01:06 ehird, I tried writing generic expression manipulation code. Ended up with some 500 lines, and that didn't properly simplify all cases. The polynomial code is less than 300 lines, including the "visitor pattern" code used by the backend(s) 22:01:39 SimonRC, it might. But that graph I showed isn't yet in SSA form. I planned to work on that bit tomorrow 22:02:00 the graph also currently contains ordering info and lots more (though that wasn't dumped to the dot file) 22:02:08 yeah 22:02:20 however, I learnt a lot during making this 22:02:38 I even made a simple DCE/single-use-propagator pass on the graph to test it. 22:02:43 which worked like a charm. 22:02:55 still needs to be turned into proper SSA form though 22:04:08 SimonRC, with no edges excluded it looks like this currently: http://omploader.org/vMXZoOA 22:04:25 dotted is "order", green is, um, complex to explain. 22:04:42 "definition overwritten, but not read" 22:04:48 would be the best way to explain it. 22:05:31 ok 22:06:03 a lot messier, but at least the ordering info is needed atm, will not be needed once it is turned into SSA form. 22:06:46 (and the other one was added for debugging) 22:06:46 SSA can reach "round" loops, right? 22:07:25 SimonRC, err, how? I figured out "if" easily enough. And yes I guess if variable isn't changed inside the loop it can reach round it 22:07:39 you can't handle unbalanced BF loops though 22:07:45 but balanced ones yes. 22:08:05 SimonRC, but I don't know how to handle something like ,[.,] in SSA 22:08:23 :-( 22:08:38 I think compiler books cover that sort of thing too 22:08:41 if is "trivial", just some phi nodes 22:08:49 SimonRC, I don't have any :/ 22:08:57 found no online resources. 22:09:10 you could get the Dragon Book 22:09:16 SimonRC, ebook? 22:09:23 that covers lots of front-end stuff too though 22:09:28 AnMaster: dunno 22:09:32 AnMaster: just buy the damn thing 22:09:33 it's a classic 22:09:43 although personally I think you should instead opt for 22:09:44 ehird, don't like dead paper edition 22:09:49 .............. wait for it 22:09:49 SICP 22:09:56 AnMaster: buy a kindle :P 22:10:08 ehird, I read SICP, but I don't remember SSA form there? 22:10:13 * AnMaster goes to check 22:10:50 http://thepiratebay.org/torrent/3635514/Compilers_-_Principles__Techniques_and_Tools_(First_Edition__198 22:10:57 lol it's a scan 22:11:14 ehird, that would hurt to read 22:11:24 AnMaster: ,[.,] in SSA? how is that hard? 22:11:33 ehird, describe how it is done then 22:11:45 http://en.wikipedia.org/wiki/Static_single_assignment_form 22:13:57 ehird, that doesn't describe loops... 22:14:46 ehird, so try again, if you plan to link, please link something relevant. 22:14:47 :) 22:14:49 brb 22:19:41 -!- ehurd has quit (Read error: 110 (Connection timed out)). 22:22:30 yospos bitch 22:28:57 -!- Gracenotes has quit (Read error: 60 (Operation timed out)). 22:29:08 ehird, suite yourself, ignore it. 22:29:42 "suite yourself" 22:30:09 -!- Sgeo has quit (Read error: 110 (Connection timed out)). 22:31:22 tombom, isn't that the right English phrase? 22:31:33 no, miss off the e 22:31:37 suite means something different 22:31:42 ah 22:31:46 suit yourself then 22:31:48 * SimonRC goes to bed 22:31:52 tombom, what does the suit one mean? 22:32:00 that word I mean 22:32:09 -!- Judofyr has quit (Remote closed the connection). 22:32:32 * AnMaster probably never noticed the difference between suit and suite 22:33:06 A suite is a deluxe accommodation. 22:33:20 Or, what somebody has decided to pretend is deluxe, anyway :P 22:33:39 e.g. At a hotel, the honeymoon suite is the best room, and the other suites are nearly as good, and the other rooms suck as compared to the suites. 22:33:45 or a collection of things 22:33:53 or a sofa 22:34:03 That too, but it sounded more like my meaning on context :P 22:34:08 And also, it's not a sofa. 22:34:11 TODO: sex life 22:34:24 `addquote TODO: sex life 22:34:25 11| TODO: sex life 22:34:39 hilarious 22:34:41 :I 22:34:42 -!- tombom has quit ("Peace and Protection 4.22.2"). 22:35:43 hai 22:36:17 22:34 SimonRC: TODO: sex life ← WONTFIX 22:38:14 Are you ... SUUUUUUUUUUUURE 22:39:28 WORKSFORME 22:39:39 You wanna have fun? 22:39:40 echo ! 22:39:46 up, append ! 22:39:48 ehird, going to explain it? 22:40:00 AnMaster: ,[.,] in SSA? how is that hard? 22:40:01 ehird, describe how it is done then 22:40:01 http://en.wikipedia.org/wiki/Static_single_assignment_form 22:40:01 ehird, that doesn't describe loops... 22:40:06 your mom 22:40:10 I eventually got a stack overflow! Yay! 22:40:11 ehird, you fail 22:40:22 AnMaster: no, i just don't feel like helping you 22:40:59 ehird, no you fail. 22:41:36 pikhq: please clarify for the young gentlemen AnMaster here that I have no interest in helping dickwads, assholes, idiots or any other such uncouth persons and it is strictly personal, not a matter of lack of success 22:41:38 ehird, I asked ais and he said he didn't know, but that "generally you break SSA for loops slightly" 22:41:40 there's a good boy 22:41:53 so I guess you don't know either 22:42:07 right. because knowledge(ehird) strictly-subset-of knowledge(ais523). 22:42:28 ehird, no it isn't, but the way you act... 22:42:47 AnMaster: I think what he means to say is "main = print [0..]". 22:42:50 that's because i like irritating you, AnMaster. 22:43:08 pikhq: Fun fact: ghc has an oracle. Try running "main = main". 22:43:12 And stick that in a file. 22:43:14 pikhq, not sure what you mean with that though. 22:43:23 pikhq, since I don't know haskell 22:43:28 the code was BF 22:43:29 not haskell 22:43:33 (lol) 22:43:48 AnMaster: That would be all positive integers. 22:44:04 plus zero 22:44:18 Ah, right. 22:44:19 pikhq, hm ok... 22:44:28 But whaddya mean, an oracle? 22:44:47 so you mean Vx = phi(V0,...Vn) basically? 22:44:54 It certainly isn't an oracle machine, and this sure as fuck ain't halting. 22:44:55 > print [0..] 22:44:56 22:45:03 AnMaster: Yes. Except that you should stick it in a file. 22:45:03 Oh, lambdabot doesn't do IO. 22:45:05 > [0..] 22:45:06 [0,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,... 22:45:21 pikhq: 22:45:21 [ehird:~/Junk] % echo 'main=main'>foo.hs;ghc foo.hs -o foo;./foo 22:45:22 pikhq, err..? 22:45:22 foo: <> 22:45:28 you tell me that isn't the work of a halting oracle! 22:45:30 Hmm. 22:46:02 Has different behavior with runhaskell. 22:46:07 yah 22:46:35 pikhq, infinite lists == blergh if language doesn't support it. 22:47:20 AnMaster: Yes. 22:47:36 * pikhq looks at ghc's C output... 22:47:43 * pikhq brain break 22:47:43 pikhq, plus I have a DAG here... 22:48:35 guess I need cycles for SSA form then 22:49:13 pikhq: don't use -fvia-C 22:49:25 the native code generator is as good most of the time and sometimes better :P 22:49:40 pikhq: oh, did you know? GHC, after compiling the C code, then runs the asm through a perl script that changes calls into jumps. 22:49:54 You're kidding. 22:50:05 pikhq: Also, this script is "literate perl", which is a one-off format designed just for ghc that basically reverses comments/code (so that code is prefixed instead of comments). 22:50:19 It is "compiled" (trivially translated) to perl in the compilation process. 22:50:19 ehird: o_O 22:50:24 pikhq: 's called the Evil Mangler. :) 22:50:28 ... Because it doesn't need the stack at all. LMAO 22:50:48 That is beautiful. Epic hack, though. 22:50:59 how redundant :) 22:51:50 Redundancy is redundant. 22:52:09 there's also the Satanic Splitter, which is another revered/feared perl script 22:52:23 also some assembly post-processing iirc 22:52:41 i haven't heard of the Satanic Splitter before now 22:52:49 olsner: the mangler is the asm post-processing 22:53:00 http://markmail.org/message/blmoqkkooqezr3p4 22:53:04 Where can I find this evil Perl? 22:53:20 pikhq: ghc_source_tree 22:53:42 pikhq: $prefix/local/lib/ghc-version/ghc-asm 22:53:44 if you don't need the comments. 22:54:06 ehird, why this literate perl. I mean, *why* 22:54:10 last procedure is "tidy_up_and_die" 22:54:17 AnMaster: because the mangler needs a lot of explaining 22:54:27 ehird, fair enough 22:54:44 the bit that reversed it to normal perl probably needs a bit of explaining too I imagine! 22:54:53 this looks like some kind of reference: http://hackage.haskell.org/trac/ghc/wiki/Commentary/EvilMangler 22:54:54 pikhq: http://darcs.haskell.org/ghc/driver/mangler/ghc-asm.lprl 22:54:56 the literate version 22:55:48 And, of course, it's commented via TeX. 22:56:09 yep 22:56:33 Makes sense, given that TeX is the ultimate example of a literate program. :P 22:56:42 have you ever read the original one? 22:56:46 god, that pascal is _awful_ 22:57:04 olsner, what is the splitter used for really 22:57:48 splitting things 22:57:50 ehird, I have not read it, but I have glanced at it. 22:58:01 i was talking to pikhq.. 22:58:02 I think I'm remembering what it does now... it splits up object files to allow static linking to throw away more of the unused parts of the static library 22:58:03 *... 22:58:04 ehird, "things" == object files? 22:58:08 yes 22:58:24 "and it tells its 22:58:24 unsuspecting victims that can say SplitObjs=NO at any time, but when 22:58:25 they do, it punishes them with multi-megabyte executables" 23:03:18 ehird, so what does it split out of the object files? 23:03:22 debug info? 23:03:33 Don't know 23:04:20 it's doing something similar to --gc-sections and --function-sections (don't remember the precise placing of the hyphens, but something like that it is), only manually 23:05:14 iirc 23:06:20 you mean ld's "--gc-sections"? 23:06:22 right 23:06:44 --function-sections isn't ld at least 23:07:04 olsner, simplest way is one object file / function 23:08:07 yes, I think that's what the splitter makes it 23:16:46 -!- MigoMipo has quit ("QuitIRCServerException: MigoMipo disconnected from IRC Server"). 23:24:36 -!- jix_ has joined. 23:36:40 -!- jix has quit (Read error: 113 (No route to host)). 23:37:54 -!- coppro has changed nick to ze23||||||-. 23:38:48 -!- ze23||||||- has changed nick to ze23}{||||||-. 23:40:10 -!- ze23}{||||||- has changed nick to coppro. 23:42:22 -!- BeholdMyGlory has quit (Remote closed the connection). 23:48:15 -!- coppro has changed nick to IgnisCaelum. 23:48:19 -!- IgnisCaelum has changed nick to coppro. 23:50:57 -!- GreaseMonkey has joined.