code logs -> 2019 -> Tue, 10 Sep 2019< code.20190909.log - code.20190911.log >
--- Log opened Tue Sep 10 00:00:23 2019
00:59 himi [sjjf@Nightstar-1drtbs.anu.edu.au] has joined #code
00:59 mode/#code [+o himi] by ChanServ
01:09 catalyst [catalyst@Nightstar-5dv16h.cable.virginm.net] has joined #code
01:13 celticminstrel [celticminst@Nightstar-6an2qt.dsl.bell.ca] has joined #code
01:13 mode/#code [+o celticminstrel] by ChanServ
02:38 Degi [Degi@Nightstar-5v2v2q.dyn.telefonica.de] has quit [Connection reset by peer]
03:10
< Yossarian>
I watched the Diablo post-mortem @ GDC on youtube again.
03:11
< Yossarian>
I find it hard to believe initially the game was set up as a turn based game and actions were measured in seconds and in the course of several afternoons this groundwork worked when allowing like 20 ticks / second or whatever.
03:22
<&McMartin>
X-COM Hype!
03:23
<&McMartin>
I have two favorite parts of that talk that I can't choose between
03:23
<&McMartin>
The part about email... but ON THE INTERNET
03:23
<&McMartin>
And the part where he busts out a CD from 1995 running DirectX 1.0 and it still frickin' works
03:23
<&McMartin>
I, however, also have a question for our resident pythonistas.
03:24
<&McMartin>
I am parsing the results of "git diff master HEAD --numstat", which I have put into a file 'changes.txt'
03:24
<&McMartin>
I then extract lines added and removed, while skipping changes to binary files, with this nested list comprehension
03:24
<&McMartin>
[(int(a), int(b)) for (a, b, c) in [z.split() for z in open("changes.txt").readlines()] if a != "-"]
03:24
<&McMartin>
I feel like there's probably a way to do this without nesting them.
03:28
<&McMartin>
Also, did I say "140MB binary blob" above?
03:28
<&McMartin>
Make that "450MB of binary blobs"
03:28
< Yossarian>
X-COM UFO Defense / Enemy Unknown is probably one of the best games during the golden age of games ever. Then poor Microprose :(
03:31
< Yossarian>
Diablo was a big deal, too.
03:31
< Yossarian>
But I have a hard time that in turn-based mode they had fractional seconds to do things and then implemented a tick loop without turns and it magically worked
03:31
< Yossarian>
or maybe I suck
03:32
< Yossarian>
Also, Diablo would not have been the same as a turn-based game, for sure.
03:34
< Yossarian>
$ cat .vimrc | nc termbin.com 9999
03:34
< Yossarian>
https://termbin.com/v31a
03:38
<&[R]>
Man, remember that time I discovered that emacs links to systemd?
03:39
< Yossarian>
Seriously?
03:39
<&[R]>
I bitched about that very loudly, you were there
03:40
< Yossarian>
systemd is a problem, it offers solutions that other init systems don't offer but all the dependencies from other projects is a problem. Torvalds doesn't see this as a problem in an interview I watched last night but it was a little dated.
03:40
< Yossarian>
but then again, he's just concerned about the kernel I guess
03:41
<&[R]>
"it offers solutions that other init systems don't offer" <-- runit disagrees
03:41
< Yossarian>
those were his words
03:41
< Yossarian>
more or less
03:42
<&[R]>
But really that stuff doesn't need to be in PID 1, s6, monit and supervisord are fine
03:42
<&[R]>
Eitherway your vimrc is pretty long
03:42
< Yossarian>
in my mind, Redhat is trying to pull SCO style moves on the popular distros and projects
03:43
< Yossarian>
yeah, i have to clean it up
03:43
<&[R]>
https://termbin.com/cn3h
03:43
<&[R]>
That's mine
03:44
< Yossarian>
or split it for functions like the hilight colorscheme helper at the end, put it in another file and source it.
04:00
<&[R]>
<[R]> $ tcpdump -i eth3
04:00
<&[R]>
<[R]> tcpdump: error while loading shared libraries: libsystemd.so.0: cannot open shared object file: No such file or directory
04:00
<&[R]>
-*- [R] foams at mouth
04:06
<&[R]>
https://termbin.com/6fvx
04:57 Bruno [Bruno@Nightstar-h3b.r89.134.103.IP] has joined #code
05:00 Bruno [Bruno@Nightstar-h3b.r89.134.103.IP] has quit [[NS] Quit: ]
05:20 catalyst [catalyst@Nightstar-5dv16h.cable.virginm.net] has quit [Ping timeout: 121 seconds]
05:21 Derakon is now known as Derakon[AFK]
05:23 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:25 catalyst [catalyst@Nightstar-5dv16h.cable.virginm.net] has joined #code
06:03 catalyst [catalyst@Nightstar-5dv16h.cable.virginm.net] has quit [Connection closed]
07:08 Kindamoody[zZz] is now known as Kindamoody
07:26 himi [sjjf@Nightstar-1drtbs.anu.edu.au] has quit [Ping timeout: 121 seconds]
07:38
<&jeroud>
McMartin: Hmm. I can't think of a way in Python.
07:39
<&jeroud>
Some other languages have constructs that are essentially pipelined listcomps.
07:40
<&jeroud>
The problem here is that you're trying to perform two transformations on the data, with a filter in between.
07:43
<&jeroud>
You could write the split() -> (int(a), int(b)) as a function, but that would fail without the filter.
07:49
<&McMartin>
Yeah, I'm kind of hoping for some extra listcomp fu that I'm missing or not properly appreciating.
07:49
<&jeroud>
I guess you could filter in the inner loop.
07:50
<&McMartin>
ISTR that Haskell's listcomp combiners let you do arbitrary sequences of maps and filters and cartesian products, and I'm not sure how far that translates.
07:52
<&jeroud>
Python's listcomps are a little like its lambdas.
07:53
<&jeroud>
In Elixir I'd solve this with a pipeline. In Rust I'd use an iterator chain.
07:55
<&jeroud>
I can't even remember if Elixir *has* listcomps. I know Erlang does.
07:57
<&jeroud>
Oh, you *can* have multiple for clauses in a Python listcomp.
07:59
<&McMartin>
Yeah, absolutely
07:59
<&jeroud>
In a few minutes I'll have my laptop set up and can tinker a bit.
07:59
<&McMartin>
It's the intermixing of for with if and back that is the part where I seem to lose the plot
08:17
<&jerith>
[
08:17
<&jerith>
(int(a), int(b))
08:17
<&jerith>
for z in open("numstat.txt").readlines()
08:17
<&jerith>
for (a, b, c) in [z.split()]
08:17
<&jerith>
if a != "-"
08:17
<&jerith>
]
08:20
<&McMartin>
Great, thanks.
08:20
<&McMartin>
It was the binding z to bind a through c that had escaped me
08:20
<&McMartin>
And really, one should put an "if len(z) == 3" between the fors.
08:22
<&jerith>
Also, unless you can guarantee that you never have renames (or spaces in filenames), you want either `.split("\t")` or `.split(None, 2)`.
08:22
<&jerith>
(The former assumes you haven't processed the tabs out of the numstat output.)
08:23
<&McMartin>
Ah yes
08:26
<&jerith>
Anyway, I have just rediscovered the reason I don't use this multiple-for version of listcomps.
08:26
<&jerith>
I find them borderline unreadable.
08:26
<&jerith>
The middle-out way listcomps must be read is bad enough.
08:27
<&jerith>
But that at least more or less matches English grammatical structure.
08:27
<&jerith>
The ordering of the for clauses doesn't.
08:28
<&jerith>
(I keep expecting them to be last-to-first rather than first-to-last.)
08:29
<&jerith>
Pipelines (and iterator chains, I guess) are a much better representation.
08:34
<&jerith>
You can also drop the .readlines(). Iterating over a file emits lines.
09:01
<&jerith>
McMartin: Another: [
09:01
<&jerith>
tuple(int(n) for n in z.split(None, 2)[:2])
09:01
<&jerith>
for z in open("numstat.txt").readlines()
09:01
<&jerith>
if not z.startswith("-")
09:01
<&jerith>
]
09:01
<&jerith>
I like that for not having multiple fors, I dislike it for the inability to name the fields.
09:02
<&jerith>
But you can factor the `tuple(...)` out into a function.
09:04 Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has quit [Ping timeout: 121 seconds]
09:07 Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has joined #code
09:07 mode/#code [+o Alek] by ChanServ
09:43 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
09:43 mode/#code [+qo Vornicus Vornicus] by ChanServ
10:00 Kindamoody is now known as Kindamoody|afk
10:02 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
10:02 mode/#code [+o himi] by ChanServ
10:48
<~Vornicus>
Okay, so, disallowing the zero-area triangles splits in the first place doesn't actually work.
10:48
<~Vornicus>
this is frustrating.
10:54
<~Vornicus>
(why doesn't it work? I don't know, but argh)
11:02
<@TheWatcher>
I blame Syloq.
11:10
<~Vornicus>
ok. looking at my test rig that actually manages this, the point that adds wrong is actually outside the hull; it lands on a doubled infinite edge.
11:21
<~Vornicus>
In which case, I need to determine which of the two it actually lands on. Once it does that the rest of the action takes place but I have to make sure step 1 actually works.
11:21
<~Vornicus>
...it would help if my pencil had lead in it
11:23
<~Vornicus>
...neither of them appears to work correctly? what?
11:25
<~Vornicus>
okay that's not a good sign.
11:29
<~Vornicus>
it appears that in both cases I get a finite degenerate where the far twin is finite regular, so the rejigger doesn't happen correctly.
11:30
<~Vornicus>
:(
11:41
<~Vornicus>
Okay, so what do I do about this.
11:48
<~Vornicus>
I can't just up and pick a different direction for the distant points. that leads to this same problem again but with slightly varied requirements.
11:48
<~Vornicus>
I can't switch to hull-ish things; part of the reason I'm doing it this way is because I don't already have all the points, so I can't know what the hull is until afterwards.
11:50
<~Vornicus>
The original code I'm basing this on had that sort of issue: I had to examine the points and find the one that was lexicographically "first" in some way, and this made it possible to create the diagram without having to worry about this situation.
11:53
<~Vornicus>
I figured by starting with reified (but infinitely distant) actual points we'd win but that has gotten me into the present predicament, where I can land directly on multiple distant lines at once and this has major geometric implications.
11:53 Degi [Degi@Nightstar-l4qtv8.dyn.telefonica.de] has joined #code
12:04
<~Vornicus>
...if I could adjust the location of the distant points so that it never happens, so that the lexicographically first and last items are always the extreme points in the direction perpendicular to the distant points axis, then I would win.
12:04
<~Vornicus>
Because then the convex hull guarantees that I don't have coincident distant lines.
12:05
<~Vornicus>
But this can itself break the triangle hierarchy.
12:05
<~Vornicus>
Aaaargh.
12:15 Vornotron [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
12:17 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
13:17 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Connection reset by peer]
13:17 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
13:17 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
13:21 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Connection reset by peer]
13:22 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
13:22 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
13:26 catalyst [catalyst@Nightstar-5dv16h.cable.virginm.net] has joined #code
13:48
< Vornotron>
I suppose I could move the distant points slightly to make it less likely that I'll hit the damn thing but I'm still mad about this
14:12
<&ToxicFrog>
Triangles are your nemesis, aren't they.
14:14
< Vornotron>
forever
14:30
< Vornotron>
though, to be fair
14:30
< Vornotron>
I do in this endeavor grapple with the infinite.
14:45
< Vornotron>
(the original also, uh, was not code. it was a description of the algorithm with a lot of bits missing)
14:46 Irssi: #code: Total of 34 nicks [25 ops, 0 halfops, 0 voices, 9 normal]
14:47 TheWatcher changed the topic of #code to: Welcome to #Code, where Vorn grapples with the infinite | Ask, then hang about till someone appears who can help: We have high latency, but excellent signal. | Rants and monologues are encouraged; many cores, no waiting
14:47 Vornotron is now known as Vornicus
14:47 mode/#code [+qo Vornicus Vornicus] by ChanServ
15:15 Degi [Degi@Nightstar-l4qtv8.dyn.telefonica.de] has quit [Connection reset by peer]
15:39 catalyst [catalyst@Nightstar-5dv16h.cable.virginm.net] has quit [Connection closed]
15:50
<&jeroud>
Vornicus: Is the vornonoi code visible to people who aren't you?
15:50
<&jeroud>
(I may have asked this before.)
15:50
<~Vornicus>
not currently, I'm not happy enough with it yet to put it anywhere.
15:52
<&jeroud>
Github now has private repos for free accounts, if that's useful.
15:52
<&jeroud>
(There's a restriction on the number of collaborators you can add to those.)
15:52
<~Vornicus>
somewhat, but
15:54
<~Vornicus>
thing is, I can't git. every time I have, I've ended up with things in the repository that I don't want there at all and I can never figure out what the hell i'm supposed to do to prevent it and... honestly 90% of the time when I stop working I'm in not merely red state but halfway through typing a line of code.
15:55
<~Vornicus>
and then with other projects it's been "oh you can't commit *at all* because there's something crazy with your repo" and :(
15:55
<&jeroud>
That sounds weird.
15:56
<~Vornicus>
that one was a submodule thing - I was using somebody else's lib and it just would not understand what that meant despite me following the instructions
15:56
<&jeroud>
Are you using revision control at all for this?
15:56
<&jeroud>
Yeah, submodules are terrible. Worse even than the rest of git.
15:57
<~Vornicus>
No, I gave up on revision control because I have to spend more time fucking with version control than actually, uh, *doing* anything
15:57
<~Vornicus>
and nearly all the time it does not do what I want at all.
15:58
<&jeroud>
:-(
15:59
<&[R]>
:/
16:00
<&jeroud>
If you ever want to have another go at making it work for you, I'm happy to help.
16:04
<~Vornicus>
(it also doesn't help that the lone professional context I had for it actually actively discouraged anything approaching revision control, because if my changes weren't *instantly* visible to the art team that was doing the work on the database it wasn't fast enough)
16:05
<&[R]>
I love bullshit environments where revision control is discouraged
16:05
<&[R]>
Makes the hate rise for your boss so fast-fast
16:06
<~Vornicus>
(I was also essentially the only dev. the other guy who "knew code" steadfastly refused to use, for instance, indentation)
16:06
<&jeroud>
I find it incredibly uncomfortable to write anything nontrivial without revision control, because I have no safety net.
16:07
<~Vornicus>
whereas if I get to the point where revision control might be necessary I determine that whatever I was working on simply wasn't worth it
16:07
<&jeroud>
(At least part of that comes from my anxiety and attention issues.)
16:11
<~Vornicus>
and mine are worse than yours and only exacerbated by having to deal with that shit
16:13
<&jerith>
:-(
16:16
<@TheWatcher>
Vornicus: ... no indentation, wat
16:17
<~Vornicus>
I could not figure out how he lived
16:17
<@TheWatcher>
I mean, I have a *lot* of problems with python, but it at least filters out that level of idiot
16:20
<~Vornicus>
so yeah. I have enough frustrations without having to add more.
16:38 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
16:55 * Vornicus gnaws on this problem some more
17:15
<~Vornicus>
Alternative: actually do use a convex hull system instead of what I use now; this increases cost from approx. logarithmic to approx. square rootish to find the appropriate location, no longer need the triangle hierarchy because I'm navigating the mesh itself
17:16
<~Vornicus>
That said it's three non-collinear points before it actually starts working. I'd need a new method for the new point landing outside of the hull that adds all *those* edges
17:28 Derakon[AFK] is now known as Derakon
18:22 mac [macdjord@Nightstar-rslo4b.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
18:23 macdjord [macdjord@Nightstar-rslo4b.mc.videotron.ca] has joined #code
18:23 mode/#code [+o macdjord] by ChanServ
19:14
<~Vornicus>
-- also the on-edge one has to actually be specialized to handle landing directly on a hull edge
19:43
<@Alek>
who was in South Africa again?
19:43
<@Alek>
https://imgur.com/gallery/Lp0XY7e
20:00
< ErikMesoy>
I used to be in South Africa. Pfffft.
20:07
<~Vornicus>
If the first three points are collinear, is there anything special i have to do? Looks like the first one that comes out not collinear will fix that.
20:25
<~Vornicus>
oh, that's the other reason. duh. I use the infinite triangles when I'm doing the dual, which makes not having them painful over there too.
20:25
<~Vornicus>
man. that's even more special cases than I thought.
20:27
<~Vornicus>
I am glad I chased that around just to see what kind of special case bs I missed by not going that way.
20:33 * McMartin pushes the BURNINATE button
20:35
<~Vornicus>
\o/
20:37
<&McMartin>
That's ~450MB out of the master index
20:38
<&McMartin>
But we'll still keep downloading it forever, because git is superior to svn
20:38
<~Vornicus>
*metal happens*
20:49 * TheWatcher fucking stabs these people
20:50
<@TheWatcher>
4 separate people have admitted to working on this piece of javascript. 651 lines of code, 6 comments, every single one of them about as much use as a chocolate teapot.
20:54
<@TheWatcher>
I think rewriting the damned thing from scratch will be faster than working out WTF this thing is doing inside
20:56 Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
21:05 catalyst [catalyst@Nightstar-5dv16h.cable.virginm.net] has joined #code
21:05
<@gnolam>
So... just regular javascript then.
21:12 Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code
21:13
< catalyst>
I wonder what prompted that
21:13
< catalyst>
I can think of so many things
21:14
< Pink>
Some sort of catalyst, presumably
21:14 * catalyst chucks a drumkit off a cliff
21:15
<@TheWatcher>
gnolam: I'd laugh, but yeah
21:18
<~Vornicus>
Okay. By disallowing infinite degenerate triangles from getting the thing I guarantee that it lands in one of the right places. But once I'm there the mesh still isn't set up right and will not correct itself without coaxing. On the other hand it looks like all I need to do is force one flip, and not attempt further flips on that triangle or its buddy
21:31 mac [macdjord@Nightstar-rslo4b.mc.videotron.ca] has joined #code
21:31 mode/#code [+o mac] by ChanServ
21:32 macdjord [macdjord@Nightstar-rslo4b.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
21:44 Kindamoody|afk is now known as Kindamoody
21:55 macdjord|slep [macdjord@Nightstar-rslo4b.mc.videotron.ca] has joined #code
21:55 mode/#code [+o macdjord|slep] by ChanServ
21:58 mac [macdjord@Nightstar-rslo4b.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
22:14 Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Client exited]
22:15 Kimo|autojoin [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
22:15 mode/#code [+o Kimo|autojoin] by ChanServ
22:27 Kimo|autojoin is now known as Kindamoody
22:28 mac [macdjord@Nightstar-rslo4b.mc.videotron.ca] has joined #code
22:28 mode/#code [+o mac] by ChanServ
22:29 macdjord|slep [macdjord@Nightstar-rslo4b.mc.videotron.ca] has quit [Operation timed out]
22:33 mac [macdjord@Nightstar-rslo4b.mc.videotron.ca] has quit [Connection reset by peer]
22:34 mac [macdjord@Nightstar-rslo4b.mc.videotron.ca] has joined #code
22:34 mode/#code [+o mac] by ChanServ
22:48 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
23:03 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Connection reset by peer]
23:07 Kindamoody is now known as Kindamoody[zZz]
--- Log closed Wed Sep 11 00:00:24 2019
code logs -> 2019 -> Tue, 10 Sep 2019< code.20190909.log - code.20190911.log >

[ Latest log file ]