HNHacker News
TopNewBestAskShowJobs

ash

5,047 karma · joined January 12, 2008

submissionscomments
ash··on JSONB has landed
Yes, but it's not impossible to achieve it in practice.

For example, JavaScript JSON.stringify and JSON.parse have well-defined behaviour:

> Properties are visited using the same algorithm as Object.keys(), which has a well-defined order and is stable across implementations

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

> The traversal order, as of modern ECMAScript specification, is well-defined and consistent across implementations. Within each component of the prototype chain, all non-negative integer keys (those that can be array indices) will be traversed first in ascending order by value, then other string keys in ascending chronological order of property creation.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Similarly, Python json module guarantees that "encoders and decoders preserve input and output order by default. Order is only lost if the underlying containers are unordered." Since 3.7 dict maintains insertion order.

https://docs.python.org/3/library/json.html

https://docs.python.org/3/library/stdtypes.html#dict

Yes, JS and Python behaviour are not the same for all cases, however, non-integer keys do maintain order across Python and JavaScript.

ash··on Gobs of data (2011)
I've posted it because I'm always on the lookout for simple solutions for complex problems, and especially for how these solutions are designed. The post describes the design process well.

Also Rob Pike is a great technical writer. Another example of his style is "Effective Go":

https://go.dev/doc/effective_go

ash··on Show HN: Nue – A React/Vue/Vite/Astro Alternative
Hello Tero! Do you have project example using Nue (however small)?
ash··on Ask HN: Good Books on the History of Technology?
The Dream Machine by M. Mitchell Waldrop. Weaves fascinating history of personal computing and internet through J.C.R. “Lick” Licklider biography.
ash··on Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs
I agree that pronouncing identifiers over the phone is rare. But I’m occasionally typing identifiers from:

1. a screenshot or a screen share that contains an identifier

2. another device where I can’t easily take an identifier

ash··on Display brighter-than-white color on Apple devices
How do you enable HDR on iPhone for viewing?
ash··on Display brighter-than-white color on Apple devices
How can it be used? What browsers and what operating systems support it?
ash··on Display brighter-than-white color on Apple devices
Duplicate: https://news.ycombinator.com/item?id=36384625
ash··on The James Webb Space Telescope is finding too many early galaxies
This discovery of the early galaxies seems to make “huge-looking iPhones far away” xkcd obsolete.
ash··on The James Webb Space Telescope is finding too many early galaxies
Why would it be bright white?
ash··on Sergey Brin: Irate Call from Steve Jobs
https://news.ycombinator.com/item?id=34228271
ash··on Modules, not microservices
Where do you begin if the code was in hundreds of separate modules? It's not clear if it's easier. It would take time to load the code into your brain regardless of the structure.

By the way, JavaScript parser in esbuild is a 16 thousand lines of code module too:

https://github.com/evanw/esbuild/blob/0db0b46399de81fb29f6fc...

ash··on Automatic snow tires throw chains at your wheels [video]
> ... AWD + All-Season > FWD + Winter ...

> Braking is longer on snow and ice with all-seasons

I think braking performance is more important. I would choose FWD but on "proper" winter tires. It's better to risk not making up the icy hill, rather than to risk crashing into a front car or even injuring a pedestrian.

By the way, the video doesn't explore braking performance.

(For the unfamiliar with these TLAs: AWD - all-wheel drive, FWD - forward-wheel drive.)

ash··on Cosmology and the big bust debate video
Direct no-paywall link to a video: https://iai.tv/assets/videos/linked/HTLGI2022_L5%20Cosmology...
ash··on Remembear Winding Down
The bear watching your cursor while typing a password was awesome.
ash··on DIY 1kW MPPT Solar Charge Controller
To prevent potential confusion, I'm not an author of this project. Angelo Casimiro is.
ash··on DIY 1kW MPPT Solar Charge Controller
Video: https://www.youtube.com/watch?v=ShXNJM6uHLM

Firmware: https://github.com/AngeloCasi/FUGU-ARDUINO-MPPT-FIRMWARE

ash··on Fresh – Next-gen web framework
You still have transfer the JS.
ash··on Effective Go
It's best to consider Effective Go as the book, like the timeless K&R ("The C Programming Language" book).
ash··on Show HN: Google Drive to SQLite
Nice! I didn't know about cog.

I've developed a simple "codeblocks" tool that to keep README.md up-to-date. In your example, here is how to insert the latest `--help` output:

    codeblocks usage-auth README.md -- google-drive-to-sqlite auth --help
Where "usage-auth" is the block language in README.md:

    Full `--help`:
    ```usage-auth
    Usage: ...
    ```
Checking is also possible:

    codeblocks --check usage-auth README.md -- google-drive-to-sqlite auth --help
It's not as generic as cog, but does not require writing codegen scripts inside Markdown file.

https://github.com/shamrin/codeblocks

ash··on Malloy – A Better SQL, from Looker
It would be nice to see how this query could look in Postgres.
ash··on Malloy – A Better SQL, from Looker
I don't think there is a good way to return nested JSON using SQL, which this example does.
ash··on Malloy – A Better SQL, from Looker
SQL resisted attempts to improve upon it for many-many years. Kudos to Looker for not giving up!

Automatic generation of nested JSON results is very interesting:

https://looker-open-source.github.io/malloy/documentation/la...

ash··on 10 years of whatever this has been
What's L1?
ash··on Mozilla to put ads in Firefox address bar suggestions
Please note they said it was a mistake which was quickly fixed. Bugs happen.

https://twitter.com/BrendanEich/status/1269313200127795201

https://brave.com/referral-codes-in-suggested-sites/

ash··on Climate change: IPCC report is 'code red for humanity'
World population is projected to (at least) level out by 2100.

https://en.wikipedia.org/wiki/Projections_of_population_grow...

ash··on The House That Vanished
The article is from May 01, 2019. Covid didn't exist yet.
ash··on Declassified documentary of 1961 Tsar Bomba thermonuclear test
> The documentary film was released and posted on August 20, 2020 on the YouTube channel of Rosatom State Atomic Energy Corporation in connection with the celebration of 75 years of nuclear industry.

https://thebarentsobserver.com/en/security/2020/08/rosatom-r...

ash··on Changes at Basecamp
They say antitrust discussions are okay.

> Note that we will continue to engage in politics that directly relate to our business or products. This means topics like antitrust, privacy, employee surveillance. If you're in doubt as to whether something falls within those lines or not, please, again, reach out for guidance.

https://world.hey.com/dhh/basecamp-s-new-etiquette-regarding...

ash··on Icecream: Never use print() to debug again in Python
Could you provide a concrete example? It's still unclear to me why one wants a custom breakpoint() handler.
← PreviousPage 2 of 16Next →