Skip to main content
11 events
when toggle format what by license comment
May 1, 2019 at 9:48 vote accept Qqwy
Jun 16, 2016 at 2:36 comment added Benjamin Hodgson @phg Zippers actually aren't that good at representing multi-dimensional data structures; badcook's answer to an earlier question of mine gives an explanation of the weak spots. The other answers on that question, and the question it duplicates, are rather fascinating too!
Jun 15, 2016 at 23:05 answer added Karl Bielefeldt timeline score: 7
Jun 15, 2016 at 22:38 comment added coredump See also stackoverflow.com/q/9611904/124319
Jun 15, 2016 at 22:15 answer added Kasey Speakman timeline score: 4
Jun 15, 2016 at 21:42 comment added Robert Harvey You have an 8x8 board in chess. In a memory-mapped language like C, you can make a mathematical calculation to get the exact address of a cell, but that's not true in memory-managed languages (where ordinal addressing is an implementation detail). It wouldn't surprise me if jumping across (a maximum of) 14 nodes takes roughly the same amount of time as addressing an array element in a memory-managed language.
Jun 15, 2016 at 21:36 history tweeted twitter.com/StackProgrammer/status/743195620790439936
Jun 15, 2016 at 21:33 comment added Qqwy @RobertHarvey It will vary. But to give an example: In Chess, we have a 64x64 board, but all computations to check for what moves are possible, and to determine the current position's heuristic value (difference in material, king in check or not, passed pawns, etc) all need to access squares of the board.
Jun 15, 2016 at 21:09 comment added Robert Harvey How big is this playing board? Big O characterizes how an algorithm scales, not how fast it is. On a small board (say, less than 100 in each direction), O(1) vs. O(n) is unlikely to matter much, if you only touch each square once.
Jun 15, 2016 at 20:44 comment added phipsgabler I can't speak about praxis, but two things come to my mind from Haskell: zippers, allowing constant-time "steps" over data structures, and comonads, which are related to zippers by some theory which I neither remember nor properly understand ;)
Jun 15, 2016 at 20:26 history asked Qqwy CC BY-SA 3.0