Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kgm
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
1.
▲
by
kgm
1y ago
I have used id() in production code, but the circumstances were extremely specific: It was in some monitoring-related code that was trying to dig down into the guts of the interpreter for the purposes of tracking memory usage on the level o
2.
▲
Factorio Friday Facts #408 – Statistics improvements, Linux adventures
(factorio.com)
4 points
by
kgm
2y ago
|
0 comments
3.
▲
by
kgm
3y ago
When it comes to profiling in Python, never underestimate the power of the standard library's profiler. You can supply it with a custom timing function when instantiating the Profile type [1], and as far as the module is concerned, thi
4.
▲
Factorio: Space Age
(factorio.com)
6 points
by
kgm
3y ago
|
1 comments
5.
▲
by
kgm
3y ago
My own experience was with the 3D-enhanced version of Mechwarrior 2: Mercenaries, specifically. It is possible that the equivalent version for Mechwarrior 2 was more stable. It's also possible my 3D drivers of the time were the cause o
6.
▲
by
kgm
3y ago
Part of the issue there is that the 3D-acceleration-enabled versions of Mechwarrior 2 (and Mercenaries) were buggy as heck even at the time. (Mercenaries was even pretty buggy before they did the 3D card patch, and it only got moreso.) It
7.
▲
by
kgm
3y ago
There's a whole generation of games from the mid to late 90s (and perhaps into the early 00s) that's remarkably annoying to play these days because of this issue. The game I've personally tried to get running, every once in a
8.
▲
by
kgm
4y ago
I am taken a little aback by the name. There is, of course, already the D programming language, which has even had a major version number of 2 for quite some time. It also brings to mind the JavaScript library d3, which, while not strictly
9.
▲
by
kgm
4y ago
All right, behold my idiotic story about the time I got a job for one of the major tech companies. It's the late 00's. I am in my early 20s. I have an associate's degree from the local community college, and I have been messi
10.
▲
by
kgm
5y ago
For another breakdown of the details of floating-point precision, I recommend qntm's "0.1 + 0.2 returns 0.30000000000000004": https://qntm.org/notpointthree
11.
▲
by
kgm
5y ago
"Mars was empty before we came." Red Mars, Kim Stanley Robinson
12.
▲
by
kgm
5y ago
I would also recommend https://www.joelonsoftware.com/2003/10/08/the-absolute-minim...
13.
▲
“Lena” isn't about uploading
(qntm.org)
2 points
by
kgm
5y ago
|
0 comments
14.
▲
by
kgm
5y ago
I once wrote a popular browser-based tool for a popular game. Other tools existed in the space at the time I started the project, but I felt the need to go at the problem my own way, and I managed to add some mathematical sophistication tha
15.
▲
by
kgm
5y ago
There is no sense in which English pronunciation can be described as "consistent." As supporting evidence, may I introduce the poem "The Chaos": https://ncf.idallen.com/english.html
16.
▲
by
kgm
5y ago
I just finished a re-read of the "Commonweal" series by Graydon Saunders, which begins with The March North : https://play.google.com/store/books/details?id=MoIOAwAAQBAJ I've never been sure how to
17.
▲
by
kgm
5y ago
One thing to note, in the gritty details of Python's actual implementation of the list type, is that there's a little more to say about how list resizing works than is immediately obvious. The relevant source is here: https:/
18.
▲
by
kgm
5y ago
The standard array module was more relevant in the distant past, before version 2.6 added the bytearray type. Otherwise, numpy arrays are considerably more useful in virtually every circumstance.
19.
▲
by
kgm
5y ago
Yeah, but we're not talking about pure mathematics. We're talking about floats, and I find that it's very important to be clear about the limitations. It's easy to get some nasty bugs if you start assuming that you can c
20.
▲
by
kgm
5y ago
This is a neat article, but it does have some errors. One subtle point that the post gets wrong: > So where does that come from? The answer is that Python stores everything inside dictionaries associated with each local scope. Which mean
21.
▲
by
kgm
5y ago
The podcast Behind the Bastards has a two-part episode on the history of the US border patrol titled "The U.S. Border Patrol Is A Nightmare That Never Ends," which I listened to just recently. It is entirely horrifying, and this r
22.
▲
Projects and channels that have decided to leave Freenode
(github.com)
11 points
by
kgm
5y ago
|
2 comments
23.
▲
The Freenode resignation FAQ, or: “what the fuck is going on?”
(gist.github.com)
92 points
by
kgm
5y ago
|
8 comments
24.
▲
by
kgm
5y ago
You joke, but Factorio is a sufficiently "crunchy" logistics game that it has prompted me to study a number of serious topics, from learning linear programming to determine optimal production ratios, to dipping my toe into learnin
25.
▲
by
kgm
6y ago
I taught myself linear programming because of Factorio. It is easily the single game in which I have spent the most time, probably close to 4,000 hours. It is delightful to see that the team is continuing to improve it, even after the 1.0 r
26.
▲
by
kgm
6y ago
I am seeing other analyses that put the size of the explosion at about one tenth of this size. The analysis in this Twitter thread correlates the observed degree of damage with the distance from the explosion. It comes up with an estimated
27.
▲
by
kgm
6y ago
This is clearly about Python, so I will note that this is not actually the case: The generator expression introduces a new scope, and so it does not reassign the value of x. Python does not require the "global" and "nonlocal&
28.
▲
by
kgm
6y ago
Though "when" the object is created isn't always so straightforward: >>> x = 257 >>> y = 257 >>> x is y False >>> def f(): ... x = 257 ... y = 257 ... return x
29.
▲
by
kgm
10y ago
A few years ago, a Dr. R. Andrew Hicks of Drexel University designed a non-reversing mirror that is a single sheet of glass. The reflection is slightly distorted, however. News coverage: http://techfragments.com/inventions-n
30.
▲
by
kgm
10y ago
To be pedantic (which I think is warranted here), range does not return a generator, it returns a sequence called a range object. This object can be indexed, sliced, and (relevant to this discussion) supports the 'in' operator. &q
More ›