2012-04-15T00:23:25 *** Fandekasp has joined #aichallenge 2012-04-15T00:25:15 *** X-Scale has quit IRC (Remote host closed the connection) 2012-04-15T00:27:03 *** archdori has quit IRC (Ping timeout: 265 seconds) 2012-04-15T01:00:46 *** pairofdice has joined #aichallenge 2012-04-15T01:59:50 *** Fandekasp has quit IRC (Ping timeout: 245 seconds) 2012-04-15T02:08:21 *** kurnevsky has joined #aichallenge 2012-04-15T02:26:37 *** Fandekasp has joined #aichallenge 2012-04-15T03:08:58 *** kurnevsky1 has joined #aichallenge 2012-04-15T03:09:25 *** kurnevsky has quit IRC (Read error: Connection reset by peer) 2012-04-15T03:24:04 *** archdori has joined #aichallenge 2012-04-15T03:27:26 *** Fandekasp has quit IRC (Ping timeout: 252 seconds) 2012-04-15T03:32:02 *** Palmik has joined #aichallenge 2012-04-15T03:36:32 *** mceier has joined #aichallenge 2012-04-15T03:57:09 *** GeorgeH has quit IRC (Read error: Connection reset by peer) 2012-04-15T03:58:52 *** GeorgeH has joined #aichallenge 2012-04-15T04:05:27 *** smiley1983 has quit IRC (Ping timeout: 260 seconds) 2012-04-15T04:31:54 *** smiley1983 has joined #aichallenge 2012-04-15T04:39:43 *** Tiktalik is now known as Sleeptalik 2012-04-15T04:39:47 *** choas has joined #aichallenge 2012-04-15T04:50:14 *** archdori has quit IRC (Ping timeout: 250 seconds) 2012-04-15T05:20:50 *** smiley1983 has quit IRC (Ping timeout: 240 seconds) 2012-04-15T05:38:36 *** foRei has joined #aichallenge 2012-04-15T05:39:24 *** iglo has joined #aichallenge 2012-04-15T05:52:08 *** Fandekasp has joined #aichallenge 2012-04-15T06:10:39 *** Jak_o_Shadows1 has quit IRC (Ping timeout: 252 seconds) 2012-04-15T06:18:06 *** Jak_o_Shadows has joined #aichallenge 2012-04-15T06:18:12 *** Jak_o_Shadows has joined #aichallenge 2012-04-15T06:21:58 *** kilae has joined #aichallenge 2012-04-15T06:24:26 *** archdori has joined #aichallenge 2012-04-15T06:27:53 *** Fandekasp has quit IRC (Ping timeout: 252 seconds) 2012-04-15T06:42:53 *** delt0r_ has quit IRC (Ping timeout: 252 seconds) 2012-04-15T06:49:38 *** AlliedEnvy has quit IRC (Read error: Connection reset by peer) 2012-04-15T06:50:16 *** AlliedEnvy has joined #aichallenge 2012-04-15T06:55:34 *** delt0r_ has joined #aichallenge 2012-04-15T07:27:55 *** smiley1983 has joined #aichallenge 2012-04-15T08:18:32 *** archdori has quit IRC (Ping timeout: 272 seconds) 2012-04-15T08:18:51 *** kurnevsky1 has quit IRC (Quit: Leaving.) 2012-04-15T08:19:31 *** Fandekasp has joined #aichallenge 2012-04-15T08:35:27 *** smiley1983 has quit IRC (Ping timeout: 265 seconds) 2012-04-15T08:41:08 *** Jak_o_Shadows has quit IRC (Remote host closed the connection) 2012-04-15T08:45:24 *** mcstar has joined #aichallenge 2012-04-15T09:01:29 *** sigh_ has joined #aichallenge 2012-04-15T09:01:55 *** mceier_ has joined #aichallenge 2012-04-15T09:04:05 *** _dr_ <_dr_!~johannes@faui32o.informatik.uni-erlangen.de> has joined #aichallenge 2012-04-15T09:05:21 *** mceier has quit IRC (Disconnected by services) 2012-04-15T09:05:26 *** mceier_ is now known as mceier 2012-04-15T09:08:24 *** sigh has quit IRC (*.net *.split) 2012-04-15T09:08:24 *** _dr <_dr!~johannes@faui32o.informatik.uni-erlangen.de> has quit IRC (*.net *.split) 2012-04-15T09:10:16 *** thestinger has joined #aichallenge 2012-04-15T09:16:26 *** nikosl21 has joined #aichallenge 2012-04-15T09:17:18 *** nikosl21 has left #aichallenge 2012-04-15T09:24:48 *** archdori has joined #aichallenge 2012-04-15T09:27:59 *** Fandekasp has quit IRC (Ping timeout: 250 seconds) 2012-04-15T09:46:31 *** archdori has quit IRC (Ping timeout: 264 seconds) 2012-04-15T09:57:27 mcstar: http://www.chris-granger.com/2012/04/12/light-table---a-new-ide-concept/ pretty neat 2012-04-15T09:57:40 it's what emacs has always wanted to be 2012-04-15T09:58:39 hi 2012-04-15T09:59:05 thestinger: started watching week4 2012-04-15T09:59:11 incredible, 200 minutes of video 2012-04-15T09:59:14 lol 2012-04-15T10:00:14 i decided im gonna make a trueskill implementation in haskell 2012-04-15T10:00:22 thats gonna be my learning project 2012-04-15T10:00:30 (hope i will get the time) 2012-04-15T10:00:56 microsoft guys did one in F#, and is supposed to be ubercool 2012-04-15T10:01:12 I implemented a terrible naive trie :P 2012-04-15T10:01:27 im gonna take a look at your link in time 2012-04-15T10:01:36 only took about 15 mins, but I wasted an hour trying to figure out how to implement C++ iterators 2012-04-15T10:01:43 still haven't figured it out... 2012-04-15T10:01:46 haha 2012-04-15T10:01:47 wtf 2012-04-15T10:01:57 iterating over the nodes in the trie is a depth-first search 2012-04-15T10:01:59 why are they hard to do? 2012-04-15T10:02:04 so the natural way to express it is recursion 2012-04-15T10:02:12 mcstar: because it's 300 lines of boilerplate 2012-04-15T10:02:18 ouch 2012-04-15T10:02:24 I found a boost lib that does it for you 2012-04-15T10:02:33 boost boost, always boost 2012-04-15T10:02:38 but I don't really have the details figured out 2012-04-15T10:02:42 i get the feeling that you are a lazy guy 2012-04-15T10:02:46 lol 2012-04-15T10:03:07 mcstar: you basically have to read the C++ standard to implement them 2012-04-15T10:03:10 and know it really well 2012-04-15T10:03:13 i dropped boost asio for libusb even XD 2012-04-15T10:03:16 or... use a lib 2012-04-15T10:03:50 and are you sure you need iterators at all? 2012-04-15T10:04:00 I don't need them but it's a learning project 2012-04-15T10:04:13 ah, so you want! to do iterators 2012-04-15T10:04:17 then dont complain 2012-04-15T10:04:19 XD 2012-04-15T10:04:21 lol :P 2012-04-15T10:04:34 :D 2012-04-15T10:05:47 I made a method which returns a vector of the elements, I just need to switch to an iterator 2012-04-15T10:05:53 sounds so simple :P 2012-04-15T10:12:15 mcstar: the second section of videos is a relief though 2012-04-15T10:12:38 a bunch of neat little concepts 2012-04-15T10:12:45 instead of huge things that take 4 videos to explain 2012-04-15T10:22:23 *** smiley1983 has joined #aichallenge 2012-04-15T11:02:10 stupid thing didnt accept 0x0202 2012-04-15T11:13:23 ? 2012-04-15T11:13:26 mcstar: the problem set? 2012-04-15T11:14:09 no 2012-04-15T11:14:15 in video question 2012-04-15T11:14:19 oh 2012-04-15T11:14:27 when you need the new value to xor with 2012-04-15T11:14:31 I always get those wrong because I use the wrong syntax 2012-04-15T11:14:31 you start with 0x01 2012-04-15T11:14:34 well 2012-04-15T11:14:42 one time I gave the wrong answer and it thought it was right 2012-04-15T11:14:46 makes me feel like an idiot :P 2012-04-15T11:14:50 i managed to do them so far 2012-04-15T11:14:51 heh 2012-04-15T11:15:03 but this really sucked 2012-04-15T11:15:06 mcstar: in the algo class, it they asked for a number and I gave 2/something 2012-04-15T11:15:09 the answer was '2' 2012-04-15T11:15:12 it said I was right :P 2012-04-15T11:15:17 Dan says 0x is just for hex numbers, a minute before 2012-04-15T11:15:20 s/it they/they/ 2012-04-15T11:15:26 and now that damn thing didnt accept it 2012-04-15T11:15:40 ''? 2012-04-15T11:15:45 i see 2012-04-15T11:15:50 they truncated 2012-04-15T11:16:26 0x202? 2012-04-15T11:16:36 but that isnt correct 2012-04-15T11:16:47 you encode 1 byte with 2 ascii characters in 0-f 2012-04-15T11:17:03 this was always the case 2012-04-15T11:17:08 for homeworks and such 2012-04-15T11:17:25 and now what was i supposed to do? like on the slide? (02,02) ?? 2012-04-15T11:17:29 thats just crazy 2012-04-15T11:17:35 what did you guys answer? 2012-04-15T11:17:40 0202 2012-04-15T11:17:44 bleh 2012-04-15T11:17:45 maybe 22 2012-04-15T11:17:49 actually I think 22 2012-04-15T11:18:15 nice, well that isnt 0000001000000010 2012-04-15T11:18:24 nice, well that isnt 00000001000000010 2012-04-15T11:18:27 mcstar: I did those a while ago because I was interested in it, and then hit a video I found really boring and put it off for a week 2012-04-15T11:18:46 so I don't really remember 2012-04-15T11:20:17 bin to hex and backwards is surprisingly convenient 2012-04-15T11:20:53 what do you mean? 2012-04-15T11:21:11 like saving space? 2012-04-15T11:21:36 but what is surprising about it? 2012-04-15T11:21:41 easy, space, convenient, compared to decimal to binary 2012-04-15T11:21:55 yeah 2012-04-15T11:22:08 you could use base 256 too 2012-04-15T11:22:24 if i were chinese id use that 2012-04-15T11:23:08 paintext 2012-04-15T11:24:24 Alice and Bob 2012-04-15T11:24:53 i was surprised that ssh got it backwards 2012-04-15T11:27:48 on 0 courses now but 4 new ones start tomorrow 2012-04-15T11:27:55 * pairofdice is a Udacity fanboy 2012-04-15T11:28:17 ml-class is starting soon 2012-04-15T11:28:19 so i met the udacity crew yesterday 2012-04-15T11:28:25 including david and sebastian 2012-04-15T11:28:28 nice 2012-04-15T11:28:28 also got a shirt. woot 2012-04-15T11:28:39 2012-04-15T11:29:08 Oh, awesome 2012-04-15T11:29:41 they were working through the weekend to get the launch done on monday but they held a little meetup at a bar in palo alto near their little shop 2012-04-15T11:30:38 https://www.coursera.org/course/ml :) 2012-04-15T11:30:49 I think I'll take 2-3 of the next round of udacity courses 2012-04-15T11:31:00 they're pretty easy 2012-04-15T11:31:13 I know, I took cs101 and cs373 2012-04-15T11:31:21 His methods lack pretty pictures for me 2012-04-15T11:32:12 I understood it pretty well until neural networks 2012-04-15T11:37:49 palo alto, where it all begun 2012-04-15T11:47:58 *** kurnevsky has joined #aichallenge 2012-04-15T11:49:35 *** Garf has joined #aichallenge 2012-04-15T11:51:13 *** kurnevsky1 has joined #aichallenge 2012-04-15T11:51:15 *** kurnevsky has quit IRC (Read error: Connection reset by peer) 2012-04-15T11:59:08 *** dlila has joined #aichallenge 2012-04-15T12:06:48 mcstar: lol, my attempt at iterators failed 2012-04-15T12:06:58 the 212KB of template errors is most unhelpful 2012-04-15T12:07:51 c++ sounds painful 2012-04-15T12:09:57 thestinger: hm, you broke my record, i only had a ~90kb once 2012-04-15T12:09:59 i think 2012-04-15T12:11:13 I understand what I have to do but it's just convoluted and messy 2012-04-15T12:11:44 http://sprunge.us/heMN I'm copying this whole reading the docs :P 2012-04-15T12:15:09 I'm not sure if I need iterator_range too 2012-04-15T12:17:56 I should have just implemented this for strings and dealt with templates later >.< 2012-04-15T12:20:31 *** sigh_ has quit IRC (Remote host closed the connection) 2012-04-15T12:21:28 I like that dereference returns a reference :P 2012-04-15T12:21:58 you need that for writing 2012-04-15T12:46:42 in this example the reference type is not a reference though 2012-04-15T12:52:04 hm 2012-04-15T12:52:07 ill keep this reference in mind 2012-04-15T12:55:34 I guess I need some arbitrary value as the end iterator 2012-04-15T12:56:27 try 0 2012-04-15T12:56:47 well, I think I can just keep it hidden inside the iterator 2012-04-15T12:57:03 I'm not sure how to implement the equals method correctly 2012-04-15T12:57:19 I guess I need to use pointers and not references so I can compare them 2012-04-15T12:57:43 ah, yeah this will work 2012-04-15T12:57:54 I'll just use nullptr for the end sentinel 2012-04-15T13:02:05 *** GeorgeH has quit IRC (Ping timeout: 276 seconds) 2012-04-15T13:02:52 *** GeorgeH has joined #aichallenge 2012-04-15T13:02:57 mcstar: well, my do-nothing boilerplate iterator works :P 2012-04-15T13:03:58 just had to add a fourth (optional) template parameter to get it to return by value 2012-04-15T13:05:22 excellent 2012-04-15T13:05:39 the container part doesn't work though >.< 2012-04-15T13:05:54 something to do with const correctness I think 2012-04-15T13:08:16 http://sprunge.us/TQiO >.< 2012-04-15T13:08:59 oh, fixed it 2012-04-15T13:09:11 weird... just had to make the equals method const 2012-04-15T13:09:21 equal method* 2012-04-15T13:09:25 who the f decided that profiling libraries arent built by default with cabal 2012-04-15T13:09:38 *** rofer is now known as make 2012-04-15T13:09:43 *** make is now known as rofer 2012-04-15T13:10:02 thestinger: that looks like an error message 2012-04-15T13:10:08 if thats what you are asking 2012-04-15T13:10:11 lol 2012-04-15T13:10:14 XD 2012-04-15T13:10:14 I figured it out :P 2012-04-15T13:10:21 now I need to solve the next 200 problems 2012-04-15T13:10:29 the sad part is that it looks easy now that I coded this much 2012-04-15T13:10:41 it still doesn't work though 2012-04-15T13:11:15 oh, it all makes sense now 2012-04-15T13:11:20 I forgot to ever initialize the pointer 2012-04-15T13:12:20 mcstar: http://paste.pocoo.org/show/0EHTto05L9ntl0DWFf8X/ it looks _so_ easy now 2012-04-15T13:12:41 atm it just outputs "cat" and then gets to the end and stops 2012-04-15T13:13:56 im glad you had fun 2012-04-15T13:14:48 lol :P 2012-04-15T13:15:02 well now I just have to make increment do 1 step of the depth-first search each time 2012-04-15T13:15:34 and then I can remove this evil method which returns a vector of all things inside the trie 2012-04-15T13:31:51 *** iglo has quit IRC (Remote host closed the connection) 2012-04-15T13:40:46 *** dlila has quit IRC (Remote host closed the connection) 2012-04-15T14:24:05 yeah that is totally unncessary 2012-04-15T14:24:17 since you can just initialize a vector any time from interators 2012-04-15T14:24:21 -n 2012-04-15T14:27:22 i hate reboots 2012-04-15T14:27:25 *** mcstar has quit IRC (Quit: mcstar) 2012-04-15T14:31:30 *** mcstar has joined #aichallenge 2012-04-15T14:31:34 ugh 2012-04-15T14:31:36 this almost works 2012-04-15T14:31:52 I made the DFS iterative using a stack, and then made it work step by step for the increment method 2012-04-15T14:32:07 but it segfaults if it run increment in the constructor 2012-04-15T14:32:54 so there are 98570 elements output by the iterator instead of 98569 2012-04-15T14:32:57 the initial one is empty 2012-04-15T14:34:12 KMNHWA 2012-04-15T14:37:16 hm 2012-04-15T14:37:18 this sucks 2012-04-15T14:37:54 did you mention somethign was recursive? 2012-04-15T14:38:57 i remember something like: you did a recursive dfs 2012-04-15T14:39:12 and i was thinking, maybe you could make it iterative with a tiny stack 2012-04-15T14:39:21 and now i see you said that 2012-04-15T14:39:34 im out of sync with the world 2012-04-15T14:43:20 *** delt0r_ has quit IRC (Ping timeout: 252 seconds) 2012-04-15T14:44:08 thestinger: you know that ibdknox used to hang out here? 2012-04-15T14:44:20 (there was a time) 2012-04-15T14:47:11 nope, I didn't :P 2012-04-15T14:47:18 mcstar: did you look at that neat clojure IDE? 2012-04-15T14:47:29 yeah 2012-04-15T14:47:38 well, read the text 2012-04-15T14:47:42 didnt download it 2012-04-15T14:47:49 I watched the video 2012-04-15T14:47:52 looks really awesome 2012-04-15T14:48:09 i think the told me about clojure the first time 2012-04-15T14:48:21 (or was it aeriq'ue?) 2012-04-15T14:48:32 -t 2012-04-15T14:49:34 my tests take so long to run under valgrind 2012-04-15T14:51:08 http://paste.pocoo.org/show/Zma5Uz66K2YNGhTlckPe/ so close :( 2012-04-15T14:52:16 thestinger: are trying to hack my box with chosen cyphertext attacks? 2012-04-15T14:52:41 lol'd 2012-04-15T14:53:14 whats that character on the last line? 2012-04-15T14:53:44 i think you copied that from somewhere else 2012-04-15T14:54:01 what editor are you using btw? 2012-04-15T14:54:08 i dont think i ever asked you 2012-04-15T14:54:09 *** iglo has joined #aichallenge 2012-04-15T14:54:15 but you seem to be a vim guy 2012-04-15T14:54:21 vim, yeah :P 2012-04-15T14:54:44 ah i see, it just boxed the doubl ecolon 2012-04-15T14:54:47 mcstar: increment() is my crappy conversion of a depth-first search to an incremental operator++ 2012-04-15T14:55:10 really not sure why it segfaults when I run it in the constructor >.< 2012-04-15T14:55:28 thestinger: but why did the paste service box :: ? 2012-04-15T14:55:42 thinks it is bad syntax? 2012-04-15T14:55:45 yeah 2012-04-15T14:55:47 it isn't 2012-04-15T14:55:50 it's not needed though 2012-04-15T14:55:50 it is wrong 2012-04-15T14:56:04 I originally copied this from boost::irange, which was in the boost namespace 2012-04-15T14:56:07 *** delt0r_ has joined #aichallenge 2012-04-15T14:56:47 just for the boilerplate (all the typedefs) 2012-04-15T14:57:01 and the inheritance crap 2012-04-15T14:57:15 just had to switch to to a forward iterator tag... although I'm not sure what that even does 2012-04-15T14:57:32 it still compiles and works if I inherit from a template with a random_traversal_tag 2012-04-15T14:58:49 its not like i will give you some useful advice here 2012-04-15T15:01:57 i reached cabal dependency hell 2012-04-15T15:02:02 lol 2012-04-15T15:02:15 haskell needs a better standard lib 2012-04-15T15:02:22 haskell-platform sucks because it lags so far behind 2012-04-15T15:02:46 yeah 2012-04-15T15:03:11 the problem is that we are spoiled by pacman 2012-04-15T15:03:28 if we were brought up on other distros, i dont think we'd noticed it 2012-04-15T15:04:08 ah yeah, flame alert 2012-04-15T15:04:40 *** pairofdice has quit IRC (Quit: Regeneration!) 2012-04-15T15:09:41 http://pastebin.com/YEJHy0AF < ntanslate it from russian 2012-04-15T15:10:09 Accoun: hey buddy, where have you been? 2012-04-15T15:11:28 the guy wrote a program that computes 1244, man, am i pleased 2012-04-15T15:11:30 or what 2012-04-15T15:14:13 funny text, ill give you that 2012-04-15T15:18:16 *** Accoun has quit IRC () 2012-04-15T15:18:36 mcstar: lol, I'm an idiot 2012-04-15T15:18:43 the segfault was just a null pointer dereference 2012-04-15T15:18:59 I was trying to run increment on the end node 2012-04-15T15:19:00 @:> 2012-04-15T15:19:00 >.< 2012-04-15T15:19:00 mcstar: I have no idea what you mean. 2012-04-15T15:19:04 by putting it in the constructor 2012-04-15T15:19:14 wooo it works :D 2012-04-15T15:19:22 speed testing time 2012-04-15T15:19:33 now comes the real surprise 2012-04-15T15:19:57 test: test.cc:48: int main(): Assertion `iterative_values == from_iterator' failed. 2012-04-15T15:19:58 :( 2012-04-15T15:20:01 what are you comapring it with? 2012-04-15T15:20:25 well, I want to see how much faster this is compared to building up a gigantic vector out of little vectors 2012-04-15T15:20:39 thestinger: you seen, you shouldnt put those asserts in your cod 2012-04-15T15:20:41 e 2012-04-15T15:20:54 mcstar: they're basically unit tests 2012-04-15T15:21:02 yeah, but they canfail 2012-04-15T15:21:05 I'm just using asserts for a test framework 2012-04-15T15:21:09 and you dont want that do you? 2012-04-15T15:21:12 none are in my actual trie code 2012-04-15T15:21:47 I just have test.cc which is what I'm actually running 2012-04-15T15:21:51 thestinger: how are you actually allocating memory for this? 2012-04-15T15:22:04 one pointer for every leaf? 2012-04-15T15:22:23 yes, I haven't turned it into a radix trie yet 2012-04-15T15:22:32 well 2012-04-15T15:22:50 mcstar: one pointer to each child 2012-04-15T15:22:59 and a bool to mark where sequences end 2012-04-15T15:23:17 I haven't decided on the way to handle the pointers to children yet 2012-04-15T15:23:25 for a std::string, there can be at most 256 2012-04-15T15:23:25 ok, so every node stores data, pointer to childs, and a bool 2012-04-15T15:23:30 no 2012-04-15T15:23:33 they don't store data 2012-04-15T15:23:46 i thought trie nodes do 2012-04-15T15:23:49 they have a bool and an associative array 2012-04-15T15:24:05 'a' -> trie, 'b' -> trie, 'c' -> trie 2012-04-15T15:24:20 so when you retrieve values, you just build up a string as you walk 2012-04-15T15:24:41 this is just a trie_set so that's all it has 2012-04-15T15:24:48 i mean every node has a pointer to some data right? 2012-04-15T15:24:57 if it was a trie_map it would have a Maybe monad with data instead of a bool 2012-04-15T15:25:16 mcstar: each node has a bool marking the end, and an associative array 2012-04-15T15:25:23 the top level node is always false (not the end) 2012-04-15T15:25:28 so if you put 2012-04-15T15:25:34 tea, tree and tear into it 2012-04-15T15:25:42 the top level node has an associative array with 2012-04-15T15:25:47 t -> trie 2012-04-15T15:25:55 then that trie node has 2012-04-15T15:26:00 i get it 2012-04-15T15:26:06 seen such an exmaple 2012-04-15T15:26:08 e -> trie, r -> trie 2012-04-15T15:26:32 i just dont get this associative array part 2012-04-15T15:26:48 what is 'trie' here? 2012-04-15T15:26:53 isnt it a pointer to another node? 2012-04-15T15:27:18 well, all the nodes are just their own trie 2012-04-15T15:27:26 it's just recursive like a linked list 2012-04-15T15:27:31 yeah 2012-04-15T15:27:57 since there can only be up to 256 children (for byte strings), you can use a cheap structure for the associative array 2012-04-15T15:28:22 atm I've been lazy and just used boost::container::map (which would be stupid, but I don't plan on keeping that) 2012-04-15T15:28:44 so every node has a map that stored the location of the child nodes 2012-04-15T15:28:50 stored* 2012-04-15T15:28:52 stores 2012-04-15T15:28:53 yeah 2012-04-15T15:29:01 that is pretty heavy 2012-04-15T15:29:13 the map will just be an array though 2012-04-15T15:29:17 probably sorted 2012-04-15T15:29:25 since the max n is 256 2012-04-15T15:30:53 I'm not sure if a binary search actually saves much time on an array that small in C++ 2012-04-15T15:31:01 so I'll figure out unsorted vs sorted later 2012-04-15T15:31:22 *** Accoun has joined #aichallenge 2012-04-15T15:31:37 *** Sleeptalik is now known as Tiktalik 2012-04-15T15:32:02 mcstar: https://en.wikipedia.org/wiki/Radix_tree can space-optimize it like that later 2012-04-15T15:44:02 crappy benchmark time 2012-04-15T15:47:23 mcstar: I'm just using SCOWL which has 670k english words 2012-04-15T15:49:14 mcstar: nice, my test was rigged against my new code but it's still better :) 2012-04-15T15:49:37 copying all values to a vector (marked volatile to force it to copy) 1k times 2012-04-15T15:49:54 recursive DFS (building up vectors): ~40s 2012-04-15T15:50:19 iterative DFS with a std::stack (building up one vector): ~30.5s 2012-04-15T15:50:32 building a vector using the begin/end iterators: 27s 2012-04-15T15:50:34 so it's never worse 2012-04-15T15:53:16 thestinger: std::string? 2012-04-15T15:53:32 yes 2012-04-15T15:53:39 670k of them 2012-04-15T15:53:53 the trie itself is still awful so I bet it's waaaaaay slower than std::set atm 2012-04-15T15:53:53 but your trie splits each one up 2012-04-15T15:53:58 how many nodes are there? 2012-04-15T15:54:36 a lot :P 2012-04-15T15:54:41 don't keep track atm 2012-04-15T15:54:53 i dont understand, why is the last one the fastest? 2012-04-15T15:55:14 behind the iterators, there is the iterative dfs, isnt there? 2012-04-15T15:55:21 doing it recursively involves calling the move constructor many times 2012-04-15T15:55:56 and then using a.insert(a.end(), b.begin(), b.end()); 2012-04-15T15:56:02 which is one allocation but still slow 2012-04-15T15:56:16 the iterative way calls the move constructor once (returning it) 2012-04-15T15:56:24 the iterator has no call to the move constructor 2012-04-15T15:56:27 I assume that's why 2012-04-15T15:58:02 mcstar: the iterative method and iterator are basically identical code 2012-04-15T15:58:20 thats what i though 2012-04-15T15:58:22 t 2012-04-15T15:58:38 but the iterative one has to return a vector of strings 2012-04-15T15:58:43 the iterator returns one at a time 2012-04-15T15:59:22 I assume it's all being inlined since it's simple 2012-04-15T15:59:44 for all the cases 2012-04-15T16:00:44 this is going to give me nightmares 2012-04-15T16:08:09 mcstar: ah, figured it out 2012-04-15T16:09:22 iterator is now 3.5s, iterative method is 3.4s 2012-04-15T16:09:32 (smaller set of test data due to impatience) 2012-04-15T16:15:26 thestinger: thats what i call optimiziation, instant 10 fold 2012-04-15T16:16:42 only 2x :P 2012-04-15T16:16:48 reduced the data set size 2012-04-15T16:17:04 made the recursive version faster though 2012-04-15T16:17:11 it's faster than the iterator and iterative one now 2012-04-15T16:18:02 http://paste.pocoo.org/show/446Lj49HJCSOEdXdiqcl/ since it only uses one vector and doesn't need std::stack 2012-04-15T16:19:43 for some reason I did it in a really convoluted way before 2012-04-15T16:20:13 http://paste.pocoo.org/show/SSQJhlbKaYlzG1LLxdgM/ 2x slower 2012-04-15T16:27:47 *** kurnevsky has joined #aichallenge 2012-04-15T16:28:06 *** kurnevsky1 has quit IRC (Read error: Connection reset by peer) 2012-04-15T16:31:48 *** kurnevsky1 has joined #aichallenge 2012-04-15T16:31:56 *** kurnevsky has quit IRC (Read error: Connection reset by peer) 2012-04-15T16:33:05 my .cabal is 1.3G 2012-04-15T16:36:15 lol, that's huge 2012-04-15T16:42:15 mcstar: which libs do you have? :\ 2012-04-15T16:42:28 all of boost is only 144MB 2012-04-15T16:42:34 and that's like 50 libs 2012-04-15T16:44:49 http://sprunge.us/haVY 2012-04-15T16:45:46 why the gtk stuff? 2012-04-15T16:46:15 leksah 2012-04-15T16:46:39 http://hackage.haskell.org/package/cautious-file-1.0.1 paranoid much? 2012-04-15T16:47:37 Stability experimental 2012-04-15T16:47:53 somewhat amusing that a lib for avoiding data loss isn't considered stable 2012-04-15T16:48:08 you better not lie about it 2012-04-15T16:59:52 Bob just made +400 dollars thanks to me 2012-04-15T17:02:04 :P 2012-04-15T17:02:17 mcstar: the first two problems were really fun 2012-04-15T17:13:17 i dont get why that ciphertext is 39 bytes long 2012-04-15T17:13:26 i guess it isnt padded 2012-04-15T17:13:33 say nothing 2012-04-15T17:14:31 which question? (don't worry, I won't say anything) 2012-04-15T17:15:23 the second one 2012-04-15T17:16:06 *** iglo has quit IRC (Quit: .) 2012-04-15T17:17:12 *** kilae has quit IRC (Quit: ChatZilla 0.9.88.2 [Firefox 11.0/20120312181643]) 2012-04-15T17:19:21 *** kurnevsky1 has quit IRC (Quit: Leaving.) 2012-04-15T17:24:24 haha 2012-04-15T17:24:34 man, i kept changing the wrong bits 2012-04-15T17:25:04 after trying all 9, i realized thats not the IV!! 2012-04-15T17:28:33 I screwed that up on my first attempt for a silly reason, I'll tell you why when you're done 2012-04-15T17:28:56 *** coeus has joined #aichallenge 2012-04-15T17:29:11 I got everything except that question and for some reason I just couldn't figure out what I did wrong :P 2012-04-15T17:30:39 what do you mean? 2012-04-15T17:30:46 you know instantly if its right or wrong 2012-04-15T17:30:51 I mean I had a plain-text readable answer 2012-04-15T17:30:53 and I thought it was right 2012-04-15T17:30:56 but I made a dumb mistake 2012-04-15T17:31:14 I've probably made it obvious what the mistake was now :P 2012-04-15T17:33:35 well 2012-04-15T17:33:51 the explanation for why it was wrong actually gave it away 2012-04-15T17:35:25 i dont get this, but dont worry 2012-04-15T17:35:32 onthe other hand quaestion 4 is a joke 2012-04-15T17:35:53 question 5 is too 2012-04-15T17:38:05 *** Palmik has quit IRC () 2012-04-15T17:38:13 3 and 8 were the standard ones that appear on each problem set, I like them (little logic puzzles) 2012-04-15T17:38:22 I hated 10 :P 2012-04-15T17:39:19 I pretty much took a lucky guess on that and had to read the explanation... 2012-04-15T17:41:53 *** Chris_0076 has quit IRC (Quit: Leaving) 2012-04-15T17:44:35 aaaa 2012-04-15T17:44:46 i hate that when i click on the text, the box gets marked 2012-04-15T17:44:54 i like highlighting text when im thinking 2012-04-15T17:45:38 I do that too 2012-04-15T17:45:46 helps me avoid losing my place in the text 2012-04-15T17:45:54 if I stop to think about it, etc. 2012-04-15T17:46:12 and it's just a habit too 2012-04-15T17:52:39 mcstar: I'm still a bit unsure about whether I implemented this iterator right 2012-04-15T17:52:59 I don't think I did 2012-04-15T17:53:23 'it == ++it' shouldn't be true 2012-04-15T17:53:28 >.< 2012-04-15T17:53:38 only the end iterator compares unequal 2012-04-15T18:06:43 thestinger: im pretty sure 'it == ++it' is undefined behavior 2012-04-15T18:06:53 anyway, i think i should watch the videos 2012-04-15T18:07:08 i skipped the last 3 2012-04-15T18:08:00 mcstar: well 2012-04-15T18:08:17 hm 2012-04-15T18:08:50 mcstar: if I have two iterators to the same container, I think they should only compare equal if they are at the same place 2012-04-15T18:09:51 *** alehorst has joined #aichallenge 2012-04-15T18:11:32 *** jmcarthur has quit IRC (Read error: Connection reset by peer) 2012-04-15T18:12:03 mcstar: aha, I'll just compare the pointer on top of the stack 2012-04-15T18:12:14 I can kill off a member by doing that too 2012-04-15T18:12:22 *** jmcarthur has joined #aichallenge 2012-04-15T18:14:24 trie_set.hh:55:53: error: invalid use of member function (did you forget the ‘()’ ?) 2012-04-15T18:14:27 wow 2012-04-15T18:14:31 gcc gave a helpful error message 2012-04-15T18:27:49 *** mceier has quit IRC (Quit: leaving) 2012-04-15T18:31:08 *** choas has quit IRC (Ping timeout: 246 seconds) 2012-04-15T18:51:41 *** sigh has joined #aichallenge 2012-04-15T18:52:06 *** sigh has quit IRC (Remote host closed the connection) 2012-04-15T19:03:29 *** AlliedEnvy has quit IRC (Ping timeout: 276 seconds) 2012-04-15T19:04:42 *** sigh has joined #aichallenge 2012-04-15T19:12:10 *** sigh has quit IRC (Remote host closed the connection) 2012-04-15T19:30:44 thestinger: im an idiot 2012-04-15T19:30:46 i get it now 2012-04-15T19:30:57 :) 2012-04-15T19:30:59 I did that too 2012-04-15T19:31:07 mcstar: tell me what so I'm sure :P 2012-04-15T19:31:14 you forgot to undo the thing? 2012-04-15T19:31:20 i entered 8 2012-04-15T19:31:24 bleh 2012-04-15T19:31:25 yeah 2012-04-15T19:31:27 you forgot to undo the change 2012-04-15T19:31:30 I did exactly that :P 2012-04-15T19:31:30 yeah 2012-04-15T19:31:58 they added an explanation, it wasn't there originally 2012-04-15T19:32:12 * thestinger was stumped 2012-04-15T19:32:17 eventually I figured it out 2012-04-15T19:32:48 thestinger: now that you tell me, i noticed the explanation 2012-04-15T19:33:00 i actually thought through what went wrong 2012-04-15T19:33:09 and im really tired 2012-04-15T19:33:35 i should do these problems sooner 2012-04-15T19:34:11 *** Tiktalik is now known as Tiktalik|FOOOOOO 2012-04-15T19:34:32 *** Tiktalik|FOOOOOO is now known as Tiktalik|Food 2012-04-15T20:04:13 *** Fandekasp has joined #aichallenge 2012-04-15T20:18:14 *** mcstar has quit IRC (Ping timeout: 276 seconds) 2012-04-15T20:22:05 *** thestinger has quit IRC (Quit: WeeChat 0.3.7) 2012-04-15T21:09:38 *** foRei has quit IRC (Read error: Connection reset by peer) 2012-04-15T21:53:03 *** Chris_0076 has joined #aichallenge 2012-04-15T21:55:46 *** Tiktalik|Food is now known as Tiktalik 2012-04-15T22:34:06 *** smiley1983 has quit IRC (Ping timeout: 276 seconds) 2012-04-15T22:35:21 *** smiley1983 has joined #aichallenge 2012-04-15T22:43:51 *** delt0r_ has quit IRC (Ping timeout: 276 seconds) 2012-04-15T22:56:46 *** delt0r_ has joined #aichallenge