Better HN
topnewbestaskshowjobs
Log inSign up

coder543

6,699 karma · joined Jul 18, 2012 (14y ago) · 1,967 submissions

My email is at gmail using my username.

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

Submissions

comment 7y ago · link · parent

> AMD is only superior when it comes to performance for parallelized tasks, single thread performance is still owned by Intel.

Strongly disagree. Zen 2 gave AMD better IPC and comparable clock speeds. Zen 2 is also more power efficient than what Intel offers per unit of compute.

Intel offers a few processors with higher frequencies, but only by having absurdly high power consumption and uncompetitive price.

Source: https://www.anandtech.com/show/14605/the-and-ryzen-3700x-390...

Look at the last chart at the bottom and the summary:

> Normalising the scores for frequency, we see that AMD has achieved something that the company hasn’t been able to claim in over 15 years: It has beat Intel in terms of overall IPC.

The web tests are also very lightly threaded benchmarks:

https://www.anandtech.com/show/14605/the-and-ryzen-3700x-390...

Definitely no “ownage” there from Intel. AMD processors did great. The Intel 9900K generally did worse, and the 9700K only did slightly better for some interesting reasons discussed at the end of the page.

Making claims that AMD’s processors only perform better in highly threaded tasks is either disingenuous or based on significantly outdated information.

Zen 2 brings AMD up to parity with Intel in IPC, and the clock speed difference isn’t substantial in most cases.

AMD also offers substantially more (equally strong) cores and stronger threads at a better price. They also have products that offer substantially more PCIe 4.0 lanes than anything Intel has, among other nice features, especially when comparing server processors.

Intel will dump billions and billions of dollars into becoming competitive again, but right now... Intel’s main advantage is in their low idle power consumption in laptops. No one should be buying Intel processors for anything else.

comment 7y ago · link · parent

> you essentially want the ability to run 2x capacity for at least a little time

This isn't the customer's choice. The customer does not want this.

As the article talks about, AWS Elasticsearch isn't actually elastic. On standard Elasticsearch, you can add and remove nodes at will and it will automatically handle rebalancing. AWS Elasticsearch can't do that. It has to spin up a new cluster of the desired size, copy everything over, and then turn off the old cluster. That is a form of blue/green deploy.

> So why wouldn't you reserve 2x?

Why would you want to pay double all the time because AWS can't use Elasticsearch correctly? AWS should foot the bill to ensure that everything works properly within their broken implementation when something requires the cluster to be duplicated and redeployed, not the customers.

> Or switch to a AB like deploy?

To reiterate: this isn't their choice. AWS forces this inefficient methodology on users of AWS Elasticsearch, which is why the article strongly recommends against using AWS Elasticsearch.

comment 7y ago · link · parent

Safari on macOS already implements a proprietary web push technology using APNS. Push providers like OneSignal already support it.

It is 100% compatible with the way notifications work on iOS.

comment 7y ago · link · parent

Ideally, PWAs added to the home screen would show up in the Settings app like normal iOS apps do. You would be able to control notification settings and privacy settings just like on any other app.

If they don’t want to allow web push for websites, that’s one thing, but crippling PWAs that users have chosen to add to their home screen is another thing entirely.

> Similar for the Web Capture API.

You can already use the camera through a PWA on iOS, until you add it to the home screen. Then, last time I checked, it stopped being able to use the camera or even ask for permission to use the camera, which really hurts the usefulness of PWAs.

comment 7y ago · link · parent

Unfortunately, iOS does not support web push notifications like Android (and practically every desktop browser including Safari on macOS), which is a huge limitation.

Not supporting notifications at all is a dealbreaker for most apps that could just be PWAs.

Furthermore, last I checked, iOS doesn’t allow PWAs added to the home screen to access the camera or certain other valuable things that they should be able to access, but maybe that has finally been fixed.

Apple has intentionally made PWAs a bad experience to push people to the App Store, which is really unfortunate since they basically invented the concept of adding a website to your home screen that would then open in a chromeless experience that felt like an app.

comment 7y ago · link · parent

Look carefully, it isn't going the wrong way: https://www.google.com/maps/place/Kennedy+Park+Pl,+Californi...

It's just a really bad parking lot design.

Regardless, Smart Summon doesn't currently care about things like directionality in a parking lot. This version doesn't try to do anything fancy like reading markings on the pavement.

The app will show you on a satellite map the route that the car is planning to go, assuming this release follows what was shown in the early access releases.

As the person supervising its behavior, it's currently solely your responsibility to make sure that the car doesn't cause problems for other people. The car will do its best to avoid hitting anyone or anything while still making it to your location, but you're still the one in charge.

Smart summon currently works via a dead man's switch. You have to hold down a button the entire time, and if you let go of the button for any reason, the car immediately stops.

The long-term goal is that supervision won't always be necessary, of course, but this feature is available now -- with supervision. If you see an opportunity to use it, it's there. It will get better. I've personally watched Autopilot grow up from something barely usable as a driver assistance technology to something that works extremely well for every day usage.

comment 7y ago · link · parent

If you’re looking at the latency chart, higher is worse. The right hand side of the C# graph is not a good thing.

The throughput graph doesn’t show C# pulling ahead significantly. Significant is how far behind Java is from Go and C# in that benchmark.

Also be sure you’re not looking at JavaScript on the throughout graph, since it is colored very similarly to Go.

comment 7y ago · link · parent

> The C# one was faster then Go

As pointed out over here (https://news.ycombinator.com/item?id=20984503), Compared to C#, Go was faster (higher throughput) for smaller batch sizes, and it always had significantly lower latency.

.NET Core is particularly good these days, so I'm sure there are times when C# is definitely faster than Go, but the network driver isn't a great example to support that.

comment 7y ago · link · parent

It affected AMD's Zen architecture significantly less. A number of exploits that applied to Intel didn't apply at all to Zen, and the ones that did apply had less costly mitigations than Intel.

comment 7y ago · link · parent

I think we were talking about Spectre, Meltdown, and related attacks. Not the PSP or IME, although those are concerning too.

comment 7y ago · link · parent

That’s a good point. Also imagine if the attacker controlled 7 out of the 8 threads on a core... maybe they would have even clearer statistics for analysis.

Or maybe POWER9 is completely secure.

My main point was that Epyc has already proven to be much more resistant to these attacks than Intel’s architecture, and it wouldn’t require dealing with porting your applications to run on a niche ISA, with very limited options to buy server hardware, and very few (if any) options to rent cloud instances on POWER9.

comment 7y ago · link · parent

> A mainframe adds reliability and backward compatibility

Citation needed, especially on that implication that x86-64 lacks reliability.

I’ve run reliable services on commodity hardware that literally processed over 5 billion transactions per day.

> How long is Linux on x86-64 going to stay a thing?

If something better comes along, why wouldn’t you want to move to it? But “better” in this context would imply popular support and plentiful access to developers, so you would have years of warning. It wouldn’t come as a surprise. As of now, it has been going for at least a decade, and shows no signs of stopping.

> What are you going to do about staging Linux updates on business-critical facilities?

This is not some huge, unsolved problem. It has been solved many times, in my opinion, so just learn how others do it and follow suit. I’m not here to teach sysadmin “tips and tricks.”

I would be completely clueless on how to stage updates for a mainframe. Turn it off and back on? And I’m betting all of the good training material there is locked behind expensive paywalls.

> Perhaps not so simple after all.

Disagree, especially since you can hire people to solve these problems for a lot less money than you can get just the hardware for a mainframe, let alone hire the extremely rare (read: expensive) personnel needed to maintain and develop applications for mainframe.

If IBM would focus on bringing the entry-level cost of mainframe down, they would probably be able to get more adoption, and more people would be able and motivated to learn their systems.

comment 7y ago · link · parent

I would have asked the opposite question: what does mainframe add other than complexity?

It's a lot easier to find good engineers to write and maintain software for Linux on x86-64 than it is to find mainframe engineers, which makes things simpler, arguably.

comment 7y ago · link · parent

I think AMD already has that covered with Epyc 2 (Rome) processors.

POWER is also known for being highly SMT, which could lead to them being even more prone to the issues that plagued Intel's implementation of hyperthreading. A single POWER9 core has 4 to 8 threads.

comment 7y ago · link · parent

Epyc 2's memory layout is not like Epyc 1. Epyc 2 is very simple.

comment 7y ago · link · parent

> > Precomputing values without I/O is conceptually just an advanced kind of compiler optimization, and that’s why Rust is basically seeking to make const fns only pure functions.

I agree that generating an array at compile time is perfectly fine. I was saying that I/O should be restricted in compile-time computation, which the person I was responding to made me believe was entirely unrestricted in compile-time computation in D.

comment 7y ago · link · parent

> Things like mixing in a data file is incredibly useful and not something I would want to use a rebuild step for at all.

It’s not directly part of the const function, but rust has compiler built-ins to import files as values as compile time, which makes it easy to declare global static variables that contain that data.

This is different from being able to walk a directory and read random files.

https://doc.rust-lang.org/std/macro.include_str.html

https://doc.rust-lang.org/std/macro.include_bytes.html

> They share the same frontend so there is very little difference.

That’s excellent.

comment 7y ago · link · parent

Rust’s macro system is incredibly powerful — much more powerful than C++’s, which is just text substitution. It’s easy to make DSLs in Rust. That’s not what I’m talking about.

> Well, the alternative is to learn an actual dozen of language

That’s a false dichotomy.

comment 7y ago · link · parent

A major difference is that the Go compiler will not run build scripts when you build the code. You have to manually run codegen scripts, which is error prone since people are not good at remembering to do manual steps. Rust will automatically run the build script before building your code. It just allows you to logically separate build time I/O from runtime I/O, which I find is nice for reproducibility of builds and maintainability of code. The build script is still written in Rust, and you can import Rust code from wherever into that build script. The plan is to support arbitrary non-I/O computation in constant functions anywhere in Rust, since those are just pure functions.

As far as your comment about databases, you should look at Diesel. It handles this very nicely in Rust, so... that’s not a problem at all.

> Note that D also has an LLVM-based compiler backend that is slower to compile but produces much faster code, which can be used for release builds.

Is it compatible with 100% of the code that the current DMD release is compatible with? That’s all I ask for in alternate compiler implementations... but it seems like a lot, sometimes.

comment 7y ago · link · parent

Partially moved just means that the compiler tracks which fields have been “moved out” of the struct and prevents you from either accessing those fields or attempting to reuse the partially moved struct as if it were still a whole struct, since it is no longer whole... it has given up some of its members, conceptually.

In the article linked by this discussion, the author specifically mentions how fields can’t be moved out in D’s implementation.

Option is the correct approach for dealing with information that might be missing, but that’s not really related to partially moved structs.

Structs document what is available in a given value, to both the compiler and to you. If that’s not convincing, then I’m not going to try more here... it’s off topic. But I will say you can use maps in Rust or other statically typed languages. They’re just not meant to be an alternative to well-defined structs.

comment 7y ago · link · parent

The problem with D is that it is so non-uniform. People talk about the betterC mode, but not nearly all D code written can run in this mode. Now people will talk about this ownership mode, but very little code will really use it. To become an expert in D or C++, you really need to understand what feels like a dozen different languages... and that’s not what I’m looking for in a single language.

D’s concept of ownership (for now) doesn’t seem to have any plan to support partially moved structs, which are a major ergonomic feature.

D has organically grown just about every interesting feature ever conceived, but I would much rather use a purpose-built language, which is what Rust feels like.

I don’t want a C++ that’s better at being C++ than C++ is. I really enjoy how consistent and expressive Rust is. I also appreciate how intentional Go is about being Go.

A lot of people enjoy C++, and some people enjoy D. I enjoyed C++ back when Rust wasn’t an option... then something better came along. D and C++ try to be everything to everyone. I like D better than C++... but I have seen no compelling reason to trade Rust for D.

Variadic templates are much better expressed by either tuples or const generics. A fixed length array of a constant generic length is the Rustic solution to tensor-like problems, and it is being rigorously developed.

Arbitrary compile time computation should be separated from the body of the program. If you need to download files or read the file tree at compile time, that should happen in a build script. Rust provides build.rs for that. Precomputing values without I/O is conceptually just an advanced kind of compiler optimization, and that’s why Rust is basically seeking to make const fns only pure functions.

The fast compile times are a double edged sword, since those binaries are noticeably slower than Rust binaries, from what I’ve seen. I hope that Rust will one day have a much faster compiler for development builds.

I also think every sign is showing that Rust is starting to get some real traction, so I don’t think I’m alone in these opinions... but they are mostly just that: opinions. You’re welcome to your own.

comment 7y ago · link · parent

Railguns are not coilguns. Railguns maintain physical contact between the projectile and the rails for the entire length of the barrel. That's a lot of friction. Friction leads to heat, light, and a puff of smoke from material that has been ablated during the launch, if I were to guess.

This leads to one of the big problems with railguns, which is that you have to replace the rails frequently due to wear and tear.

comment 7y ago · link · parent

huh. that seems like a lot of waste for no measurable benefit: https://stressgrid.com/blog/beam_cpu_usage/

maybe it's beneficial to someone, but I don't think that should be the default.

either way, it doesn't change the picture painted by the TechEmpower benchmarks.

comment 7y ago · link · parent

I feel like that article just supports the comment you're replying to. I mean, look at this: https://stressgrid.com/blog/benchmarking_go_vs_node_vs_elixi...

If the article had gone up to 250K connections, Elixir would have fallen down similarly to what happened to Node... although the reasons for Node being unable to keep up were unclear in the article, and I think warranted further investigation that the article didn't do.

For another comparison, feel free to click around on the tabs here: https://www.techempower.com/benchmarks/#section=data-r17&hw=...

The plaintext benchmark is about as far from a computationally intensive task as you can get... it should basically be network-bound, supposedly an ideal task for the BEAM VM, yet the results are clear.

If you turn on additional languages and frameworks, you'll note that Elixir or Erlang are significantly faster than, say, Rails, but Elixir or Erlang are a good 5x to 25x slower than Go.

People have built massive, successful companies on Ruby on Rails, such as GitHub, so don't think that I'm discounting these languages wholesale. You just have to accept that you will be paying substantially higher infrastructure costs if your infrastructure needs begin scaling beyond a single server. If you think that Elixir or Ruby or whatever else is the secret sauce to make your company successful, go for it! But those are a lot slower than Go or Rust or other very fast languages.

comment 7y ago · link · parent

Zen+ has about the same IPC as the Intel processors from when it was released, the problem was just lower clockspeeds. The single threaded gap was somewhere around 5%, not the 40%+ of Bulldozer.

Zen 2 raises IPC by 15%, and raises clock speeds by a solid 10% or more. Single threaded Zen 2 performance is not even a slight concern for me.

Add 9% to the benchmark result this entire thread is about, because this engineering sample was not running at the specified boost frequency that the 3950X will have. Intel has nothing to compete against that... it should be uncontested.

On Epyc, their clock speeds were generally comparable to Intel's, and the single threaded performance was already great there, except for a few specialty processors that Intel released for servers that don't care about high core counts. Epyc 2 stands to completely annihilate any advantage Intel had left.

AMD Zen has always used less power than Intel for each unit of work done, which was one of the original surprises, so... power consumption is absolutely not favoring Intel.

I really feel like you're mentally comparing to the old Bulldozer Opteron processors, based on the concerns you listed.

comment 7y ago · link · parent

"Competitive" does not ever mean "uncontested". It means the trade-offs are reasonable. Choosing Intel after Zen was released meant making trade-offs -- giving up advantages, such as losing a large amount of multithreaded performance and paying a much higher price, as well as having to disperse more heat at maximum load for the chance at that lesser performance.

Just the same as choosing AMD would involve trade-offs in terms of a very slight loss of single threaded performance, or a higher idle power consumption, particularly in laptops.

In either case, you have good options. Neither product is completely devastatingly useless for any task, as was the case with Bulldozer, which had single threaded performance that was nearly half that of Intel's.

With the release of Zen, there was no longer a clear market leader dominating in performance of all classes, or pricing, or whatever other metric you want. That's called "competitive."

Zen 2 looks like it will be "uncontested." It will have the advantage in essentially everything, including single and multithreaded performance, gaming performance, power consumption, and price... if AMD's benchmarks are to be believed. The general sentiment is that AMD's benchmarks were actually conservative.

The benchmark leaked above in this thread is not running at the production boost clock, which would be 9% higher than the benchmark given, making it theoretically uncontested.

Obviously, we will have to wait for extensive third party benchmarking, but Zen has always been competitive, immediately and unequivocally reducing Intel to merely being competitive as well. Zen 2 has the opportunity be more.

comment 7y ago · link · parent

I wouldn't be so sure:

https://news.ycombinator.com/item?id=20166237

Intel opened Thunderbolt up for non-Intel platforms awhile ago, and we're already seeing motherboards that offer it for Ryzen.

1
585960
66