00:11:51 -!- voodooattack has joined. 00:28:32 oerjan how do you unlambdify stuff like \x.\y.x y 00:29:23 it can be done in the same way but there is an additional rule that is helpful: 00:29:32 \x.(S (Kx) I) ?? 00:29:50 \y. C y = C 00:30:05 so \x.\y.x y = \x.x = I 00:30:30 yep, that is the direct way. 00:30:36 but then what? 00:31:36 for the outer one 00:31:42 \x.((S (Kx)) I = S(S(KS)(S(KK)I))(KI) 00:32:23 eh, forget first parenthesis 00:33:35 -!- crathman has joined. 00:33:49 -!- crathman has quit (Remote closed the connection). 00:35:49 -!- crathman has joined. 00:37:32 -!- tgwizard has quit (Read error: 60 (Operation timed out)). 00:45:59 damn that's complicated 00:49:29 http://www.encyclopediadramatica.com/index.php/C 00:49:49 let's try that bit of code :P 00:50:38 yep, abstraction elimination by this method is exponential in the number of variables. 00:52:21 there are more complicated combinators you can use but they need more variables than this before becoming worthwhile. 00:53:54 essentially you can merge a list of variables using something cons-like to make the blowup linear in the number of variables instead, I think. 00:57:27 I remember writing something about it on the old esolang mailing list. 01:06:54 too many Ss and Ks and Is 01:07:27 hmm... thue seems too hard for a first project :< 01:08:03 i kinda like haskell in the sense i haven't done a single algorithmic error even though i use quite complicated mappings etc 01:08:18 (haven't noticed at least :P) 01:08:42 i assume this applies after you have fixed the type errors? 01:08:47 yes 01:08:53 them i have millions :P 01:09:37 It would be cool to define K in terms of S 01:09:52 i don't think it can be done 01:10:27 lessee, why not... 01:10:44 K x y removes y 01:10:45 \x y.x ==> S (KK) I 01:10:53 i'd need this function doSubst :: (String, String) -> String -> (Bool, String) where first tuple is the substitution (from, to), second the string to alter, return (success, new string) 01:11:05 i can't make it nicely though :< 01:11:11 But I think you cannot make any expression in S that removes an argument completely 01:11:43 i have a very similar function in IrpBot 01:12:07 can you gimme a hint? :P 01:12:27 i have the knowledge necessary to do that... just can't :<< 01:12:58 too complicated 01:13:11 a "" = "" 01:13:11 a t | old `isPrefixOf` t = new ++ a (drop (length old) t) 01:13:14 a (c:r) = c:a r 01:14:37 i believe you need import Data.List for the isPrefixOf 01:15:03 nice 01:18:08 back to expressing K with S, I now remember the terminology 01:21:14 ack, i had it backwards 01:25:57 anyhow, there are two classes of combinators that are closed and K and S are in different ones. 01:26:27 K is affine, this means every argument is used at most once 01:26:43 -!- oklofok has joined. 01:26:56 S is the opposite (relevant may be the word), every argument is used at least once 01:27:30 I is in the intersection: the linear ones, which use every argument exactly once 01:28:36 the affine subset can be generated by the combinators S, B, C. 01:28:45 *K, B, C 01:32:19 C a b c = a c b, B a b c = a (b c) 01:32:58 the opposite subset would be S, B, C; I think 01:33:02 C = 1? :P 01:33:29 nope 01:34:35 i think it works :D 01:35:03 combinators are not usually commutative 01:35:08 15 lines :PP 01:35:19 what works? 01:35:25 my thue interpreter 01:35:26 thue? 01:35:28 ya 01:35:58 are you doing random choice of rules? 01:36:00 it did runThue [("oko","pol"), ("pol", "mo")] "okopol" -> "momo" 01:36:03 no 01:36:26 i do rule by rule... since thue does not care about order right? 01:36:42 you can read my code, it's 15 lines as i said 01:37:07 it's very bad code i'm sure, this is the first program i've done on a functional language :D 01:37:15 (unless you count python) 01:38:41 http://www.pastebin.ca/356379 01:39:19 i tried not to look at your code too much, just checked drops param order and the function names 01:40:38 it takes the substs as a list 01:40:44 so it's not exactly thue 01:41:08 parser next? you might want to look at the Parsec library 01:41:57 with that the parser shouldn't be more than another 15 lines 01:43:01 man that's ugly 01:43:12 -!- oklopol has quit (Read error: 110 (Connection timed out)). 01:43:28 -!- oklopol has joined. 01:43:44 god i hate it when it does that 01:44:42 oklopol: you do know that you can ask nickserv to kick off your ghosts? 01:45:37 i don't, there is no such service on qnet 01:45:43 (that i know of) 01:45:57 if there's one here, please share it with me :D 01:46:18 do /msg nickserv help 01:46:19 hmm... i can't do file io, the monads will kill me 01:47:01 i'm not registered, maybe i should :P 01:47:23 Indeed that is necessary to kill ghosts 01:47:32 yep, but maybe later 01:47:40 as well as for sending private messages 01:47:43 can you help me with filw io? 01:47:46 *file 01:47:58 I suggest using the interact function for a start 01:48:37 okay, how do i use it? :) 01:48:47 That saves you most of the trouble with IO if you are just making a pipe 01:49:04 main = interact yourPipeFunction 01:49:05 pipe? :D 01:49:41 a function from stdin to stdout 01:49:51 Quick Haskell tutorial? 01:50:06 i suppose it is 01:50:18 I need to get back to Haskell hacking sometime. 01:50:28 i had "filename: " -> open file -> read -> parse -> exec in mind 01:50:34 The Scheme in Haskell tutorial looks really nice. 01:50:46 right... 01:51:01 you want the filename as input or on the command line? 01:51:15 unless it's hard, yes :D 01:51:21 because 01:51:26 i mean, which one 01:51:29 i don't know how to specify stdin 01:51:36 okay, just a pipe 01:52:01 hmm... getContents or smth 01:52:19 readFile 01:52:20 i read about this somewhere, i'll try on my own, i'll be here crying for help soon 01:52:31 i'll find the page :D 01:52:37 ok 01:52:56 btw Haskell does have if then else 01:53:15 (for you case ... True -> ... False ...) 01:53:20 *your 01:54:19 -!- meatmanek has joined. 01:54:36 -!- meatmanek has quit (Read error: 104 (Connection reset by peer)). 01:54:56 (> scheme haskell) 01:55:13 (> scheme) haskell 01:55:51 we need to come up with something that means the opposite in scheme and haskell 01:56:45 yes 01:57:52 -!- wooby has joined. 01:59:01 -!- meatmanek has joined. 02:00:03 -!- oklofok has quit (Read error: 110 (Connection timed out)). 02:00:06 main needs a declaration (or whaddyacallit) main :: Something -> oso 02:00:08 ? 02:00:13 and what is it :P 02:00:17 RealWorld? 02:00:21 :: IO () 02:00:28 just that? 02:00:29 oki 02:00:50 and type declarations are often optional 02:00:51 main :: IO() 02:00:55 main = return 5 02:00:56 ? 02:01:05 oh 02:01:11 () /= Int 02:01:17 Indeed :) 02:01:20 it won't compile that's all 02:01:24 i mean 02:01:32 nothing, so they can't be optional there 02:01:36 You would get a message about no Num instance for () 02:02:24 hmm... how can i return 5 from main? :D 02:02:30 it's optional in the sense you don't have to write it, not in the sense that main can be any type 02:02:56 return strips off the monad, IO, right? 02:03:04 maybe not :D 02:03:06 sort of 02:03:12 but not really 02:03:25 actually the opposite, return puts it on 02:03:35 well, i'll understand it later 02:03:48 i wanna get this working first :D 02:03:53 and note also that return does not quit from a function 02:04:05 i do know that 02:04:35 i don't attach meaning to names 02:05:24 System.Exit.exitWith (ExitFailure 5) 02:05:25 i mean, i don't have problems with confusing languages, but i do have problems in understanding how IO works :P 02:06:01 but... but... why aren't there better examples, examples that work :\ 02:06:08 on the net 02:06:25 there aren't? 02:07:24 incorrect indentation 02:07:35 whenever there's a main 02:07:48 it's my error i'm pretty sure 02:08:01 doing something really wrong when copypasting... 02:08:03 just for a start imagine that Haskell distinguishes sharply between pure expressions and actions 02:08:21 first i'd like to get ANY main working :P 02:08:23 and that actions have type IO something 02:08:40 oaky 02:08:52 main = print "Hello, world!" 02:09:17 parse error 02:09:24 possibly incorrect indentation 02:09:27 how can that be? 02:09:46 where are you putting it? 02:09:48 hard to say... it's in the Thue file 02:09:50 in the end 02:09:56 and i just run it 02:10:04 dblclick on the file 02:10:22 runThue'' (subst:substs) init sure = case doSubst subst init of 02:10:22 (False, _) -> runThue' substs init sure 02:10:22 (True, newinit) -> runThue' substs newinit True 02:10:22 main = print "Hello, world!" 02:10:26 end of my file 02:10:44 indentation wrong though 02:10:50 because of the paste 02:10:56 And it compiles without main? 02:11:01 yes 02:11:06 all the functions work 02:11:21 sorry 02:11:26 it seems they dont' xD 02:12:10 okay 02:12:12 now it works 02:12:39 i had done something fishy there... forgot about it and thought it was the same working code 02:12:56 next step would be a do block I guess 02:13:04 main = do 02:13:24 and then some more actions, indented 02:13:59 i tried one code, but it said isAscii not in scope... and nothing was imported 02:14:10 hmm 02:14:16 import Data.Char for that I think 02:14:21 oaky 02:14:44 btw: haskell.org/hoogle 02:15:50 as well as http://www.haskell.org/ghc/docs/latest/html/libraries/index.html 02:16:03 okay, i now have a code that reads two names, one for output, one for input and pipes 02:16:37 i'll peruse those later :) 02:16:49 too much just now... it's 4 am 02:17:08 There is also System.Environment.getArgs 02:17:21 hmm 02:17:29 but i call main as a function 02:17:35 in the prompt 02:17:44 :main 02:17:45 i could just give them as params? 02:17:54 Special command 02:18:04 can give arguments 02:18:35 okay, i'll stick to the file thing though :D 02:18:46 s <- readFile ifile 02:19:08 return s will be a string with the contents of the file..? 02:19:28 s will be that string 02:19:54 <- takes values out of IO in a sense 02:20:06 okay 02:20:31 i'll make the parser, thue's io comes some other time, i'll sleep soon 02:22:25 s <- readFile ifile 02:22:25 let (substs, init) = parseRaw s in 02:22:25 runThue substs init 02:22:31 would this be right? 02:22:54 if i do the parseRaw that converts string -> substitutions and initial string 02:23:26 looks fine 02:23:48 good, i'll start the parser... not sure if i'll manage to finish it just now :D 02:23:58 everything's kinda hazy 02:24:47 Does Haskell make well to parsers like the BT one? (Not that I'd switch.) 02:25:10 BT? 02:25:21 Bencoding. 02:25:54 almost certainly 02:26:56 Parsec would be shooting fish in a barrel :) 02:27:16 heh 02:27:18 write one 02:30:15 -!- crathman has quit (Read error: 110 (Connection timed out)). 02:36:14 -!- wooby has quit. 02:54:04 -!- meatmanek has left (?). 03:15:05 done 03:17:39 http://www.pastebin.ca/356520 03:18:26 took you longer to code :) 03:18:55 i'm not a fast coder 03:19:25 but it is just 24 lines :) 03:19:52 and ununderstandable by me 03:21:27 to run, do parseTest (many bencoding) "whatever" 03:21:53 ah, drop the many 03:41:23 -!- ShadowHntr has joined. 03:49:07 (S)S(S)S()S(K)I(S_)F 03:49:37 something does not look quite right there 03:49:57 ()? S_? 03:51:35 yeah, because i was just banging on the keyboard 03:55:40 on second thought, it is obvious that () should be I 03:57:15 because that makes (A1...An)B = A1...AnB for all n including 0 03:58:02 There should be a function that takes all the arguments you give it and does nothing with them 03:58:18 there is: V 03:58:28 it's in unlambda 03:58:33 V x = V 03:59:09 V = Y \f.\x.f ? 03:59:36 yeah 04:00:32 V = (SII) \f.\x.ff 04:00:56 you can take it from there :) 04:02:15 (SII)x == xx 04:02:47 well, yeah 04:03:26 but that would make the expression larger 04:03:42 Y = \f.(SII) \x.f (SII) x 04:04:15 ...right? 04:04:36 that would seem a reasonable conclusion 04:05:20 except the parentheses are not quite right 04:05:34 bargle blop 04:05:45 Y = \f.(SII) \x.f (xx) 04:06:10 yeah 04:09:57 V = (SII)(S(KS)(S(KK)I))(S(KK)I) 04:11:44 S(KK)I = KK 04:12:20 wait... 04:12:47 S(KK)I = K 04:13:02 S(KK)Ix = (KK)x(Ix) 04:13:15 = K 04:13:57 V = (SII)(S(KS)K)K 04:15:12 = (SII)(S(KK)) 04:15:26 nope 04:15:30 wrong order 04:17:14 i don't see how you got your first expression, though 04:17:55 SII \xf.ff 04:18:13 s/xf/fx/ 04:18:22 and then? 04:18:45 \f.(S (Kf) (Kf)) 04:18:55 (drop the SII for a moment) 04:19:55 ok (but not optimized) 04:19:59 ? 04:20:10 how can you optimize it? 04:20:16 S (Kf) (Kf) = K(ff) 04:20:45 oh right 04:20:50 it's a konstant function 04:22:09 so \fx.ff == S(KK)(SII) 04:22:30 so V = (SII)S(KK)(SII) 04:22:43 so V = (SII)(S(KK)(SII)) 04:24:05 might be right :) 04:28:25 (KK) = I right? 04:28:45 I mean K 04:29:06 no 04:29:22 KKx = K 04:29:34 right 04:30:04 so yes, V = (SII)(S(KK)(SII)) 04:30:55 * bsmntbombdood feels like he has accomplished something 04:32:08 actually 04:32:14 S(KK)(SII) 04:32:26 nevermind 04:33:51 S(KK)(SII)x = KKx(xx) = K(xx) 04:34:49 yeah 04:35:09 so if x = S(KK)(SII), then xx = K(xx) 04:36:02 what's your point? 04:36:27 just triple checking 04:58:57 i'm going to bed, thanks for your help 04:59:23 me too, good night 04:59:40 -!- oerjan has quit ("leaving"). 05:15:08 -!- Sgeo has quit (Remote closed the connection). 05:28:01 -!- digital_me has quit (Read error: 60 (Operation timed out)). 05:31:22 -!- GregorR has changed nick to _D6Gregor1RFeZi. 05:52:43 -!- puzzlet has joined. 05:59:14 -!- Arrogant has joined. 06:33:10 -!- ShadowHntr has quit ("End of line."). 06:55:40 -!- _D6Gregor1RFeZi has changed nick to GregorR. 07:34:41 -!- RodgerTheGreat has quit. 07:40:30 -!- voodooattack has quit (Read error: 113 (No route to host)). 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:01:08 -!- Arrogant has quit ("Leaving"). 08:35:38 -!- pgimeno has quit (Read error: 104 (Connection reset by peer)). 08:51:50 -!- pgimeno has joined. 13:09:47 -!- nazgjunk has joined. 13:41:34 -!- helios24 has joined. 13:57:56 -!- jix has joined. 14:20:07 *BOGGLE*: 14:20:10 "No, everyone is born Christian. Only later in life do people choose to stray from Jesus and worship satan instead. Atheists have the greatest "cover" of all, they insist they believe in no god yet most polls done and the latest research indicates that they are actually a different sect of Muslims." 14:21:53 no, actually *this* is even more mind-boggling: 14:21:56 ""One of the most basic laws in the universe is the Second Law of Thermodynamics. This states that as time goes by, entropy in an environment will increase. Evolution argues differently against a law that is accepted EVERYWHERE BY EVERYONE. Evolution says that we started out simple, and over time became more complex. That just isn't possible: UNLESS there is a giant outside source of energy supplying the Earth with huge amounts of energy. If there were su 14:22:35 Headline: Christian Scientists Hypothesise 'Sun' 14:29:17 -!- nazgjunk has quit ("Bi-la Kaifa"). 14:34:06 haa!!! 14:34:16 that's funny 14:36:15 "a giant outside source of energy supplying the Earth with huge amounts of energy" 14:56:40 -!- kxspxr has joined. 14:57:52 -!- kxspxr has quit (Client Quit). 15:19:03 -!- crathman has joined. 15:24:04 -!- wooby has joined. 15:24:34 -!- wooby has quit (Client Quit). 15:46:48 -!- RodgerTheGreat has joined. 16:13:56 -!- Arrogant has joined. 16:16:35 -!- sebbu has joined. 16:32:50 bsmntbombdood: Hmmm, now what could that be ... 16:33:03 bsmntbombdood: Something like a big ball of burning gas ... 16:33:11 bsmntbombdood: That uses nuclear fusion to create energy ... 16:33:20 -!- RodgerTheGreat has quit. 16:33:24 bsmntbombdood: Energy which ends up transferred to Earth ... ;) 16:34:14 Hilarious. 16:39:29 -!- FabioNET has joined. 16:56:28 -!- Arrogant has quit ("Leaving"). 17:12:37 -!- RodgerTheGreat has joined. 17:21:59 -!- ShadowHntr has joined. 17:26:16 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 17:28:48 -!- oklofok has joined. 17:34:52 -!- oklofok has changed nick to oklopol. 17:52:29 -!- nazgjunk has joined. 17:59:38 -!- RodgerTheGreat has quit. 18:05:14 -!- RodgerTheGreat has joined. 18:07:51 -!- nazgjunk has quit (Read error: 104 (Connection reset by peer)). 18:13:36 -!- nazgjunk has joined. 18:13:37 -!- UpTheDownstair has joined. 18:14:13 -!- nazgjunk has quit (Read error: 104 (Connection reset by peer)). 18:14:30 -!- UpTheDownstair has changed nick to nazgjunk. 18:21:17 -!- ShadowHntr has quit (Read error: 131 (Connection reset by peer)). 18:22:18 -!- ShadowHntr has joined. 18:37:00 GregorR: indeed 18:38:01 pikhq: Why are you never online? :P 18:43:21 -!- ShadowHntr has quit (Client Quit). 18:45:06 you're killin me 18:45:26 i'm bored 18:50:23 you should do the oko 18:50:28 http://www.vjn.fi/148.htm 18:50:33 too bad i wrote this in finnish :\ 18:52:50 GODDAMN THESE PEOPLE ARE ANNOYING 18:53:16 rararar 19:00:47 finnish is a pretty useless language. nobody speaks it! 19:17:29 -!- nazgjunk has quit ("Bi-la Kaifa"). 19:17:37 :D 19:18:03 yeah... who likes useless languages... 19:50:35 -!- wooby has joined. 20:06:56 -!- ihope has joined. 20:07:36 ~exec self.raw("PRIVMSG ihope :Boing") 20:07:45 Interesting, don't you think? 20:07:50 ~exec self.raw("PRIVMSG ihope :Boing") 20:07:55 Really, how odd... 20:08:33 ~ps 20:08:33 0: 'self.ihope = IRCbot("80.32.164.76", "FOLLYbot", "nope", "ihope", "Now 100% Real", 9999, "#lobby", True, ["#lobby"], "#", True); self.ihope.listen(); self.ihope.bsmnt = self', 772164.12 seconds 20:08:40 Hee. 20:08:58 ~kill 0 20:09:06 ~ps 20:09:06 0: 'self.ihope = IRCbot("80.32.164.76", "FOLLYbot", "nope", "ihope", "Now 100% Real", 9999, "#lobby", True, ["#lobby"], "#", True); self.ihope.listen(); self.ihope.bsmnt = self', 772197.13 seconds 20:09:10 Yay. 20:17:57 -!- FabioNET has quit (Read error: 145 (Connection timed out)). 20:20:22 ~exec self.raw("QUIT") 20:20:22 -!- bsmnt_bot has quit. 20:20:26 -!- bsmnt_bot has joined. 20:20:30 ~ps 20:20:31 None 20:20:39 That's one way to do it, eh? 20:20:48 ~exec self.ihope = IRCbot("80.32.164.76", "FOLLYbot", "nope", "ihope", "Now 100% Real", 9999, "#lobby", True, ["#lobby"], "#", True); self.ihope.listen(); self.ihope.bsmnt = self 20:38:11 -!- helios24 has quit (Read error: 60 (Operation timed out)). 20:44:55 ~exec self.ihope.bsmnt.raw("PRIVSMG #esoteric :Foo") 20:45:02 Interesting. 20:45:05 Oh. 20:48:30 -!- helios24 has joined. 21:00:51 -!- helios24 has quit (Read error: 60 (Operation timed out)). 21:06:47 -!- helios24 has joined. 21:09:36 -!- FabioNET has joined. 21:11:13 -!- sebbu has quit (Read error: 60 (Operation timed out)). 21:16:05 -!- jix has quit ("Bitte waehlen Sie eine Beerdigungnachricht"). 21:16:06 -!- ihope has quit ("http://tunes.org/~nef/logs/esoteric/06.08.09"). 21:18:48 -!- sebbu has joined. 21:22:54 -!- FabioNET has quit (Client Quit). 21:39:51 -!- RodgerTheGreat has quit. 21:54:50 ihope 21:56:53 me too 22:01:44 iklopol 22:02:28 osofok 22:02:47 fuck... i'll have to wear a suit tomorrow :<<< 22:02:57 hah 22:03:26 you mean poohead 22:07:15 -!- wooby has quit. 22:13:04 -!- digital_me has joined. 22:26:55 -!- Sgeo has joined. 22:30:42 -!- oerjan has joined. 22:34:47 ug 22:35:37 ly 22:35:50 ITYM "li" 22:36:12 why i realized that just after saying it 22:36:17 *li 22:36:22 http://en.wikipedia.org/wiki/Ugli_fruit 22:38:37 why the heck isn't it spelled Hugli if that's how it's originally pronounced? 22:47:51 Darn Babelfish doesn't have finnish 22:49:28 oklopol: Why can't you write in a sensible language such as Norwegian? :) 22:51:08 Or Finlandssvenska, but I guess you hate that as much as most Norwegians hate Nynorsk 23:09:54 -!- GregorR has changed nick to _D6Gregor1RZeFi. 23:10:18 -!- _D6Gregor1RZeFi has changed nick to _D6Gregor1RFeZi. 23:31:50 -!- sebbu has quit ("Leaving"). 23:39:39 -!- crathman has quit ("Chatzilla 0.9.77 [Firefox 2.0.0.1/2006120418]").