Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sltkr
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
33 ms
·
481.
▲
by
sltkr
6y ago
Starlark is an extremely limited dialect of Python. It is intentionally not Turing complete, to prevent unbounded computation. I think the rationale for making it syntactically similar to Python was: we want to add a macro processing langua
482.
▲
by
sltkr
6y ago
It's not just on vacuum. Rowids are reused whenever stuff is deleted from the end of the table: sqlite> CREATE TABLE t(x); sqlite> INSERT INTO t(x) VALUES ('foo'), ('bar'); sqlite> SELECT rowi
483.
▲
by
sltkr
6y ago
The value introduced by C++ was type safety. In C, it's way too easy for the format string to get out of sync with the type of the arguments, e.g.: printf("%d", my_long_var); Might seem correct and work correctly on
484.
▲
by
sltkr
6y ago
The whole thing is written from the assumption that investors discriminate against women and nonwhites, and that the purpose of research is to confirm this pre-existing belief, rather than find out the objective truth. > [..] future rese
485.
▲
by
sltkr
6y ago
This applies equally to ArrayList.
486.
▲
by
sltkr
6y ago
The site feels rather snappy to me. The backend is powered by PHP; most pages load in 100-200 ms, which is very reasonable. I've certainly used much, much slower software, especially for business purposes. Maybe the demo site is suffer
487.
▲
by
sltkr
6y ago
Doesn't ML work fine with fixed point numbers? I don't think there is a particular use case for very large or very small numbers.
488.
▲
by
sltkr
6y ago
True, I was talking about the general case. This is a bit similar to local variables: they have to be allocated on the heap in the general case, but Go uses escape analysis to determine which local variables can safely be allocated on the s
489.
▲
by
sltkr
6y ago
I think the reason is much simpler: block-scoped defer isn't useful if you statements appear in a nested construct. Example: fd := OpenSocket(...); if fd != 0 { defer CloseSocket(fd); } // do stuff
490.
▲
by
sltkr
6y ago
That one executes deferred statements at end of scope, instead of on function exit. That doesn't work well if your defer-statement occurs in an if-body, for example. I don't think it's super valuable to mimic the Go syntax an
491.
▲
by
sltkr
6y ago
The title is “Making GitHub’s new homepage fast and performant” which suggests performant is something different from (just) fast.
492.
▲
by
sltkr
6y ago
I didn't say there is such a law. I'm just saying it's not a case of "two sides disagreed on the true value of the company". It's not so symmetric. One side was selling short because they believed (not unreaso
493.
▲
by
sltkr
6y ago
That's my point. Nobody believed AAPL was worth $15/share in 1997. Nobody believes GameStop is worth $400/share today. The motivations for buying are different.
494.
▲
by
sltkr
6y ago
> If the short sellers think the stock is overpriced, and there's others that think its underpriced, then both sides are placing their bets and will deal with the result, either by making or losing a lot of money. I don't think
495.
▲
by
sltkr
6y ago
Github is free, easy to use, and reliable. Lots of developers use it for private repositories, which obviously don't benefit from community contributions. It's easier than setting up your own server. Putting the code on Github als
496.
▲
by
sltkr
6y ago
Something like this: https://www.amazon.co.uk/dp/B008LR3KD8/ The idea is that it wakes you up gently by flooding the room with light resembling a natural sunrise. One reason that it might be expensive is that it n
497.
▲
by
sltkr
6y ago
It is very true. A similar event happened in Europe a year ago (also due to problems in former Yugoslavia) and all electric clocks in my house (microwave, oven, alarm clocks) went out of sync temporarily. I was just as surprised as you. Bas
498.
▲
by
sltkr
6y ago
As you say, you need to set certain bits to special values to encode a v4 UUID, leaving less than 128 bits for the payload, which means a random 128 bit number is not a valid UUID except by chance. Second, a v4 UUID should set all remaining
499.
▲
by
sltkr
6y ago
This isn't strictly speaking a UUID. It's just a 128-bit identifier. It's "compatible with UUID" only in the sense that both are 128 bits wide, but this scheme doesn't have the structure of a UUID. To summarize
500.
▲
by
sltkr
6y ago
The copy hypothesis also doesn't explain the difference between warm and cold start performance, at least for the "random read" case. For warm start, the speed for read vs mmap is 3 GB/s vs 6 GB/s (i.e. mmap is 2x f
501.
▲
by
sltkr
6y ago
I doubt you would. A large app each would have hundreds of changes like this. It would get pretty boring after the first dozen or so.
502.
▲
by
sltkr
6y ago
First, you haven't demonstrated at all that the "elegant" solution is slower. Between `remove_cs101` and `remove_elegant`, it looks like they are equivalent (in particular, the inner loop has the same number of instructions)
503.
▲
by
sltkr
6y ago
> In sub-Saharan Africa, extreme poverty has actually been increasing. According to your source, only in absolute terms, not in relative terms. Ideally, both should go down of course, but it does mean a smaller percentage of Africans liv
504.
▲
by
sltkr
6y ago
Yes, but the point is that the UNIX timestamp doesn't count the the number of seconds elapsed since January 1, 1970. It counts 86400 seconds per day, regardless of how many seconds the day actually has (which can vary due to leap secon
505.
▲
by
sltkr
6y ago
Python is great, but in this case, you could get almost identical output using bash alone: for t in {0..4100000000..100000000}; do TZ=UTC printf "%'13d - %(%Y-%m-%d %H:%M:%S)T\n" $t $t; done
506.
▲
by
sltkr
6y ago
I see; it sounds like latency would become very unpredictable under that model. I can imagine that's a serious problem in practice, but it's not typically what's meant by starvation. https://en.wikipedia.org/w
507.
▲
by
sltkr
6y ago
> ... you are going to get starvation as async does not have a fairness mechanism - timesharing is co-operative and based on FIFO in all the implementations I've seen. If it's FIFO based, why would you get starvation?
508.
▲
by
sltkr
6y ago
The important difference is that society doesn't need pensioners to work (in fact, retiring to free up jobs for younger people is often considered desirable), so the main concern around UBI, which is that it discourages people from wor
509.
▲
by
sltkr
7y ago
I liked "JavaScript for impatient programmers" ( https://exploringjs.com/impatient-js/ ) which is a relatively short but reasonably comprehensive explanation of modern JavaScript. In particular, it accurately d
510.
▲
by
sltkr
7y ago
At that point, why not go straight to async functions? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
More ›