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