2012-10-13T00:08:17 *** FireFly has quit IRC (Ping timeout: 246 seconds) 2012-10-13T00:21:56 *** FireFly has joined #aichallenge 2012-10-13T01:54:43 *** Simas_J has joined #aichallenge 2012-10-13T02:11:12 *** antimatroidl has quit IRC (Ping timeout: 255 seconds) 2012-10-13T02:11:22 *** mceier has quit IRC (Ping timeout: 265 seconds) 2012-10-13T02:12:49 *** mceier has joined #aichallenge 2012-10-13T02:14:48 *** pairofdice has joined #aichallenge 2012-10-13T02:42:29 *** mpstyler has joined #aichallenge 2012-10-13T02:48:44 *** epicmonkey has joined #aichallenge 2012-10-13T03:09:24 *** foRei has joined #aichallenge 2012-10-13T03:14:48 *** amstan has quit IRC (Quit: Konversation terminated!) 2012-10-13T03:25:05 *** sigh has quit IRC (Ping timeout: 248 seconds) 2012-10-13T03:26:27 *** sigh has joined #aichallenge 2012-10-13T03:28:57 *** sigh_ has joined #aichallenge 2012-10-13T03:31:47 *** sigh has quit IRC (Ping timeout: 255 seconds) 2012-10-13T03:49:01 *** antimatroidl has joined #aichallenge 2012-10-13T03:54:40 *** sigh_ has quit IRC (Remote host closed the connection) 2012-10-13T04:04:22 *** sigh has joined #aichallenge 2012-10-13T04:27:29 *** mcstar has joined #aichallenge 2012-10-13T04:57:49 *** scribble has quit IRC () 2012-10-13T05:20:55 *** Simas_J has quit IRC (Read error: Connection reset by peer) 2012-10-13T05:57:34 *** FireFly has quit IRC (Changing host) 2012-10-13T05:57:34 *** FireFly has joined #aichallenge 2012-10-13T06:03:47 *** mleise has joined #aichallenge 2012-10-13T07:01:02 *** antimatroidl has quit IRC (Ping timeout: 245 seconds) 2012-10-13T07:07:56 *** antimatroidl has joined #aichallenge 2012-10-13T07:37:38 *** antimatroidl has quit IRC (Ping timeout: 272 seconds) 2012-10-13T07:41:01 *** antimatroidl has joined #aichallenge 2012-10-13T08:01:51 *** coeus has joined #aichallenge 2012-10-13T08:10:51 *** coeus_ has joined #aichallenge 2012-10-13T08:12:53 *** coeus has quit IRC (Ping timeout: 260 seconds) 2012-10-13T08:22:56 *** coius__ has joined #aichallenge 2012-10-13T08:25:57 *** coeus_ has quit IRC (Ping timeout: 260 seconds) 2012-10-13T08:30:46 *** Scooper has joined #aichallenge 2012-10-13T08:33:07 *** mpstyler has quit IRC (Quit: ChatZilla 0.9.89 [Firefox 15.0.1/20120905151427]) 2012-10-13T08:39:28 *** coeus_ has joined #aichallenge 2012-10-13T08:41:03 *** coius__ has quit IRC (Ping timeout: 244 seconds) 2012-10-13T08:45:58 *** thestinger has joined #aichallenge 2012-10-13T08:46:11 *** coius_ has joined #aichallenge 2012-10-13T08:49:12 *** coeus_ has quit IRC (Ping timeout: 272 seconds) 2012-10-13T08:56:07 0<<7|9; 2012-10-13T08:56:09 wtf 2012-10-13T09:02:36 *** thestinger has quit IRC (Quit: WeeChat 0.3.9) 2012-10-13T09:03:28 *** thestinger has joined #aichallenge 2012-10-13T09:11:59 mcstar: "When faced with that kind of situation most creatures will do ANYTHING for just a few more minutes of life." does that sound right to you? 2012-10-13T09:12:14 that situation being a life threatening one like a trapped limb 2012-10-13T09:12:41 *** coius_ has quit IRC (Read error: Connection reset by peer) 2012-10-13T09:12:52 yeah, people would self-amputate 2012-10-13T09:13:32 yes but they wouldn't do it just to prolong life by a few minutes 2012-10-13T09:13:41 they'd do it with the intent of hopefully living longer than that 2012-10-13T09:17:17 who knows 2012-10-13T09:17:34 antimatroidl: http://www.amazon.com/Commonsense-Book-Death-Reflections-Thanatologist/dp/0742563316 :P 2012-10-13T09:19:01 afk, went running 2012-10-13T09:19:27 that was quick! :P 2012-10-13T09:19:37 thestinger: not sure what the joke is? :P 2012-10-13T09:19:57 not a joke 2012-10-13T09:23:41 ? 2012-10-13T09:23:50 relevance? 2012-10-13T09:24:32 yes 2012-10-13T09:24:33 relevant 2012-10-13T09:24:41 book about death-prolongers 2012-10-13T09:24:45 (most people) 2012-10-13T09:28:48 *** coius_ has joined #aichallenge 2012-10-13T09:51:39 *** thestinger has quit IRC (Quit: WeeChat 0.3.9) 2012-10-13T09:52:49 *** thestinger has joined #aichallenge 2012-10-13T09:55:08 back 2012-10-13T09:55:44 \o 2012-10-13T10:05:13 thestinger: arch trouble 2012-10-13T10:05:19 what? 2012-10-13T10:05:46 trying to update 2012-10-13T10:05:56 and it says ligl conflicts with nvidia-utils 2012-10-13T10:06:05 wth, i dont have libgl installed 2012-10-13T10:06:13 and why would it want to install it? 2012-10-13T10:06:34 and i should make the transition to systemd... 2012-10-13T10:06:46 but i wont 2012-10-13T10:07:05 you should, yes 2012-10-13T10:07:14 but i wont 2012-10-13T10:07:19 why not? 2012-10-13T10:07:25 you use kde 2012-10-13T10:07:27 you have to 2012-10-13T10:07:27 the author is probably an ex-nazi 2012-10-13T10:07:37 at least, the offspring of one 2012-10-13T10:07:45 you don't have a choice if your want gnome/kde to work 2012-10-13T10:07:53 gnome requires systemd directly, kde requires it through polkit 2012-10-13T10:07:59 the updates just haven't moved from testing yet 2012-10-13T10:08:01 i dont use either 2012-10-13T10:08:28 thestinger: anyway, it was a joke, ill make the transition 2012-10-13T10:08:42 i just read that one argument against systemd is the author 2012-10-13T10:08:47 wat? 2012-10-13T10:08:52 that's not an argument against systemd 2012-10-13T10:08:59 the author is a perfectly fine person anyway 2012-10-13T10:09:03 and i figured, he has german connections, and lived in brazil... 2012-10-13T10:09:37 thestinger: you dont get it, do you? 2012-10-13T10:10:00 no I don't get it 2012-10-13T10:10:29 most german nazis emigrated to argentine, brazil, south africa.., after ww2 2012-10-13T10:10:43 well, some of them remained in west-germany 2012-10-13T10:10:46 I know that 2012-10-13T10:10:52 and what does it have to do with lennart? 2012-10-13T10:11:09 nothing probably 2012-10-13T10:11:13 thats why its a joke 2012-10-13T10:11:46 but i read a forum post of an arch developer, mentioning that one argument against systemd is the author 2012-10-13T10:11:51 *** chris__0076 is now known as Chris_0076 2012-10-13T10:12:10 *** coeus_ has joined #aichallenge 2012-10-13T10:12:12 mcstar: well that's kinda bullshit 2012-10-13T10:12:17 one argument against many, that he dismisses immediately 2012-10-13T10:12:23 amongst* 2012-10-13T10:12:34 mcstar: well lots of people claim it is an argument against systemd 2012-10-13T10:13:03 but what specific do they have to say against leiningen? 2012-10-13T10:13:09 (or whatever his name is) 2012-10-13T10:14:50 *** coius_ has quit IRC (Ping timeout: 245 seconds) 2012-10-13T10:18:44 mcstar: they blame him for ubuntu breaking their audio 2012-10-13T10:18:49 really, they don't have rational arguments 2012-10-13T10:18:57 they just make ad hominem attacks, not even based in fact 2012-10-13T10:30:16 *** thestinger has quit IRC (Quit: WeeChat 0.3.9) 2012-10-13T10:33:10 *** thestinger has joined #aichallenge 2012-10-13T10:33:58 *** coeus has joined #aichallenge 2012-10-13T10:36:52 *** coeus_ has quit IRC (Ping timeout: 276 seconds) 2012-10-13T10:47:44 *** coeus_ has joined #aichallenge 2012-10-13T10:51:00 *** coeus has quit IRC (Ping timeout: 255 seconds) 2012-10-13T11:06:58 *** sigh has quit IRC (Remote host closed the connection) 2012-10-13T11:07:40 *** Kingpin13 has joined #aichallenge 2012-10-13T11:09:23 why do i find my keyboard too big? 2012-10-13T11:10:01 i have to learn more emacs, i use the mouse too much 2012-10-13T11:11:16 *** ecidforiap has joined #aichallenge 2012-10-13T11:12:02 *** pairofdice has quit IRC (Ping timeout: 240 seconds) 2012-10-13T11:13:06 *** FireFly has quit IRC (Excess Flood) 2012-10-13T11:14:04 mleise: did you read how the top solvers solve sudoku? 2012-10-13T11:14:59 well, at least kudoku, it is translated to many languages, c/js/java/lua 2012-10-13T11:15:12 mcstar: nope 2012-10-13T11:15:19 quite interesting 2012-10-13T11:15:20 is it important to know that ? 2012-10-13T11:15:24 yeah 2012-10-13T11:15:39 they start out with an unusual representation of the problem 2012-10-13T11:15:45 I hope all the work I put in so far isn't in vain 2012-10-13T11:15:52 with one, that i wouldnt have come up with myself 2012-10-13T11:16:09 from that, the problem is really easy 2012-10-13T11:16:28 im trying to decipher them 2012-10-13T11:16:40 and maybe make a more haskellish solution out of it 2012-10-13T11:16:44 O.o what representation ? 2012-10-13T11:17:03 should i tell you? 2012-10-13T11:17:14 *** FireFly has joined #aichallenge 2012-10-13T11:17:18 Well, my representation is in rectangular regions 2012-10-13T11:17:35 tell me, please 2012-10-13T11:17:45 are you sure you want to know? 2012-10-13T11:18:01 maybe finish yours, and later you can read about these 2012-10-13T11:18:06 hmm ok 2012-10-13T11:18:33 but, is that representation allowing for the fastest implementation ? 2012-10-13T11:18:40 probably yes 2012-10-13T11:18:47 and it is 100 lines 2012-10-13T11:18:56 you are kidding me 2012-10-13T11:18:58 no 2012-10-13T11:19:42 I am @ 2000 lines now 2012-10-13T11:19:59 o.O 2012-10-13T11:20:03 just writing a better way to query regions 2012-10-13T11:20:45 *** UncleVasya has joined #aichallenge 2012-10-13T11:21:04 I hate how I have dozen's of functions for every query I have. In the end it comes down to "union of x,y,z, except c" or similar 2012-10-13T11:21:04 js: 90, java: 110, c:110, lua: 108 2012-10-13T11:21:13 that's how it should read in the source coe 2012-10-13T11:21:16 *code 2012-10-13T11:21:28 *** FireFly has quit IRC (Excess Flood) 2012-10-13T11:22:31 a little voice in my head reminds me of the problem of "over-enineering" 2012-10-13T11:23:04 "this is Sudoku, not a space flight simulator" 2012-10-13T11:23:24 yeah, it isnt 2012-10-13T11:24:06 mleise: lol, i wrote my asteroids game in 2 evenings, and look at me, how long ive been playing with this stupid thing 2012-10-13T11:27:49 *** FireFly has joined #aichallenge 2012-10-13T11:28:05 does that count as a space flight simulator btw ? 2012-10-13T11:28:36 enum Column : ℕ = { a, b, c, d, e, f, g, h, i }; 2012-10-13T11:28:45 that should do it 2012-10-13T11:29:04 I'm using chess notation 2012-10-13T11:30:53 not, it isnt a space flight simulator 2012-10-13T11:31:19 but if i was asked on which project would i spend more time, i would have said, on that one 2012-10-13T11:31:33 would i be spending* 2012-10-13T11:33:32 *** thestinger has quit IRC (Ping timeout: 246 seconds) 2012-10-13T11:33:37 yes, I wouldn't have gone so far if you weren't working on a solver in parallel 2012-10-13T11:34:27 enum Row : ℕ { Ⅸ, Ⅷ, Ⅶ, Ⅵ, Ⅴ, Ⅳ, Ⅲ, Ⅱ, Ⅰ }; // is that sane ? 2012-10-13T11:36:34 mleise: great, now blame me 2012-10-13T11:36:50 XD 2012-10-13T11:37:06 *** coeus has joined #aichallenge 2012-10-13T11:40:12 *** coeus_ has quit IRC (Ping timeout: 272 seconds) 2012-10-13T11:43:59 I blame the AIChallenge and PlanetWars, too 2012-10-13T11:48:40 *** coeus_ has joined #aichallenge 2012-10-13T11:52:16 *** coeus has quit IRC (Ping timeout: 260 seconds) 2012-10-13T11:58:35 *** thestinger has joined #aichallenge 2012-10-13T12:08:37 mcstar: initscripts is in [extra] now :P 2012-10-13T12:14:09 yay 2012-10-13T12:14:26 thestinger: i wont upgrade until im finished with sudoku 2012-10-13T12:14:37 it allocates my mental resources :) 2012-10-13T12:17:34 woo almost finished marking for the semester 2012-10-13T12:17:41 one more lot of calc assignments next weekend 2012-10-13T12:18:01 did over 14 hours of marking the same question over and over for another unit over the last 2 weeks :( 2012-10-13T12:19:03 antimatroidl: you should have written a script for that 2012-10-13T12:19:29 repetition is what computers good at 2012-10-13T12:20:12 would have been a fair aichallenge 2012-10-13T12:20:24 'write a fair automatic grading script' 2012-10-13T12:21:23 *** coeus has joined #aichallenge 2012-10-13T12:23:35 *** coeus_ has quit IRC (Ping timeout: 245 seconds) 2012-10-13T12:24:32 mcstar: they're mostly handwritten 2012-10-13T12:24:48 thats why a challenge 2012-10-13T12:24:53 recognize handwriting 2012-10-13T12:24:58 recognize natural language 2012-10-13T12:25:03 me no good with that 2012-10-13T12:25:04 score the answer 2012-10-13T12:25:19 plus i was being paid by the hour 2012-10-13T12:25:21 so there's that 2012-10-13T12:49:03 python is great for implementing pseudocode 2012-10-13T12:49:41 *** coeus_ has joined #aichallenge 2012-10-13T12:52:44 *** coeus has quit IRC (Ping timeout: 245 seconds) 2012-10-13T12:58:46 though, the pseudocode that im reading is far from natural to me 2012-10-13T13:01:35 *** coeus_ has quit IRC (Ping timeout: 246 seconds) 2012-10-13T13:15:27 *** coeus_ has joined #aichallenge 2012-10-13T13:24:06 *** coeus has joined #aichallenge 2012-10-13T13:26:09 *** coeus_ has quit IRC (Ping timeout: 252 seconds) 2012-10-13T13:32:11 *** coeus_ has joined #aichallenge 2012-10-13T13:32:39 *** coeus has quit IRC (Read error: Operation timed out) 2012-10-13T13:49:22 *** coeus has joined #aichallenge 2012-10-13T13:50:57 *** coeus_ has quit IRC (Ping timeout: 246 seconds) 2012-10-13T13:52:30 *** coeus_ has joined #aichallenge 2012-10-13T13:55:29 *** coeus has quit IRC (Ping timeout: 240 seconds) 2012-10-13T13:57:43 *** smjm has joined #aichallenge 2012-10-13T13:57:43 *** smjm has joined #aichallenge 2012-10-13T13:58:21 *** coeus has joined #aichallenge 2012-10-13T14:01:29 *** coeus_ has quit IRC (Ping timeout: 260 seconds) 2012-10-13T14:04:33 *** coeus_ has joined #aichallenge 2012-10-13T14:06:34 *** coeus has quit IRC (Ping timeout: 245 seconds) 2012-10-13T14:08:10 *** coeus has joined #aichallenge 2012-10-13T14:10:09 *** coeus_ has quit IRC (Ping timeout: 240 seconds) 2012-10-13T14:12:25 *** jacob_strauss has joined #aichallenge 2012-10-13T14:12:26 i cant break away from recursion 2012-10-13T14:13:12 thestinger: http://sprunge.us/DeMg?python compare solve1 with mysolve1 2012-10-13T14:16:08 *** coeus_ has joined #aichallenge 2012-10-13T14:18:47 *** coeus has quit IRC (Ping timeout: 265 seconds) 2012-10-13T14:19:41 *** coeus has joined #aichallenge 2012-10-13T14:20:17 mleise: dont look at my paste, its a primitive version of the algorithm that that fast solver uses 2012-10-13T14:21:32 *** coeus_ has quit IRC (Ping timeout: 246 seconds) 2012-10-13T14:29:35 *** coeus_ has joined #aichallenge 2012-10-13T14:32:18 *** coeus has quit IRC (Ping timeout: 248 seconds) 2012-10-13T14:34:30 *** jacob_strauss has quit IRC (Quit: jacob_strauss) 2012-10-13T14:36:13 *** thestinger has quit IRC (Quit: WeeChat 0.3.9) 2012-10-13T14:37:46 *** thestinger has joined #aichallenge 2012-10-13T14:41:59 *** epicmonkey has quit IRC (Ping timeout: 245 seconds) 2012-10-13T14:45:11 *** epicmonkey has joined #aichallenge 2012-10-13T14:49:50 *** coeus has joined #aichallenge 2012-10-13T14:51:39 *** coeus_ has quit IRC (Ping timeout: 265 seconds) 2012-10-13T15:00:10 *** UncleVasya has quit IRC (Quit: UncleVasya) 2012-10-13T15:00:12 *** Accoun has quit IRC () 2012-10-13T15:06:09 *** epicmonkey has quit IRC (Ping timeout: 245 seconds) 2012-10-13T15:10:18 mcstar: my sister called, what's that code? 2012-10-13T15:10:49 *** coeus_ has joined #aichallenge 2012-10-13T15:11:53 so, they researched that they can apply a 5x5 matrix to sudoku ? 2012-10-13T15:13:09 *** coeus has quit IRC (Ping timeout: 240 seconds) 2012-10-13T15:14:14 *** Accoun has joined #aichallenge 2012-10-13T15:22:26 mleise: thats the generator matrix, it contains all sudoku solutions 2012-10-13T15:23:05 *** coeus has joined #aichallenge 2012-10-13T15:23:24 j/k 2012-10-13T15:23:28 and i said, dont look at it 2012-10-13T15:23:58 what do you mean "it contains all sudoku solutions" ? 2012-10-13T15:24:20 there are just a bunch of zeroes and ones 2012-10-13T15:24:33 it is a 25 bit number, actually 2012-10-13T15:24:48 oh you are j/k 2012-10-13T15:25:04 *** coeus_ has quit IRC (Ping timeout: 252 seconds) 2012-10-13T15:25:08 yes 2012-10-13T15:25:40 for a moment you shocked me 2012-10-13T15:25:45 :) 2012-10-13T15:26:08 I really thought there is a simple algorithm that just applies a matrix to the board and gets the solution 2012-10-13T15:26:29 it is an NP-complete problem 2012-10-13T15:26:42 yeah right, I somehow forgot 2012-10-13T15:26:42 meaning, there are no efficient algorithms 2012-10-13T15:27:13 anyway I cannot find a good way to express in D the relation between different region types. I need... another language maybe 2012-10-13T15:27:34 mleise: just you a void* 2012-10-13T15:27:38 you->use 2012-10-13T15:27:38 I have a big template that is called "intersect" that has a lot of if-else 2012-10-13T15:27:52 for every combination of input types 2012-10-13T15:27:58 like a 'row' or a 'cell' 2012-10-13T15:28:12 e.g. the intersection of a row and a column is a cell 2012-10-13T15:28:43 while that works, I wonder if Haskell can express it more elegantly 2012-10-13T15:29:36 *** Garf has joined #aichallenge 2012-10-13T15:29:50 I also only handle row 'intersect' column. For column 'intersect' row I recursively call the template with the arguments swapped :p 2012-10-13T15:30:14 mleise: i think pattern matching can help there 2012-10-13T15:30:23 It looks like poor man's ... whatever this is called. Arithmetic data types maybe? 2012-10-13T15:30:41 algebraic, not arithmetic 2012-10-13T15:30:52 ah yes, those things 2012-10-13T15:31:35 the types doesnt really matter 2012-10-13T15:31:37 *** Garf has quit IRC (Read error: Connection reset by peer) 2012-10-13T15:31:41 what you want is pattern matching 2012-10-13T15:31:48 is the intersection of a row and col a 'type product' ? 2012-10-13T15:32:00 or, you can do similar things with generic functions 2012-10-13T15:32:00 e.g. cell is a product type of row and col ? 2012-10-13T15:32:21 generic functions == templates 2012-10-13T15:32:40 well, type Row = Int, type Col = Int, type Cell = (Row, Col) 2012-10-13T15:32:44 in this sense, it is 2012-10-13T15:32:54 but you dont gain anything from it, except readability 2012-10-13T15:32:58 mleise: you can make your own ADTs by hand 2012-10-13T15:33:11 I'm sure http://www.boost.org/doc/libs/1_51_0/doc/html/variant.html exists for D 2012-10-13T15:33:39 doesnt matter 2012-10-13T15:33:47 discrimination union == tagged union == algebraic data type 2012-10-13T15:33:49 c++ or D doesnt have generic functions 2012-10-13T15:33:54 what do you mean? 2012-10-13T15:33:59 templates are more generic than type classes 2012-10-13T15:34:03 they're a superset 2012-10-13T15:34:03 mcstar: uh.... 2012-10-13T15:34:09 that's why template haskell exists 2012-10-13T15:34:17 *** Garf has joined #aichallenge 2012-10-13T15:34:28 a generic function is a function that dispatches on any number of its argument 2012-10-13T15:34:38 you can emulate it, yes, but it is not in the language 2012-10-13T15:34:40 mcstar: ? so variadic templates 2012-10-13T15:34:45 and that makes it awkward 2012-10-13T15:34:47 not really sure what you mean 2012-10-13T15:34:55 thestinger: look up it then 2012-10-13T15:35:01 it up* 2012-10-13T15:35:11 I know what the definition of generic function is that I'll get on wikipedia 2012-10-13T15:35:16 yes, I use variadic templates 2012-10-13T15:35:17 and C++ and D definitely do have generic functions 2012-10-13T15:35:41 last time i checked they didnt 2012-10-13T15:35:43 templates are part of the language, they are aware of types and can implement type-safe parametric polymorphism 2012-10-13T15:36:00 type classes are a subset of templates that are *easier to use and read* and give saner errors 2012-10-13T15:36:02 but can't express as much 2012-10-13T15:36:10 because the type classes are explicit 2012-10-13T15:36:15 they aren't generics, in a way that they exist only once. 2012-10-13T15:36:25 but they can do the job :) 2012-10-13T15:37:01 thestinger: thx, so I have the best language for the job already 2012-10-13T15:37:05 yeah, lets abuse the definition of generic functions 2012-10-13T15:37:12 it's not an abuse 2012-10-13T15:37:31 templates are part of the language 2012-10-13T15:37:34 they are not a preprocessor 2012-10-13T15:37:47 they are type-safe, and can implement the same stuff as type classes 2012-10-13T15:37:48 you are abusing function overloading too 2012-10-13T15:38:00 function overloading is unrelated to this topic 2012-10-13T15:38:08 it is not 2012-10-13T15:38:12 that's a different type of polymorphism than templates 2012-10-13T15:38:21 you are defining functions with different types but with the same name 2012-10-13T15:38:37 that's not what templates do 2012-10-13T15:38:57 semanticall, yes 2012-10-13T15:39:11 y 2012-10-13T15:39:28 ? 2012-10-13T15:39:38 My templates never change their name 2012-10-13T15:40:07 mcstar: semantically, templates are not code generation - that's one way you can implement them 2012-10-13T15:40:11 I just call "intersect(myrow, myblock)" and it returns whatever the combined type is 2012-10-13T15:41:22 templates are a way of generalization over type, and and specialization of those 2012-10-13T15:41:37 mcstar: you don't have to specialize templates 2012-10-13T15:41:43 if c++ didnt support function overloading, templates wouldnt be that interesting 2012-10-13T15:41:49 you can 2012-10-13T15:41:52 yes, you can 2012-10-13T15:41:58 i didnt say you have to 2012-10-13T15:42:04 there an 'and' 2012-10-13T15:42:24 thats an enumeration in natural languages 2012-10-13T15:42:33 function overloading is only really relevant to variadic templates that have to be recursive afaict 2012-10-13T15:42:53 otherwise it's just combining two features 2012-10-13T15:43:32 ok, stop! I have a specific question. 2012-10-13T15:44:01 Is there a language that would be able to identify "intersect" as a call where the order of arguments doesn't matter ? 2012-10-13T15:44:26 why does the order matter? 2012-10-13T15:44:31 so I can declare it like intersect (row, column) and call it as intersect(mycol, myrow) ? 2012-10-13T15:45:13 why? 2012-10-13T15:45:20 (defgeneric gf ((r row) (c col)) ..stuff..) (defgeneric gf ((c col) (r row)) (gf r c) 2012-10-13T15:45:23 like that? 2012-10-13T15:45:38 more generic 2012-10-13T15:45:54 like what? 2012-10-13T15:45:56 but yeah that's close 2012-10-13T15:46:01 Either Row Col, or variant 2012-10-13T15:46:11 you can do that in D 2012-10-13T15:46:26 is the class already made? that's something I dunno 2012-10-13T15:46:38 Variant ? seriously ? how am I supposed to write the fastest Sudoku solver with that? 2012-10-13T15:46:46 why would speed be related? 2012-10-13T15:46:50 variant is stack based 2012-10-13T15:47:00 and fully statically typed 2012-10-13T15:47:05 no OOP or dynamic casts or anything 2012-10-13T15:47:09 oh 2012-10-13T15:47:16 it's an algebraic data type 2012-10-13T15:48:13 well I'm calling that function with a host of types: row, column, block, cell, row-wise-sector, column-wise-sector, free-form-region 2012-10-13T15:48:47 and I only want to define one direction and the type system to swap the arguments if necessary 2012-10-13T15:49:10 if you have a variant, that can hold either Row or Col, and you call some function on it, it will be decided at runtime, what function to actually call, wont it? 2012-10-13T15:49:37 mcstar: sort of, it uses a static, type checked visitor 2012-10-13T15:49:40 no, variant is a ... variant 2012-10-13T15:49:44 similar to how you would get something out of Maybe or Either 2012-10-13T15:50:04 thats pattern matching 2012-10-13T15:50:12 it is done at runtime 2012-10-13T15:50:28 yes, but the function addresses aren't dynamically dispatched 2012-10-13T15:50:31 it's static 2012-10-13T15:50:32 I need a language that is able to express math, period :p 2012-10-13T15:50:42 takeOnlyLeft (Left a) = Just a; takeOnlyLeft _ = Nohthing 2012-10-13T15:50:53 dynamic dispatch sounds nice, if that allows argument swapping :) 2012-10-13T15:51:05 dynamic dispatch has cost 2012-10-13T15:51:06 mcstar: it's implemented without virtual function calls or dynamic dispatch in C++, that's what I mean by static 2012-10-13T15:51:18 it does a switch over the typeid 2012-10-13T15:51:39 thestinger: thats the same thing 2012-10-13T15:51:50 and dispatches to a statically known function address 2012-10-13T15:51:52 no vtable 2012-10-13T15:51:56 lol 2012-10-13T15:52:09 yeah, its like a little vtable 2012-10-13T15:52:14 doesnt matter what you call it 2012-10-13T15:52:25 it is a switch/type-cond/patter match/whatever 2012-10-13T15:53:13 mcstar: there aren't pointers to functions, branch prediction works on it 2012-10-13T15:53:19 it's unlike a vtable 2012-10-13T15:53:30 ok, a vtable is more generic 2012-10-13T15:53:36 but it is still a runtime thingy 2012-10-13T15:53:42 the CPU will predict (correctly) which way it will go, and it has no actual overhead 2012-10-13T15:54:10 why would it predict correctly all the time? 2012-10-13T15:54:33 sometimes it will be correct, other times it wont 2012-10-13T15:54:39 I'd have to write some metaprogramming stuff to define my algebra. :-/ "intersection" is a function where the order and count of arguments doesn't matter. generate a 2 pages template to work with it 2012-10-13T15:54:52 mcstar: branch prediction isn't probabilistic 2012-10-13T15:55:06 but you dont know the input! 2012-10-13T15:55:35 yes, I do know the input at the call size 2012-10-13T15:55:37 *site 2012-10-13T15:55:43 mleise: not you 2012-10-13T16:09:18 variants are not free in all cases. branch prediction is pretty good, but not magic 2012-10-13T16:12:41 callgrind seems to think it should be magic 2012-10-13T16:19:32 *** coeus_ has joined #aichallenge 2012-10-13T16:20:08 *** thestinger has quit IRC (Quit: walking dog) 2012-10-13T16:22:56 *** coeus has quit IRC (Ping timeout: 260 seconds) 2012-10-13T16:27:26 *** ecidforiap has quit IRC (Quit: In girum imus nocte et consumimur igni.) 2012-10-13T17:02:58 *** Areks|2 has joined #aichallenge 2012-10-13T17:05:44 *** Areks has quit IRC (Ping timeout: 272 seconds) 2012-10-13T17:09:28 *** coeus has joined #aichallenge 2012-10-13T17:11:26 *** coeus_ has quit IRC (Ping timeout: 260 seconds) 2012-10-13T17:16:58 *** coeus_ has joined #aichallenge 2012-10-13T17:20:18 *** coeus has quit IRC (Ping timeout: 272 seconds) 2012-10-13T17:35:17 *** Garf has quit IRC (Read error: Connection reset by peer) 2012-10-13T18:01:17 mcstar: ok, so I wrote a template that generates the "dynamic dispatch" for me. I list the operations as functions taking 2 arguments 2012-10-13T18:01:50 ok 2012-10-13T18:01:56 the template handles braking down multiple arguments, and reversing the argument order for commutative functions 2012-10-13T18:03:08 jesus 2012-10-13T18:03:17 must have been fun 2012-10-13T18:03:43 yes 2012-10-13T18:04:46 alias Binary!(OperationMode.commutative, 2012-10-13T18:04:47 function(Row row, Column column) { return cast(Cell) (9 * row + column); }, 2012-10-13T18:04:47 function(Block block, Cell cell) { assert(cell.blockOf == block, "cell must be within block for union"); return cell; } 2012-10-13T18:04:47 ) intersect; 2012-10-13T18:05:36 It'll be much easier to read than the previous template spaghetti 2012-10-13T18:07:23 *** coeus_ has quit IRC (Ping timeout: 255 seconds) 2012-10-13T18:07:48 *** thestinger has joined #aichallenge 2012-10-13T18:19:12 *** coeus_ has joined #aichallenge 2012-10-13T19:10:03 *** coeus has joined #aichallenge 2012-10-13T19:12:15 *** coeus_ has quit IRC (Ping timeout: 246 seconds) 2012-10-13T19:13:20 *** sigh has joined #aichallenge 2012-10-13T19:24:21 *** coeus has quit IRC (Ping timeout: 246 seconds) 2012-10-13T19:28:37 *** sigh has quit IRC (Ping timeout: 260 seconds) 2012-10-13T19:33:41 *** Scooper has quit IRC (Quit: Leaving) 2012-10-13T19:36:49 *** coeus has joined #aichallenge 2012-10-13T19:37:51 *** sigh has joined #aichallenge 2012-10-13T19:57:36 *** mcstar has quit IRC (Ping timeout: 260 seconds) 2012-10-13T20:45:13 *** coeus_ has joined #aichallenge 2012-10-13T20:47:59 *** coeus has quit IRC (Ping timeout: 252 seconds) 2012-10-13T21:36:26 *** coeus has joined #aichallenge 2012-10-13T21:38:35 *** coeus_ has quit IRC (Ping timeout: 276 seconds) 2012-10-13T21:39:43 *** foRei has quit IRC (Quit: Bye) 2012-10-13T22:07:31 *** mleise has quit IRC (Quit: Leaving.) 2012-10-13T22:19:13 *** antimatroidl has quit IRC (Quit: Leaving.) 2012-10-13T22:28:14 *** antimatroidl has joined #aichallenge 2012-10-13T22:48:50 *** thestinger has quit IRC (Quit: WeeChat 0.3.9) 2012-10-13T22:48:53 *** coeus_ has joined #aichallenge 2012-10-13T22:53:20 *** coeus has quit IRC (Ping timeout: 276 seconds) 2012-10-13T22:58:41 *** coeus_ has quit IRC (Ping timeout: 260 seconds)