Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ekimekim
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
50 ms
·
481.
▲
by
ekimekim
12y ago
The way I was trained: SELECT content FROM article; The uppers are keywords, the lowers are arguments (column and table name).
482.
▲
by
ekimekim
12y ago
I make a point of tuning in for the actual safety part then switching to my personal music again when they start waffling on about the company slogan and wishing a good flight a dozen times.
483.
▲
by
ekimekim
12y ago
> With the exception of end-to-end encryption And therein lies one of the big issues. As Apple is discovering, implementing good practice security with end-to-end encryption or similar untrusted-middleman setups is being made illegal.
484.
▲
by
ekimekim
12y ago
Well more properly python doesn't have a "main" function. You just directly execute the initial script, which will import other modules, define functions and classes, etc, and finally (hopefully) execute something.
485.
▲
by
ekimekim
12y ago
"Problem solving" is perhaps the wrong phrase here. It's more like "information gathering", which is an important step in problem solving.
486.
▲
by
ekimekim
12y ago
Another very minor detail, but you mention that RabbitMQ can do priority based on multiple queues. While that's certainly a fine way to do it, it's worth noting that AMQP also supports per-message priorities within one queue: htt
487.
▲
by
ekimekim
12y ago
Suppose a service has a timed routine that spawns a child every 10 seconds. Unfortunately, this child has a bug and starts leaking zombies to PID1. Congratulations, you now have approx 9 hours until your entire system stops being able to sp
488.
▲
by
ekimekim
12y ago
The problem isn't when your main docker process is dying (in this case I believe dockerd itself reaps the process), the problem is when your service spawns child processes as part of normal operation. As an example, suppose we have a s
489.
▲
by
ekimekim
12y ago
There's a slight difference between a git push and a full mirror operation. A git push only synchronises the current branch. Even git push --all doesn't necessarily push all reachable commits - tags, other named refs (eg. stash),
490.
▲
by
ekimekim
12y ago
You can, but it's still a good idea to avoid as it tends to confuse some tools (and some people).
491.
▲
by
ekimekim
12y ago
True, but I fail to see why it's relevant. Every mention of generic here (at time of reading) is along the lines of "this pattern could be generalised if we had generics", which IMO is a fair point to make when discussing way
492.
▲
by
ekimekim
12y ago
I've heard a couple of times that requests coming from JS "need to get a 200" in order to see the response data at all. Now, I've never worked with JS myself, but to me this sounds more like a badly-designed library prob
493.
▲
by
ekimekim
12y ago
Yes, but the point was that it could be done in rust, using rust's language features (type safety and so forth). Making your main inline assembly isn't really using the language very much.
494.
▲
by
ekimekim
12y ago
I make a point of only enabling an ad-blocker if I find the ads overly invasive, resource-intensive or objectionable. Another suggestion is that, for sites that I regularly visit and like the content, I will (and do) happily pay a subscript
495.
▲
by
ekimekim
12y ago
Back in 2nd year CS we were tasked with making a simple terminal minesweeper game. It would print the whole board state after each move and read coords from stdin to know what square was picked. I wanted to make it a proper GUI-style board
496.
▲
by
ekimekim
12y ago
Well, no. The decorator generator is called first, then the decorator is called, all at the time when the line "@app.route()" is first reached during import. You could just as easily write @foo.bar[baz]('abc').hello and
497.
▲
by
ekimekim
12y ago
As a followup to the sibling comment, note that closures aren't the only way to achieve the same effect, for example: class MyDecorator(object): def __init__(self, func): self.func = func def __call__(self, on
498.
▲
by
ekimekim
12y ago
There's a closed formula for computing the nth fibonacci number - however it remains a good example in numeric contexts, a Hello World equivalent.
499.
▲
by
ekimekim
12y ago
I've often thought about how long until an entire system can be automated to the point where zero humans are involved - not in the running, maintenance, making money to hire the servers to run it...how would the law deal with such a sy
500.
▲
by
ekimekim
12y ago
He is explicitly copying the behaviour of the standard library defaultdict here. One clear motivation is thus: Suppose I have an empty defaultdict(list). I do the following: d = defaultdict(list) l = d['foo'] Accordin
501.
▲
by
ekimekim
12y ago
Yes, if you don't care about collisions* or being able to reverse the hash (a pre-image attack) then there's nothing wrong with MD5 per se. However, MD5 was designed as a secure algorithm, and makes tradeoffs, mainly in speed, to
502.
▲
by
ekimekim
12y ago
I've also used it for downloading all possible formats for a video when debugging problems that only seem to be there in some resolutions.
503.
▲
by
ekimekim
12y ago
Like many tools, youtube-dl supports a -- flag to indicate "the remaining arguments are not flags". So your example would work as: youtube-dl -x --audio-format mp3 -- -fCtvurGDD8
504.
▲
by
ekimekim
12y ago
Python's Decimal module (though not its floats, for some reason) has, IMO, a pretty good implementation of these features. https://docs.python.org/2/library/decimal.html#context-objec... Basically, it encapsu
505.
▲
by
ekimekim
12y ago
It isn't possible to never produce a NaN. 0/0 and inf-inf, for example, have no reasonable result that can be produced. And indeed, the spec defines those operations as resulting in NaN.
506.
▲
by
ekimekim
12y ago
Which begs the question, in what direction is the causation? Are less secure apps more popular because they're a better user experience? Are popular apps less likely to be secure because they're owned by large companies less incli
507.
▲
by
ekimekim
12y ago
"you will consider most of the warnings that come from tools like pylint or pep8 or pyflakes to be a bit picky." I use pyflakes, and out of the box it doesn't give ANY stylistic warnings, only basic "I don't think t
508.
▲
by
ekimekim
12y ago
I think the parent was referring to HN's ranking system's tendency to apply a penalty to posts with many comments, in an effort to keep flame wars off the front page (if I recall correctly - it's been a while since I saw a &q
509.
▲
by
ekimekim
12y ago
I fail to see how the tools Pottering works on have any relevance to the discussion. Are you claiming that personal attacks are justified if you don't like a person's software?
510.
▲
by
ekimekim
12y ago
Correct me if I'm wrong, but I would've assumed that most methods of IPC (unix sockets, pipes...everything except shared memory) would need to be copied into kernel space (via a write(2) then copied back out (via a read(2)) at som
More ›