Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
OskarS
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
81 ms
·
841.
▲
by
OskarS
7y ago
In all likelyhood, the reason that's there isn't because a programmer was an idiot. Almost certainly, that variable was originally a float, then some time later another programmer came in and refactored it into an int, but missed
842.
▲
by
OskarS
7y ago
That's an extremely ungenerous interpretation of those events. He shouldn't have handed over control of the package to someone he barely knew, but from his perspective, it was that or let the package die. He volunteered his time,
843.
▲
by
OskarS
7y ago
It's good to hear that there's an idiomatic Rust way of doing this that doesn't require unsafe but is still performant. I figured there was, but to an outsider it was not obvious how. This is not actually the first time I
844.
▲
by
OskarS
7y ago
Certainly what I would use if I was building cloudflare.com...
845.
▲
by
OskarS
7y ago
I will say, the one example they have there which is sort-of analogous to "render each pixel of this image in parallel" is the "draw a julia set" one [0], and it's a very bad way of convincing a C/C++ programme
846.
▲
by
OskarS
7y ago
Naming your product after dumb internet memes is a great way to make me not want to use them. Don’t get me wrong, from first look it seems like a perfectly fine product, but the name is atrocious.
847.
▲
by
OskarS
7y ago
Fair enough, "non-negative integers" then.
848.
▲
by
OskarS
7y ago
Oh, you're right! I missed the dollar sign! That makes it even worse! Unless V8 converts the regex to that expression (which it could maybe do, but I doubt), there's no way the regex version could be anything like as fast. Your ve
849.
▲
by
OskarS
7y ago
Even worse: it is only used one time in the entire code-base, and that one time was to check whether or not a value returned by the string length function was odd. What.... why.... the only concievable point of a package like this is that a
850.
▲
by
OskarS
7y ago
You really think that line is "super-optimized"? It generates and executes a regex to check if a string has one of two different prefixes. I don't know a lot about JavaScript internals, but I would imagine that is both forces
851.
▲
by
OskarS
7y ago
I found Python's standard library to be generally excellent. Not perfect, by any means, and certainly not "all-encompassing", but that's an impossible standard. But it covers the areas you'd want a standard library
852.
▲
by
OskarS
7y ago
Ok, but lets say you're doing something that requires an isWindows() function. You search NPM, you find this package. At this point, do you not even look at the code? Like, even a glance would make you aware that all it's doing is
853.
▲
by
OskarS
7y ago
I'm surprised this isn't a bigger issue in the election, actually. I realize that there are bigger issues at stake, but robocalling seems like a tangible thing that basically all Americans deal with every day and absolutely loathe
854.
▲
by
OskarS
7y ago
If you want to make the argument "this is a bad warning because it will cause many false positives", then that's a perfectly valid argument to make. It doesn't really apply in this case, but it's a valid argument to
855.
▲
by
OskarS
7y ago
Isn't that pretty much the definition of a warning? An expression that is technically valid, but probably a mistake. If something wasn't a valid expression, it would be a compiler error, not a warning.
856.
▲
by
OskarS
7y ago
Wait... so your point is that since "bad programmers" do this, there shouldn't be a warning for it? That is among the silliest thing I ever heard. Especially since there's a trivial way to get rid of the warning: just wr
857.
▲
by
OskarS
7y ago
To clarify: it's not "constant time" in the sense of having O(1) time complexity with regards to the size of the inputs, which is what most people mean by "constant time" (which is obviously not possible in this cas
858.
▲
by
OskarS
7y ago
I don't think I've ever seen anyone on HN defend AMP. We all hate it. It's a pox on the modern web.
859.
▲
by
OskarS
7y ago
Presumably it's partly questions like these that make Troy Hunt eager to find people with money and lawyers to help him host this thing.
860.
▲
by
OskarS
7y ago
I was just thinking, the only ones I can imagine taking ownership would be one of the "big internet foundations" that have earned their trust: Mozilla, the Internet Archive, Wikimedia, or the EFF. Of those, Mozilla and the EFF are
861.
▲
by
OskarS
7y ago
Successfully developing functional fusion power is considerably more plausible than practical quantum computers in the near term. The problem with fusion research is that it is and has been massively, chronically underfunded.
862.
▲
by
OskarS
7y ago
One thing I found really eye-opening about this show is that it really showed both the bad side as well as the good side of Soviet culture. It is unquestionably the case that Soviet authoritarianism and disregard for safety is to blame for
863.
▲
by
OskarS
7y ago
This is good to know, but fairly unsurprising. The interesting case is List<T>. The .Count property is actually a function call, and the value could change during the loop. If you don’t mutate the list, is it smart enough to both inli
864.
▲
by
OskarS
7y ago
I disagree. I use a 1Password, and I used to do the "totally random string of letters, symbols and digits", but I've dropped it for the "four or five random english words" alternative for all new passwords. There ar
865.
▲
by
OskarS
7y ago
I feel like the argument he put forth is entirely reasonable. He cannot possibly vet a new maintainer, so if the project is to live on, have people fork it and let the community decide which fork they want.
866.
▲
by
OskarS
7y ago
My previous (rather limited) understanding of Pathfinder was that it was just a text renderer, I didn't realize that it was a more general vector graphics package. Is the idea for Pathfinder that it should be integrated into Firefox fo
867.
▲
by
OskarS
7y ago
If you want this package to be a quality package that can be used in production, there are many more steps you need to take. Determining if you have access to "the internet" is not a trivial thing. Off the top of my head, here are
868.
▲
by
OskarS
7y ago
I doubt it. I think these are for detecting whether or not you're in a "captive portal". I.e. airport wifi that requires you to enter login credentials or something. But hey, give it a whirl: block detectportal.firefox.com wi
869.
▲
by
OskarS
7y ago
Yeah, I totally agree, but you can sort-of imagine this being useful as like an indicator light in your OS or something. But don't use this library for that. Don't use this library for anything.
870.
▲
by
OskarS
7y ago
So... the test is "can I connect to either the website icanhazip.com or OpenDNS". With the IPv4 addresses of both burned into the code. So this depends on two external servers never going down and not ever changing IP addresses, o
More ›