--- Log opened Mon Jul 02 00:00:31 2018 |
00:20 | <@Alek> | Gotta propitiate those spirits. |
00:32 | | himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [The TLS connection was non-properly terminated.] |
00:34 | <@Reiv> | Well, that's a bit of a shitshow: https://nakedsecurity.sophos.com/2018/06/29/linux-distro-hacked-on-github-all-code-considered-compromised/ |
00:36 | <&[R]> | Is that the Gentoo one? |
00:37 | <&[R]> | Yup |
00:37 | <&[R]> | Github was only a mirror for them |
00:37 | <&[R]> | And ONLY github was compromized |
00:42 | <@Reiv> | It is, nonetheless, rather important that folks using gentoo check their sources |
01:30 | | Kindamoody is now known as Kindamoody[zZz] |
02:08 | | Vornicus [Vorn@Nightstar-sjaki9.res.rr.com] has joined #code |
02:08 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
02:50 | | himi [sjjf@Nightstar-1drtbs.anu.edu.au] has joined #code |
02:50 | | mode/#code [+o himi] by ChanServ |
03:02 | | McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has quit [Ping timeout: 121 seconds] |
03:06 | | McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has joined #code |
03:07 | | mode/#code [+ao McMartin McMartin] by ChanServ |
03:09 | | Degi_ is now known as Degi |
03:18 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client] |
03:46 | | Degi [Degi@Nightstar-sk7u76.dyn.telefonica.de] has quit [Connection closed] |
04:38 | | celticminstrel [celticminst@Nightstar-5onml2.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
04:41 | | celticminstrel [celticminst@Nightstar-5onml2.dsl.bell.ca] has joined #code |
04:41 | | mode/#code [+o celticminstrel] by ChanServ |
05:12 | | himi [sjjf@Nightstar-1drtbs.anu.edu.au] has quit [Ping timeout: 121 seconds] |
05:25 | | Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has joined #code |
05:39 | | Derakon is now known as Derakon[AFK] |
05:40 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code |
05:40 | | mode/#code [+o Reiv] by ChanServ |
06:38 | <~Vornicus> | Ok. I have the delaunay triangulation. i now need to find the corresponding voronoi diagram, which I have to cut off at the borders of my region |
06:46 | <~Vornicus> | Each triangle in the triangulation is replaced by its centroid; the edges swap from the triangle points to the corresponding center points. |
06:46 | <~Vornicus> | er, not centroid, circumcenter |
06:49 | <~Vornicus> | -- this leaves the degenerate triangles: those with infinite points as corners. These don't have finite circumcenters; they do, however, create "points" of polygons, and we have to cut those off. |
06:53 | <&[R]> | Hmm, 160$+40$ shipping from Amazon.com. Is amazon.ca cheaper? 1300$ and up for it alone. Welp. |
06:55 | <~Vornicus> | Of course - I will also have to cut off *other* things, where the circumcenter ends up outside of my borders |
06:56 | <&[R]> | What's all this triangles and hull nonsense going to be anyways? |
06:56 | <~Vornicus> | procgen madness |
06:58 | <~Vornicus> | but I've claimed a workshop and demanded pig tail seeds so I'd better fucking finish this. |
08:13 | | gnolam [lenin@Nightstar-ego6cb.cust.bahnhof.se] has joined #code |
08:13 | | mode/#code [+o gnolam] by ChanServ |
09:32 | <@TheWatcher> | Vornicus: wat |
09:32 | <@TheWatcher> | Pig tail seeds? O.o |
09:33 | | Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity] |
09:52 | <~Vornicus> | it's a dwarf fortress reference |
09:53 | <@TheWatcher> | Oh, right |
09:53 | | * TheWatcher hasn't ever played DF, heathen that he is. |
09:55 | | Kindamoody[zZz] is now known as Kindamoody |
09:55 | <~Vornicus> | I played all of once |
09:55 | <~Vornicus> | I did not get so far as to have Fun |
09:55 | <@TheWatcher> | I was unaware that was an option in DF~ |
09:56 | <~Vornicus> | http://dwarffortresswiki.org/images/4/40/FunComic.png |
10:38 | | himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code |
10:38 | | mode/#code [+o himi] by ChanServ |
10:40 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code |
11:43 | | Degi [Degi@Nightstar-sk7u76.dyn.telefonica.de] has joined #code |
12:01 | | celticminstrel [celticminst@Nightstar-5onml2.dsl.bell.ca] has quit [Ping timeout: 121 seconds] |
12:05 | | Kindamoody is now known as Kindamoody|afk |
13:02 | <~Vornicus> | ugh a bug |
13:13 | <~Vornicus> | Bug: corners that have two Distant Points attached sometimes don't correctly... uh... convexify. |
13:15 | <@TheWatcher> | How convexing~ |
13:17 | <~Vornicus> | Approximately it works like this: there are several triangles on the outside and all of them own some portion of the infinite outside plane. Most such triangles are infinite in one dimension, but there are three that are infinite in two dimensions because it has two Distant Points attached. If I place points in an order that makes the convex hull "lose" the finite corner of a 2-d infinite triangle, but the points added do not fall inside that |
13:17 | <~Vornicus> | triangle, it doesn't remove the point from the 'convex hull' and so it remains. |
13:45 | <~Vornicus> | So... ugh. Okay. This is geometrically correct: I'm acting like the distant points are fixed points on the Line At Infinity and that means I'm getting this result. |
13:47 | <~Vornicus> | The reason the place I got this from *didn't* have this problem is that it uses two distant points that are opposite each other: once you get started, points in one-infinite triangles can't see the one-infinite triangles for the other distant point, and can't see the points/edges associated with same. |
13:50 | <~Vornicus> | But it has its own limitations: In that, I must start with one of the points, and that point has to be special, in that I must know it's on the convex hull of the final point set |
13:51 | <~Vornicus> | Which isn't an acceptable limitation to me: there are no points in my existing point set that are on the convex hull for the final point set because, after all this, there is no such thing. |
14:00 | <~Vornicus> | -- okay get this. I pick a point. It doesn't have to be a hull point. But I make two triangles here and use *both* as potential root triangles, instead of just one. This beats the bug for the reasons listed above. |
14:05 | <~Vornicus> | THanks, #code , you've been a great help |
14:07 | <~Vornicus> | oh, duh. the way the circumcircle works in projective space is that the circumcenter of an infinite circle is in fact on the line at infinity, which very neatly solves my problem anyway~ |
14:08 | | macdjord [macdjord@Nightstar-grpbnp.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
14:33 | <~Vornicus> | So, upshot: the initial condition on this is a two-point triangle that contains the universe; adding a point to the triangulation at this point creates two triangles. |
14:36 | <@TheWatcher> | Alas for the fact that "The initial condition on this is a two-point triangle that contains the universe" can't fit in the topic~ |
14:41 | <~Vornicus> | that's okay, the topic fits in it |
14:59 | | celticminstrel [celticminst@Nightstar-5onml2.dsl.bell.ca] has joined #code |
14:59 | | mode/#code [+o celticminstrel] by ChanServ |
15:41 | | macdjord [macdjord@Nightstar-grpbnp.mc.videotron.ca] has joined #code |
15:41 | | mode/#code [+o macdjord] by ChanServ |
16:26 | | macdjord [macdjord@Nightstar-grpbnp.mc.videotron.ca] has quit [[NS] Quit: Pie Jesu Domine (*thunk*), Donna Eis Requiem (*thunk*).] |
16:45 | | Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has joined #code |
16:56 | | macdjord [macdjord@Nightstar-grpbnp.mc.videotron.ca] has joined #code |
16:56 | | mode/#code [+o macdjord] by ChanServ |
17:56 | <@gnolam> | https://twitter.com/mikko/status/1013786939667951617 |
18:46 | | Kindamoody|afk is now known as Kindamoody |
19:13 | <@abudhabi> | McMartin: Is UQM HD any good? |
19:16 | <&McMartin> | I'm not associated with it. The artwork from it I saw didn't look terrible, but the engine has a logical worldspace of 320x240 pixels and I consistently heard tales of that going sideways in weird ways |
19:21 | <@celticminstrel> | I think most of the art is good but there are a few I don't like as much as the original. |
19:21 | <@celticminstrel> | IIRC Hayes was one of them. |
19:48 | | * Vornicus refactor refactor refactors good lord this code was much more terrible |
19:49 | <&jeroud> | I really wish it were possible to refactor my way out of terribleness in the code I'm currently writing for work. |
19:50 | <&jeroud> | Alas, golang. |
20:05 | | Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity] |
20:36 | <~Vornicus> | I find myself quite grumpy about the lack of iterator-ize-able iteration in lua. TF says you *can* do this somehow but I simply do not see it |
20:57 | <&jeroud> | On the other hand, generics in golang. |
21:25 | <&ToxicFrog> | Vornicus: if you're more specific about what you need, I may be able to help more? |
21:31 | <&ToxicFrog> | The `coroutine.wrap` stuff I mentioned last time I explained pretty clearly here: https://www.lua.org/pil/9.3.html |
21:31 | <~Vornicus> | like, okay: I have a triangle; the triangle is defined by corners, which themselves are merely indexes into a list of corners. In order to calculate the circumcircle (or later, the centroid of a larger polygon, so a threefer isn't going to do it) I need to take them by cyclic pairs: ab bc ca, or in larger cases ab bc cd de ef fa (or even longer). So, in Python I'd do this with something like: for a, b in cyclic_pairs(map(self.vertices.__index__ |
21:31 | <~Vornicus> | , my_tri.vertices)): |
21:31 | <&ToxicFrog> | Basically, use coroutine.yield() where you'd use yield in python and explicitly wrap it in coroutine.wrap because it won't be auto-converted to a coroutine like in python |
21:32 | <&ToxicFrog> | And the problem is writing cyclic_pairs()? |
21:33 | <~Vornicus> | the problem is that, as far as I can tell, I can write cyclic_pairs() as accepting a table, or as accepting a *thing that becomes an iterator when called* -- so I'd have to essentially hand-curry every thing I want to be able to do this way and... |
21:33 | <&ToxicFrog> | So wait |
21:34 | <&ToxicFrog> | Your actual objection here is that tables are not implicitly coerceable to iterators? |
21:34 | <~Vornicus> | So I have different calling conventions for an iterable I'm passing to another iterator vs an iterable I'm using directly |
21:34 | <~Vornicus> | vs a table |
21:34 | <~Vornicus> | There are *three* calling conventions. |
21:35 | <&ToxicFrog> | The convention is generally that you pass tables around and create iterators at the point of use. |
21:35 | <&ToxicFrog> | So if I were doing this, I'd have map() return table and cyclic_pairs() take a table and return an iterator. |
21:36 | <&ToxicFrog> | If the table is large enough that performance is a concern, I might fold the map into cyclic_pairs so you can just call cyclic_pairs(my_tri.vertices), or I might write a lazy_map that returns {} with a special __pairs or __index on it, but probably the former. |
21:40 | <&ToxicFrog> | Something like this: http://ix.io/1fMp |
21:41 | | * iospace sets ToxicFrog on fire |
21:41 | <&ToxicFrog> | augh |
21:41 | | * ToxicFrog dies |
21:44 | <&ToxicFrog> | Vornicus: that said, fundamentally there is no difference between an iterator and any other function, so if you want to create and pass iterators around there's nothing stopping you. |
21:57 | <~Vornicus> | The difficulty isn't so much... how do I put this |
21:58 | <~Vornicus> | When I go for k in ipairs(thingy) do, ipairs returns three things |
21:58 | <~Vornicus> | And accepts one |
21:58 | <~Vornicus> | So if I make a thing that's designed to go in the place of ipairs, it has to return... three things |
22:08 | <~Vornicus> | But the thing is, if I expect to be able to pass ipairs to map, well, I'm in trouble: map would have to take a curried 0-arity callable or something if I don't want to have to generate the table for it before it hits map |
22:26 | <&ToxicFrog> | It doesn't have to return three things. |
22:27 | <&ToxicFrog> | All an iterator needs is a function that can be called repeatedly to return successive values. |
22:27 | <&ToxicFrog> | The extra values are a convenience for iterator implementors; they are not mandatory. |
22:32 | <&ToxicFrog> | Like, this means that pairs() can be implemented as: function pairs(t) return next,t,nil end, |
22:32 | <&ToxicFrog> | But you could also implement it as: |
22:33 | <&ToxicFrog> | function pairs(t) return coroutine.wrap(function() local k,v; repeat k,v = next(t,k); coroutine.yield(k,v); until k == nil; end) end |
22:33 | <&ToxicFrog> | In which case it returns only a single value, the for loop infers the invariant and the index as nil, the invariant remains nil and the index is ignored. |
22:35 | <&ToxicFrog> | So, yeah. Anything you can do with the three-value form you can also do with a single function with the others baked into it using either upvalues or coroutine state. |
23:35 | | Degi [Degi@Nightstar-sk7u76.dyn.telefonica.de] has quit [Connection closed] |
23:59 | | Vornicus [Vorn@Nightstar-sjaki9.res.rr.com] has quit [Ping timeout: 121 seconds] |
--- Log closed Tue Jul 03 00:00:32 2018 |