00:11:51 -!- voodooattack has joined.
00:29:23 <oerjan> it can be done in the same way but there is an additional rule that is helpful:
00:30:05 <oerjan> so \x.\y.x y = \x.x = I
00:30:30 <oerjan> yep, that is the direct way.
00:31:42 <oerjan> \x.((S (Kx)) I = S(S(KS)(S(KK)I))(KI)
00:32:23 <oerjan> 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:49:29 <voodooattack> http://www.encyclopediadramatica.com/index.php/C
00:50:38 <oerjan> yep, abstraction elimination by this method is exponential in the number of variables.
00:52:21 <oerjan> there are more complicated combinators you can use but they need more variables than this before becoming worthwhile.
00:53:54 <oerjan> 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 <oerjan> I remember writing something about it on the old esolang mailing list.
01:07:27 <oklopol> hmm... thue seems too hard for a first project :<
01:08:03 <oklopol> 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 <oklopol> (haven't noticed at least :P)
01:08:42 <oerjan> i assume this applies after you have fixed the type errors?
01:09:52 <oerjan> i don't think it can be done
01:10:53 <oklopol> 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 <oklopol> i can't make it nicely though :<
01:11:11 <oerjan> But I think you cannot make any expression in S that removes an argument completely
01:11:43 <oerjan> i have a very similar function in IrpBot
01:12:27 <oklopol> i have the knowledge necessary to do that... just can't :<<
01:13:11 <oerjan> a t | old `isPrefixOf` t = new ++ a (drop (length old) t)
01:14:37 <oerjan> i believe you need import Data.List for the isPrefixOf
01:18:08 <oerjan> back to expressing K with S, I now remember the terminology
01:21:14 <oerjan> ack, i had it backwards
01:25:57 <oerjan> anyhow, there are two classes of combinators that are closed and K and S are in different ones.
01:26:27 <oerjan> K is affine, this means every argument is used at most once
01:26:43 -!- oklofok has joined.
01:26:56 <oerjan> S is the opposite (relevant may be the word), every argument is used at least once
01:27:30 <oerjan> I is in the intersection: the linear ones, which use every argument exactly once
01:28:36 <oerjan> the affine subset can be generated by the combinators S, B, C.
01:32:19 <oerjan> C a b c = a c b, B a b c = a (b c)
01:32:58 <oerjan> the opposite subset would be S, B, C; I think
01:35:03 <oerjan> combinators are not usually commutative
01:35:58 <oerjan> are you doing random choice of rules?
01:36:00 <oklofok> it did runThue [("oko","pol"), ("pol", "mo")] "okopol" -> "momo"
01:36:26 <oklofok> i do rule by rule... since thue does not care about order right?
01:36:42 <oklofok> you can read my code, it's 15 lines as i said
01:37:07 <oklofok> it's very bad code i'm sure, this is the first program i've done on a functional language :D
01:38:41 <oklofok> http://www.pastebin.ca/356379
01:39:19 <oklofok> i tried not to look at your code too much, just checked drops param order and the function names
01:40:38 <oklofok> it takes the substs as a list
01:41:08 <oerjan> parser next? you might want to look at the Parsec library
01:41:57 <oerjan> with that the parser shouldn't be more than another 15 lines
01:43:12 -!- oklopol has quit (Read error: 110 (Connection timed out)).
01:43:28 -!- oklopol has joined.
01:43:44 <oklopol> god i hate it when it does that
01:44:42 <oerjan> oklopol: you do know that you can ask nickserv to kick off your ghosts?
01:45:37 <oklopol> i don't, there is no such service on qnet
01:45:57 <oklopol> if there's one here, please share it with me :D
01:46:19 <oklopol> hmm... i can't do file io, the monads will kill me
01:47:01 <oklopol> i'm not registered, maybe i should :P
01:47:23 <oerjan> Indeed that is necessary to kill ghosts
01:47:40 <oerjan> as well as for sending private messages
01:47:43 <oklopol> can you help me with filw io?
01:47:58 <oerjan> I suggest using the interact function for a start
01:48:47 <oerjan> That saves you most of the trouble with IO if you are just making a pipe
01:49:04 <oerjan> main = interact yourPipeFunction
01:49:41 <oerjan> a function from stdin to stdout
01:50:18 <Sukoshi> I need to get back to Haskell hacking sometime.
01:50:28 <oklopol> i had "filename: " -> open file -> read -> parse -> exec in mind
01:50:34 <Sukoshi> The Scheme in Haskell tutorial looks really nice.
01:51:01 <oerjan> you want the filename as input or on the command line?
01:51:29 <oklopol> i don't know how to specify stdin
01:52:01 <oklopol> hmm... getContents or smth
01:52:20 <oklopol> i read about this somewhere, i'll try on my own, i'll be here crying for help soon
01:52:56 <oerjan> btw Haskell does have if then else
01:53:15 <oerjan> (for you case ... True -> ... False ...)
01:54:19 -!- meatmanek has joined.
01:54:36 -!- meatmanek has quit (Read error: 104 (Connection reset by peer)).
01:55:51 <bsmntbombdood> we need to come up with something that means the opposite in scheme and haskell
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 <oklopol> main needs a declaration (or whaddyacallit) main :: Something -> oso
02:00:50 <oerjan> and type declarations are often optional
02:01:20 <oklopol> it won't compile that's all
02:01:32 <oklopol> nothing, so they can't be optional there
02:01:36 <oerjan> You would get a message about no Num instance for ()
02:02:24 <oklopol> hmm... how can i return 5 from main? :D
02:02:30 <oerjan> 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 <oklopol> return strips off the monad, IO, right?
02:03:25 <oerjan> actually the opposite, return puts it on
02:03:35 <oklopol> well, i'll understand it later
02:03:48 <oklopol> i wanna get this working first :D
02:03:53 <oerjan> and note also that return does not quit from a function
02:04:35 <oklopol> i don't attach meaning to names
02:05:24 <oerjan> System.Exit.exitWith (ExitFailure 5)
02:05:25 <oklopol> i mean, i don't have problems with confusing languages, but i do have problems in understanding how IO works :P
02:06:01 <oklopol> but... but... why aren't there better examples, examples that work :\
02:07:48 <oklopol> it's my error i'm pretty sure
02:08:01 <oklopol> doing something really wrong when copypasting...
02:08:03 <oerjan> just for a start imagine that Haskell distinguishes sharply between pure expressions and actions
02:08:21 <oklopol> first i'd like to get ANY main working :P
02:08:23 <oerjan> and that actions have type IO something
02:08:52 <oerjan> main = print "Hello, world!"
02:09:24 <oklopol> possibly incorrect indentation
02:09:46 <oerjan> where are you putting it?
02:09:48 <oklopol> hard to say... it's in the Thue file
02:10:22 <oklopol> runThue'' (subst:substs) init sure = case doSubst subst init of
02:10:22 <oklopol> (False, _) -> runThue' substs init sure
02:10:22 <oklopol> (True, newinit) -> runThue' substs newinit True
02:10:22 <oklopol> main = print "Hello, world!"
02:10:56 <oerjan> And it compiles without main?
02:12:39 <oklopol> i had done something fishy there... forgot about it and thought it was the same working code
02:12:56 <oerjan> next step would be a do block I guess
02:13:24 <oerjan> and then some more actions, indented
02:13:59 <oklopol> i tried one code, but it said isAscii not in scope... and nothing was imported
02:14:16 <oerjan> import Data.Char for that I think
02:14:44 <oerjan> btw: haskell.org/hoogle
02:15:50 <oerjan> as well as http://www.haskell.org/ghc/docs/latest/html/libraries/index.html
02:16:03 <oklopol> okay, i now have a code that reads two names, one for output, one for input and pipes
02:16:37 <oklopol> i'll peruse those later :)
02:16:49 <oklopol> too much just now... it's 4 am
02:17:08 <oerjan> There is also System.Environment.getArgs
02:17:29 <oklopol> but i call main as a function
02:17:45 <oklopol> i could just give them as params?
02:18:35 <oklopol> okay, i'll stick to the file thing though :D
02:19:08 <oklopol> return s will be a string with the contents of the file..?
02:19:54 <oerjan> <- takes values out of IO in a sense
02:20:31 <oklopol> i'll make the parser, thue's io comes some other time, i'll sleep soon
02:22:25 <oklopol> let (substs, init) = parseRaw s in
02:22:54 <oklopol> if i do the parseRaw that converts string -> substitutions and initial string
02:23:48 <oklopol> good, i'll start the parser... not sure if i'll manage to finish it just now :D
02:24:47 <Sukoshi> Does Haskell make well to parsers like the BT one? (Not that I'd switch.)
02:26:56 <oerjan> Parsec would be shooting fish in a barrel :)
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:17:39 <oerjan> http://www.pastebin.ca/356520
03:19:25 <oerjan> but it is just 24 lines :)
03:21:27 <oerjan> to run, do parseTest (many bencoding) "whatever"
03:41:23 -!- ShadowHntr has joined.
03:49:37 <oerjan> something does not look quite right there
03:55:40 <oerjan> on second thought, it is obvious that () should be I
03:57:15 <oerjan> because that makes (A1...An)B = A1...AnB for all n including 0
03:58:02 <bsmntbombdood> There should be a function that takes all the arguments you give it and does nothing with them
04:00:56 <oerjan> you can take it from there :)
04:03:26 <oerjan> but that would make the expression larger
04:04:36 <oerjan> that would seem a reasonable conclusion
04:05:20 <oerjan> except the parentheses are not quite right
04:05:45 <oerjan> Y = \f.(SII) \x.f (xx)
04:17:14 <oerjan> i don't see how you got your first expression, though
04:19:55 <oerjan> ok (but not optimized)
04:33:51 <oerjan> S(KK)(SII)x = KKx(xx) = K(xx)
04:35:09 <oerjan> so if x = S(KK)(SII), then xx = K(xx)
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:10 <SimonRC> "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 <SimonRC> no, actually *this* is even more mind-boggling:
14:21:56 <SimonRC> ""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 <SimonRC> Headline: Christian Scientists Hypothesise 'Sun'
14:29:17 -!- nazgjunk has quit ("Bi-la Kaifa").
14:36:15 <bsmntbombdood> "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 <GregorR> bsmntbombdood: Hmmm, now what could that be ...
16:33:03 <GregorR> bsmntbombdood: Something like a big ball of burning gas ...
16:33:11 <GregorR> bsmntbombdood: That uses nuclear fusion to create energy ...
16:33:20 -!- RodgerTheGreat has quit.
16:33:24 <GregorR> bsmntbombdood: Energy which ends up transferred to Earth ... ;)
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:38:01 <GregorR> pikhq: Why are you never online? :P
18:43:21 -!- ShadowHntr has quit (Client Quit).
18:50:33 <oklopol> too bad i wrote this in finnish :\
19:00:47 <lament> finnish is a pretty useless language. nobody speaks it!
19:17:29 -!- nazgjunk has quit ("Bi-la Kaifa").
19:18:03 <oklopol> yeah... who likes useless languages...
19:50:35 -!- wooby has joined.
20:06:56 -!- ihope has joined.
20:07:36 <ihope> ~exec self.raw("PRIVMSG ihope :Boing")
20:07:45 <ihope> Interesting, don't you think?
20:07:50 <ihope> ~exec self.raw("PRIVMSG ihope :Boing")
20:07:55 <ihope> Really, how odd...
20:08:33 <bsmnt_bot> 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:09:06 <bsmnt_bot> 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:17:57 -!- FabioNET has quit (Read error: 145 (Connection timed out)).
20:20:22 <ihope> ~exec self.raw("QUIT")
20:20:22 -!- bsmnt_bot has quit.
20:20:26 -!- bsmnt_bot has joined.
20:20:39 <ihope> That's one way to do it, eh?
20:20:48 <ihope> ~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 <ihope> ~exec self.ihope.bsmnt.raw("PRIVSMG #esoteric :Foo")
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.
22:02:47 <oklopol> fuck... i'll have to wear a suit tomorrow :<<<
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:36:12 <oerjan> why i realized that just after saying it
22:36:22 <SimonRC> http://en.wikipedia.org/wiki/Ugli_fruit
22:38:37 <oerjan> why the heck isn't it spelled Hugli if that's how it's originally pronounced?
22:47:51 <oerjan> Darn Babelfish doesn't have finnish
22:49:28 <oerjan> oklopol: Why can't you write in a sensible language such as Norwegian? :)
22:51:08 <oerjan> 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]").