HNHacker News
TopNewBestAskShowJobs

Humphrey

686 karma · joined September 30, 2014

submissionscomments
Humphrey··on Australia's weird little time zone (2008)
It's also mentioned on Wikipedia https://en.wikipedia.org/wiki/Australia/Eucla
Humphrey··on Moving from React to htmx
I've solved your data binding problem with: GraphQL (server) + UrQL (JS graph client with the graphcache plugin) + GraphQL Code Generator (creates TS types for your API).

The data syncs perfectly, keeps up-to-date. GraphQL subscriptions allow for real time updates. Oh, and React-Hook-Form for forms, which feeds quite nicely into my GraphQL mutations. It's a real neat solution.

As for server side, I've started using Python-Strawberry (was using Graphene but it stopped receiving updates) with Django.

It's super solid stack, with typings flowing all the way from server API through to my react components.

Humphrey··on Improving Firefox Responsiveness on macOS
This. Firefox drains battery, but still less than Docker & a TypeScript dev environment. Using those three together means my M1 Air falls a LONG WAY SHORT of the 18hr battery life I was promised
Humphrey··on Learn Postgres at the Playground – Postgres compiled to WASM running in browser
I love that you did such an audacious thing.

FYI, if you're on MacOS, someone has packaged Postgres into a standard "just works" self contained MacOS app. With a GUI & system tray menu to control it. It's so good that I use it instead of a Docker image for PG. All the psql and pg_restore commands are contained in the .app package and can be called from the terminal.

https://postgresapp.com/

Humphrey··on Show HN: 1024, a 2048 Puzzle Game
I initially tried to rotate my phone. It look me a while to notice the buttons. Good 5 mins of fun!
Humphrey··on The Echidna Is Australia’s Most Delightfully Different Mammal
Was once [ignorantly] trying to help encourage an echidna to get off a busy road next to my house, but it burrowed down into the cement curb gutter. It managed to use its quills to hold onto the cement, and there was not a chance of moving it. I couldn't believe how strongly it could hold onto what I thought as smooth cement.
Humphrey··on My 40-liter backpack travel guide
Got this bag also, it's the best!
Humphrey··on Tauri 1.0 – Electron Alternative Powered by Rust
> As far as I understand, applications are not written in Rust but in HTML/CSS/JS.

Frontend UI yes. But enables you to use rust for your background worker (Electron apps use node for the background worker)

Humphrey··on Tauri 1.0 – Electron Alternative Powered by Rust
I think it depends on your use case. Yes, a huge selling point Electron is being able to control the Chromium version. But, I can imagine a lot of less complicated apps don't need this.

Also, the Chromium renderer is only half of an Electron app. There is also a background thread running in node, which can pass messages to the renderer.

So, I can imagine that for apps that are more background thread heavy, swapping out node for rust could work quite well.

Humphrey··on Lilium achieves first main wing transition for all-electric aircraft [video]
Why is the speed in metric (km/hr) and the vertical acceleration in imperial (ft/min). Hurts my brain!
Humphrey··on Show HN: Can you lose at Wordle if you tried?
Screen size is slightly too high for iPhone SE, wanna slice off about 50px?
Humphrey··on Show HN: Can you lose at Wordle if you tried?
Cant you make the vertical height on mobile about 50px less, so it does not scroll in full screen on an iPhone SE. Thanks!
Humphrey··on My thoughts about Fly.io (so far) and other newish technology I'm getting into
Yeah, and I guess all my Australian hosted things are slow for you Americans who have even more money to spend
Humphrey··on Nvidia releases open-source GPU kernel modules
I'm confused! Why would Nvidia want to keep any of this closed source. Surely they make money when people buy graphics cards, and having open source out-of-the-box graphics support in Linux would mean they would sell more graphics cards?
Humphrey··on Show HN: I am building a free version of Strava
I was literally thinking while riding on the weekend that my watch should be able to track "hang time" / "In the air time". So good work! I'll try that out next time I ride.

I don't like the idea of strapping my phone to the frame like that. I bought an Apple Watch so that I didn't need to take my fragile phone with me.

Also, Strava's watch app is very basic and boring, so I use a different app to record "Workout-doors", and then sync my activities to Strava for the Social Network aspect of it.

I suspect it'll be impossible to compete with Strava for the Social Network ability, but I think there is room for the apps that record your activities and give better real-time and post-activity stats.

Humphrey··on Python’s “type hints” are a bit of a disappointment to me
Oh of cause -- and I suspect TS only became so good because it had the freedom to be a new language.
Humphrey··on Python’s “type hints” are a bit of a disappointment to me
While I love the idea behind Python's type hints, they are merely a shadow of the success of TypeScript.

Like the author, I've mostly given up on adding type hints in my Python code. I now only use them when I want to help my IDE find autocomplete suggestions.

Whereas TypeScript was a game changer for JavaScript. I used to hate JavaScript, but somehow TypeScript has become one of my favourite languages! How has the advent of Typing has changed my opinion on these two very similar languages?

- JavaScript without types is a mess, whereas Python comparatively was much better, esp since it does runtime duck type checks.

- Python type hints are much similar to Flow type hints in JS, which I tried, but ditched for the same reasons as Python type hints.

- I was hesitant to try TS's all in approach, cause it was harder to introduce into a project, but after having converted a number of projects to TS, I can see that going all-in is a much better approach than just adding hints as you go.

- TS does checks at many more levels. Eg, if a property is optional or could have different types, it is a syntax error if I don't check the value is valid before use.

- TS does an amazing job of auto-detecting types, so most of the time you don't need to specify types, and it enforces these just as if you declared them.

- TS has reached the critical mass were most popular packages now include type definitions, I very rarely have to add @types/* anymore. This means you get full intelisense on all 3rd packages! I spend a lot less time referring to documentation now!

In hindsight, compiling out types is a great work flow. TypeScript is so good that it has made me enjoy Python less. If there was ever a Python equivalent to TS which reached a critical mass of support, I'd jump all-in in a heartbeat.

Humphrey··on Why Web3 won't make the world more equal
I wonder whether we should stop calling it Web3? Names matter, and calling it such helps promote & legitimise it. But is the current state of the block chain hipe what we want the web to become? Shall we wait and see whether this actually becomes the 3rd gen of the web before giving it such a name?
Humphrey··on My website is one binary
But it's not an apples to apples comparison.

Generating static files has a smaller attack vector than running an executable on a server.

Keeping a service up and running over a long period of time is much more work than using generic static site hosting.

HTML that works today will likely still work in 10 years time, but a binary you compile today most likely won't, or at least, you'll have wanted to have changed up your server.

Humphrey··on Backyard approaching lighting at Adelaide Airport
Also, at that time, it's super quite except for those freighters.
Humphrey··on Backyard approaching lighting at Adelaide Airport
Oh, those 2am freighter flights! I'm in a super quiet area of Trevallyn, which makes those couple of flights quite loud. Also, Launceston has a similar set of runway lights, that you drive under, and look very close to a house.
Humphrey··on New WebKit features in Safari 15.4
Unfortunately, Apple have a policy that the inbuilt webkit is the only browser engine that is allowed to be used on an iOS device. The iOS Chrome, Firefox, & Edge apps are just thin wrappers around the same Safari engine included in iOS.
Humphrey··on You can change your number
> Why would it do that?

If I remember correctly, Signal was first explained to me as a secure SMS app. That is it stores your SMS's more securely than the stock apps did... and if you were messaging somebody who also used Signal, then you'd be upgraded to an end-to-end encrypted message.

That said, now I'm on iOS, it doesn't let me do that, so I only use it for contacts with Signal.

Humphrey··on You can change your number
Yes, on Android - it can replace your SMS app, and uses secure storage so that other apps do not have access to your SMS's.
Humphrey··on Django Issue Tracker inaccessible due to expired certificate
Certificate expired 2022-02-03 which, depending on your timezone, means that you can't access it.

Since they have enabled HSTS, browsers will not let you add an exception, so this site is effectively offline for my half of the world.

Humphrey··on Solving Wordle in 3.64 guesses on average, 99.4% of the time
It fails with the word "frogs", as it tells me it is "gross"
Humphrey··on Solving Wordle in 3.64 guesses on average, 99.4% of the time
I have also hacked around on solving this problem. However, I decided that using the shorter list of answers was cheating, since end users wouldn't have access to this list. From a user's perspective, any word that Wordle lets you guess could be a valid solution.

It's still a work in progress, but my code died when I tried to generate a complete game tree for the full list.

However, in theory it could be done once, to determine the best starting word, and then hardcoded to always use the same start word. So, my plan to explore a game tree approach from guess 2.

Humphrey··on Etsy’s Journey to TypeScript
TS does take into account things like === and you can get warnings for using them wrongly. But I'm not certain... I just don't find myself thinking about === and use strict.
Humphrey··on Etsy’s Journey to TypeScript
> one thing that TS doesn't provide ... is an integer type.

This! I'd love an integer type, and I think this would be within the scope of TS: Use a JS number when running, but type check it to integer.

There is JS bigint though.

Humphrey··on Etsy’s Journey to TypeScript
Opinion based on my experience: Typescript kicks Python typing to the curb.
← PreviousPage 5 of 8Next →