6,699 karma · joined Jul 18, 2012 (14y ago) · 1,967 submissions
Backend-focused full-stack engineer with 8+ years of experience, mostly focused on Go, Rust, and TypeScript, but open to other options.
Resume: https://drive.google.com/file/d/1VNC272B3n7ZEfppMHkm2wGgaINwYl4Av/view
comment 4y ago · link · parent
2 to 5 watts for ethernet, less than 1 watt for SFP+.[0]
[0]: https://community.fs.com/blog/10gbase-t-vs-sfp-which-one-is-...
I really wish SFP+ and SFP28 would be more common in high end desktop motherboards. They’re more efficient and just better, and they can be adapted to plain old ethernet if needed (at a power penalty imposed by switching away from fiber).
comment 4y ago · link · parent
But, most people are happy with the default output from iPhone in most circumstances.
comment 4y ago · link · parent
Why don't you supply a source to go along with your bold claim? Instead, here is the first set of test results I found on google: https://rxnetworks.com/press-releases/test-confirms-that-gal...
It shows that using more than just GPS substantially improved accuracy in challenging environments. Dual frequency GPS should show strong improvements too.
comment 4y ago · link · parent
If ASAN were a silver bullet, C memory safety vulnerabilities would be a distant memory. They’re not. ASAN helps, but it isn’t enough.
comment 4y ago · link · parent
In the mean time, if Redbean and Cosmopolitan want Rust-like promises of memory safety… they need to write it in Rust.
comment 4y ago · link · parent
I also haven't been able to find any in-depth independent benchmarks of Redbean. About the only thing I could find was someone struggling to reproduce the benchmark results.[0]
Personally, I've dealt with more than enough memory safety vulnerabilities caused by no programmer being good enough to write safe and correct C (or C++). Those vulnerabilities are easily prevented by choosing just about any other language people are likely to know about... so, I have no desire to deploy anything like Redbean when alternatives exist. It's cool to see the hacks they've been able to do with Cosmopolitan to make cross platform binaries, but hacks like that are not what I want for anything other than educational purposes, at least not until they've been more battle tested.
comment 4y ago · link · parent
When I was self-hosting on a DigitalOcean droplet, I was using Caddy instead of nginx, which handled letsencrypt for me, so that was nice.
comment 4y ago · link · parent
Go doesn't really do template inheritance in the way I think you're meaning. Go prefers composition over inheritance, and that carries over to the templating system. Go templates let you pass a parameter to the template you're calling, which I believe addresses the need you linked to. Calling another template is not just simple string concatenation; the other template can act on input provided by the calling template.
There are a lot of different ways to approach templating pages in a web app. I think Go's templating system is one of the least objectionable ones I've used.
I have no experience with Quarkus, so I can't say how good or bad that one is, but my experience with Ruby templating systems is that people often start mixing complex logic into the templates, including database calls, and that causes things to get messy. Go's template environment is very minimal by default, and you can extend it with custom functions if you want to give more power to the templates, but Go encourages you to compute your data ahead of time, then pass it into the template... and just have your template be a template for formatting the data.
comment 4y ago · link · parent
Go has had templating built into the standard library since... forever?
And Go templates can use other templates, as long as they're all loaded into the same context, if that's what you were getting at.
simple examples of Go's built-in templates: https://gowebexamples.com/templates/
templates using other templates: https://levelup.gitconnected.com/using-go-templates-for-effe...
comment 4y ago · link · parent
If I search for "Rust" in the VS Code Extension Marketplace, it shows the extension you linked to... but it is clearly marked as deprecated, and VS Code won't even let me install it. So, it’s even more of a non-issue today than it was a year ago.
The actual rust-analyzer extension works fine for me. I think Go's tooling is slightly better in my experience, but both are far better than any experience I've had with C++ tooling.
comment 4y ago · link · parent
I'm also not seeing where you got that "$500-600" number "upthread", which presumably refers to the rest of this HN discussion, since I don't see any numbers like that. It could make the prices somewhat more reasonable than they were for iPhone, but I definitely haven't had time to do the research myself, and I don't appreciate how Apple hides the OOW repair cost for laptops, which makes this analysis harder.
comment 4y ago · link · parent
LTT runs the numbers to demonstrate it. Apple is making you pay more to do it yourself, and you have to wait days for the parts to arrive, when you could just go down to the Apple Store. The pricing completely nullifies any real-world benefit of this program, making the program seem like it is entirely performative.
If an individual can't even save money doing it this way, the program is worse than useless for repair shops since they won't be able to compete with Apple Store repair services. That's also without even addressing the inability for repair shops to buy parts before a customer shows up with a problem. Repair shops want to be able to provide same day service, which this program makes impossible... unless your name is Apple.
comment 4y ago · link · parent
I guess I hadn’t realized that clients could RST_STREAM on these pushes, but it doesn’t change the outcome here.
What you describe isn’t a win for anyone except a client with a cold cache, and then they start losing immediately after that. That’s why it isn’t done. That’s why HTTP/2 Push is going away.
comment 4y ago · link · parent
Well… the client knows which resources are already in its cache. The server does not. You just suggested that the server should always send resources that client almost certainly already had cached, which is wasteful for everyone involved.
> So with HTTP/2 push you just push the whole package and the client tell the server if it already have some of the files.
That doesn’t make sense. Once the files have been pushed, the bandwidth and time has already been wasted. The client doesn’t get to tell the server anything in that scenario.
comment 4y ago · link · parent
Ad-supported or not has always been a choice for as long as Amazon has offered ad-supported kindles. I remember making this choice about 10 years ago, and I made this choice about a month ago when I bought my most recent Kindle.
If you bought it used or from a reseller, I don't know what to tell you, but Amazon gave you a choice if you bought it from them.
As a source, here is an Engadget article from the time when this option was introduced: https://www.engadget.com/2011-04-11-amazon-releases-ad-suppo...
You can clearly see that Amazon offered the "with Special Offers" version alongside the versions without "Special Offers". The ad-supported version was discounted by $25 back then. Nowadays, it appears to be a $20 difference on the Paperwhite.
comment 4y ago · link · parent
Did they exit the business? It looks like the Nook Glowlight 4 was released less than a year ago.
I don't know a single person in real life with an e-reader other than a Kindle, including myself, so I had to google to see how B&N Nook was doing when you said that, but it still seems to be a thing.
comment 4y ago · link · parent
I still don't think I would personally recommend GraphQL to most companies.
comment 4y ago · link · parent
Not even close. There are quite a few keywords that modify behavior, including abstract, final, transient, synchronized, etc. You also have method overloading, including constructors which use a separate syntax from normal method declaration. Java also relies heavily on non-linear control flow thanks to exception handling. Go has panics, but it isn’t normal to see them in my experience, and indicates a serious bug with your code, whereas Java exceptions are extremely normal to see… but that doesn’t mean non-linear control flow is simple.
All Java classes have implicit methods like toString and equals, which you need to be aware of, and then this also lets you override the behavior of the equals method… yet you can’t override any operator, for some reason. And the actual equals operator is not at all what the average person expects when they’re getting started in Java, since it is referential equality, not value equality, except when it isn’t. I guess it is “simple” that the language lets you override the equals method, since that is consistent with other methods, but why is it a method at all? Why doesn’t the equals operator just do the expected thing, which would be equivalent to calling an invisible, non-overridable equals method? If no operator should be overridable, then no operator should be overridable, and the equals method is effectively an operator since the regular equals operator is just a footgun most of the time, except for the cases where it is performing value equality checks. Java has other footguns that stem from the language, not the standard library, like hashCode. I could go on, but really, why bother?
If you only want to talk about the basic features of the language and ignore the many keywords and edge cases you can run into in the syntax, then even C++ is simple. It’s the interaction of all these features that makes the language complex, including the implicit nullability of almost everything.
> there are 3 visibility modifiers (which are also language feature of Go, just implicit in naming convention).
Java actually has four access modifiers, not three, one of them is just implicit.[0] Go only has the notion of public and private, and private in Go is probably closer to the "default" access modifier in Java.
Compare to actually smaller languages like Go, or really small languages like Lua, Lisp, Tcl, or Smalltalk.
Java isn’t the worst language by a long shot, but it is one I’m unlikely to intentionally pick for anything.
You’ve left a bunch of comments all around this thread defending Java against even the smallest slights. I’m not interested in debating pointless aspects of Java forever this morning. I’ve used Java. I’ve used C++. I’ve used many languages in many contexts. You may disagree with my conclusions, and that’s fine. In my experience, Go takes less code and is less error prone than Java, in addition to being nicer to deploy and run. That's enough for me to choose it over Java, even if Go isn't perfect either.
comment 4y ago · link · parent
Small compared to what?
Java and C++ are extremely competitive in feature bloat, and I can hardly think of anything that is comparable to them. Even C# has a smaller surface area, in my opinion, even though it manages to implement a variety of useful features that Java currently lacks (like async/await and value types), but C# is still a large language — no doubt about it. C# just manages the interactions of its features better than Java, in my opinion, which makes it feel simpler.
I have honestly never heard anyone call Java a small language. It is far from that!
> Java’s standard lib has been planned with value types in mind for some time now, plenty of classes will be able to take advantage of them.
Aren’t the majority of the standard container types using some form of inheritance? That’s what I recall, and that rules them out.
comment 4y ago · link · parent
Java’s GC design requires more barriers which hinder performance throughout the lifetime of a heap allocation, not just at the time the value was allocated.
Either way, Go also uses per-thread caches in its allocator to avoid contention between threads. I don’t believe it is a bump allocator, but this goes back to other tradeoffs being discussed. The number of barriers, the duration of STW, etc.
I don’t understand why so many people in here feel the need to declare the superiority of Java GC. Java’s garbage collectors are better for Java, due to the way that Java allocates practically everything on the heap. That doesn’t mean they have zero performance tradeoffs and that they’re perfect. They do have tradeoffs, and not just in complexity of tuning.