Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tomstuart
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
tomstuart
3y ago
There will be, yes: https://developer.apple.com/visionos/work-with-apple/
32.
▲
by
tomstuart
3y ago
The peculiar viewpoint you’re demonstrating in this comment is similar to Reddit’s. It’s not objectively wrong , but the calculus involved definitely looks weird from the outside. How would you quantify the value of Hacker News to Y Combin
33.
▲
by
tomstuart
3y ago
I don’t think you’re misunderstanding anything, but to clarify, I’m talking about a more general notion of subtyping (e.g. structural, “duck typing” etc), not necessarily inheritance. Instances of A and B can (in Smalltalk parlance) respond
34.
▲
by
tomstuart
3y ago
> My question is, why is that necessary? Exactly what is the benefit, except for a tiny bit of convenience? Why is that better than functions that work on well-defined types? The benefit is subtype polymorphism via dynamic dispatch. When
35.
▲
by
tomstuart
3y ago
If anyone’s interested, I wrote up an example application of dual numbers in Ruby: https://tomstu.art/automatic-differentiation-in-ruby
36.
▲
by
tomstuart
4y ago
You have to fill in an online form. Go to support.nintendo.com, choose your country, and search for the page about joycon drift — e.g. in the UK it’s https://www.nintendo.co.uk/Support/Nintendo-Switch/Troublesh...
37.
▲
by
tomstuart
4y ago
The metaprogramming lecture [0] perpetuates the common misunderstanding of what “mocking” is [1], which is unfortunate. [0] https://missing.csail.mit.edu/2020/metaprogramming/#a-brief-... [1] https://ma
38.
▲
by
tomstuart
4y ago
The newer (or perhaps still the same!) version of this is to add `babel-standalone` to the page [0] and put the `type="text/babel"` attribute on any `<script>` tags where you want to use JSX. [0] https://reac
39.
▲
by
tomstuart
4y ago
…by Sam Barlow, now better-known for the live-action video games Her Story , Telling Lies and Immortality .
40.
▲
by
tomstuart
4y ago
It’s hard to generate efficient code ahead-of-time because the compiler doesn’t know what the types of values will be, so it has to emit very general code that can cope with all possibilities at the expense of performance. A just-in-time co
41.
▲
by
tomstuart
4y ago
True enough. I think when we say “simple” we often really mean “cheap” (to maintain), so maybe it’s better to cut to the chase and just say that instead.
42.
▲
by
tomstuart
4y ago
I agree with what you mean, but I’d nitpick and say it’s not the code itself that’s the asset, but rather the behaviour of that code when executed. If you could refactor and get the same behaviour with less code (whatever that means), that’
43.
▲
by
tomstuart
4y ago
You’re describing people who believe that code is an asset, when the reality is that it’s a liability: zero lines of code would be ideal if you could get away with it, but you can’t, so you have to compromise and limit that liability as muc
44.
▲
by
tomstuart
4y ago
This isn’t a complete project, but it’s a good start if you wanted to hack on the idea yourself: https://learnopencv.com/center-stage-for-zoom-calls-using-me...
45.
▲
Raspberry Pi Camera Module 3 released
(raspberrypi.com)
141 points
by
tomstuart
4y ago
|
131 comments
46.
▲
by
tomstuart
4y ago
Thank you, that’s very kind!
47.
▲
by
tomstuart
4y ago
> I don't think the execution model you mention, which results in the absurdity of C style transitive includes polluting the global namespace, will ever be changed though. There is a proposal at https://bugs.ruby-lang.org
48.
▲
by
tomstuart
4y ago
>> 6.626e-34 < 9.109e-31 => true
49.
▲
by
tomstuart
4y ago
While the original Wasm PR description is a useful historical snapshot of the cross-build instructions, the copy in the official documentation is being updated over time: https://github.com/ruby/ruby/blob/mast
50.
▲
by
tomstuart
4y ago
For better or worse, the convention in Ruby is to name methods in a second-person style [0], as if addressing the object directly: “file, do you `#exist?`”; “string, do you `#start_with?` foo?”. So, for consistency, `Dir.exist?` and `File.e
51.
▲
by
tomstuart
4y ago
The endpoints of the lines have subpixel resolution, so although you’re only drawing whole pixels, the choice of which pixels to draw along the line may change based on the subpixel positions of the endpoints.
52.
▲
Ruby 3.2.0 preview 3 released
(ruby-lang.org)
5 points
by
tomstuart
4y ago
|
1 comments
53.
▲
by
tomstuart
4y ago
Notable addition since preview 2 not mentioned here: `Data.define` can be used to define stricter, immutable Struct-like classes.
54.
▲
by
tomstuart
4y ago
This was, for me, not an effective demo: when I tap “sign in with a passkey” it shows me a QR code to scan with another device. What? (I assume this is because I haven’t created an account yet, but if so, the demo needs to make that about t
55.
▲
by
tomstuart
4y ago
I know what you mean, but — as the article explains [0] — Git’s packfile format uses delta compression, which is essentially “storing diffs”. [0] https://github.blog/2022-08-29-gits-database-internals-i-pac...
56.
▲
by
tomstuart
4y ago
A complex number represents a 2D point in the complex plane, but multiplication by a complex number on the unit circle also happens to correspond to a rotation in the complex plane, e.g. 3 × i = 3i, which is a rotation of 90 degrees antic
57.
▲
by
tomstuart
4y ago
This is incredibly clever. In case anyone else is confused by the order: the ASCII codes for L, S, R are 76, 83, 82 respectively, so L encodes i and R encodes -i as you’d expect.
58.
▲
by
tomstuart
4y ago
I do find “BDD” a frustrating term. It was coined by Dan North [0] to refer to a coherent set of sensible TDD practices — give tests expressive names, say “behaviour” not “test”, write executable “given/when/then” acceptance crite
59.
▲
by
tomstuart
4y ago
I have neither the motivation nor the energy to start an internet argument about it, but I’d like to reassure the casual reader that this post is promoting a minority viewpoint.
60.
▲
by
tomstuart
4y ago
A thread investigating the source of this claim: https://twitter.com/Vortex_Egg/status/1548047874411245570
More ›