HNHacker News
TopNewBestAskShowJobs

foobazgt

637 karma · joined September 12, 2022

submissionscomments
foobazgt··on GM electric vehicles can now access Tesla Superchargers
Ditto
foobazgt··on GraalPy – A high-performance embeddable Python 3 runtime for Java
I mean, if you're trying to embed one language in another, please don't be surprised when the quickstart guide has a couple of examples containing a few lines of code written for the embedding language and its package manager(s).
foobazgt··on Fair: A Go library for serving resources fairly
Ah ok, that makes sense. Over loopback, you can roundtrip Redis at least as fast as double-digit micros. Intra-DC, your network latency should be somewhere in the triple-digit micros. I'd say if you're not seeing that, something is probably wrong.
foobazgt··on Fair: A Go library for serving resources fairly
I'm sorry, I don't think I understand your question. Are you talking about the KVS? You shard the servers for extra capacity. Several KVS's have built-in clustering if you want to go that route. They're usually incredibly stable, but if one goes down for whatever reason (say the physical machine fails), you just spin another one up to take its place.

In terms of preserving state, the answer for rate limiting is that it is almost always far, far less dangerous to fail open than it is to deny requests during a failure. If you really, really, wanted to preserve state (something I'd suggest avoiding for a rate limiter), several KVS's have optional persistence you can turn on, for example, Redis' AOF.

The end services themselves should be designed with some sort of pushback mechanism, so they shouldn't be in any danger of overloading, regardless of what's going on with the rate limiter.

foobazgt··on Fair: A Go library for serving resources fairly
Rate limiters seem like the poster child for something you'd want to host in an in-memory KVS. Typical access times look more like ~100us, not milliseconds. Even if you have a complicated algorithm, you can still limit it to a single round trip by using a Redis Function or some moral equivalent.
foobazgt··on How to Lead Your Team When the House Is on Fire
You're definitely not in mortal danger as a SWE, but FWIW, I've witnessed (2nd hand) datacenter servers literally catch on fire and entire datacenters go out because a critter got crispified on some power lines. Sometimes "the server's on fire" is metaphorical and sometimes it's literal. In the latter case, at least you can get some interesting pictures of the aftermath.
foobazgt··on How America's universities became debt factories
> In order to have a happy life, you have to have a vocation and an avocation that are separate from each other.

This reads to me as your career shouldn't involve doing something you enjoy. I think this mostly happens in situations where people are doing exactly at work what they'd do at home, and they don't like their job for any vast number of reasons. Usually that's only a problem if you don't have the security to find another job.

My personal experience is that it really helps to be able to be passionate about your work. It's fulfilling. You will perform better at your job, because you will be multiplying your experience from work with your experience at home. Sometimes my hobbies and my work have been literally exactly the same, e.g. I've been able to open source projects from work (which I then work on as a hobby).

The advice I'd give people instead:

Like your job. Get a degree in a field that you both enjoy and that pays well. That sounds glib, but so many people don't think about this at all (part of the focus of the article). You probably won't be able to align your career and the exact activity you enjoy the most, but you should shoot for them being in the same ballpark. Where they don't align? Sure, that's opportunity for a hobby.

foobazgt··on Why is language documentation still so terrible?
Right, I was careful to say "generated javadoc", but that nuance might not have been obvious. The author's point is not about the syntax you use to write documentation, it's about the experience you have consuming it. (And FWIW, Java 23 supports Markdown comments[0]).

Re: "introductional/topical contents", this is what package-info.java files are for.

0) https://openjdk.org/jeps/467

foobazgt··on Why is language documentation still so terrible?
Do you have specific examples in mind?
foobazgt··on Why is language documentation still so terrible?
The author rants about Java a lot, when they admit they've never even used it. It shows. People view documentation in their IDEs. Generated javadoc is almost not a thing nowadays. I suspect this is the same in similarly statically typed languages with good IDE support.
foobazgt··on Conservative GC can be faster than precise GC
This is such a weird take. Java's been everywhere in prod in the industry for decades from backends running millions of qps to HFT to game clients.

IME, the most common GC problems I see are:

  - incredibly basic settings are wrong, like the max heap size
  - the app was written with some very poor behavior, e.g. unreal amounts of allocation or tons of allocation thrashing in tenured heap.
There aren't even a lot of GCs knobs to "manage" anymore compared to a decade ago [0]. Don't treat your GC as a black-box machine with infinitely available resources, and you'll be fine.

0) https://docs.oracle.com/en/java/javase/22/gctuning/ergonomic...

foobazgt··on BMW Overtakes Tesla in European EV Sales for First Time
Yes, I suppose if

  - after ignoring the persistent warning you had days in advance that the 12v is dying
  - you lose power in the exact few seconds between
    - first securing every vehicle door
    - and then proceeding to open any other door
  - and there's another passenger inside
  - and they are also incapable of operating a door
then you will have to either jump your 12v or otherwise somehow unlock your door. The odds are diminishingly small given all of those factors, but wait there's also more:

  - You don't have all the accidental 12v drains that happen in other vehicles (lights, accessories, etc... accidentally left running)
  - The 12v is constantly replenished from the main battery, rather than a more unreliable alternator
So, I suppose there's this and then there are also the odds that your passenger is immediately struck by lightning as they exit the vehicle. At least in the former unlikely scenario, emergency responders can help you out with relative ease and little harm.
foobazgt··on BMW Overtakes Tesla in European EV Sales for First Time
Huh? The model 3 didn't come out until 2017 and the model Y came out in 2020. That's literally just four years ago - not 2012.

I own a 2019 model 3 and will be replacing it with a 2024. In those 5 years, it's accumulated a bunch of improvements. I don't exactly have a changelog to work with, but here's what I can think of off the top of my head:

  - more powerful rear motor, 10% faster 0-60, breaking 10s quarter mile
  - track mode v3
  - heat pump
  - matrix headlights
  - adaptive suspension w/ frequency response suspension dampers
  - ryzen media control unit
  - triple pane glass
  - heated steering wheel
  - sport seating
  - ventilated seats
  - usb-c ports
  - rear entertainment system
  - HW4
  - updated wheels/tires
  - exterior styling updates (front bumper, non-chrome handles, etc...)
  - interior styling updates (LED lighting, carbon fiber dash, etc...)
Oh, and there's also the fact that I'm only paying 70% of what I did the first time around (inflation adjusted).
foobazgt··on BMW Overtakes Tesla in European EV Sales for First Time
This seems in direct contrast to reality. The long-range RWD model 3 (360mi of range) is available for $35K (after federal tax credit). That's more bang-for-the-buck than I've seen for any car in my lifetime. I'm not aware of any class competitor that's even mildly close.
foobazgt··on BMW Overtakes Tesla in European EV Sales for First Time
I don't really get this. "Love the art, not the artist" is pretty much an essentialism for participating in modern human society. Try taking a moment to trace through everything you consume and see how much of it was originated by very flawed human beings - some monstrously so. This extends in every direction, even all the way out to things like massive scientific discoveries. Nothing's immune, because we're all human.

I'm in the process of buying my 3rd Tesla, because I still don't think there's anything better out there (based on my personal needs). I'm not making any political or moral statements. I'm just buying an excellent vehicle.

foobazgt··on I've built my first successful side project, and I hate it
There's a third case: dealing with folks who just aren't technically savvy enough to figure some things out on there own, no matter how intuitive, well documented, or fully featured your product is.

I think I'd rather troubleshoot with a well-scripted AI chatbot, than a human being who's forced into the role of an automaton - executing directly from a script. Just, FFS, let me escalate to an actual competently trained human being once I've been through the troubleshooting.

foobazgt··on East Germany invented 'unbreakable' drinking glasses
I've lost at least a dozen pieces of glassware exactly this way. :(
foobazgt··on Philips Hue bulbs are randomly turning brightness to 100%
I finished a space recently and, when planning for the ceiling fan, ensured we had a wall switch in addition to the remote. It seems penny-wise pound-foolish to do otherwise.
foobazgt··on C++ patterns for low-latency applications including high-frequency trading
Usually the proposal is to randomize the processing of the queue. So, as long as your trades get in during the window, there's no advantage to getting in any earlier. In theory the window is so small as to not have any impact on liquidity but wide enough to basically shut down all HFT.
foobazgt··on C++ patterns for low-latency applications including high-frequency trading
My experience has been that it's rather heuristic based. It's a clear win when you can immediately see far enough in advance to know that it'll also decrease the amount of generated code. You can spot trivial cases where this is true at the point of inlining. However, if you stopped there, you'd leave a ton of optimizations on the table. Further optimization (e.g. DCE) will often drastically reduce code size from the inlining, but it's hard to predict in relationship to a specific inlining decision.

So, statistics and heuristics.

foobazgt··on C++ patterns for low-latency applications including high-frequency trading
> That eliminates all of the function call overhead and may also enable further optimizations (dead code elimination, constant propagation, etc.).

AFAIK, the speedup is almost never function call overhead. As you mention at the tail end, it's all about the compiler optimizations being able to see past the dynamic branch. Good JITs support polymorphic inlining. My (somewhat dated) experience for C++ is that PGO is the solve for this, but it's not widely used. Instead people tend to avoid dynamic dispatch altogether in performance sensitive code.

I think the more general moral of the story is to avoid all kinds of unnecessary dynamic branching in hot sections of code in any language unless you have strong/confidence your compiler/JIT is seeing through it.

foobazgt··on Batteries: How cheap can they get?
At $6343 [1] for 13.5kwh [2], seems closer to $500/kwh? The federal rebate does help substantially, but most folks should qualify. This # is closer to $400/kwh if you buy with solar, and $300 if you're buying a few instead of just one.

Re: car batteries, the difference between the rear-wheel drive and long range is about 20kwh (60kwh vs 80kwh), for $8K. That's $400/kwh and doesn't even include all the other trim differences like having dual motors instead of single.

So, it looks like reality is closer to $300-$400/kwh, depending. Not close to your ideal of $50/kwh, but still much better than $1000/kwh.

1) https://www.tesla.com/energy/design/overview 2) https://service.tesla.com/docs/Public/Energy/Powerwall/Power...

foobazgt··on Meta LLM Compiler: neural optimizer and disassembler
Can vouch for this having fixed non-determinism bugs in a compiler. Nobody is happy if your builds aren't reproducible. You'll also suffer crazy performance problems as everything downstream rebuilds randomly and all your build caches randomly miss.
foobazgt··on Pitfalls of comparing BigDecimals in Java
Zachtronics (https://www.zachtronics.com/) is amazing, but their games are lower level programming. You're typically designing hardware or writing assembly. I haven't played them all, but I can vouch for last call BBS (design hardware), exapunks (software controlling bots), shenzen i/o (you design hardware and write the assembly to power it), and tis-100 (writing assembly for a distributed, cluster of processors).

It sounds a lot more intimidating than reality. The puzzles start off easy enough that you can ramp into the difficulty., and they usually have many different possible solutions. You can "win" with easy solutions, and then later revisit them and try to produce the "best" solution. (Often pretty difficult).

To be fair, I did come at them from somewhat of a background in hardware, but my son also loved them (with no such background).

foobazgt··on I learned Haskell in just 15 years
FYI, I think you meant functional core, imperative shell.
foobazgt··on In Colorado, an ambitious new highway policy is not building them
I've watched that video and seen it quoted a fair number of times, but I don't see how it jives with the reality of tax collection and spending - at least in my area of residence (ATL). I'd love some hard data on how the city is subsidizing the suburbs.

Instead, the recent trend has been that wealthy areas near downtown (e.g. Buckhead) have been trying to incorporate so that they're no longer subsidizing the rest of the city.

foobazgt··on In Colorado, an ambitious new highway policy is not building them
At what population does a city qualify to discuss transit policy? Atlanta has over 6M residents.

I think mass transit can be great in the right contexts. For ATL, I think it makes the most sense in the few sq miles of city proper, not 20+ mi out.

foobazgt··on In Colorado, an ambitious new highway policy is not building them
My experience is the opposite. The harder it becomes to visit a locale, the less likely I become to visit it. Eventually I decide it's not worth visiting at all.
foobazgt··on X is justifiably slow (2022)
In CS, foo, bar, and baz are those metasyntactic variables.
foobazgt··on Instead of “auth”, we should say “permissions” and “login”
I can second GP.

I have always heard and used authz and authn (pronounced auth-z and auth-n). Bare "auth" typically was used to mean both, but IAM was more clear for that in specific contexts. E.G. you might say someone "authed" to indicate both authentication and authorization, and you might have an IAM team that handles both authentication and authorization.

FWIW, I lead an IAM team.

← PreviousPage 4 of 8Next →