2012-05-06T01:10:36 *** Chris_0076 has joined #aichallenge 2012-05-06T01:41:40 *** Chris_0076 has quit IRC (Quit: Leaving) 2012-05-06T01:45:18 *** dvladim has joined #aichallenge 2012-05-06T01:49:03 *** Chris_0076 has joined #aichallenge 2012-05-06T02:00:59 *** epicmonkey has joined #aichallenge 2012-05-06T02:07:35 *** kurnevsky has joined #aichallenge 2012-05-06T02:09:42 *** Chris_0076 has quit IRC (Quit: Leaving) 2012-05-06T02:12:12 *** Chris_0076 has joined #aichallenge 2012-05-06T02:17:25 *** Chris_0076 has quit IRC (Quit: Leaving) 2012-05-06T02:40:59 *** amstan has quit IRC (Quit: Konversation terminated!) 2012-05-06T02:56:56 *** Chris_0076 has joined #aichallenge 2012-05-06T03:00:11 *** dvladim has quit IRC (Read error: Operation timed out) 2012-05-06T03:11:02 *** HaraKiri has joined #aichallenge 2012-05-06T03:30:00 *** epicmonkey has quit IRC (Ping timeout: 276 seconds) 2012-05-06T03:30:23 *** dvladim has joined #aichallenge 2012-05-06T03:47:34 *** smiley1983 has quit IRC (Ping timeout: 244 seconds) 2012-05-06T04:23:20 *** X-Scale has quit IRC (Ping timeout: 272 seconds) 2012-05-06T04:39:00 *** Vrexu has joined #aichallenge 2012-05-06T05:02:51 *** mceier has joined #aichallenge 2012-05-06T05:17:07 *** NoxiaZ^ has joined #aichallenge 2012-05-06T05:26:40 *** dvladim has quit IRC (Ping timeout: 272 seconds) 2012-05-06T05:30:11 *** foRei has joined #aichallenge 2012-05-06T06:28:43 *** kilae has joined #aichallenge 2012-05-06T06:46:43 *** ronchamon has quit IRC (Ping timeout: 245 seconds) 2012-05-06T06:47:34 *** thestinger has joined #aichallenge 2012-05-06T06:58:40 *** delt0r_ has quit IRC (Ping timeout: 276 seconds) 2012-05-06T07:11:22 *** delt0r_ has joined #aichallenge 2012-05-06T07:11:56 *** NoxiaZ^ has quit IRC (Ping timeout: 255 seconds) 2012-05-06T07:13:36 *** pairofdice has joined #aichallenge 2012-05-06T07:15:59 *** NoxiaZ^ has joined #aichallenge 2012-05-06T07:26:37 *** dmj111 has quit IRC (Ping timeout: 276 seconds) 2012-05-06T08:05:20 *** ronchamon has joined #aichallenge 2012-05-06T08:13:28 *** NoxiaZ^ has quit IRC (Ping timeout: 248 seconds) 2012-05-06T08:40:38 *** iglo has joined #aichallenge 2012-05-06T08:41:38 *** Vrexu has quit IRC (Remote host closed the connection) 2012-05-06T08:43:43 *** epicmonkey has joined #aichallenge 2012-05-06T08:44:54 *** iglo has quit IRC (Remote host closed the connection) 2012-05-06T09:15:11 *** UncleVasya has joined #aichallenge 2012-05-06T09:16:40 Hi. Maybe you'll find this interesting: http://metachess.kiev.ua/en/screenshots. Bye. 2012-05-06T09:16:49 *** UncleVasya has quit IRC (Client Quit) 2012-05-06T09:18:25 *** UncleVasya has joined #aichallenge 2012-05-06T09:18:34 or this: http://newcdn.flamehaus.com/Valve_Handbook_LowRes.pdf 2012-05-06T09:18:38 *** UncleVasya has quit IRC (Client Quit) 2012-05-06T09:27:21 *** supertux has joined #aichallenge 2012-05-06T09:28:46 *** supertux has left #aichallenge ("Verlassend") 2012-05-06T09:34:12 *** NoxiaZ^ has joined #aichallenge 2012-05-06T10:19:41 *** dmj111 has joined #aichallenge 2012-05-06T10:54:00 *** dici has joined #aichallenge 2012-05-06T11:11:49 *** choas has joined #aichallenge 2012-05-06T11:19:20 *** choas has quit IRC (Ping timeout: 245 seconds) 2012-05-06T11:36:35 *** sigh has quit IRC (Remote host closed the connection) 2012-05-06T11:45:29 *** NoxiaZ^ has quit IRC (Ping timeout: 245 seconds) 2012-05-06T11:48:44 *** mcstar has joined #aichallenge 2012-05-06T11:59:45 *** HaraKiri has quit IRC () 2012-05-06T12:05:38 *** choas has joined #aichallenge 2012-05-06T12:21:02 *** HaraKiri has joined #aichallenge 2012-05-06T12:31:44 *** Garf has joined #aichallenge 2012-05-06T12:45:23 *** amstan has joined #aichallenge 2012-05-06T12:45:23 *** ChanServ sets mode: +o amstan 2012-05-06T13:19:36 *** AlliedEnvy has quit IRC (Read error: Connection reset by peer) 2012-05-06T13:25:21 *** NoxiaZ^ has joined #aichallenge 2012-05-06T13:29:03 *** cyphase has quit IRC (Read error: Connection reset by peer) 2012-05-06T13:31:44 niiice 2012-05-06T13:47:58 *** cyphase has joined #aichallenge 2012-05-06T13:56:33 *** AlliedEnvy has joined #aichallenge 2012-05-06T14:04:12 *** g0llum has joined #aichallenge 2012-05-06T14:08:29 cs 212 unit3 fucked with my head 2012-05-06T14:09:19 have you done cs262 yet? 2012-05-06T14:09:33 I found the cs212 unit really easy 2012-05-06T14:09:38 I went through it yea 2012-05-06T14:09:58 I just used a binary search for the inverse though 2012-05-06T14:10:15 * thestinger has to do the cs262 work 2012-05-06T14:10:24 It's not hard but Norvig's style just confuses me 2012-05-06T14:10:43 ? 2012-05-06T14:10:56 And it's a bit hard 2012-05-06T14:10:59 D: 2012-05-06T14:11:20 well, he codes pythonic python 2012-05-06T14:11:26 the other courses haven't used python well 2012-05-06T14:11:31 cs373 especially 2012-05-06T14:11:37 I think that was intentional though 2012-05-06T14:15:02 * thestinger loves for-else 2012-05-06T14:18:33 I was amused by how easy it was to pass the tests for the unit 3 of the web course 2012-05-06T14:19:28 it accepts it if you store ids and redirect 2012-05-06T14:19:38 it doesn't care about the content of the pages at all 2012-05-06T14:19:49 you don't even need to have any html :P 2012-05-06T14:20:36 pairofdice: I've found that the language course is the most challenging due to the somewhat tricky graph searches you have to do 2012-05-06T14:21:10 at least that's how I've implemented my solutions to these things 2012-05-06T14:23:03 Yeah, I had some difficulties with the graphs 2012-05-06T14:26:15 But at least there's labels 2012-05-06T14:33:06 *** choas has quit IRC (Ping timeout: 260 seconds) 2012-05-06T14:57:55 whats cs 212 unit 3? 2012-05-06T14:58:10 pairofdice: ^^ 2012-05-06T14:58:16 *** delt0r_ has quit IRC (Ping timeout: 260 seconds) 2012-05-06T14:59:00 *** Vrexu has joined #aichallenge 2012-05-06T14:59:03 im doing python for 2 days now, i have to admit again, it is a useful language 2012-05-06T14:59:14 mcstar: "tools" basically 2012-05-06T14:59:17 it's peter norvig's class 2012-05-06T14:59:25 ai? 2012-05-06T14:59:29 no 2012-05-06T14:59:42 what kind of tools then? 2012-05-06T14:59:51 well it's really just a general programming course 2012-05-06T14:59:54 it's actually really good 2012-05-06T15:00:00 mcstar: that unit teaches how to write parsers 2012-05-06T15:00:04 among other things 2012-05-06T15:00:05 thestinger: ok, im interested in the se 2012-05-06T15:00:14 in the specific program that fucked with pairofdice's head 2012-05-06T15:00:31 *** iglo has joined #aichallenge 2012-05-06T15:00:48 for example the first homework in that is writing a json parser just by using the code already done in the unit 2012-05-06T15:00:49 which is easy 2012-05-06T15:00:54 thestinger: btw, how is it Go-ing? 2012-05-06T15:01:12 lol 2012-05-06T15:01:15 haven't started on that 2012-05-06T15:01:19 I got scared off 2012-05-06T15:01:23 :) 2012-05-06T15:01:58 thestinger: did you read the json chapter in RWH? 2012-05-06T15:02:03 no 2012-05-06T15:02:08 too many things I have to do 2012-05-06T15:02:18 yeah i know the feeling 2012-05-06T15:10:30 *** delt0r_ has joined #aichallenge 2012-05-06T15:15:18 *** Accoun has quit IRC () 2012-05-06T15:15:59 * Vrexu humbly thanks for the shared information and decides to enroll on becoming a somehow less lame programmer. 2012-05-06T15:24:05 Need to beat lambdas and decorators to submission 2012-05-06T15:27:51 *** Chris_0076 has quit IRC (Quit: Leaving) 2012-05-06T15:27:53 pairofdice: Beat it! 2012-05-06T15:28:47 pairofdice: why? :P 2012-05-06T15:29:14 decorators are just sugar for g = f(g) 2012-05-06T15:29:32 and python lambdas are an awful syntax for anonymous functions 2012-05-06T15:31:19 *** dvladim has joined #aichallenge 2012-05-06T15:31:58 *** Chris_0076 has joined #aichallenge 2012-05-06T15:34:45 some of the lambda use cases aren't so clear 2012-05-06T15:35:07 and decorators melt my mind just because of recursion 2012-05-06T15:35:15 decorators aren't recursion 2012-05-06T15:35:22 they're seriously just 2012-05-06T15:35:27 g = f(g) 2012-05-06T15:35:30 yeah 2012-05-06T15:35:52 lambdas just save you from having to name a nested function 2012-05-06T15:35:53 *** Accoun has joined #aichallenge 2012-05-06T15:36:02 until python 3, python doesn't have proper closures though 2012-05-06T15:36:09 (the nonlocal keyword) 2012-05-06T15:42:10 python 2 does have closures 2012-05-06T15:42:36 Zannick: yes, but not proper ones 2012-05-06T15:42:46 not sure what you mean 2012-05-06T15:43:14 they can't change stuff in the outer scope 2012-05-06T15:43:21 unless it's mutable 2012-05-06T15:43:23 why would you want to do that 2012-05-06T15:43:40 well 2012-05-06T15:43:50 you can make a closure out of self.func eg. 2012-05-06T15:43:53 because that's what a closure is 2012-05-06T15:44:06 Zannick: yeah, but then it's like java "closures" :P 2012-05-06T15:44:28 no, java closures are Closure 2012-05-06T15:44:33 :) 2012-05-06T15:44:41 you can get around the lack of nonlocal in py2 though 2012-05-06T15:44:55 just have to use a dict to hold your local vars, and then modify the dict in the nested function 2012-05-06T15:45:20 d = 0 2012-05-06T15:45:24 def f(x): 2012-05-06T15:45:30 d += x 2012-05-06T15:45:34 ^ 2012-05-06T15:45:39 (let ((x 0)) (lambda (y) (incf x y) (format nil "~&~d~%" y))) 2012-05-06T15:46:04 thestinger: or list 2012-05-06T15:46:55 so i've always thought of closures as functions that can be called eventually, where some arguments are filled and maybe touches other things 2012-05-06T15:47:03 eg. functools.partial 2012-05-06T15:47:16 Zannick: you exmaple is not closed over d 2012-05-06T15:47:27 your 2012-05-06T15:47:49 but yeah, python scoping doesn't let you assign because it overwrites in a more local scope 2012-05-06T15:47:57 no? 2012-05-06T15:48:01 not at all 2012-05-06T15:48:19 Zannick: http://sprunge.us/HHcF 2012-05-06T15:48:36 (ofc i can be wrong cause i dont know python that well) 2012-05-06T15:48:48 (but still, that doesnt look like a closure) 2012-05-06T15:48:56 (more like d is a dynamically bound variable) 2012-05-06T15:48:58 without nonlocal it won't work 2012-05-06T15:49:11 x is part of the state of the f function, but g can't modify it 2012-05-06T15:49:27 x += 5 won't work (it will throw an exception, since it's not defined locally) 2012-05-06T15:49:37 x = 10 will make a local var and won't change the outer scope 2012-05-06T15:49:40 ah, yes 2012-05-06T15:49:48 but this will work 2012-05-06T15:50:35 http://sprunge.us/JIYY 2012-05-06T15:50:40 or a dict 2012-05-06T15:50:44 it's just a hack though 2012-05-06T15:51:01 *** epicmonkey has quit IRC (Ping timeout: 276 seconds) 2012-05-06T15:51:46 functools.lru_cache is a good example of it 2012-05-06T15:53:42 (lambda x: lambda y: x+y)(2)(4) 2012-05-06T15:53:57 unfortunately x is not mutable from the second lambda 2012-05-06T15:54:15 python lambdas are so bad :P 2012-05-06T15:54:25 but it just means you have to name stuff 2012-05-06T15:54:50 *** g0llum has quit IRC (Read error: Connection reset by peer) 2012-05-06T15:54:58 i hate naming stuff 2012-05-06T15:55:04 i call my dog Dog 2012-05-06T16:06:26 *** Garf has quit IRC (Quit: Make a new plan, Stan!) 2012-05-06T16:15:42 thestinger: http://sprunge.us/QZXU 2012-05-06T16:18:16 you can make recursive list comprehensions 2012-05-06T16:18:29 in python2 2012-05-06T16:19:24 oh I think it was removed in 2.7 2012-05-06T16:19:44 yup :( 2012-05-06T16:20:21 mcstar: http://stackoverflow.com/questions/9631777/what-does-locals-1-mean-in-python 2012-05-06T16:22:11 *** dvladim has quit IRC (Ping timeout: 272 seconds) 2012-05-06T16:22:40 ah yeah, ive seen the local() trick before 2012-05-06T16:22:43 locals* 2012-05-06T16:23:01 im not sure in what kind of problem though 2012-05-06T16:23:05 locals() and globals() are for metaprogramming hacks 2012-05-06T16:24:34 why not just use a language that supports metaprogramming... 2012-05-06T16:25:02 im just saying this is stuff im not supposed to know about python 2012-05-06T16:25:34 well they're in the language for the same reason as eval, being able to compile/decompile to the AST of python, etc. 2012-05-06T16:26:06 http://docs.python.org/py3k/library/ast.html scary 2012-05-06T16:27:02 thestinger: lol, looks much like haskell 2012-05-06T16:31:39 here, something more evil 2012-05-06T16:32:03 mcstar: http://ideone.com/vwTsG 2012-05-06T16:33:31 with the ast module you can actually change any source code though 2012-05-06T16:33:47 without relying on it having source available 2012-05-06T16:33:54 *** kurnevsky has quit IRC (Read error: Connection reset by peer) 2012-05-06T16:38:37 thestinger: you still have the source 2012-05-06T16:38:48 and you must do it blindly 2012-05-06T16:38:58 but yeah, funny 2012-05-06T16:39:13 yeah, ast is for proper self-modifying code though 2012-05-06T16:39:16 that's just a silly hack 2012-05-06T16:40:45 thestinger: if you really want to learn about macros take a look at Paul Graham's On Lisp, and be enlightened 2012-05-06T16:41:08 no, dont just take a look at it, read it! 2012-05-06T16:41:13 later 2012-05-06T16:41:17 bye 2012-05-06T16:41:21 lol 2012-05-06T16:41:24 XD 2012-05-06T16:41:47 *** iglo has quit IRC (Remote host closed the connection) 2012-05-06T16:56:07 mcstar: I would prefer if we could have hygienic macros in lisp 2012-05-06T16:56:26 but then scheme's macros are just as hard to debug 2012-05-06T16:56:41 *** kilae has quit IRC (Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725]) 2012-05-06T17:01:43 delt0r_: tired of gensym? 2012-05-06T17:03:01 i only wrote like 2 useful lisp macros in my life, so i dont really see the downside of unhygienic ones :( 2012-05-06T17:13:05 *** HaraKiri has quit IRC () 2012-05-06T17:23:41 *** Dici_ has joined #aichallenge 2012-05-06T17:23:41 *** dici has quit IRC (Disconnected by services) 2012-05-06T17:23:43 *** Dici_ is now known as dici 2012-05-06T17:27:37 How many bodies do you see there? 2012-05-06T17:27:44 Careful! Its a trick question. 2012-05-06T17:27:55 (showing a murder scene) 2012-05-06T17:37:09 delt0r_: ah i forget about redefining labels binding standard functions 2012-05-06T17:37:26 that you cant really do with gensym 2012-05-06T17:37:34 (well, it would look horrible) 2012-05-06T17:53:33 *** thestinger has quit IRC (Quit: WeeChat 0.3.7) 2012-05-06T17:56:03 *** Vrexu has quit IRC (Remote host closed the connection) 2012-05-06T18:06:40 *** NoxiaZ^ has quit IRC (Ping timeout: 256 seconds) 2012-05-06T18:07:53 *** mcstar has quit IRC (Quit: mcstar) 2012-05-06T18:22:24 *** dici has quit IRC (Read error: Connection reset by peer) 2012-05-06T18:41:33 *** mceier has quit IRC (Quit: leaving) 2012-05-06T18:53:12 *** Chris_0076 has quit IRC (Quit: Leaving) 2012-05-06T18:55:53 *** Chris_0076 has joined #aichallenge 2012-05-06T19:23:36 *** Chris_0076 has quit IRC (Ping timeout: 260 seconds) 2012-05-06T19:30:50 *** Chris_0076 has joined #aichallenge 2012-05-06T19:32:28 *** Fandekasp has joined #aichallenge 2012-05-06T19:36:00 *** sigh has joined #aichallenge 2012-05-06T19:46:01 *** pairofdice has quit IRC (Quit: in girum imus nocte et consumimur igni) 2012-05-06T19:46:36 *** mleise1 has joined #aichallenge 2012-05-06T19:46:57 *** mleise has quit IRC (Quit: Leaving.) 2012-05-06T19:50:43 *** foRei has quit IRC (Quit: Bye) 2012-05-06T19:52:16 *** sigh has quit IRC (Remote host closed the connection) 2012-05-06T20:57:29 *** archdori has joined #aichallenge 2012-05-06T21:01:07 *** Fandekasp has quit IRC (Ping timeout: 260 seconds) 2012-05-06T21:02:47 *** replore_ has joined #aichallenge 2012-05-06T21:17:40 *** replore_ has quit IRC (Read error: Connection reset by peer) 2012-05-06T21:43:03 *** thestinger has joined #aichallenge 2012-05-06T22:26:35 *** coeus has quit IRC (Read error: Operation timed out) 2012-05-06T22:52:43 *** thestinger has quit IRC (Quit: WeeChat 0.3.7) 2012-05-06T22:58:39 *** delt0r_ has quit IRC (Ping timeout: 272 seconds) 2012-05-06T23:11:02 *** delt0r_ has joined #aichallenge 2012-05-06T23:16:08 *** alc has joined #aichallenge 2012-05-06T23:45:47 *** chris__0076 has joined #aichallenge 2012-05-06T23:48:30 *** Chris_0076 has quit IRC (Ping timeout: 240 seconds) 2012-05-06T23:49:25 *** chris___0076 has joined #aichallenge 2012-05-06T23:51:56 *** chris__0076 has quit IRC (Ping timeout: 260 seconds) 2012-05-06T23:53:29 *** alc has quit IRC (Ping timeout: 265 seconds) 2012-05-06T23:54:03 *** chris___0076 has quit IRC (Ping timeout: 256 seconds) 2012-05-06T23:57:18 *** Fandekasp has joined #aichallenge