Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
nayuki
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
68 ms
·
721.
▲
by
nayuki
3y ago
Yup, this is why we need to implement a land value tax (not property tax!) and loosen zoning restrictions.
722.
▲
by
nayuki
3y ago
Okay? The elephant in the room is that bad urban design is bad for your health: Car centrism, parking lots, stroads, endless sprawl, etc.
723.
▲
by
nayuki
3y ago
Oh boy, the elliptic curve pseudorandom number generator debacle.
724.
▲
by
nayuki
3y ago
With the mouse, middle-clicking or Ctrl+leftclicking on those buttons have the same effect.
725.
▲
by
nayuki
3y ago
With the mouse, you can Ctrl+drag to duplicate a tab.
726.
▲
by
nayuki
3y ago
I did the calculation manually from memory: 3.6 km/h = 1 m/s. 1 g = 9.8 m/s^2. So, 100 km/h = 27.8 m/s. 36 m/s in 0.956 s is an average acceleration of 29.1 m/s^2. Divide that by 9.8 m/s^2 to get 2.96
727.
▲
by
nayuki
3y ago
> SIM cards are just smart cards. [...] SIM cards no longer conform is ISO 7810 in most cases (having migrated to the smaller micro and nano formats), but continue to be compliant with ISO 7816 for electrical and protocol compatibility.
728.
▲
by
nayuki
3y ago
No, the Japanese fare gates have motion detectors. If you try to walk through without scanning, the gates close. I tested this once.
729.
▲
by
nayuki
3y ago
Yeah, I love Doors Open Toronto (end of every May), https://www.toronto.ca/explore-enjoy/festivals-events/doors-... . Many of the sites are related to arts or churches, but some are infrastructure like a water tre
730.
▲
by
nayuki
3y ago
Void is not a good example for you to point out. Rust's interpretation is correct: The unit type () is what most functions should return. The void type has no valid values at all, which means it cannot be returned. It is other language
731.
▲
by
nayuki
3y ago
I agree with the blog post, also having learned C++ followed by Rust. Only in the context of saner modern languages like Rust did I see C++'s footguns in retrospect. Probably my top footgun for C++ is implicit copy construction by defa
732.
▲
by
nayuki
3y ago
Ah yes, as if the road provider isn't a monopoly, or there's any competition in the price of gasoline.
733.
▲
by
nayuki
3y ago
That's in the same ballpark as HDDs. It takes me ~24 hours to fill an 18 TB HDD.
734.
▲
by
nayuki
3y ago
Tuple creation and destructuring does not require parentheses in Python. w = 0, # w == (0,) (x) = (0,) # x == (0,) y, = 0, # y == 0 (z,) = (0,) # z == 0 Though in Rust, parentheses are required for tuple c
735.
▲
by
nayuki
3y ago
In Java, it's src array, src offset, dest array, dest offset, length. It's a natural order of from, to. It's C memcpy() that's the odd one out by putting the destination before the source.
736.
▲
by
nayuki
3y ago
Indeed. Whereas JavaScript and Python even allow a trailing comma in function parameters: function foo(x,) {} def foo(x,): pass Before anyone questions why anyone would do this, it's for putting arguments (or array el
737.
▲
by
nayuki
3y ago
More weight directly translates into more energy (gasoline or electricity) to move the car.
738.
▲
by
nayuki
3y ago
But also wrappers like: https://docs.oracle.com/javase/8/docs/api/java/util/Collecti...
739.
▲
by
nayuki
3y ago
I really like this PSA from the British THINK!, juxtaposing celebration and darkness: https://www.youtube.com/watch?v=CERT0xNFGo4
740.
▲
by
nayuki
3y ago
> At one point Amtrak had a photo contest to take photos of their trains and submit them, and a guy was arrested by Amtrack police for doing just that. And Stephen Colbert did a great comedy episode about this exact problem. https:/
741.
▲
by
nayuki
3y ago
I had a heart attack because I talked about Java's @Override annotation in my Git commit comments, but GitHub displays them as the user @OverRide. e.g. https://github.com/nayuki/DEFLATE-library-Java/commit
742.
▲
by
nayuki
3y ago
Evaporative cooling can be very cheap compared to closed-loop cooling. Look at how coal and nuclear power plants release steam into the environment.
743.
▲
by
nayuki
3y ago
Mini Air Crash Investigation: How A Camera Sent This Passenger Jet Into A Terrifying NoseDive. https://www.youtube.com/watch?v=5VGsnztTo4A
744.
▲
by
nayuki
3y ago
Is this technology really that new? Canon has been selling "Diffractive Optics (DO)" lenses for decades. For example, https://kenrockwell.com/canon/lenses/70-300mm-do-is.htm , https://en.canon
745.
▲
by
nayuki
3y ago
I get it, you find the infinite loop to be distateful. Here's an alternative: Remove the loop wrapper. Add `throw new ConcurrentModificationException();` at the end. Don't modify the two helper functions. This way, the constructor
746.
▲
by
nayuki
3y ago
> Still, I can see laptops choosing the most popular port regardless of the possible conversion. Yeah. It's silly that my old Lenovo ThinkPad X220 (bought in 2012) has a full-size DisplayPort port whereas my Lenovo ThinkPad X1 Carbo
747.
▲
by
nayuki
3y ago
It is possible to fix this String constructor implementation without creating a defensive copy of the input array or having a TOCTOU vulnerability. // Change this implementation to a loop. public String(char[] value) {
748.
▲
by
nayuki
3y ago
I've been drinking distilled water for 3 years and I have no noticeable body changes.
749.
▲
by
nayuki
3y ago
It doesn't matter. Pick a number. Maybe you have a 650 MiB cap because you're releasing software on CD. Maybe you have a 25 GB cap because you're releasing on BD. Or 100 MB for some app store. Yet, semver only considers API c
750.
▲
by
nayuki
3y ago
> There might just be new functionality added with no change to existing behavior. Even this can be a breaking change for you. Suppose you're writing a bootloader that must fit in 512 bytes and you import a library. If the size of t
More ›