HNHacker News
TopNewBestAskShowJobs

tomstuart

2,961 karma · joined August 27, 2009

Computer scientist, technical leader, Ruby & JS hacker, http://computationbook.com/ author, &c. https://tomstu.art/, hi@tomstu.art
submissionscomments
tomstuart··on To Ruby from Python
I’m interested to learn what “first-class functions” means to you. Ruby has both `Proc` and `Method` which would appear to qualify. Is your frustration that you can’t `def foo … end` and then use bare `foo` to refer to it as a value (vs invoking it)?
tomstuart··on Git from the Inside Out
(2015)
tomstuart··on Fresh – Next-gen web framework
It doesn’t. This only works once React itself (i.e. the JavaScript code for the library) has loaded, which usually happens pretty quickly. The user-written React components might not finish loading until much later.
tomstuart··on Making popular Ruby packages more secure
You need somewhere to physically store a secret, plus the ability to do some computation to turn that secret into a time-based one-time code. A lot of people do use their phone, but there’s nothing to stop you using a dedicated hardware token, or conversely just your computer (e.g. 1Password [0]) if you’re comfortable with keeping all your secrets in the same place.

Naturally there are security/convenience tradeoffs however you do it. The important thing is that, unlike with passwords, you never send the secret over the wire.

[0] https://blog.1password.com/totp-and-1password/#totp-isnt-the...

tomstuart··on Making popular Ruby packages more secure
That’s correct. If you’re a maintainer of a very popular gem, as of 15th August you’ll no longer be able to e.g. `gem push` if you haven’t enabled MFA on your RubyGems account. You will of course still be able to log in and enable it.

More details in the RFC: https://github.com/rubygems/rfcs/blob/master/text/0007-mfa-r...

tomstuart··on Fresh – Next-gen web framework
“The page remembers the click” was the original intent [0], but the latest version of React includes a feature called selective hydration [1] which can hydrate a component synchronously in response to an event if possible (i.e. without replaying the event). Naturally React itself has to be loaded for any of that to work.

[0] https://twitter.com/dan_abramov/status/1200118229697486849

[1] https://github.com/reactwg/react-18/discussions/130

tomstuart··on CJEU confirms that UK citizens have lost EU citizenship
Yes, sorry, poor choice of words. Fixed.
tomstuart··on CJEU confirms that UK citizens have lost EU citizenship
Assuming good faith on the part of Leave voters, there was a sustained political and media campaign of straightforward lies (“the economy will improve”, “immigration will be reduced” etc) which convinced a lot of people.
tomstuart··on A year with the Elgato Stream Deck
Given that the entire premise of this product is “dynamically programmable buttons whose labels show what they’re currently mapped to”, I completely agree it’s uninteresting if you have no need for dynamically programmable buttons whose labels show what they’re currently mapped to.
tomstuart··on A year with the Elgato Stream Deck
One advantage is that you can map a button to a folder, allowing you to drill down into a whole different set of items. This isn’t functionally different from what you can achieve with a numpad + modifiers, or even just a regular keyboard, but it’s clearly nicer and requires less memorisation.

It’s also not just “custom icons”, it’s a live display — e.g. in the top image of the linked post, you can see a display on one of the buttons showing (presumably) an upcoming calendar event.

tomstuart··on Programming with Nothing
FYI there’s an (explicitly interpreted, not proc-encoded) implementation of this in https://computationbook.com, including compilation from lambda calculus: https://github.com/tomstuart/computationbook/tree/master/uni...

And also, as you imply, iota: https://github.com/tomstuart/computationbook/tree/master/uni...

tomstuart··on Automatic Differentiation: Forward and Reverse
Thank you! This is the clearest explanation I’ve read and it definitely shook something loose in my brain.
tomstuart··on Ask HN: Do you rewrite pull requests?
The `Co-authored-by` trailer is your friend here. Even if you completely rewrite their code, give them coauthor credit in the commits and they’ll get the satisfaction of seeing their face in the commit history without the hassle of actually addressing all your feedback. https://docs.github.com/en/pull-requests/committing-changes-...
tomstuart··on Show HN: Prevent your computer sleeping with just a webpage
You might need `caffeinate -d` to prevent the display from sleeping.
tomstuart··on PSA: React 18 calls code twice in strict dev mode to detect side effects
Aside from being development-only, note that you also need to wrap a component in `<React.StrictMode>…</React.StrictMode>` to opt it into this.
tomstuart··on What do new Sudoku techniques teach us about real-world problem solving?
Yes, it’s a joke. Simon discloses “the secret” in almost every video, so the joke is that it’s always presented as mysterious insider knowledge even though it’s clearly not.
tomstuart··on Ask HN: Domain Name Registrars in EU?
Gandi.
tomstuart··on Lambda Calculus in 400 Bytes
I wrote https://computationbook.com/ for that audience.
tomstuart··on What have we got to lose? (1998)
It’s from the first issue of Wired UK, a spinoff: https://archive.gyford.com/1997/wired-uk/1.01/adams.html
tomstuart··on Ask HN: Best (physical) book to learn React?
I understand that you want a paper book, but just to be safe: have you already seen https://beta.reactjs.org/learn? It’s really good.
tomstuart··on No Hello (2013)
I don’t want to take sides, but https://nohello.net/ is good too.
tomstuart··on Liminal Space
This is the Baader–Meinhof phenomenon: https://en.wikipedia.org/wiki/Frequency_illusion
tomstuart··on What’s the Difference Between American English and British English?
“Haych” is common but nonstandard in Britain: https://youtu.be/j4hvh5e8-nw
tomstuart··on Bugs are evolving to eat plastic
“Bug” meaning “insect” is a North Americanism [0]. The article is from The Guardian in the UK, where the non-insect meaning is the more natural interpretation, particularly in a headline (cf “hospital superbug” for stories about MRSA [1]).

[0] https://www.oxfordlearnersdictionaries.com/definition/englis... [1] https://www.nhs.uk/conditions/mrsa/

tomstuart··on Ask HN: I'm looking for a good book on the fundamentals of CS
I don’t think you’ll find a better return on investment than working through The Elements of Computing Systems (https://www.nand2tetris.org/) which recently got a second edition. It won’t teach you how to make a rendering engine, or even necessarily any data structures or algorithms, but it will give you a big-picture understanding of the practical fundamentals (literally “what is a computer and how does it really work?”) which you can then use to direct your own learning based on what you want to know next.
tomstuart··on Leaving MySQL
You might find this (from 1989) interesting: https://dreamsongs.com/RiseOfWorseIsBetter.html
tomstuart··on Programming with Something
Hey Sam! Thanks so much! That means a lot.
tomstuart··on Programming with Something
Thank you, I’m glad you liked it! Yes, some of the same ideas are covered in the second half of chapter six. The presentation in this talk is different, mainly because Ruby has pattern matching now, which makes everything clearer.
tomstuart··on Programming with Something
This is the sequel to a talk about the lambda calculus I gave ten years ago. Here’s the 2011 Hacker News discussion: https://news.ycombinator.com/item?id=3343205
tomstuart··on Eidos-Montréal Offices shifting to the 4 day work week
No:

> In the next few weeks, the Montreal and Sherbrooke studios will be officially closed on Fridays, without changing the working conditions currently in place nor the salaries of employees, thus switching from the 40-hour week to 32-hour.

← PreviousPage 3 of 11Next →