--- Log opened Tue Jul 09 00:00:21 2019 |
01:00 | <&ToxicFrog> | Spiralizing a matrix is one of those problems that seems like it should be trivial but I'm having a lot of trouble coming up with a simple solution to it. |
01:02 | <@Reiv> | Trivial? I don't even understand the question~ |
01:04 | <&ToxicFrog> | Reiv: given an NxM matrix, return the elements of it in an inward spiral starting at the upper left |
01:04 | <&ToxicFrog> | E.g. given: |
01:04 | <&ToxicFrog> | [[1 2 3] |
01:04 | <&ToxicFrog> | [4 5 6] |
01:04 | <&ToxicFrog> | [7 8 9]] |
01:04 | <&ToxicFrog> | Return [1 2 3 6 9 8 7 4 5] |
01:05 | <@Reiv> | oh dear |
01:05 | <@Reiv> | I can see how it could be looped if the matrix was an array, but it is still a pain |
01:06 | <&ToxicFrog> | Oh wait, I have mutable data structures |
01:06 | <&ToxicFrog> | This is going to be gross, but easy |
01:54 | <&ToxicFrog> | There we go. I now have more than 50% CCT coverage. |
01:54 | <&ToxicFrog> | And with the singularity API unlocked, I'm starting to automate more things. |
01:54 | <&ToxicFrog> | It is time for the meat to surrender to the machine. |
02:58 | <@Reiv> | ... singularity API? |
03:11 | | Yossarian [yoss@Nightstar-d7h8ki.org] has joined #code |
03:14 | | catalyst [Jessikat@Nightstar-5dv16h.cable.virginm.net] has quit [[NS] Quit: Leaving] |
03:16 | <&ToxicFrog> | Reiv: the API that lets you write software to control your in-game character's actions, e.g. to join/work for a corp or faction, buy/install augmentations, etc |
03:18 | <@Reiv> | goodness |
03:18 | <@Reiv> | So this is an API in-game or for the game? |
03:23 | <&ToxicFrog> | In-game |
03:23 | <&ToxicFrog> | The whole game is about writing programs to automate stuff |
03:23 | <&ToxicFrog> | Completing different bitnodes (challenge modes, basically) unlocks new game mechanics and APIs |
03:45 | <@Reiv> | huh, neat |
03:45 | <@Reiv> | So how many mechanics have you now that you didn't have at the start? |
03:45 | <@Reiv> | I mean, I appreciate you went from 'hacking' to 'running corporations' and now apparently 'piloting meatware' |
03:46 | <@Reiv> | Did the APIs allow new, uh, technological capabilities? |
03:47 | < Yossarian> | <&ToxicFrog> The whole game is about writing programs to automate stuff |
03:48 | < Yossarian> | Which game is this? Sounds interesting. I have had similiar idea with Kerbal Space Program. |
03:51 | <&ToxicFrog> | Yossarian: Bitburner |
03:52 | <&ToxicFrog> | It's an online idle game with an in-game JS scripting API |
03:52 | <&ToxicFrog> | (which I have ported Lua to) |
03:52 | <&ToxicFrog> | Reiv: I haven't unlocked "running corporations" yet, I jumped straight from bitnode1 (the base game) to 4 (the singularity API) |
03:52 | <&ToxicFrog> | I don't know what you mean by "new technological capabilities" |
03:59 | <@Reiv> | More capable APIs or the like, mostly |
04:00 | < Yossarian> | Interesting. |
04:07 | <&ToxicFrog> | Reiv: well, as noted, there's the singularity API, and most new mechanics also come with an API to manage them |
04:07 | <&ToxicFrog> | e.g. unlocking the ability to join (and eventually run) criminal gangs also unlocks the gangs API, unlocking upgraded hacknet servers also unlocks an API for managing the new features, etc. |
04:10 | <&ToxicFrog> | There's a whole list of bitnodes and what they unlock in the documentation if you're really interested. |
04:24 | <@Reiv> | neat |
04:24 | <@Reiv> | This game sounds like it is laser-focused ToxicFrog Catnip~ |
04:47 | | celmin|away is now known as celticminstrel |
05:06 | | celticminstrel [celticminst@Nightstar-6an2qt.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
05:35 | | gnolam [quassel@Nightstar-csto10.cust.bahnhof.se] has joined #code |
05:35 | | mode/#code [+o gnolam] by ChanServ |
06:20 | | gnolam [quassel@Nightstar-csto10.cust.bahnhof.se] has quit [[NS] Quit: Gone] |
06:25 | | McMartin [mcmartin@Nightstar-ipm463.ca.comcast.net] has joined #code |
06:25 | | mode/#code [+ao McMartin McMartin] by ChanServ |
06:38 | | McMartin [mcmartin@Nightstar-ipm463.ca.comcast.net] has quit [[NS] Quit: kernel upgrade] |
06:40 | | McMartin [mcmartin@Nightstar-ipm463.ca.comcast.net] has joined #code |
06:41 | | mode/#code [+ao McMartin McMartin] by ChanServ |
07:49 | <&jerith> | One day I'll write a hacker game set in the dark dystopian future of 2019. |
07:49 | <&jerith> | Except by then it'll probably be the dark dystopian future of 2035 or something. |
07:51 | <&McMartin> | There's the Bitcoin-related satirical passive RPG |
07:53 | <&jerith> | The level I'm currently playing in ddf-2019 is "navigate the Byzantine labyrinth of github's graphql API to figure out which of my employer's repos need admin users added to them". |
07:59 | <&[R]> | Wasn't there a github thing linked a while back that specifically handled that? |
08:02 | <&jerith> | I linked a thing that groveled through the API for security alerts. |
08:04 | <&jerith> | This is an extension of that same thing so we can figure out which repos don't have admins who care about their security. |
08:04 | <&jerith> | Or rather, who are empowered to do anything about security issues. |
08:20 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
08:20 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
09:01 | | Kindamoody|afk is now known as Kindamoody |
09:45 | | Degi [Degi@Nightstar-aa9u9h.dyn.telefonica.de] has joined #code |
11:09 | <&ToxicFrog> | Reiv: it really is |
11:09 | | Degi [Degi@Nightstar-aa9u9h.dyn.telefonica.de] has quit [Operation timed out] |
12:01 | | You're now known as TheWatcher[d00m] |
12:23 | | * Vornicus fiddles with exapunks, discovers quite a number of not-terribly-obvious optimization techniques |
12:24 | < ErikMesoy> | is that the one with silly amounts of hack-the-everything even by hollywood standards? |
12:28 | <~Vornicus> | yes |
12:29 | <~Vornicus> | I have already done the following via hacking: ordered pizza delivery, removed peanuts from a peanut candy manufacturing process, faked paying an invoice, and restored function to my arm. |
12:29 | <&ToxicFrog> | o.O |
12:36 | <@abudhabi> | That sounds like some sort of Uplink remake. |
12:37 | <~Vornicus> | It is... not? |
12:37 | <~Vornicus> | like if you want an uplink remake you look at bitburner |
12:41 | | * Vornicus tries to figure out how jerith did this one |
12:45 | <~Vornicus> | like i'm at 4n + 11, and he's at ... 1n + 34? |
12:51 | <&ToxicFrog> | Yeah I think Exapunks is closer to TIS-100 or the like |
12:51 | <&ToxicFrog> | It's a programming puzzle game |
12:51 | <&ToxicFrog> | I wouldn't really call Bitburner an Uplink remake, although it has some aesthetic similarities |
12:58 | <~Vornicus> | 3n + 8 now, slightly better. there's another optimization technique |
13:09 | <~Vornicus> | aha, got you, that's 10 lines. |
13:14 | <~Vornicus> | 1n+34 must need other exas to do the operations and communicate with each other, though I can't see how to do that in less than 2 cycles anyway... oh god, I had a terrible thought |
13:34 | <~Vornicus> | yeah that's ... something all right. |
13:47 | <~Vornicus> | Okay that's pretty cool. |
13:48 | | celticminstrel [celticminst@Nightstar-6an2qt.dsl.bell.ca] has joined #code |
13:48 | | mode/#code [+o celticminstrel] by ChanServ |
13:59 | <~Vornicus> | ...oh no |
14:00 | | celticminstrel is now known as celmin|away |
14:03 | <~Vornicus> | oh that's too big. I've got a lot of noops involved though so that doesn't help! |
14:04 | | * Vornicus cuts out three there... |
14:07 | <@TheWatcher[d00m]> | I fucking hate Tomcat. |
14:07 | | You're now known as TheWatcher |
14:12 | | * Vornicus makes clones do the work. |
14:18 | <&[R]> | Is there an image viewer that makes going through a bunch of images and renaming them really simple? |
14:20 | <~Vornicus> | allegedly irfanview is the tool for that vague sort of thing but I don't know I always found it annoying |
14:24 | <@TheWatcher> | [R]: you mean, load image, let you enter a new name, load next image, etc? |
14:24 | <&[R]> | Yeah |
14:24 | | * Vornicus fiddles with the thing, determines that he's now at 5n/3 + something, which is neat and all, but.. |
14:25 | <&[R]> | Right now I'm using sxiv to view them, then just using mv to rename them, but it's a bitch |
14:26 | <~Vornicus> | on WIndows you can literally use Windows Explorer, it can give you image previews |
14:26 | <&[R]> | Not big enough |
14:26 | <&[R]> | I need a fairly sizable view of the image to know what image number it is |
14:27 | <@TheWatcher> | You'd think this'd be a commonly needed thing, but buggered if I can think of a viewer that makes that easy |
14:27 | <~Vornicus> | on win10: in the view section, turn on Preview Pane, and make that sucker wide |
14:28 | <&[R]> | Alright, I guess W10 VM bumped up a priority |
14:29 | <~Vornicus> | THen to do the task you press down to get to the next picture, f2 to begin rename, and enter to finish |
14:30 | <~Vornicus> | This should be possible as low as 7 and maybe even vista as well though the details of getting the preview pane may vary |
14:30 | <&[R]> | Still would need to VM those |
14:31 | <&[R]> | xzgv supposedly was going to get a rename feature, but the latest version doesn't have it enabled |
14:31 | <&[R]> | (Given there's menu entries for it that are greyed out) |
14:33 | <&jeroud> | Vornicus: Have you beaten any of my exapunks scores yet? |
14:33 | <~Vornicus> | jeroud: no! |
14:33 | <~Vornicus> | I'm working on, uh, TWN 4, which is *bonkers* to get fast |
14:34 | <&jeroud> | Excellent. |
14:34 | <&jeroud> | It has been long enough since I played that I recall very little. |
14:34 | <~Vornicus> | Trick as far as I can see it in this level is |
14:36 | <&jeroud> | But I *do* recall a few cases where my highly optimized solutions relied on unspecified properties of the level. |
14:37 | <&jeroud> | That caused early patches to break some of my solutions. |
14:46 | | * Vornicus is on the prowl, now, 145 |
14:49 | <~Vornicus> | think that'll do for now, though |
15:00 | <&jerith> | Ah, I see now. That one took a lot of patience and experimentation. |
15:01 | <~Vornicus> | anyway trick: fraqvat n zrffntr xrrcf na rkn ohfl sbe gjb plpyrf, fb bgure rknf V ybnq jvyy unir eryngvir cunfrf bs 2 plpyrf, fb gb trg gurz gb flap hc bar cre plpyr V unir gb unir gjb ybnqref, be unir gur ernqre qebc n pbhcyr ba gur sybbe naq fgneg fraqvat fbzrjung uvture ahzoref ng svefg. |
15:08 | <&jerith> | I see there are some levels where the code size restrictions have changed and my fast solutions are no longer valid. ;_; |
15:10 | | Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code |
15:11 | | Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds] |
15:13 | <~Vornicus> | aw |
15:14 | <&ToxicFrog> | [R]: for image in *; do feh -x -F --auto-zoom "$image"; printf '%s -> ' "$image"; read name; if [[ $name ]]; then mv "$image" "$name"; fi; done |
15:14 | <~Vornicus> | feh! |
15:15 | <&ToxicFrog> | Pops up a fullscreen view of each image; hit Q to dismiss it and then type in the new name. If you don't want to rename an image just hit enter. |
15:15 | <&ToxicFrog> | With some adjustment of the feh invokation (replace -x -F with appropriate --geometry) and positioning of your terminal you could get the rename prompt and the image on screen at the same time. |
16:55 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code |
17:07 | | Kindamoody is now known as Kindamoody|afk |
17:33 | <&jeroud> | Meh, this register limitation is more annoying than I remember. |
18:05 | | * Vornicus gets the UC berkeley one down to 130, is pretty happy with it though obviously there's better, apparently |
18:05 | <~Vornicus> | ...and there's a solitaire game in here |
18:21 | | Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds] |
19:49 | | * Vornicus examines Opus Magnum's Airship Fuel level, where the best score for space is 1 more hex than the minimum required toolbenches. |
19:55 | <~Vornicus> | got it. |
20:00 | | Kindamoody|afk is now known as Kindamoody |
20:25 | <&jerith> | SHENZHEN I/O has the best Zachtronics solitaire. |
20:28 | <&McMartin> | Correct |
20:32 | <~Vornicus> | it is, but these others in OM and EP are no slouches |
21:05 | | Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has joined #code |
21:05 | | mode/#code [+qo Vorntastic Vorntastic] by ChanServ |
22:52 | <~Vorntastic> | Oh ffs I think I figured out my missing polygons |
22:55 | <@Reiv> | Oh? |
23:00 | <~Vorntastic> | Yeah. Longish explanation has to wait till I can use a true keyboard but short story is geometry always has more special cases than you think |
23:04 | <~Vorntastic> | For as much geometry as I do, I goddamn hate geometry |
23:07 | | * McMartin also notes that SHENZHEN I/O's solitaire was so good that it became a viable standalone commercial product in its own right. |
23:07 | <&McMartin> | This is something that OM and EP cannot really match. |
23:11 | <@Reiv> | What was SHENZHEN's solitare? |
23:12 | | mac [macdjord@Nightstar-grpbnp.mc.videotron.ca] has quit [Connection closed] |
23:12 | <&McMartin> | It was a FreeCell variant with mahjongg symbology. |
23:12 | <@Reiv> | hm! |
23:12 | <&McMartin> | https://store.steampowered.com/app/570490/SHENZHEN_SOLITAIRE/ |
23:13 | <&McMartin> | You have the suits, which match and stack like FreeCell, and then the dragons match and end up stacking in a way that *consumes a cell*, such that a victorious play ends with zero cells available. |
23:13 | <&McMartin> | It's cunning and evil. |
23:13 | <&McMartin> | And very good. |
23:14 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds] |
23:14 | <&McMartin> | I did end up playing a good deal of it~ |
23:18 | <@Reiv> | ... huh |
23:18 | | macdjord [macdjord@Nightstar-grpbnp.mc.videotron.ca] has joined #code |
23:18 | | mode/#code [+o macdjord] by ChanServ |
23:19 | <@Reiv> | neat |
23:21 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client] |
23:21 | <&jeroud> | Many years ago I used to keep a Space Quest (V, I think) savegame at the place where there's a videogame to play. |
23:23 | <&jeroud> | SHENZHEN I/O was my first experience of that sort of thing in close to two decades. |
23:25 | <&jeroud> | The thing I particularly like about that solitaire is that it's presented as the boss's daughter's school project or something. |
23:26 | <&jeroud> | When the Grumpy British Expat mentions that maybe an undo function would be nice, boss replies that his daughter says undo is unnecessary if you apply a little forethought. |
23:31 | <~Vornicus> | Okay. Home, cat kicked off of keyboard, random music they started playing stopped |
23:31 | <~Vornicus> | time to 'Splain |
23:31 | < Mahal> | :D |
23:32 | <~Vornicus> | So, background. As you know Bob, Vornonoi is a thing that creates Voronoi diagrams. It does so by creating the dual, called the Delaunay Triangulation |
23:33 | <~Vornicus> | (it is a dual here in the sense that it reverses the sense of the lines: where the voronoi diagram draws borders between regions, the delaunay triangulation draws roads between capitals) |
23:34 | <~Vornicus> | So, typically the delaunay triangulation of a finite pile of points is itself finite, and has edges all around that form the convex hull |
23:35 | <~Vornicus> | Unfortunately this task is Annoying, but I can avoid this problem by adding Distant Points - two points, infinitely far away, that create regions that neatly cover the entire plane outside of the convex hull |
23:37 | <~Vornicus> | Then a lot of stuff gets simpler: instead of having to, for each new point, detect whether it's outside the existing convex hull and use special systems just for that, I can use the standard "triangle hierarchy" and edge manipulation to add points no matter where they are |
23:38 | <~Vornicus> | However, the edge correction system, which corrects the triangulation as I go so the invariants that make a triangulation Delaunay are maintained |
23:40 | <~Vornicus> | now needs a little help: it contains a small variety of special cases to handle situations where one or more of the points in a quadrilateral is one of the Distant Points |
23:40 | | VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Connection reset by peer] |
23:41 | <~Vornicus> | It is these special cases that I have discovered are yet insufficient in a very particular situation |
23:44 | <~Vorntastic> | https://usercontent.irccloud-cdn.com/file/KnsLoQcg/irccloudcapture1389633532.jpg |
23:44 | <~Vornicus> | a picture, to help envision the situation. |
23:47 | <~Vornicus> | So, the Distant Points are, as you can see, directly to the left and right. You will also notice that every point on the convex hull is connected to the distant points |
23:47 | | VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code |
23:47 | | mode/#code [+ao VirusJTG VirusJTG] by ChanServ |
23:47 | <~Vornicus> | So, what happens when two points on the convex hull are directly left/right of each other |
23:49 | <~Vornicus> | Well, for one thing, we generate an infinitely long but nevertheless zero area triangle. This, in itself, is fine. |
23:52 | <~Vornicus> | But then, what if I add a third point, directly between those two? Well, that's on that finite edge. And this is where things go wrong |
23:56 | <~Vornicus> | See, that point I just added is *also on the convex hull* -- but it's not connected to a distant point. Instead, it's part of a finite degenerate triangle, and my corrections don't handle it properly: since *normally* if the far point in the quadrilateral is a Distant Point, we're not working on a degenerate triangle, the point in question is interior and swapping will cause the hull to no longer be convex |
23:57 | <~Vornicus> | So normally i don't want to do that. |
23:58 | <~Vornicus> | But here in this situation, where I'm otherwise creating a degenerate triangle, I *do* want to split, and the result will still be convex. |
--- Log closed Wed Jul 10 00:00:22 2019 |