00:15:12 -!- itidus21 has left ("Leaving"). 00:20:34 -!- Frooxius has quit (Quit: ChatZilla 0.9.88-rdmsoft [XULRunner 1.9.0.17/2009122204]). 00:20:55 -!- Frooxius has joined. 00:28:16 Some games have Vancian casting. So now, make up the game with Vatican casting. 00:30:44 -!- Phantom_Hoover has quit (Quit: Leaving). 00:40:36 -!- ais523 has quit (Remote host closed the connection). 00:43:16 -!- DCliche has joined. 00:47:16 -!- Klisz has quit (Ping timeout: 276 seconds). 00:56:03 > ((+1) &&& (*2)) 4 00:56:04 (5,8) 00:57:10 -!- rodgort has quit (Quit: ERC Version 5.3 (IRC client for Emacs)). 00:57:28 -!- rodgort has joined. 01:00:44 "An important limitation upon programming is that the machine must adhere to a prescribed linear course of operation. It cannot at any point choose between two subsequent programs on the basis of results already obtained." 01:00:49 I guess programming has changed since 1947. 01:01:02 lol 01:01:25 a bit 01:13:54 I guess if was invented later. 01:19:31 :t unfoldr 01:19:33 forall b a. (b -> Maybe (a, b)) -> b -> [a] 01:19:40 hm 01:19:58 ah 01:30:22 A Black Sheep is still a Sheep. 01:33:10 http://sigcis.org/pipermail/members/2009-February/191226.html 01:33:35 I think that ... the discovery of "if"? 01:35:23 @undo do { x <- m; y <- m2; f x y } 01:35:23 m >>= \ x -> m2 >>= \ y -> f x y 01:35:41 erm 01:36:00 @@ @pl @do { x <- m; y <- m2; f x y } 01:36:00 Parse error at "{" (column 1) 01:36:22 @. pl do { x <- m; y <- m2; f x y } 01:36:23 Parse error at "{" (column 1) 01:36:25 erm 01:36:27 @help @@ 01:36:28 help . Ask for help for . Try 'list' for all commands 01:36:37 -!- coppro has changed nick to coppro_. 01:36:38 @help @ 01:36:38 @ [args]. 01:36:38 @ executes plugin invocations in its arguments, parentheses can be used. 01:36:38 The commands are right associative. 01:36:38 For example: @ @pl @undo code 01:36:38 is the same as: @ (@pl (@undo code)) 01:36:57 -!- coppro_ has changed nick to coppro. 01:37:01 @@ @pl @undo { x <- m; y <- m2; f x y } 01:37:01 Parse error at "{" (column 1) 01:37:06 @@ @pl @undo do { x <- m; y <- m2; f x y } 01:37:07 (m2 >>=) . f =<< m 01:37:08 lol 01:38:20 :t liftM 01:38:21 forall a1 r (m :: * -> *). (Monad m) => (a1 -> r) -> m a1 -> m r 01:38:22 :t liftM2 01:38:23 forall a1 a2 r (m :: * -> *). (Monad m) => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r 01:38:42 :t join . liftM2 01:38:43 forall a2 r (m :: * -> *). (Monad m) => (a2 -> a2 -> r) -> m a2 -> m r 01:39:14 :t join .: liftM2 undefined 01:39:15 forall (m :: * -> *) a a1 a2. (Monad m) => m a1 -> m a2 -> m a 02:21:54 -!- myndzi has joined. 02:24:38 -!- DCliche has quit (Quit: SLEEP, GLORIOUS SLEEP). 02:27:45 just a though for a new esolang 02:28:11 a language which has data disappear if you don't access it after some amount of time 02:36:08 variable: Yes I have thought of something similar too; see "Silly Emplosions" 02:36:39 -!- pikhq_ has joined. 02:36:46 -!- pikhq has quit (Ping timeout: 252 seconds). 02:37:24 "If you leave a variable for too long without assigning a value, the variable will lose its value." 02:37:40 ya 02:38:54 -!- myndzi has quit. 02:39:02 -!- myndzi has joined. 02:42:28 I realized now, in the Pure BF implementation, there is things such as (t $ Sum 0) but I think it is really same as (extract t) 02:44:06 For the (->) comonad, extract = ($ mempty) 02:54:43 -> is a comonad? 03:03:57 Yes, but it require the input type to be monoid 03:04:46 You can also make an indexed comonad which is similar but has the input type being a category instead 03:06:56 This is such a program using -> comonad: http://esolangs.org/wiki/Pure_BF/Implementation 03:08:34 -!- azaq23 has quit (Quit: Leaving.). 03:14:30 :t uncurry 03:14:31 forall a b c. (a -> b -> c) -> (a, b) -> c 03:30:57 http://hpaste.org/56825 03:31:02 anyway I can make this slightly less terrible? 03:34:50 kallisti, update 03:35:41 kallisti: I don't know 03:35:52 zzo38: it may be hard to discern what it does. 03:36:31 the idea is that I have a function called stepLine, which generates a walk on the board starting from some coordinate and direction (the Move type is a Coord Direction pair) 03:36:55 it walks forward and if it ends when it runs into a piece or when it reaches the edge of the board. 03:37:10 if it encounters a portal that's facing the opposite direction of the direction of travel 03:37:13 it goes through the portal 03:37:19 so it can possibly be an infinite walk. 03:37:39 s/if it ends/it ends/ 03:39:12 so this function extends that simple walk by applying a function whenever a portal is encountered 03:39:39 the function receives the location of the portal (as a Move) and the location of where the portal takes it. 03:40:19 whenever it returns Nothing wrapped in a monad, the walk halts 03:40:45 otherwise it returns Just the value to append to the walk list. 03:41:08 I use the State monad, but I generalized the type signature to any Monad/Functor 03:41:33 Can it work with any applicative functor? 03:41:55 hm 03:42:01 I think so? 03:42:07 maybe if I change the returns to pures 03:42:59 the point is that I want to keep track of every portal I've visited, and then halt the walk when I've reached the same portal again. 03:43:07 to avoid an infinite loop. 03:43:30 State seemed like the easiest way to not only keep track of the portals, but to keep track of them between multiple walks from a given starting point. 03:43:53 but... I'm wondering if there's a better way. 03:45:01 walkWithPortals will be used to: a) figure out the valid moveset for a given piece b) detect loops when a projectile is fired 03:45:35 possibly other things I haven't considered. it's a useful bit of code that removes some ugly, duplicate code. 03:46:31 a small change I was wondering about: 03:46:34 maybe (return Nothing) (uncurry portalF) mTuple 03:46:40 can I avoid this? 03:48:16 step' returns a single step, ignoring portals, step returns a single step forward and follows portals 03:48:28 so to detect portals I check the result of both against each other... if they're different then we've hit a portal. 03:49:23 but they both return Maybes... because their may be no step to take (you're in front of a piece or at the edge of the board) 03:49:32 *there 03:51:57 it's probably better if I just paste the whole code 03:51:58 http://hpaste.org/56828 03:57:54 zzo38: what's the term in chess for pieces that move in cardinal directions? 03:57:59 do they use orthogonal? 04:38:07 @pl (\x -> map (f x)) 04:38:07 map . f 04:38:16 @pl (\x y -> map (f x) y) 04:38:16 map . f 04:38:23 hm 04:38:50 @pl (\x y -> f . g . h $ map (f x) y) 04:38:50 ((f . g . h) .) . map . f 04:39:45 @pl (\x -> f . g . h . map (f x)) 04:39:45 ((f . g . h) .) . map . f 04:44:06 Haskell kind of forces you to get good at naming things. :P 04:44:43 nope 04:47:55 either that or use a lot of letters. 04:48:18 or just be really bad at naming things still 04:48:19 I guess 04:48:39 all of my names are just lots of apastrafes 04:48:46 bad 04:48:59 m''' 04:49:08 not to be confused with m'' 04:49:11 and m' 04:49:12 or... 04:49:15 do you actually just use '? 04:49:16 ''' 04:49:22 oh wait can't 04:49:51 i put an underscore before it 04:50:28 > _' = 2 in _' 04:50:29 : parse error on input `=' 04:50:32 > let _' = 2 in _' 04:50:33 2 04:51:19 * kallisti takes note of that one for a future Haskell obfuscator 04:51:28 though the ideal obfuscator just applies @pl to everything 04:51:36 so there won't be any variables 04:53:20 let _'_ = '_' 04:54:32 @hoogle (<|>) 04:54:33 Control.Applicative (<|>) :: Alternative f => f a -> f a -> f a 04:54:33 Text.Parsec.Prim (<|>) :: (ParsecT s u m a) -> (ParsecT s u m a) -> (ParsecT s u m a) 04:54:33 Text.ParserCombinators.Parsec.Prim (<|>) :: (ParsecT s u m a) -> (ParsecT s u m a) -> (ParsecT s u m a) 04:55:52 @unpl (\(a,b) -> (f a, f b)) 04:55:53 (\ (a, b) -> (f a, f b)) 04:55:56 @pl (\(a,b) -> (f a, f b)) 04:55:57 f *** f 04:56:32 @pl (\a b -> (f a, f b)) 04:56:32 (. f) . (,) . f 04:57:56 is there anything dangerous about FlexibleContexts? 04:58:45 It's a gateway to IncoherentInstances 04:59:35 ...so 04:59:39 not dangerous? 05:00:06 I basically want to generalize my State code to MonadState, despite the fact that it uses a specific state type... 05:00:22 Not by itself. But you often don't use it by itself. 05:14:20 -!- oerjan has joined. 05:15:32 -!- MDude has changed nick to MSleep. 05:22:18 @hoogle (Maybe a, Maybe b) -> Maybe (a,b) 05:22:18 No results found 05:22:27 heh 05:22:57 uncurry (liftM2 (,)) 05:23:00 :t uncurry (liftM2 (,)) 05:23:01 forall a1 a2 (m :: * -> *). (Monad m) => (m a1, m a2) -> m (a1, a2) 05:23:45 walkWithPortals :: (Functor m, Monad m) => Board -> (Move -> Move -> m (Maybe Move)) -> Move -> m [Move] 05:23:51 oerjan: do you walk with portals? 05:23:59 sadly, no 05:24:15 also, how obscene is that type? 05:24:22 it looks pretty obscene to me. 05:24:49 well Functor _should_ be implied by Monad. if you replace fmap by liftM, it might do. 05:24:59 *_should_ have been 05:25:11 no it wasn't implied because I'm using fmap 05:25:23 I don't really like the liftM family but... I'll try it. 05:25:49 i mean, in a general why the heck doesn't haskell do it, oh you mean it's been discussed a googol times before, ok... 05:25:56 *+sense 05:26:20 linearWalk :: (MonadState (S.Set Move) m) => Board -> Move -> m [Move] 05:26:22 FLEXIBLECONTEXTS OSHI 05:26:33 while raisins are dancing around you, hysterically. 05:26:48 I like how linearWalk actually isn't really very linear at all. 05:26:53 depending on what you mean by linear... 05:27:12 flexiblecontexts is trivial, another thing that should have been in haskell by default. 05:27:18 in an absolute sense it is not a continuous line. however, when thinking with portals, it's perfectly linear. 05:27:42 curvaceousWalk? 05:28:01 I guess I should call it like linearWalkButCatchesInfiniteLoops 05:28:11 and then call stepLine linearWalk 05:29:10 concatLinearWalks :: Board -> [Move] -> [Move] 05:29:12 concatLinearWalks = ((join . (`evalState` S.empty)) .) . mapM . linearWalk 05:29:16 BOOM PUNCHLINE 05:33:51 um the join there is actually concat, no? it's outside the monad after all. 05:33:56 yes 05:34:06 is that confusing? 05:34:09 might be clearer to use concat, then 05:34:39 done. :) 05:35:14 can you tell what it does by chance? :P 05:35:37 data Move = Move Coord Direction 05:36:19 linearWalk (Move c d) starts its walk from point c traveling in direction d 05:36:29 *linearWalk board (Move c d) 05:38:05 hmmm wait is State a monoid? 05:38:07 well it concatenates results of linearWalk, each linearWalk starting with the end state of the previous one 05:38:19 yes 05:38:26 i don't know why that is an interesting operation. 05:38:50 it probably isn't. it's just the first time I've actually used State for anything useful. :P 05:39:13 in this case the state is a set of every portal we've encountered along the walk 05:39:20 oh wait hm 05:39:20 linearWalk actually just takes one step, right 05:39:20 the walks short circuit when they encounter the same portal again. 05:39:24 no 05:39:35 zero or more 05:39:45 more than one? 05:39:58 well it could take zero if it attempts to walk into another piece 05:40:10 or off the edge of the board. 05:40:25 but otherwise takes one or more. 05:40:30 the zero is obvious. what i don't understand is why you'd want more than one. 05:40:51 to define movesets for each piece. 05:41:31 oh. so it's not some walk a piece would actually try to take, now it makes more sense 05:41:41 yes it's a list of possible moves. 05:41:43 (the concatenated one) 05:42:01 which can be a tricky thing to figure out on a board with four portals on it. 05:43:18 heh 05:43:31 there may be a more efficient way to calculate that I don't know 05:43:45 but it seemed easiest to just define what the set of moves is and then traverse it to see if the attempted move is valid. 05:44:05 do you exit a portal in the same direction, or rotated 05:44:09 maybe use a set instead of a list? I don't know, that's a lot of inserts for basically only probably one lookup. 05:44:21 oerjan: the portal forces your new direction 05:44:26 so... whatever that means 05:44:30 phrased in those terms that you just said. :P 05:44:42 rotated I guess. 05:44:42 which means loops need to take into account what direction you are traveling 05:45:00 believe so yes. 05:45:09 I'm not entirely sure about that 05:45:15 but it currently does take that into account. 05:45:22 there's only one direction from which you can enter a given portal 05:45:28 so... just keeping track of the coordinate should be enough 05:45:56 ok 05:46:27 unfortunately I'll probably need to rewrite some of this code or generalize it even further in order to get it to work with projectiles.... 05:47:17 oh hmmm 05:47:19 just got an idea 05:47:58 oerjan: http://hpaste.org/56830 hi can you make walkWithPortals less ugly? 05:48:03 actually I might be doing that soon. 05:48:15 I think I'm going to make walkWithPortals a special case of a more general function 05:49:01 ok 05:49:23 basically walkWithPortals applies the function you supply it whenever it encounters a portal on a walk (note that this kind of walk can possibly be infinite -- this is before the short-circuiting happens) 05:49:29 but 05:49:48 I can just generalize that to "apply a function when you land on any piece" 05:49:54 and that basically lets me do all the other things I want to do. 05:51:14 * kallisti is not sure if he's going about it the right way. 05:51:27 this is the first large Haskell program I've written. :) 05:52:39 * oerjan has never written a large haskell program, he thinks 05:54:00 hmmm I should test the code I currently have. 05:54:05 that's going to be annoying... 05:54:48 the Maybe monad has been my favorite for this section of code. 05:58:01 is there anything that short circuits on Just instead of Nothing? 05:58:14 > Just 2 <|> Nothing 05:58:15 Just 2 05:58:22 > Nothing <|> Just 2 05:58:23 Just 2 05:58:27 awwwwwwwww yeah 05:58:36 that's excellent 05:59:11 this means I can write "piece handlers" 05:59:17 and then just piece them together 05:59:18 with that. 05:59:36 or, well, something similar. 05:59:50 -!- itidus21 has joined. 05:59:55 itidus21: SUP DAWG 06:00:04 the soup dog 06:00:09 dup dog 06:00:12 bringing soup to everyone 06:00:38 i see in topic they think spotted marsh elliott extinct :-s 06:00:46 just don't be too picky on the hygiene. 06:01:06 itidus21: in this channel yes. it's been spotted in neighboring ones. 06:01:37 IRC is a weird place 06:01:54 -!- Phantom_Hoover has joined. 06:01:56 you can be in multiple locations at once, and your neighbors are defined by similarity in what they talk about. 06:02:04 -!- oerjan has set topic: Now open for Americans to liberate | Get your esoil and esoline here! | Glorious optator institutes permanent ban penalty for power tripping | Weapons of mass banning "just monoids in the category of endofunctors, what's the problem?" | Spotted marsh elliott still unspotted | Gregorian chants outlawed, "American" | http://codu.org/logs/_esoteric/. 06:02:50 there are so many... jokes 06:03:02 what, in the topic? 06:03:07 yes 06:04:42 -!- oerjan has set topic: Now open for Americans to liberate | Get your esoil and esoline here! | Production of tripless power cables start, "mandatory security change" | Weapons of mass banning "just monoids in the category of endofunctors, what's the problem?" | Spotted marsh elliott still unspotted | Gregorian chants outlawed, "American" | http://codu.org/logs/_esoteric/. 06:05:56 oerjan: I wouldn't be surprised if there's some kind of "GENERALIZE GRAPH WALK COMBINATOR" that could result from this stuff.... 06:05:59 yes 06:06:01 GGWC 06:06:08 -!- oerjan has set topic: Now open for Americans to liberate | Get your esoil and esoline here! | Production of tripless power cables start, "mandatory security change" | Glorious optator briefly unmentioned in topic, editor exiled | Spotted marsh elliott still unspotted | Gregorian chants outlawed, "American" | http://codu.org/logs/_esoteric/. 06:06:42 how do you pronounce "esoil? 06:06:50 s/\?/"?/ 06:07:03 s oil? 06:07:05 straight forward duh 06:07:22 at first sight I thought it was e soil. 06:08:09 * oerjan finds out he's not quite got the right pronunciation of "esoteric" 06:08:30 I remember when I discovered that. :P 06:09:13 * itidus21 suddenly realizes i have wrong pronunciation also 06:09:19 lol 06:09:46 i have been subverbalizing it as E-so-teric all along 06:09:57 but reading this its obviously S-O-teric 06:10:30 or it could be 06:10:35 at first I pronounced it as eh-SAW-teric, and still think that sounds good. :P 06:10:46 maybe it is 06:10:51 im just guessing 06:11:02 no it's S-O-teric as you say. 06:11:10 though the O coulkd be a schwa as well. 06:12:28 (UK) IPA: /ˌɛs.əʊˈtɛɹ.ɪk/, SAMPA: /%Es.@U"tEr.Ik/; (US) IPA: /ˌɛs.əˈtɛɹ.ɪk/ 06:12:50 someone here might even be able to see all the symbols 06:13:00 * kallisti can see them! 06:13:08 (it's fine in my browser, just not in putty) 06:13:20 "In words attributed to Art Babbitt, an animator with the Walt Disney Studios: "Animation follows the laws of physics — unless it is funnier otherwise." " 06:14:07 itidus21: it could also be more fantastic 06:14:09 instead of funny 06:14:14 for example, Dragonball Z. 06:14:26 so realistic or funny or BADASS 06:14:30 are the options. :P 06:14:30 yeah im pretty fixated on dragonball z physics 06:14:33 lol 06:14:39 I KNOW THAT'S WHY IT'S A PERFECT EXAMPLE. 06:15:13 hm 06:15:23 these explicit board parameters are getting in my way. 06:15:43 *small grin* but up until now i have focused too much on japanese comical physics 06:16:12 maybe I should combine Move and Board into something.... 06:16:12 the article heer reminds me that teh west did their own innovations too 06:17:37 I realized now, in the Pure BF implementation, there is things such as (t $ Sum 0) but I think it is really same as (extract t) 06:17:41 ah right 06:18:46 > (Sum 1, Product 5) `mappend` (Sum 2, Product 3) 06:18:46 (Sum {getSum = 3},Product {getProduct = 15}) 06:18:50 yay 06:19:27 zzo38: you could make a paintfuck implementation with the (Sum Int, Sum Int) monoid :P 06:19:32 i think 06:21:11 @tell zzo38 Sounds like you could generalize the monoid for your pure BF implementation, e.g. make a paintfuck implementation with the (Sum Int, Sum Int) monoid :P 06:21:12 Consider it noted. 06:21:23 I wonder just how good GHC is at common subexpression elimination. 06:22:10 kallisti: afair it tries not to be smarter than the programmer, since that can cause space leaks 06:22:50 so if you want something elimated, give it a name 06:22:50 *-in- 06:23:17 I was referring to common subexpression elimination after inlining. 06:23:26 which I can't do myself. 06:23:31 oh. 06:24:17 maybe you can use {-# NOINLINE #-} somehow (i've never optimized much) 06:24:28 er, no that's the opposite of what I want. 06:24:35 I want it to inline and CSE :P 06:24:58 I suppose I could just find... a better way to write my code. INSTEAD 06:24:59 sheesh 06:25:14 premature optimisation premature optimisation 06:25:26 unless 06:25:32 your code is awful?? and rewriting it would be good?? 06:25:33 help 06:25:38 probably. 06:26:22 you might also ask someone who actually knows the answer, i guess. 06:29:40 > many 1 06:29:41 No instance for (GHC.Show.Show (f [a])) 06:29:41 arising from a use of `M36260297... 06:29:57 > many 1 :: Maybe Int 06:29:58 Couldn't match expected type `GHC.Types.Int' 06:29:58 against inferred type ... 06:30:38 > const Just 2 <|> const Just 3 $ 5 06:30:39 No instance for (Control.Applicative.Alternative ((->) a)) 06:30:40 arising from ... 06:30:46 this should totally be a thing. 06:32:26 oh wait 06:32:36 > const (Just 2) <|> const (Just 3) $ 5 06:32:37 No instance for (Control.Applicative.Alternative ((->) a)) 06:32:38 arising from ... 06:32:40 actually this should be a thing. 06:32:43 i understand many and some are useless for monads which are not essentially parser monads 06:33:05 you need a monad in which the _same_ action can succeed or fail at different times. 06:33:39 ok State can do that. but not Maybe, [], Reader or Writer. 06:33:39 hi what does <|> on functions look like. 06:33:48 oerjan: Maybe you could make a paintfuck implementation too, if you like to do so. I have no intention to do so at this time 06:33:49 zzo38: You have 1 new message. '/msg lambdabot @messages' to read it. 06:34:07 zzo38: nah i'm just pointing out the connection 06:34:41 :t sin <|> cos 06:34:42 forall a. (Floating a, Alternative ((->) a)) => a -> a 06:35:01 You cannot use <|> on functions 06:35:21 :t Just <|> const Nothing 06:35:21 now what 06:35:21 :t Just <|> const Nothing 06:35:22 forall a. (Alternative ((->) a)) => a -> Maybe a 06:35:22 forall a. (Alternative ((->) a)) => a -> Maybe a 06:35:26 well I was thinking if its return value was <|> 06:35:30 er 06:35:32 was Alternative 06:35:33 kallisti: seems there is no instance defined 06:35:44 ....I'm having trouble figuring out what the instance looks like. :P 06:36:02 because how do you refer to the return value of the function? 06:36:08 kallisti: probably the same as most of the weird Num etc. instances 06:36:29 (f <|> g) x = f x <|> g x 06:36:31 If there is <|> then there must be empty as well, where the type signature for empty implies that it cannot be the same as any pure and that (<$> empty) = const empty due to the law fmap id = id 06:36:50 empty x = empty 06:37:07 I mean what does the instance header look like 06:37:13 that's... what I can't figure out. :P 06:37:30 oh duh right 06:38:12 a -> f b doesn't have the b in the right position to make an Applicative instance. 06:38:35 so I guess I'll just.... 06:38:40 write my own function. what should I call it? 06:38:49 newtype wrapper can do it :P 06:38:55 gross. 06:38:57 which is actually what ReaderT is, i think 06:39:23 :t ReaderT 06:39:24 forall r (m :: * -> *) a. (r -> m a) -> ReaderT r m a 06:40:16 > runReaderT (ReaderT Just <|> ReaderT (const Nothing)) 5 06:40:17 Just 5 06:40:52 eh that kind of defeats the purpose for me 06:40:55 I'll just write my own function. 06:42:18 The type signature of empty (and mzero) also implies the left zero law (mzero >> x = mzero) due to the (>>= return) law that (join . return = join . fmap return = id) 06:42:49 what's your f in this, anyway? if the f x monoid instance fits that f alternative instance, you could use a monoid instance for -> instead 06:43:01 It is not necessary to make the left zero law explicit in the definition 06:43:02 alas, Maybe is well known _not_ to match them 06:43:07 Maybe 06:43:19 it's okay I'm doing something else. :> 06:43:26 Not to match what? 06:43:45 zzo38: mappend and <|> don't do the same thing for Maybe 06:43:54 actually I could make an alternative instance for a very very specific function. :P 06:44:27 oerjan: Yes. That is so that they can make a different thing for mappend 06:44:38 > Just "test" <|> Just "so" 06:44:39 Just "test" 06:44:45 > Just "test" `mappend` Just "so" 06:44:45 But you could make a wrapper that makes mappend do the <|> 06:44:46 Just "testso" 06:45:10 Another wrapper could make mappend to do the (liftA2 mappend) 06:45:15 zzo38: well but a newtype wrapper defeats kallisti's purpose of getting something elegant 06:45:25 YEP 06:45:49 oerjan: Then, implement the InstanceDisambiguation extension proposal that I have written 06:45:50 there are already _several_ Monoid wrappers for Maybe 06:46:43 oerjan: I don't mean only for Maybe. I meant a wrapper making mappend do the <|> or the (liftA2 mappend) etc for any general Alternative or Applicative of monoid 06:48:49 Although I think, as well as making join a class method of Monad, make liftPair :: (f x, f y) -> f (x, y) a class method of Applicative since it is sometimes very useful, and you could have <*> and liftPair default methods defined in terms of each other 06:49:58 And then I try to think, if you can somehow make a Coapplicative with a kind of liftPair other way 06:50:26 zzo38: i am not sure how useful liftPair as a method is, since i think usually a liftPair implementation would just be putting (,) in the <*> definition 06:50:53 and then, why not make it general in the first place 06:52:05 Also see this: http://en.wikipedia.org/wiki/Monoidal_monad It seems similar to my "liftPair" idea but describes how a monad can be applicative functor as well, as far as I can tell 06:52:14 walkWith board (followPortal `orRule` stopOnPiece) startMove 06:52:18 holy crap that's awesome. 06:53:28 oerjan: There is the reason not make it general; you can define <*> too; the liftPair would just be another way that describes it without function (putting the use of function in fmap instead) 06:53:57 Like how, join also doesn't require the function as a parameter 06:54:05 I wonder if orRule should be left associative or right associative. 06:54:28 same associative as <|> I think 06:54:30 which is.... left? 06:54:51 If you type :info <|> in GHCi then they will tell you the fixity 06:55:02 pretty sure it's left based on its short circuting behavior with Maybe 06:55:18 It doesn't matter because it is associative 06:55:21 > Nothing <|> Just 2 <|> Nothing 06:55:22 Just 2 06:55:26 oh right 06:55:37 zzo38: the difference is that i find it hard to think of a liftPair definition which doesn't use (,) somewhere, possibly hidden in something like curry, but still. while a join definition does not have to contain any obvious correspondence to >>='s function argument. 06:55:39 > Just 3 <|> Just 2 <|> Nothing 06:55:40 Just 3 06:56:00 yeah should be left associative in this case. 06:56:48 kallisti: But <|> is associative by law, so (Just 3 <|> Just 2) <|> Nothing = Just 3 <|> (Just 2 <|> Nothing) 06:57:07 ah, indeed. 06:57:37 :t (0$0 <|>) 06:57:38 The operator `<|>' [infixl 3] of a section 06:57:38 must have lower precedence than that of the operand, 06:57:38 namely `$' [infixr 0] 06:57:38 oerjan: That is true, that is a difference. But at least "monoidal monad" in mathematics (described by the Wikipedia article) seem to be similar to liftPair 06:58:19 zzo38: yes, but in mathematical category theory, products are much more fundamental than in haskell 07:00:38 pretty sure it's left based on its short circuting behavior with Maybe <-- huh, that actually seems stupid. right would short circuit better. 07:01:04 just like with || and && 07:01:06 hm... 07:01:13 > (0$0 ||) 07:01:14 The operator `GHC.Classes.||' [infixr 2] of a section 07:01:14 must have lower ... 07:01:17 > (0$0 &&) 07:01:18 The operator `GHC.Classes.&&' [infixr 3] of a section 07:01:18 must have lower ... 07:01:38 infixl 3 <|> 07:02:04 i have had a hunch for a while that the Applicative operator fixities are not well thought out. (for one thing, they're _different_ from the corresponding Monad ones) 07:02:30 > (0$0 `mplus`) 07:02:31 The operator `Control.Monad.mplus' [infixl 9] of a section 07:02:31 must have l... 07:02:41 ok that one doesn't actually _have_ one. 07:02:42 oerjan: Yes they are different, and sometimes it is useful that they are difference. But yes it still does seem mixed up you are correct about that 07:04:13 If you type :info <|> in GHCi then they will tell you the fixity <-- also my (0$0 `op`) trick for lambdabot 07:04:30 O, yes, that too. 07:05:18 mmmm this is so good 07:05:20 this fixes so many things. 07:11:05 oerjan: what do you mean that right associative would short circuit better? 07:11:21 -!- pikhq_ has quit (Ping timeout: 240 seconds). 07:11:36 -!- pikhq has joined. 07:11:53 kallisti: if a <|> b <|> c is parsed as a <|> (b <|> c), you just need to evaluate the a to know if it causes a short circuit 07:12:10 oh right 07:12:23 I'm bad at associativity. :P 07:13:10 wow, I've written a lot of code. 07:13:23 this is the most Haskell I've written. 07:13:34 How does "in mathematical category theory, products are much more fundamental than in haskell"? Product type are useful in Haskell programming too (since really, you can do many the same as mathematics) 07:13:53 and even if <|> _doesn't_ shortcut ... for [], (<|>) = (++) and ++ has better complexity when right associated 07:17:25 zzo38: useful, sure, but in category theory products are a limit construction, and afaict used to _define_ two-argument morphisms. and you don't get currying unless your category is cartesian closed. 07:17:46 so you _need_ products in a more fundamental way. 07:18:22 oerjan: Yes, I suppose that is why some monad are "monoidal monads"; when I read that I thought, is all monads applicative functors as long as it is a cartesian closed category? Or is there something else? 07:19:08 zzo38: i don't know, monoidal monads reaches the part of category theory that is a bit too heavy for my brain nowadays. 07:20:23 zzo38: i recall some people mentioned recently, maybe here, that without cartesian closed category there is a distinction between monads and _strong_ monads. i don't know what that is though. 07:20:47 Because, I know in Haskell, all monads can be applicative functors. I would like to know if that applies to all cartesian closed categories, or if it is a weaker or a stronger requirement than this. 07:21:15 oerjan: Yes I have read some things about strong monads, and that in Haskell, all functors are strong 07:21:16 argh that requires monoidal category too. there's no escape :P 07:21:40 linearWalker :: WalkRule 07:21:40 linearWalker = followPortal `orRule` stopAtPiece 07:21:47 the terminology is just getting more ridiculous as we speak. 07:23:32 And anyways, the Arrow class in Haskell is defined using product types. 07:24:18 zzo38: hm, cartesian closed categories allow you to define monads in terms of >>= don't they, and doesn't the rest of applicative follow from that? 07:24:43 zzo38: yes, but i think that's considered a somewhat ugly fact about arrows. 07:25:28 hm 07:25:37 although some consider the rampant use of arr also an ugly fact, and i've read some suggesting a weaker arrow class without it, and _just_ product plumbing, which would be useful for circuit-like things 07:25:51 *weaker variant of 07:26:12 what would happen if..... 07:26:23 I passed these walk rules, the rule that they're a part of? 07:26:42 so that they can advance forward using all the rules. 07:26:54 hm that sounds like a continuation actually. 07:27:19 kallisti: sounds like how you do recursion in lambda calculus 07:27:31 I think arr ought to be a different class. I did write a module (not yet published) that puts arr in a different class and can use any type instead of (,) as another class parameter (which means no separate class in needed for ArrowChoice since you can use the dual category) 07:27:46 oerjan: I want to define a rule called walkAroundPiece 07:28:09 which will, if it encounters a piece, step forward beyond it. 07:28:19 but it has to know what the walk rule is 07:28:23 which is information it currently doesn't have. 07:28:35 i think i need to finish reading this website which keeps leaking memory -> 07:28:36 I put arr in a different class called CatFunctor from any one category to another, and a different name. The class methods for CatArrow are also given different names and has two parameters instead of just one 07:29:53 hmmm I think I could better structure this is a Cont maybe? 07:33:52 .... 07:33:53 I 07:34:03 I want to, so badly, name this constructor field 07:34:04 boardWalk 07:34:14 but that actually doesn't make any sense. 07:44:32 Apparently, Notch is a fan of Order of the Stick 07:44:39 RecordPuns is a weird name for RecordPuns 07:47:04 class Category c => CatArrow c p where { arr1 :: c x y -> c (p x z) (p y z); arr2 :: c x y -> c (p z x) (p z y); mirror :: c (p x y) (p y x); (*+*) :: c x y -> c x' y' -> c (p x x') (p y y'); (&|&) :: c x y -> c x y' -> c x (p y y'); } It can define arr1 in terms of arr2 and mirror, arr2 in terms of arr1 and mirror, *+* in terms of arr1 and arr2; can it define mirror in terms of &|& and arr1 and arr2? 07:47:21 argh IE will let me turn off scripts on the site but _not_ enable them on a subpage which i want them on (you _cannot_ put anything explicitly into the default region, only the restricted and cleared ones) 07:47:41 (yeah i know you'll just laugh at me using IE) 07:47:57 haha IE great funny 07:48:03 -!- ChanServ has set channel mode: +o oerjan. 07:48:15 I think you can add one more zone using the registry editor 07:48:16 -!- oerjan has kicked kallisti Just remember, there are consequences!. 07:48:22 -!- kallisti has joined. 07:48:24 egads! 07:48:29 -!- oerjan has set channel mode: -o oerjan. 07:48:46 stupid optators tripping on the power 07:48:59 i didn't trip, i was pushing you 07:49:19 am I a bad person for using record puns? 07:49:28 no, puns are always good 07:49:49 I think at this point I'm probably overcomplicating things. 07:50:07 but I can't think of a more general way to do it... 07:50:50 wait, more general implies _less_ complicated, in haskell? 07:51:08 no 07:51:12 and I think no for any language. :P 07:51:21 well... 07:51:30 I don't know this is easier than rewriting a bunch of code. 07:51:48 and in the likely event that I change some rules this will be pretty easy to modify. 07:55:09 oh wait I don't even need this rule... 07:55:17 or wait, yes I do... 08:14:50 -!- Vorpal has joined. 08:15:47 f :: Natural -> Natural -> Natural; f 0 0 = 0; f x 0 = x ^ church x (f $ pred x) (x ^ x); f x y = join (^) $ f x (pred y); z :: Natural; z = join (^) $ f 3 0; 08:18:03 uh oh.... 08:19:02 zzo38: primitive recursive, i suspect 08:19:17 Questions: [1] How large is z compared to other large numbers? [2] How much memory do you need to calculate it? [3] How long will it take for the program to complete? [4] What properties can be figured out? [5] What is the point of doing such things? 08:19:20 oh hm or 08:19:48 maybe not... 08:21:02 (By "church" I mean that the function (f $ pred x) should be applied x times) 08:21:34 oerjan: Why not? 08:21:35 i think the last f equation is equivalent to f x y = church y (join (^)) (f x 0) 08:21:35 zzo38: i guessed that much 08:21:43 why not what 08:22:34 i am not sure whether combining church with (f $ pred x) can get you out of primitive recursive or not; nothing else there does 08:22:37 oerjan: O, yes, you are probably correct about the last f equation. I meant why not primitive recursive 08:23:38 oh.... 08:23:41 I figured out what I want. 08:23:43 I think. 08:23:51 I think I want the StateT instance for MonadLogic? 08:24:09 assuming it works as I expect it to. 08:25:01 if I have StateT s [] a 08:25:10 ok so f x 0 = x ^ church x (\y -> church y (join (^)) (f (pred x) 0)) (x ^ x) 08:25:25 which is primitive recursive, i believe 08:25:27 then it should create a new state for each branch point, right? 08:25:33 oerjan: Yes which mean you don't really need the second argument 08:26:16 yep 08:26:31 :t runStateT 08:26:32 forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s) 08:27:07 zzo38: so, as usual this would be smaller than ackermann stuff 08:27:12 Now what happen if the first argument to church is also decided using f? 08:28:35 zzo38: i doubt that helps; the problem is that it's too easy to split the part where y varies by itself, so you are really only recursing on one argument at a time 08:28:46 * kallisti is bad at monad transformers... 08:28:47 *split out 08:29:13 By using mostly only the f, church, join, exponent, and predecessor of its argument; possibly in a small way that still has a large effect 08:30:04 oerjan: Even if y is ignored though; and there is one argument x only; if you did that what happen? 08:30:51 > do { x <- get; lift [x+1,x-1] } >>- iterate succ 08:30:52 Couldn't match expected type `t [] b' against inferred type `[s]' 08:31:29 halp 08:32:31 > evalStateT $ do { x <- get; lift [x+1,x-1] } >>- iterate succ 08:32:32 Couldn't match expected type `Control.Monad.Trans.State.Lazy.StateT 08:32:32 ... 08:34:22 zzo38: what would you use for church's second argument then? if you put f i don't think the recursion terminates. 08:36:10 oerjan: I know you can't put f... oops... maybe you need to use exponents and number by the predecessor of argument, too 08:38:47 > flip evalStateT 5 $ do { x <- get; lift [x+1,x-1] >>- (lift . iterate succ)} 08:38:51 [6,4,7,5,8,6,9,7,10,8,11,9,12,10,13,11,14,12,15,13,16,14,17,15,18,16,19,17,... 08:38:58 I have no idea if this is doing what I want it to do. 08:39:24 i suspect ackermann's two arguments with f nested in the recursive rule is about the simplest you can do to get something out of primitive recursive territory 08:40:09 but it would seem reasonable that each alternative branch point in the [] instance of MonadLogic would have a distinct state... 08:40:16 rather than running the state linearly through the resulting list. 08:43:27 > interleave [1,2,3] [4,5,6] 08:43:28 [1,4,2,5,3,6] 08:43:49 oh hm ack x y = ack (pred x) (ack x (pred y)) = church y (ack $ pred x) (ack x 0) 08:43:50 it's a fun exercise to write "interleave" which works for an infinite number of infinite lists 08:43:57 > [1,2,3] >>- const [4,5,6] 08:43:58 [4,4,5,4,6,5,5,6,6] 08:44:02 or i guess it's 'transpose' 08:44:13 kmc: um isn't that what >>- does 08:44:30 well, (>>- id) 08:44:35 likely 08:44:39 is that from LogicT? 08:44:45 I've actually used (>>- id) 08:44:47 i think so 08:44:58 it's from the MonadLogic class specifically 08:45:03 it's also what Control.Monad.Omega.diagonal does iirc 08:45:16 but anyway you don't need to "um" me as I said it was an exercise 08:45:18 I did think of some variant of Ackermann-Peter function which include multiple application (by church) as well, such as: a 0 n = succ n; a m 0 = church (a (pred m) 1) (a $ pred m) 1; a m n = church (a (pred m) $ a m (pred n)) (a $ pred m) (a m $ pred n); 08:46:10 -!- Ngevd has joined. 08:46:17 Hello! 08:46:33 > if [1,2,3] (\x -> [x,x,x]) undefined 08:46:34 : parse error (possibly incorrect indentation) 08:46:36 > ifte [1,2,3] (\x -> [x,x,x]) undefined 08:46:37 [1,1,1,2,2,2,3,3,3] 08:46:49 > ifte [] (\x -> [x,x,x]) undefined 08:46:51 *Exception: Prelude.undefined 08:47:00 :t ifte 08:47:00 forall (m :: * -> *) a b. (MonadLogic m) => m a -> (a -> m b) -> m b -> m b 08:47:59 Ngevd: I've been doing a lot of fancy magic since you left. :P 08:48:05 Yay 08:48:09 Magic that is fancy! 08:50:50 -!- _Slereah has quit (Ping timeout: 260 seconds). 08:53:02 so much better than boring magic! 08:55:06 Also, kallisti, how do pawns behave with portals? 08:55:22 oh i think a category can be monoidal in more than one way, with product being one of them. makes more sense now. 08:56:13 i suppose the product is used for haskell, then 08:56:30 although you could also use Either instead... 08:56:43 (for the coproduct version) 08:56:45 Ngevd: as expected? 08:57:11 oerjan: Does that have anything to do with ArrowChoice? 08:57:18 zzo38: i expect so 08:57:43 So, if there's a portal in front of them so they can go through it, and the matching portal is facing East, and they can move double, and move double through the portal, what happens? 08:58:37 the portal changes the direction of travel. 08:58:40 as though... 08:58:43 it were the same 08:58:44 >_> 08:58:49 as the original direction 08:58:51 or whatever. 08:58:54 this makes total sense. 08:58:55 :P 08:59:21 I did notice that how I have defined CatArrow, that ArrowChoice stuff is just done by CatArrow in a dual category with Either instead of (,) 09:00:51 Ngevd: think of it this way: portals just relocate points in a pieces moveset 09:01:06 hm that smash product example listed looks like what you would get if haskell's products were unlifted and you used bottoms as the identity. i think. 09:01:14 so that they continue in the direction forced by the out portal 09:01:33 Hmm 09:01:36 (unlifted = (_|_, y) = (x, _|_) = _|_) 09:01:53 *unlifted means 09:02:00 Ngevd: this is a good way to think about it, because it's currently the way I'm implementing it. :> 09:03:55 Ngevd: btw I'll allow clients to request movesets 09:04:02 so a client can highlight possible moves for a piece 09:04:16 this should make reasoning about portals easier. 09:04:54 -!- _Slereah has joined. 09:09:08 zzo38: afaiu comonads are just monads in the dual category, so shouldn't coapplicatives be similarly related to applicatives? although i don't know the categorical definition of applicative. 09:10:30 `run echo "Comonads are just monads in the dual category." >wisdom/comonad 09:10:43 No output. 09:10:53 `? comonad 09:10:57 Comonads are just monads in the dual category. 09:11:04 Wow! 09:11:16 Also, isn't that what `learn is for? 09:11:35 Ngevd: learn doesn't support pluralizing words afaik 09:11:54 > msplit [1,2,3,4] 09:11:55 [Just (1,[2,3,4])] 09:12:01 ah 09:12:16 it does at least convert to lowercase. 09:12:30 `cat bin/learn 09:12:33 ​#!/bin/sh \ topic=$(echo "$1" | sed 's/ .*//' | tr A-Z a-z) \ info=$(echo "$1" | sed 's/[^ ]* //') \ echo "$1" >"wisdom/$topic" \ echo "I knew that." \ 09:14:12 msplit looks like it would be useful for pointlessing 09:14:27 oh wait it has a surrounding [] 09:14:31 :t msplit 09:14:32 forall (m :: * -> *) a. (MonadLogic m) => m a -> m (Maybe (a, m a)) 09:14:43 > iterate (>>- iterate succ) 0 09:14:44 No instance for (GHC.Num.Num [a]) 09:14:44 arising from a use of `e_10' at > iterate (>>- iterate succ) [0] 09:14:49 [[0],[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,2... 09:28:42 -!- Ngevd has quit (Ping timeout: 245 seconds). 09:31:24 > sequence [[1..], [0..]] 09:31:25 [[1,0],[1,1],[1,2],[1,3],[1,4],[1,5],[1,6],[1,7],[1,8],[1,9],[1,10],[1,11],... 09:31:54 :t iterate 09:31:55 forall a. (a -> a) -> a -> [a] 09:32:03 @hoogle (a -> a) -> a -> m a 09:32:04 Prelude iterate :: (a -> a) -> a -> [a] 09:32:04 Data.List iterate :: (a -> a) -> a -> [a] 09:32:04 Data.Generics.Schemes everywhere :: (forall a. Data a => a -> a) -> (forall a. Data a => a -> a) 09:32:15 @hoogle (Monad m) => (a -> a) -> a -> m a 09:32:16 Prelude iterate :: (a -> a) -> a -> [a] 09:32:16 Data.List iterate :: (a -> a) -> a -> [a] 09:32:16 Data.Generics.Schemes everywhere :: (forall a. Data a => a -> a) -> (forall a. Data a => a -> a) 09:38:57 -!- Ngevd has joined. 09:46:13 oerjan: I know comonads are just monads in the dual category. But I don't know of coapplicatives 09:46:23 -!- zzo38 has quit (Remote host closed the connection). 10:03:48 :t \(x,y) -> (,) x `liftM` y 10:03:49 forall t a1 (m :: * -> *). (Monad m) => (t, m a1) -> m (t, a1) 10:04:15 i assume that's the strong monad strength function 10:05:43 :t either (return.Left) (liftM Right) 10:05:44 forall (m :: * -> *) a a1. (Monad m) => Either a (m a1) -> m (Either a a1) 10:06:02 and that would be another candidate for the coproduct monoid 10:21:37 @hoogle (MonadPlus m) => m a -> Bool 10:21:38 Data.IntMap null :: IntMap a -> Bool 10:21:38 Data.Maybe isJust :: Maybe a -> Bool 10:21:38 Data.Maybe isNothing :: Maybe a -> Bool 10:22:14 @hoogle mconcat 10:22:15 Data.Monoid mconcat :: Monoid a => [a] -> a 10:22:26 -!- myndzi has quit (Ping timeout: 248 seconds). 10:22:35 :t (== mzero) 10:22:35 forall (m :: * -> *) a. (MonadPlus m, Eq (m a)) => m a -> Bool 10:23:47 > [1,2,3] >> [] 10:23:48 [] 10:25:56 > msum (repeat []) 10:26:00 mueval-core: Time limit exceeded 10:28:36 > msum [] 10:28:37 No instance for (GHC.Show.Show (m a)) 10:28:37 arising from a use of `M6822796534... 10:30:37 > Nothing `mplus` Just 2 10:30:38 Just 2 10:31:14 > Just 1 `mplus` Just 2 10:31:15 Just 1 10:32:54 -!- sebbu has quit (Ping timeout: 255 seconds). 10:39:47 -!- monqy has quit (Quit: hello). 10:47:52 -!- Frooxius has quit (Ping timeout: 245 seconds). 10:57:12 -!- KingOfKarlsruhe has joined. 11:09:33 -!- Frooxius has joined. 11:10:04 -!- Frooxius has quit (Read error: Connection reset by peer). 11:11:22 -!- Frooxius has joined. 11:12:15 -!- Frooxius has quit (Client Quit). 11:14:55 -!- Frooxius has joined. 11:18:21 -!- Frooxius has quit (Read error: Connection reset by peer). 11:20:24 -!- Frooxius has joined. 11:20:39 spaamius 11:41:37 -!- Frooxius has quit (Ping timeout: 240 seconds). 11:49:54 -!- kallisti has quit (Ping timeout: 248 seconds). 11:51:07 -!- Ngevd has quit (Ping timeout: 252 seconds). 11:54:57 -!- Ngevd has joined. 11:56:07 I reckon DMM is dying 11:56:12 -!- Frooxius has joined. 11:56:25 And wants to pass all his knowledge onto the next generation 11:58:13 -!- Ngevd has quit (Client Quit). 12:09:53 -!- Ngevd has joined. 12:09:59 -!- Frooxius has quit (Read error: Connection reset by peer). 12:11:06 -!- Frooxius has joined. 12:14:26 -!- leonid[sunp] has joined. 12:14:31 helo 12:15:34 Hello 12:15:37 `welcome 12:15:40 Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: http://esolangs.org/wiki/Main_Page 12:15:50 i've been looking at fernando language 12:16:08 and wondered if it is possible to build a program that outputs the shortest possible fernando code that outputs any given string 12:16:38 Definitely 12:17:44 Efficiently is another challenge altogether 12:21:16 excuse me, but if fernando is turing-complete, that is impossible. 12:21:50 see kolmogorov complexity. 12:22:13 i see. 12:22:34 oerjan: How so? Enumerate through programs in shortlex order, for each program: ask your neighbourhood Turing oracle whether it halts, if it doesn't run it, if it outputted the string you wanted, well, there it is. 12:22:51 iirc, fernando doesn't have input function. 12:23:00 * oerjan swats fizzie -----### 12:23:28 oerjan: I don't think FerNANDo has any sort of unbounded storage, though. 12:23:59 FerNANDo is linear bounded 12:25:51 it's basically a matter of detecting a pattern from the desired output 12:26:23 ah, maybe so then. 12:27:13 yes, then just simulate and check for repetition to throw out non-halting programs. 12:33:00 not sure how to approach this 12:33:17 it's still not efficient though. 12:33:32 i gave up getting the optimal code 12:33:46 'fairly good' ones will satisfy me 12:36:10 well it's easy to make one which uses 3+8*n commands where n is the number of bits in the string. 12:36:43 haha yeah 12:36:51 i'd say that one is the upper bound 12:37:51 and loops are hard to use. especially since you can only jump backwards. 12:39:15 also wondering if it's possible to make fernando quine 12:41:09 (except for the trivial 0b solution of course) 12:41:29 actually nevermind. an empty code will cause an error 12:42:00 I don't see anything stopping it 12:43:05 i don't know why it would be an error. 12:43:42 i thought the only valid lines of codes are those that consist of 1, 3, or 8 variables 12:43:50 looks like i'm wrong 12:44:22 yes, what does that have to do with having _no_ lines? 12:45:47 i see 12:46:38 forget the part where i said 'nevermind' 12:46:48 forget what? 12:46:59 forget this line [07:41:15] actually nevermind. an empty code will cause an error 12:47:12 oh, thanks for reminding me. 12:47:38 i'm not sure how you'd organize a quine in this. 12:49:32 for the main reason that i'm not sure how do structured data of comparable size to the program itself. 12:50:22 *to do 13:04:48 -!- hagb4rd has quit (Read error: Connection reset by peer). 13:05:42 -!- hagb4rd has joined. 13:12:16 -!- Frooxius has quit (Ping timeout: 252 seconds). 13:14:49 I'm worried. 13:14:56 My dog just threw me a ball 13:16:53 -!- Frooxius has joined. 13:17:36 well did you fetch properly? 13:21:45 i saw a cat throw a ball at another cat's face yesterday 13:22:07 Ngevd: you're the dog now man 13:22:47 -!- oerjan has quit (Quit: Good boy!). 13:33:25 -!- Patashu has quit (Quit: MSN: Patashu@hotmail.com , Gmail: Patashu0@gmail.com , AIM: Patashu0 , YIM: patashu2 , Skype: patashu0 .). 13:34:57 -!- Ngevd has quit (Ping timeout: 245 seconds). 13:37:44 -!- Ngevd has joined. 13:37:52 -!- Frooxius has quit (Ping timeout: 252 seconds). 13:38:12 -!- Ngevd has quit (Client Quit). 14:02:46 -!- sebbu has joined. 14:02:47 -!- sebbu has quit (Changing host). 14:02:47 -!- sebbu has joined. 14:14:20 -!- KingOfKarlsruhe has quit (Quit: ChatZilla 0.9.88 [Firefox 9.0.1/20111220165912]). 14:33:24 -!- sebbu has quit (Read error: Connection reset by peer). 14:33:49 -!- sebbu has joined. 14:33:49 -!- sebbu has quit (Changing host). 14:33:49 -!- sebbu has joined. 14:48:23 -!- MSleep has changed nick to MDude. 14:58:20 -!- Ngevd has joined. 14:58:25 Hello 15:13:30 hi Ngevd 15:15:23 We're in the future 15:16:21 How did you get there? 15:17:03 By waiting 15:17:13 But now we're in the past... 15:17:15 Sounds complicated. 15:28:07 -!- Frooxius has joined. 15:39:51 -!- Ngevd has quit (Quit: Goodbye). 15:44:39 -!- primo has joined. 15:47:12 -!- azaq23 has joined. 15:47:21 -!- azaq23 has quit (Max SendQ exceeded). 15:48:02 -!- azaq23 has joined. 16:13:06 -!- MDude has quit (Ping timeout: 255 seconds). 16:34:18 @tell elliott Oh god why are rabbits so tasty im crisis 16:34:18 Consider it noted. 16:48:18 Phantom_Hoover, what makes you think elliott is coming back? 16:48:27 Oh, I guess he can receive the message in #haksell 16:48:29 #haskell 16:49:08 #haxhell. 16:52:29 -!- primo has quit (Ping timeout: 240 seconds). 16:54:25 -!- Phantom_Hoover has quit (Remote host closed the connection). 17:18:39 -!- ais523 has joined. 17:40:10 Just a heads-up, but the robotic uprising has started: http://users.ics.tkk.fi/htkallas/roombastruction.jpg 17:40:51 First they cut the cellphone chargers; next, our necks. 17:41:17 (Even the microUSB connector has been sliced, not just the cable.) 17:54:32 -!- Ngevd has joined. 17:55:04 Hello 17:58:11 fwehfiuwehfui 17:58:14 fungot 17:58:14 Ngevd: i could point you in the us a jelly donut. i am sure it can 17:58:21 ^style 17:58:21 Available: agora alice c64 ct darwin discworld europarl ff7 fisher fungot homestuck ic irc* iwcs jargon lovecraft nethack pa qwantz sms speeches ss wp youtube 17:58:31 ^style ss 17:58:31 Selected style: ss (Shakespeare's writings) 17:58:41 fungot, fwehfiuwehfui 17:58:41 Ngevd: pro. as manie as you please. 17:58:52 What a dude. 17:59:48 fungot: Are you in league with the Roombalords? 17:59:49 fizzie: widdow. it quakes me too, now i understand ye very well: could he say lesse 18:00:17 I'm not sure if that's a yes or a no. 18:00:46 Truly, fungot is a master of trickery. 18:00:46 Ngevd: gon. let your study be to content your lord, that fault is none of my lords meat? then they could smile and fawn upon his debts, and take leaue. i am 18:01:01 fizzie, how hard is it to add a style? 18:01:13 Ngevd: It's not entirely automated, but not very hard. 18:01:49 You basically need a datafile of what you want it to say in "one sentence per line" plaintext format. 18:03:27 Then it's just a matter of some ./preprocess.pl sed -e 's#.*# & #' varikn-1.0.2/varigram_kn -o .. -D .. -E .. -C -3 -n .. .. -a .. ./arpa2fungot.pl and there it is. 18:03:28 fizzie: first lord. go, comfort your bed, with hey the sweet birds throte: come hither 18:03:52 With suitable ..s. 18:06:10 I am writing a program and have no way to check it for errors 18:06:27 So you thought a new fungot style might help? Makes sense. 18:06:27 fizzie: she fals the sword. send succours ( lords) to let you enter his vnpeopled house. enter. mes. so like you, sir. nicholas and frailty, as men you are in hast: and speed must answer it 18:06:37 Take my mind of things 18:06:46 With a bit of automated Oscar Wilde 18:09:00 I've got 14322 sentences of that stuff at the moment, it seems. 18:09:20 I suppose it would be possible to stylify that. It's just a bit of a bother. 18:14:16 -!- cheater has quit (Ping timeout: 244 seconds). 18:19:55 -!- MDude has joined. 18:23:05 Is fungot's source available? I want to try running fungot in another channel. 18:23:06 Sgeo: fra. you louing men of angiers open wide your gates and let young arthur, duke of clarence daughter, did he tempt thee so? her. they give their greeting to the senators let me desire to know wherefore i sent, and your fnord, your ques, and your increasing in love leonatus posthumus.' 18:29:05 ^source 18:29:05 http://git.zem.fi/fungot/blob/HEAD:/fungot.b98 18:29:07 Sgeo: ^ 18:29:26 That's actually slightly misleading. 18:29:44 What about all the styles? Are they available somewhere? 18:29:58 But you can find all the necessary bits from behind that link, you just need more than just fungot.b98. 18:29:59 fizzie: mon. how? bribe me? is it? cel. i warrant you 18:30:02 Or could we just get a multichannel fungot 18:30:03 Ngevd: captain. pray, at whose suit is this? ham. to be hang'd that wilt not stay her tongue. the fnord 18:30:25 It works for msg 18:30:32 The current fungot works well enough multichannel, yes. 18:30:33 fizzie: gloster. now, sirs, be careful of your own will. is he not with the dolphins grace, his new-come champion, vertuous ioane of acre, nor any man of qualitie: i hope this reason stands for my bountie: but who is here? 18:30:39 And the styles aren't anywhere. 18:30:43 They're quite big, anyway. 18:30:59 My fungot directory is ~630M. 18:31:00 Aww, ok 18:31:00 fizzie: sil. what sai'st thou boy? i loue, and thou, and nature must obey necessitie, which we, on like conditions, will have it so, to great and high estate. is left to tyrannize upon my breast; and, when your owne percy, when my father dyed within's two houres 18:31:05 Sgeo, tell fizzie what channels you wanted 18:31:11 fizzie, work magic for Sgeo 18:31:23 Most of them are from public sources, anyway, so you can build them. 18:31:38 And the ones that aren't I probably couldn't share either. 18:31:40 ^style fisher 18:31:40 Selected style: fisher (Fisher corpus of transcribed telephone conversations) 18:31:42 Like this one. 18:31:48 I think it's got some copyrights on it. 18:31:59 o.O how did you get it? 18:32:11 fungot, then who was phone? 18:32:11 Sgeo: so you know getting your opinion on that how can anything that)) i've ( ( wanted to go to florida for the summer 18:32:12 You can buy it with $1000 from LDC, apparently. 18:32:23 Well, "Part 1" transcripts, anyway. 18:32:28 I'm not quite sure what I used. 18:32:52 The extra ()s are something I forgot to clean up, it's got this annotation thing going on. 18:34:08 Also I got it since we have that sort of stuff at work, and I thought building a model and spewing some output now and then will fall under the "negligible amounts" rules, or whatever. 18:37:04 -!- kallisti has joined. 18:37:04 -!- kallisti has quit (Client Quit). 18:37:15 -!- kallisti has joined. 18:39:10 -!- Ngevd has quit (Quit: Goodbye). 18:45:57 -!- zzo38 has joined. 18:50:58 annotation thing? 18:52:04 ^styles 18:52:08 ^style 18:52:08 Available: agora alice c64 ct darwin discworld europarl ff7 fisher* fungot homestuck ic irc iwcs jargon lovecraft nethack pa qwantz sms speeches ss wp youtube 18:52:16 ss? 18:52:20 ct? 18:52:27 ic? 18:52:30 pa? 18:52:50 Shapespeare, Chrono Trigger, INTERCAL, Penny Arcade. (From memory.) 18:52:56 Ah 18:52:56 Just try them and look at the descriptions. 18:52:58 ^style ss 18:52:58 Selected style: ss (Shakespeare's writings) 18:53:00 ^style ct 18:53:01 Selected style: ct (Chrono Trigger game script) 18:53:02 ^style ic 18:53:03 Selected style: ic (INTERCAL manual) 18:53:04 ^style pa 18:53:04 Selected style: pa (around 1200 transcribed Penny Arcade comics) 18:53:04 Oh, ok 18:53:14 ^style sms 18:53:14 Selected style: sms (National University of Singapore SMS corpus, 2011-08-20) 18:53:25 fungot: What's bubbling, mon? 18:53:26 fizzie: wat.? abt the imp. at one? if dun go dunno. i generally free since school holiday. are u okay with any guy...after u told to give xerox wen vil u cum? on you or in you. psalm.. ezek.. 2peter decimal. 1peter 5 18:53:36 Why does the National University of Singapore have an SMS corpus? 18:53:42 ^style c64 18:53:42 Selected style: c64 (C64 programming material) 18:53:48 ^style irc 18:53:48 Selected style: irc (IRC logs of freenode/#esoteric, freenode/#scheme and ircnet/#douglasadams) 18:53:49 Why does the National University of Singapore do anything, really? 18:54:11 I mean, how does a university get access to SMS messages like that? 18:54:36 They asked people. 18:54:45 That one was more explicit than they usually are, though. 18:54:57 In my opinion, the many-worlds interpretation of quantum mechanics is as good as any other. So you might need different interpretation for different purposes 18:55:29 purposes? 18:55:35 "These messages were collected from volunteers who were made aware that their contributions were going to be made publicly available." 18:56:00 They're still collecting it, incidentally. 18:56:25 "As of January 2012 , we have collected 41208 English SMS messages (exclusive the old corpus) and 29381 Chinese SMS messages ." 18:56:35 They also put spaces in front of commas and periods, I see. 18:56:49 Anyway, the 2011-08-20 copy had... maybe 20-30k messages? 19:03:42 -!- Klisz has joined. 19:04:34 -!- Ngevd has joined. 19:04:52 Hello 19:05:14 fizzie, I've began formatting OW's plays into fungot-format 19:05:15 Ngevd: the vm or elsewhere. then just ( set! stream... oh well. if it does it's what littledan asked about. 19:05:34 Ngevd: I've got them in sort-of the right format already. 19:05:54 Oh, cool 19:06:03 http://p.zem.fi/vz5c -- well, these ones, anyway. 19:07:12 Shall I do Salome? 19:07:38 Add the style for Super ASCII MZX Town (probably too small data for a meaningful program, however) 19:08:07 So add other stuff such as the wiki article for the game 19:08:22 And other people comments if they complained and so on 19:08:34 Is probably still too small data 19:13:38 The smallest styles which I have in there are probably around 2000-3000 lines. The YouTube one might've been smaller than that. Anyway, I'm remarkably lazy when it comes to actually adding new styles. 19:18:50 I have only 813 lines (31126 bytes) so it is insufficient 19:19:22 ASCII MZX Town? 19:20:21 It is a computer game series that I have made. Part I is already complete. Part II is not complete so you cannot play the Part II game yet. 19:22:20 -!- oerjan has joined. 19:29:34 walk :: (MonadLogic m) => WalkRule m -> Board -> Move -> m Move 19:29:34 walk rule b = msum . iterate (>>- step rule b) . step rule b 19:29:39 if I understand this correctly 19:29:47 this won't terminate 19:30:00 because eventually it will begin iterating an infinite list of []'s 19:30:10 or 19:30:12 mzeros actually 19:30:57 > iterate (>>- const []) [] 19:30:58 [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]... 19:30:59 iterate always gives an infinite list 19:31:01 yes like that 19:31:07 > msum $ iterate (>>- const []) [] 19:31:09 :( 19:31:11 mueval-core: Time limit exceeded 19:31:16 > msum $ iterate (>>- const []) [1] 19:31:19 mueval-core: Time limit exceeded 19:31:20 :((((((((((((((((((((((( 19:31:24 damn you halting problem. 19:31:34 so the question is: how many MonadPlus instances are always Eq instances? 19:31:42 because I need to check for mzero 19:32:10 very few, i should imagine 19:32:17 hm 19:32:36 since you'd usually need Eq x for Eq (m x) 19:33:09 :t ifte 19:33:10 forall (m :: * -> *) a b. (MonadLogic m) => m a -> (a -> m b) -> m b -> m b 19:33:18 isn't that what this does? 19:33:24 oh 19:33:33 well...... 19:33:54 yes 19:33:59 > ifte [1,2] return [3,4] 19:34:00 [1,2] 19:34:17 I could recursively call that I think 19:34:22 but I always want to accumulate a list. 19:35:04 hm 19:35:42 so I'll just wrap it in a Maybe 19:35:45 and check for Nothing 19:35:50 perhaps 19:35:54 I'll see if there's a better way. 19:36:15 oh I can't wrap it in Maybe 19:37:04 oh... I know 19:38:20 walk :: (MonadLogic m) => WalkRule m -> Board -> Move -> m Move 19:38:21 walk rule b m = ifte (step rule b m) (walk rule b) (return m) 19:38:31 I think. 19:40:16 so now I can use StateT [] or just [] or any other MonadLogic 19:40:19 which is excellent. 19:43:04 I'm kind of surprised that Maybe isn't a MonadLogic. 19:43:10 maybe it doesn't satisfy some law. 19:44:24 There is no definition for msplit for Maybe 19:44:26 hi 19:44:36 That is why it doesn't work 19:44:39 zzo38: ah indeed 19:44:55 :t msplit 19:44:56 forall (m :: * -> *) a. (MonadLogic m) => m a -> m (Maybe (a, m a)) 19:46:00 :t let msplit x = flip (,) Nothing <$> x in msplit 19:46:02 forall (f :: * -> *) a a1. (Functor f) => f a -> f (a, Maybe a1) 19:46:16 um hm 19:46:55 I believe it has to satisfy some laws as well. :P 19:47:09 I wonder if at patterns work with record puns.... 19:47:17 pun@(Con a b c) 19:48:06 I don't think it would 19:48:12 -!- monqy has joined. 19:48:16 :t Con 19:48:17 Not in scope: data constructor `Con' 19:48:32 msplit mzero == return Nothing msplit (return a `mplus` m) == return (Just (a, m)) 19:49:32 msplit Nothing = Just Nothing; msplit (Just a) = Just (Just (a, ...)) 19:50:01 i see, the problem is that m is discarded 19:52:38 Ooh, the progressivest: we just (very likely) voted a gay man to the second round (top two candidates) of the Finnish presidential elections. Though I really don't think the gayness had much to do with it. Still, one could have thought that would have been off-putting to some. 19:53:14 You'll see just how off-putting it is when he gets around 30% of the votes in the second round. 19:53:30 There is that. 19:54:37 I'm not so sure Paavo #1 would do *that* much better, though who knows. 19:55:04 There are altogether too many Paavos in this election. 19:55:11 Heh, true. 19:55:55 hm has anyone gay been directly voted to a top position anywhere in the world - the icelandic prime minister was presumably selected by parliament, not directly 19:56:17 (37.5% of the candidates have the given name Paavo, for the non-.fi followers.) 19:56:28 But I guess the Soini + Essayah votes will probably all go to Niinistö directly, whereas with Väyrynen that'd be different 19:57:05 and she was supposedly the first to reach that point 20:00:43 oerjan: There's the prime minister of Belgium, presumably with the same caveats. And I think there was an almost-President somewhere, was #2 in an election with a not too large gap. 20:00:54 oh right 20:04:54 http://en.wikipedia.org/wiki/David_Norris_(politician) is probably what I was thinking of, except seems it was more complicated than that. 20:13:01 Hmm 20:13:38 A Piet program could be represented as a graph where nodes have two values: colour and size 20:13:50 It would be directed and non-simple 20:13:56 But continuous? 20:14:41 Each node would have an outdegree of 8 20:15:54 Blocked outs would go to itself? 20:16:47 Given that blocked outs just twiddle those pointer things, they might also go wherever they go. 20:16:58 -!- Phantom_Hoover has joined. 20:17:02 Of course, this assumes the out-arcs are ordered 20:17:11 Some Piet compilers probably produce a graph representation. I think my halfway-done llpiet did. 20:17:27 -!- MDude has quit (Ping timeout: 255 seconds). 20:17:41 If I'm not mistaken, it could also write it out as a dot file. 20:18:55 I made up a list of monster age category for D&D 3.5e game; it is incomplete but is good enough to make up the age of my and my brother's character 20:20:05 And possibly even a few non-player characters we might find, if necessary to figure out their age 20:20:26 -!- oerjan has quit (Quit: Good night). 20:20:44 -!- MDude has joined. 20:20:56 -!- TeruFSX has quit (Disconnected by services). 20:22:12 -!- TeruFSX_ has joined. 20:22:56 -!- oklopol has quit (Ping timeout: 244 seconds). 20:29:52 walk rule b m = ifte (step rule b m) (walk rule b) (return m) 20:29:56 I don't think this is what I want actually 20:30:56 :t reflect 20:30:57 forall a (m :: * -> *). (MonadLogic m) => Maybe (a, m a) -> m a 20:31:13 I think I need to use this to "accumulate" a "list" 20:31:31 :t ifte 20:31:32 forall (m :: * -> *) a b. (MonadLogic m) => m a -> (a -> m b) -> m b -> m b 20:31:34 > reflect Nothing :: [Int[ 20:31:35 : parse error (possibly incorrect indentation) 20:31:36 > reflect Nothing :: [Int] 20:31:36 [] 20:31:44 yeah 20:32:06 not sure why it's called reflect though 20:32:25 -!- Taneb has joined. 20:32:31 What is reflect? Something with LogicT? 20:33:04 something with MonadLogic yes. 20:33:08 it's the inverse of msplit 20:33:16 > msplit [1,2,3] 20:33:16 [Just (1,[2,3])] 20:33:39 > reflect (Just (1, [2,3])) 20:33:40 [1,2,3] 20:33:43 well, almost inverse 20:36:08 -!- Ngevd has quit (Ping timeout: 276 seconds). 20:36:09 walk :: (MonadLogic m) => WalkRule m -> Board -> Move -> m Move 20:36:09 walk rule b m = ifte (step' m) iterateSteps (return m) 20:36:09 where 20:36:09 iterateSteps m' = reflect $ Just (oneStep, walk rule b m') 20:36:13 ....I think this is it. 20:36:23 Hang on 20:36:26 When did I lag out 20:36:46 ? 20:36:54 Between "I think I need to use this to "accumulate" a "list"" and "What is reflect? Something with LogicT?" 20:37:24 Taneb: http://codu.org/logs/log/_esoteric/s 20:37:53 logreading in stalker mode "a good idea" 20:38:07 monqy: yes to figure out what happened in a disconnect it's pretty ideal. 20:38:12 Ah, I didn't miss much 20:41:06 -!- DCliche has joined. 20:42:30 -!- Darth_Cliche has joined. 20:43:12 So... 20:44:33 -!- Klisz has quit (Ping timeout: 245 seconds). 20:45:43 Esolang idea! 20:45:48 brb 20:45:49 Taneb: You have 1 new message. '/msg lambdabot @messages' to read it. 20:46:09 -!- DCliche has quit (Ping timeout: 252 seconds). 20:52:06 walk :: (MonadLogic m) => WalkRule m -> Board -> Move -> m Move 20:52:06 walk rule b m = oneStep `mplus` ifte oneStep (walk rule b) mzero where oneStep = step' m 20:52:10 ....I know I've said this a lot 20:52:13 back 20:52:14 but I think this is the one I want. 20:52:26 So, esolang idea! 20:52:35 Continuous liquid automaton! 20:52:41 oh my 20:53:04 sounds interesting 20:53:41 > [1,2,3] `mplus` [4,5,6] 20:53:42 [1,2,3,4,5,6] 20:53:47 shocking 20:53:53 all the list monoids do the same thing 20:55:33 That is really the only thing for Alternative and MonadPlus to do; Monoid could have been designed to do something different but instead it doesn't different, but concatenation is probably a useful way anyways so they don't need to change that 20:56:26 oh I just realized that ifte m f mzero 20:56:28 is just.... 20:56:31 m >>- f 20:56:36 I believe 21:00:28 > [1, 2, 3] >>- replicate 2 21:00:28 [1,2,1,3,2,3] 21:00:34 > ifte [1, 2, 3] (replicate 2) mzero 21:00:34 [1,1,2,2,3,3] 21:00:46 oh 21:01:03 so.... >>- is better? : 21:01:08 for infiniteness 21:01:10 as usual. 21:01:32 :t (>>-) 21:01:33 forall (m :: * -> *) a b. (MonadLogic m) => m a -> (a -> m b) -> m b 21:01:53 > Just 2 `mplus` Nothing 21:01:54 Just 2 21:02:03 > Just 2 `mplus` Just 3 `mplus` Nothing 21:02:04 Just 2 21:02:04 > Just 2 `mplus` Just 3 21:02:05 Just 2 21:02:08 > Nothing `mplus` Just 3 `mplus` Nothing 21:02:09 > Just 2 `mappend` Just 3 21:02:09 Just 3 21:02:10 Ambiguous type variable `t' in the constraints: 21:02:10 `Data.Monoid.Monoid t' 21:02:10 ... 21:02:12 okay same as <|> 21:02:13 ...? 21:03:10 hm 21:03:35 Time to watch Megashark vs Crocosaurus 21:07:36 -!- ion has joined. 21:08:09 -!- Scriptor has joined. 21:22:57 -!- Darth_Cliche has quit (Read error: Connection reset by peer). 21:23:23 -!- Darth_Cliche has joined. 21:28:35 bah, using liftM instead of <$> to remove a Functor dependency feels.... 21:28:37 wrong 21:29:03 kallisti: I agree. Monad should always have a Functor dependency 21:29:25 Let (<#>) = liftM 21:30:19 Phantom_Hoover, guess what! 21:30:38 Taneb: http://sprunge.us/dZbj 21:30:51 everything in comments is currently broken, everything else at least compiles 21:31:29 types: http://sprunge.us/hFcT 21:31:30 Taneb, OH GOD IS EVERYONE DEAD 21:31:38 AM I IN HEXHAM 21:31:39 Phantom_Hoover, even worse! 21:31:41 IS HEXHAM EDINBURGH 21:31:55 Your Pixelquest suggestion will be in the next update 21:31:55 ! 21:32:06 nooooooooooooo 21:33:43 Goodnight 21:33:45 -!- Taneb has quit (Quit: Goodbye). 21:34:03 Taneb: what's awesome about MonadLogic is that it has an instance for both lists and (MonadLogic m) StateT s m 21:34:13 so... I can write walk rules that keep track of state. 21:34:48 as well as walkrules that require no state but will still work if state is used. 21:36:03 walkWith forwardStep (followPortals `orRule` stopAtPiece) 21:36:10 -!- Darth_Cliche has changed nick to Klisz. 21:36:11 walk = walkWith forwardStep 21:36:44 what's good about all of this 21:36:52 is that changing the rules in the future /should/ be easier. 21:38:07 > [1,2,3] <*> [] 21:38:08 [] 21:38:17 hm 21:38:32 > [1,2,3] <*> [1] 21:38:33 [1,2,3] 21:38:35 ah 21:39:12 @src (<*>) 21:39:12 Source not found. Sorry. 21:39:32 @src [] (<*>) 21:39:33 (<*>) = ap 21:39:42 right right 21:39:52 :t ap 21:39:53 forall (m :: * -> *) a b. (Monad m) => m (a -> b) -> m a -> m b 21:40:12 except... 21:40:13 oh 21:40:16 caleskell 21:40:30 > [1,2,3] >> [] 21:40:30 [] 21:40:32 > [1,2,3] >> [1] 21:40:33 [1,1,1] 21:40:42 hm no not quite 21:40:54 yes that's what I want actually. 21:42:45 > [1] >> [1,2,3] 21:42:45 [1,2,3] 21:42:47 yes 21:48:09 >> is like product, `mplus` is like sum. :> 21:51:44 -!- Patashu has joined. 21:53:05 -!- Vorpal has quit (Ping timeout: 260 seconds). 21:57:02 kallisti: Yes it is the length of the list will be the product and sum! 21:58:48 zzo38: you can also use it to do and/or behavior 21:58:51 which is what I'm currently doing 21:59:08 though neither are commutative. 22:00:46 Astrology normally splits the ecliptic into twelve sections. For some purposes you might want an eight-section ecliptic instead. I think in some places they have some holidays on the 45 degrees and so on 22:05:40 How do you use it to do and/or behavior? 22:06:14 well list concatenation is essentially an or of two multi-valued logical assertions 22:07:37 and >>, though not really quite the same as and, will produce mzero when either of its terms does so. 22:09:59 Yes, it is the case for list monad. Not all monads follow the right zero law, however. But left zero law is implied by the type signatures and monad laws 22:10:01 -!- zzo38 has quit (Remote host closed the connection). 22:13:19 -!- oklopol has joined. 22:14:28 -!- Klisz has quit (Read error: Connection reset by peer). 22:14:56 -!- Klisz has joined. 22:18:47 hm 22:18:49 so 22:19:07 if I have a point+direction pair 22:19:45 what's the best way to compute a list of the chessboard squares that are a chebyshev distance of N away? 22:23:23 oh wait nevermind this should be pretty easy. 22:27:58 -!- Klisz has quit (Read error: Connection reset by peer). 22:28:26 -!- Klisz has joined. 22:30:13 -!- aloril has quit (Ping timeout: 255 seconds). 22:30:50 -!- aloril has joined. 22:32:15 :t Logic 22:32:15 Not in scope: data constructor `Logic' 22:32:47 uh how do you mean Logics 22:32:50 *make 22:33:05 I guess with return..... 22:33:07 . 22:33:16 -!- augur has quit (Remote host closed the connection). 22:33:30 :t observeMany 22:33:30 forall a. Int -> Logic a -> [a] 22:33:45 > observeMany $ msum . map return [1,2,3,4,5] 22:33:46 Couldn't match expected type `GHC.Types.Int' 22:33:46 against inferred type ... 22:33:53 > observeMany . msum . map return $ [1,2,3,4,5] 22:33:53 Couldn't match expected type `GHC.Types.Int' 22:33:53 against inferred type ... 22:33:57 > observeAll . msum . map return $ [1,2,3,4,5] 22:33:59 [1,2,3,4,5] 22:34:36 I'm not entirely sure I understand the purpose of LogicT as it appears to just use lists... 22:34:57 -!- augur has joined. 22:35:09 kallisti, multiple infinite lists don't play nicely 22:35:19 .. I'm aware 22:35:20 but 22:35:25 MonadLogic has a list instance. 22:35:26 so........ 22:36:35 > runLogic (msum . map return $ [1,2,3,4,5]) (,) True 22:36:36 Occurs check: cannot construct the infinite type: r = (a, r) 22:36:50 > runLogic (msum . map return $ [1,2,3,4,5]) (\a r -> r) True 22:36:51 True 22:36:54 > runLogic (msum . map return $ [1,2,3,4,5]) (\a r -> r) False 22:36:55 False 22:37:36 > runLogic (msum . map return $ [1,2,3,4,5]) (\a r -> a == 0) False 22:37:38 False 22:39:25 maybe it's more efficient. 22:43:52 or.... perhaps it's just an abstraction. 22:46:03 -!- Phantom_Hoover has quit (Quit: Leaving). 22:50:33 > runLogic (msum . map return $ [1,2,3,4,5]) (\a r -> a) [] 22:50:34 No instance for (GHC.Num.Num [a]) 22:50:34 arising from a use of `e_112345' at > runLogic (msum . map return $ [1,2,3,4,5]) (\a r -> a) 0 22:50:40 1 22:51:28 > runLogic (msum . map return $ [1,2,3,4,5]) (\a r -> a:r) 0 22:51:29 No instance for (GHC.Num.Num [a]) 22:51:29 arising from a use of `e_1123450' at <... 22:51:35 > runLogic (msum . map return $ [1,2,3,4,5]) (\a r -> a:r) [] 22:51:36 [1,2,3,4,5] 22:53:14 -!- DCliche has joined. 22:56:38 -!- Klisz has quit (Ping timeout: 245 seconds). 23:42:57 -!- Nisstyre has quit (Ping timeout: 240 seconds). 23:45:16 -!- Nisstyre has joined. 23:45:56 linearWalker :: (MonadState (S.Set Move) m, MonadPlus m) => WalkRule m 23:45:56 linearWalker = stopAtPiece `orRule` followPortal `andRule` unlessVisited 23:46:01 so good.