Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
RHSeeger
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
24 ms
·
361.
▲
by
RHSeeger
1y ago
> I find that my blood glucose spikes much later than what is suggested. I'm a type 1 and my blood glucose can response can vary wildly. Sometimes it can spike quickly (15-30 minutes), other times it can take 2, 3, or even 4 hours.
362.
▲
by
RHSeeger
1y ago
Uber won by ignoring laws that were put in place, and then crying to the public whenever they got in trouble for it.
363.
▲
by
RHSeeger
1y ago
We could ask Claude to generate the schematics for a quantum computer that can find the prime factors of 21. Then we get the best of both worlds.
364.
▲
by
RHSeeger
1y ago
> The rule is that you can't cache a value in an interface, because interfaces don't store data. Right, but the start of where I jumped into this thread was about the fact that there are places where fields would make things be
365.
▲
by
RHSeeger
1y ago
But part of the goal is to not need the caller to cache it. Nor have the class that knows how to fetch it need to know how to cache it either. The responsibility of knowing how to cache the value is (desired to be) in the MetadataSource int
366.
▲
by
RHSeeger
1y ago
I don't see how that solves the problem. It seems like Video will need to keep it's own copy of CachedMetadaSource, which points back to itself, and go through that access it's metadata in the getMetadata implementation it ma
367.
▲
by
RHSeeger
1y ago
When you call myImageInstance.fetchMetadata, what does it do? I don't know rust, so it's not clear to me how the value gets cached.
368.
▲
by
RHSeeger
1y ago
I've seen such difficult to follow code in Java, and I complain about it every time. But having multiple inheritance isn't the cause (because Java doesn't have that). Nor does having multiple interfaces with default implement
369.
▲
by
RHSeeger
1y ago
From a very modified version of something I was working on recently, but with the stuff I couldn't do actually done here (and non-functionality code because of that, but is shows the idea) public interface MetadataSource {
370.
▲
by
RHSeeger
1y ago
> Even if they do, what happens when both classes implement a method or field with the same name? It's done in Java with interfaces with default implementations, and the world hasn't imploded. It just doesn't seem like th
371.
▲
by
RHSeeger
1y ago
Making the class add 2 methods and a field for every place the interface would define a field adds noise. And if you have a class with 20 interfaces, that can be a lot of noise. When you consider that the class itself doesn't actually
372.
▲
by
RHSeeger
1y ago
But then you have the getters, setters, and field on every class that implements the functionality. It works, sure, it just feels off to me. This is code that will be the same everywhere, and you're pulling it out of the common class a
373.
▲
by
RHSeeger
1y ago
But if there's a lot of classes that implement the same thing, then not duplicating code makes sense. And saying "it's an implementation detail" leads to having the same code in a bunch of different classes. It feels ver
374.
▲
by
RHSeeger
1y ago
> First, traits don't define any fields. How does one handle cases where fields are useful? For example, imagine you have a functionality to go fetch a value and then cache it so that future calls to get that functionality are not r
375.
▲
by
RHSeeger
1y ago
I know his reasoning for it, I just disagree with him. People added JSON parsers that allow comments and can _still_ get tricky with them. The only thing the standard not adding them did was make sure we can't rely on them being there.
376.
▲
by
RHSeeger
1y ago
> No comments There are a large number of people that consider that _not_ a benefit.
377.
▲
by
RHSeeger
1y ago
Static typing provides different benefits to strong typing. Both are useful in their own ways. And both can get in the way (and not be worth it) in some cases.
378.
▲
by
RHSeeger
1y ago
Most of the well thought out writeups on types that I've seen put them on two different scales - Strong vs Weak - how does the language convert between types - Static vs Dynamic - Does type information apply "early" or "
379.
▲
by
RHSeeger
1y ago
Michael Bay are basically not worth watching for me. Things move around the screen too fast to know what's going on. The Transformers movies are especially bad due to it because it can be hard to tell which robots are on which side; an
380.
▲
by
RHSeeger
1y ago
Heck, even at the low end of not-garbage, a couch runs in the $1k range. Something from Bobs Furniture Outlet, for example. Note, I love Bob's furniture. I have a couch from there I bought 10 years ago and it's absolutely the most
381.
▲
by
RHSeeger
1y ago
I built my living room coffee table by hand with my father, who is now dead. I built my shop table by hand (to match the one my father had). Even ignoring the 10s of thousand of dollars it would cost me to refurnish a house to match what I
382.
▲
by
RHSeeger
1y ago
> You might wonder why you'd ever need such a strange behaviour, right? Closures can also be used to return a group of methods that all act on the same set of variables; ie, objects.
383.
▲
by
RHSeeger
1y ago
It is, for many people, an absolute pleasure to work in.
384.
▲
by
RHSeeger
1y ago
I don't get to use Tcl at work anymore, but I adore it. I use it for command line stuff on a regular basis
385.
▲
by
RHSeeger
1y ago
I would argue that - Defining recursion is linguistic - Defining a function recursively is mathmatic
386.
▲
by
RHSeeger
1y ago
> It DOES require learning a specialized language. Which... is what math is, too.
387.
▲
by
RHSeeger
1y ago
> BTW relational DBs are math. It's funny, reading the post you're replying to, I basically read it as > I don't need math, I need <math, but by another name> My teenage daughter used to complain about math, and I
388.
▲
by
RHSeeger
1y ago
I'd be willing to consider that, but he's doing a ton of things that very clearly have _no_ upside and obvious downsides. As one example, he literally fired entire departments that were _generating_ money for the government. It&#x
389.
▲
by
RHSeeger
1y ago
I expect she'd probably drive home and get it. She doesn't have a car at 13 yrs old though. Nor would I want her walking home from her school at the moment to get it to the tune of 40+ minutes; so calling me is a reasonable option
390.
▲
by
RHSeeger
1y ago
1. I don't have a problem with my daughter owning a smartphone and using it reasonably. 2. I'm not buying my daughter a 2nd dumb phone to bring to school with her. "Bring it but don't use it (or leave it in your locker)&
More ›