code logs -> 2018 -> Sat, 10 Nov 2018< code.20181109.log - code.20181111.log >
--- Log opened Sat Nov 10 00:00:09 2018
00:36 Kindamoody|afk is now known as Kindamoody
01:04
<&McMartin>
Welp
01:05
<&McMartin>
My one-line PR I sent to another project has just kicked off a major refactoring task for them -_-
01:05
<&McMartin>
It crashed some of their systems, and they found out why and it was because they did a bunch of things wrong and need to fix that in ways that should make my fix unnecessary
01:25
<@celmin|away>
XD What
01:25
<@celmin|away>
Did the PR itself get rejected then?
01:26
<&McMartin>
We'll see how the solution is sorted out
01:26
<&McMartin>
It's still the skeleton for a fix of a different problem that they can no longer replicate, but which I can, so we'll see how this goes once they sort the rest out
01:29 celmin|away is now known as celticminstrel
01:39 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
01:39 mode/#code [+qo Vornicus Vornicus] by ChanServ
02:10 Degi_ [Degi@Nightstar-8g9456.dyn.telefonica.de] has joined #code
02:13 Degi [Degi@Nightstar-pvrt7b.dyn.telefonica.de] has quit [Ping timeout: 121 seconds]
02:45 Degi_ [Degi@Nightstar-8g9456.dyn.telefonica.de] has quit [Connection closed]
02:56 Kindamoody is now known as Kindamoody[zZz]
03:01
<&ToxicFrog>
Note to future ToxicFrog: (assoc m k nil) and (dissoc m k) are not eqv
03:25 macdjord|wurk is now known as macdjord
03:27
<&Reiver>
...
05:12 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
05:14 Derakon is now known as Derakon[AFK]
05:21 celticminstrel is now known as celmin|sleep
06:07 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
06:07 mode/#code [+qo Vornicus Vornicus] by ChanServ
06:34 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [[NS] Quit: Leaving]
09:15
< simon_>
I'm trying to build a programming exercise that involves constructing game trees, and I realize I don't know how to properly encode the game.
09:15
< simon_>
I did this once some years ago for the Nim game, but it has a really simple state being a number of sticks on a table, so an int.
09:15
< simon_>
I thought I'd do it for Tic-tac-toe this time
09:18
< simon_>
so the game state is an array of nine 'X'/'O'/' '.
09:18
<&McMartin>
Sounds good
09:18
< simon_>
I could forget about the symmetries at first...
09:19
<&McMartin>
Yes
09:19
<&McMartin>
If only because one of the things that wants to consume your game state is a renderer
09:20
< simon_>
I guess this is what makes me insecure. I can make a much smaller game tree with symmetries in mind, but since this is an exercise for a programming site, starting out with a super mathy way to represent nine squares ("because really, this group is isomorphic to ..."), that's probably not good anyways.
09:28
<~Vorntastic>
I did a tic tac toe thing that actually cared about symmetry and shit, but I did it by pretending it was asymmetric and then eliminating clone states
09:42 macdjord is now known as macdjord|slep
09:43 Kindamoody[zZz] is now known as Kindamoody
11:03
< simon_>
I have an idea for not having to eliminate symmetries
11:04
< simon_>
imagine you're playing tic-tac-toe next to a mirror, and every time you place an X, you place an X in the mirror, and that was your mental model. so eliminating that symmetry would be removing the mirror, and you suddenly have a game state half the size.
11:04
< simon_>
except eliminating the symmetries in the game are a little harder
11:05
< simon_>
so the first move is either "corner", "side" or "middle". there are only three squares on the board in the first round. but the number of squares grow with each round.
11:07 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
11:49
<~Vorntastic>
Yeah, no, there's symmetry breaking moves. You'll live
11:55
<~Vorntastic>
It gets crazy - you can pick a canonical orientation for each distinct layout but some moves from canonical orientations must provide different orientations for the same layout
11:59 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
11:59 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
12:33 celmin|sleep is now known as celmin|away
13:34 Degi [Degi@Nightstar-8g9456.dyn.telefonica.de] has joined #code
14:56 Degi [Degi@Nightstar-8g9456.dyn.telefonica.de] has quit [Connection closed]
16:19 macdjord|slep is now known as macdjord|fude
17:44 macdjord|fude is now known as macdjord
20:03
< ErikMesoy>
A curse upon whatever dev apparently went "processing power is free, aesthetics is the most important part of usability amirite"
20:03
<&McMartin>
The latter predates the former and goes back to 1984.
20:03
< ErikMesoy>
This program has full-screen menus with giant glow-animated buttons that max out the CPU and freeze the computer for 2-5 seconds when you click an option, as the old submenu majestically fades out and the new submenu majestically slides in like this is a powerpoint presentation by a fifth grader who just discovered transitions
20:05
<&McMartin>
And in 1984 you stopped everything you were doing because the BIOS noticed you'd clicked the mouse on your Macintosh :)
20:09
<~Vornicus>
argh. I hate this code. I need to get it to the point where I stop hating it.
20:11
<~Vornicus>
Part of this is figuring out how to test it. Part of this is figuring out where the hell it is *still* going wrong
20:15
<~Vornicus>
Part of it is, frankly, I hate both the array-based and link-based versions of the structure - both are hard to deal with in different and entertaining ways
20:56
<&McMartin>
oh ho ho villainy
20:56
<&McMartin>
This is precisely the feature of the design question I most often ask in interviews
21:08
<~Vornicus>
So it goes like -- okay if I use the linked version all the traversal semantics are sane to look at in code - the dual graph refers to edge.twin.next, for instance, and it's literally that. But if I'm working in that then 1. I have to do a lot of work in the destructor (because all the links are double, refcounting won't save you), and 2. when I need to consume the whole graph I need to actually perform search operations, as opposed to
21:08
<~Vornicus>
just iterating an array and being done. Dualing is also terrible because I need to do everything in two steps: the first step creates the all the nodes in the new connections graph, the second actually creates the connections. You cna't do that in one pass because the references need to exist before you can assign them.
21:09
<~Vornicus>
Using arrays instead is nicer because there's no references, just indexes, and you can traverse the array like, well, an array, and so forth
21:15
<~Vornicus>
but you go from edge.next.twin to mesh.edges[mesh.edges[edge.next].twin] and come *on*. THough I suppose since they're now indexes I can just pretend the indexes into the original array are also indexes into the dual array, which I couldn't before, so instead of going edge.prev = edge.dual.next.twin.dual (where edge is a member of the dual array) I can now go edge.prev = orig_mesh.edges[orig_mesh.edges[edge.next].twin] which is slightly
21:15
<~Vornicus>
less circuitous.
21:16
<~Vornicus>
rather, slightly less circuitous than ... whatever that'd turn out to be if I were to actually need to index in for duals
21:17
<~Vornicus>
oh, right, it's actually edge.prev = orig_mesh.edges[orig_mesh.edges[orig_mesh.edges[edge.index].next].twin]
21:34
<&McMartin>
Heh
21:34
<&McMartin>
If it were me, I'd do that and hide it behind a function call
21:34
<&McMartin>
(What is the problem?)
21:35
<&McMartin>
(That the library is to solve)
21:35
<~Vornicus>
Well, the library is Vornonoi
21:37
<&McMartin>
Ah. So I guess my question was instead "what is the problem within Vornonoi"
21:38
<~Vornicus>
This particular function generates the dual; it's being ...problematic - I have several functions that as far as I can tell the only way to test them is to reiterate what I said in the function - they're literally functions that manipulate a data structure in a specific way, by adding several entries and modifying several others
21:38
<~Vornicus>
Using array might alleviate that a *little* but not terribly much
21:41
<~Vornicus>
But I've got an integrity problem: Upon completing the dual structure I apparently have some entries where edge.next is nil, and I don't know why. And it happens semi-intermittently - generating 100 random points to build the voronoi diagram on works for random seeds 0 through 27 but fails on 28.
21:41
<~Vornicus>
I haven't been able to figure out exactly where it goes wrong either.
21:41
<&McMartin>
Oof
21:52 Derakon[AFK] is now known as Derakon
22:24 * McMartin - having got a program he now knows works - now goes to create a new history for that program so that its design decisions can be presented in a sane order
22:24
<&McMartin>
Literate Programming By Way Of History Rewriting
22:52 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Connection closed]
23:39 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
--- Log closed Sun Nov 11 00:00:10 2018
code logs -> 2018 -> Sat, 10 Nov 2018< code.20181109.log - code.20181111.log >

[ Latest log file ]