00:58:42 -!- calamari has quit ("Leaving"). 02:33:56 -!- kipple has quit ("See you later"). 02:42:37 -!- ihope_ has quit (Read error: 104 (Connection reset by peer)). 03:14:39 -!- calamari has joined. 03:56:27 -!- fungebob has joined. 04:31:50 -!- Sgeo has quit. 04:58:04 -!- Arrogant has joined. 05:15:08 -!- Paragon_ has joined. 05:18:45 -!- Arrogant has quit (Nick collision from services.). 05:18:53 -!- Paragon_ has changed nick to Arrogant. 06:00:07 -!- GregorR has quit (Remote closed the connection). 06:00:33 -!- GregorR_ has joined. 07:19:02 -!- GregorR__ has joined. 07:19:02 -!- GregorR_ has quit (Remote closed the connection). 07:20:15 -!- calamari has quit (Remote closed the connection). 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 09:36:31 -!- clog has joined. 09:36:31 -!- clog has joined. 09:38:00 -!- kipple has joined. 11:56:30 -!- GregorR__ has quit (Remote closed the connection). 13:02:07 -!- jix has joined. 13:31:31 -!- ztpin has changed nick to lwrtzy. 13:44:31 hi 13:52:11 -!- GregorR__ has joined. 14:13:48 -!- GregorR___ has joined. 15:01:26 -!- GregorR___ has quit (Remote closed the connection). 15:01:52 -!- GregorR___ has joined. 15:21:19 -!- Freya has joined. 15:21:20 -!- Freya has changed nick to nooga. 15:21:39 i'm looking for a way to check if a tree is a subtree of another 15:22:23 erm... 15:23:57 binary tree 15:24:09 isSubTree n m@(Node _ l r) = n == m || n `isSubTree` l || m `isSubTree` r 15:24:42 haskell? 15:25:38 2 513 134 105 86 07 00 09 00 0 15:25:39 yeah 15:25:43 owf 15:25:48 ? 15:25:56 i've got a tree in such format 15:26:09 3 15:26:09 2 3 15:26:09 0 0 15:26:09 0 0 15:27:06 how to parse it in haskell to get it in a format siutable for your algo? ;p 15:29:07 SimonRC 15:29:29 what is that format? 15:29:41 trees 15:29:45 [16:26] 3 15:29:45 [16:26] 2 3 15:29:45 [16:26] 0 0 15:29:45 [16:26] 0 0 15:30:05 They look like lists, not trees 15:30:26 1 15:30:26 / \ 15:30:26 2 3 15:31:36 and the nex two rows? 15:32:41 3: nodes 15:32:57 ah 15:32:58 node 1: lchild=2, rchild=3 15:32:59 I get it 15:33:16 node 2: lchild=none ... 15:33:53 well, you first want to read in an Integer and a list of pairs of Integers, then... 15:34:28 convert the list to a Map from index to pair of Integers, then... 15:34:53 i'm not good at haskel... eh 15:35:22 I could write it for you. 15:40:14 numbered from 1, right? 15:41:43 yes 15:41:53 0 means: no child 15:44:04 what's your tree type? 15:44:46 make it compatible with: isSubTree n m@(Node _ l r) = n == m || n `isSubTree` l || m `isSubTree` r 15:45:14 okay: 15:45:43 data Tree a = Node a (Tree a) (Tree a) | Nil 15:47:02 deriving (Eq) 15:47:06 of course 15:47:15 acutally, Show as well 15:48:05 erm, what data do you want in your trees? 15:49:44 I have realised that you have no data to put in them. 15:50:45 no data, just plain structure 15:51:03 okay 15:56:10 and how's it going? 16:00:18 SimonRC? 16:06:52 hm? 16:10:01 gottit, I think 16:11:00 *yawn* 16:11:03 -!- GregorR___ has changed nick to GregorR. 16:12:05 Where should I put it? 16:12:37 rafb.net/paste 16:13:15 what compiler do you have? 16:13:38 ghc 16:13:46 6.4.1 16:14:18 moin GregorR 16:15:05 nooga: good, it's needed for Data.Map 16:15:08 *incomprehensible morning mutter* 16:15:24 http://rafb.net/paste/results/ZipFnd92.html 16:15:34 http://i15.photobucket.com/albums/a379/GregorRichards/Hamburger.jpg 16:15:36 It loads, and you example works 16:15:54 GregorR: erm, okaaay 16:16:17 :-P 16:17:12 lhs? 16:18:26 yeah 16:19:14 i'm so stupid boooo -.--' 16:29:57 wait 16:30:05 how do i suppose to parse a file with this? 16:31:04 btw. 16:31:05 Constructor `Node' should have 2 arguments, but has been given 3 16:31:05 In the definition of `isSubTree': 16:31:05 isSubTree n (m@(Node _ l r)) 16:31:05 = (n == m) || ((n `isSubTree` l) || (m `isSubTree` r)) 16:41:01 -!- Sgeo has joined. 17:04:22 -!- GregorR has quit (Remote closed the connection). 17:04:42 -!- GregorR has joined. 17:05:42 javax.lang.stuff.for.smart.people.be.careful.lambda 17:10:22 -!- GregorR has quit (Remote closed the connection). 17:10:39 -!- GregorR has joined. 17:12:42 . GregorR 17:38:58 oops... 17:39:10 remove the _ from the first line 17:40:07 nooga: you will need to write your own parser 17:54:30 -!- nooga has quit. 18:00:19 -!- calamari has joined. 18:22:53 hi 18:23:01 you missed nooga by 5 mins 18:23:06 hi 18:26:49 that's okay, I know nothing about haskell 18:27:06 how did you know? 18:27:12 checked the log 18:37:26 bbl 18:37:28 -!- calamari has quit ("Leaving"). 18:40:38 -!- GregorR-L has joined. 18:42:36 ‰hi 18:42:57 Hello 19:09:43 * SimonRC goes 19:16:53 -!- GregorR-L has quit (Read error: 113 (No route to host)). 19:45:24 -!- GregorR-L has joined. 19:53:05 -!- GregorR-L has quit (Remote closed the connection). 19:53:38 -!- GregorR-L has joined. 21:02:17 -!- GregorR has quit (Remote closed the connection). 21:19:59 -!- jix has left (?). 21:47:11 -!- GregorR-L has quit (Read error: 113 (No route to host)). 22:05:47 -!- GregorR-L has joined. 23:51:43 -!- GregorR-L has quit.