HNHacker News
TopNewBestAskShowJobs

kinjba11

273 karma · joined October 27, 2018

submissionscomments
kinjba11··on Leaky Abstractions
It feels to me that this blog post is pointing out the obvious. The examples are a bit forced in my opinion. I would expect it to be about badly designed or architected code, but.

Iterating works. SQL works. Windshield wipers work. The iteration abstraction isn't leaking - the hardware and memory architecture isn't part of the abstraction. The SQL abstraction isn't leaking - the performance isn't part of the abstraction. The windshield wipers abstraction isn't leaking - the wipers were designed for rain, not a hurricane. Abstractions ignore details - that's the point. Reality doesn't cease to exist.

If your car isn't fast enough for the race, the car, steering wheel, accelerator pedal are not a leaky abstraction. You just don't have a fast enough car! If you have to worry about stuff like shifting gears, then an automatic transmission isn't the abstraction for you. The abstraction isn't leaking, you just chose the wrong one.

Abstractions are great.

I've never had to worry about CPU instructions or assembly code in the code I've written - the programming language abstraction is perfect as far as I'm concerned. Somebody handles it. I've never had to worry about the electricity powering my machines in the Cloud etc where I deploy. Perfect abstraction. Somebody handles it. My web browser chugs through hundreds of megabytes of JavaScript daily. Perfect abstraction. I've never needed to concern myself with the implementation of say V8. I've had my share of SQL performance investigations, but most of the SQL I've written didn't need any performance tweaking (there's a different abstraction for performance that works great - indexes).

Leaking is a matter of perspective.

kinjba11··on Writing Pythonic Rust
For what it's worth, OCaml is a great under-appreciated language forever dented by ugly (in my opinion) syntax and oddities like different operators for floats and ints. There's a good reason the folks behind the Reason ML fork changed things up.

Swift is another great language - forever dented by being tied hand and foot to the Apple holy garden and Objective-C legacy and runtime with memory-related keywords such as 'weak' and 'unowned'.

Nim (and perhaps D) are the closest in my mind to the "garbage collected Rust" in that they are not only garbage collected, but they are procedural-oriented, can write highly generic code and macros, and come with near-C performance. Given the "Pythonic Rust" title, another edge Nim has is its semantic whitespace, very Python-esque syntax.

kinjba11··on Writing Pythonic Rust
Nim compiles to C (through C?), so at least leveraging the C/C++ ecosystem is straightforward/first class.

It is certainly difficult to justify breaking away from the huge established multiple decade ecosystems and standard libraries seen with the JVM/.NET/Python platforms for instance.

https://nim-lang.org/docs/backends.html#interfacing

kinjba11··on “Energy in the Future”: a time capsule of energy concerns from 1953
Briefly: solar and wind energy requires sun or wind and tons of space relative to fossil/nuclear. Not every place has those.

"A reality check on renewables" https://www.youtube.com/watch?v=E0W1ZZYIV8o

kinjba11··on Scala 3.0
What do you mean by "not first class"?

https://docs.julialang.org/en/v1/manual/functions/#man-anony...

kinjba11··on Building a Distributed Turn-Based Game System in Elixir
See also for more discussion on LiveView: Phoenix LiveDashboard (April 16, 2020) https://news.ycombinator.com/item?id=22892401
kinjba11··on The Deno Company
I agree with the spirit of what you're saying, but there billions of lines of JavaScript code that can't "just go away". Being able to use e.g. 'window.crypto' without worrying about whether I'm in Node, Deno, some other runtime or a browser is great news for reusing huge amounts of code.
kinjba11··on Loop Alignment in .NET 6
> What changed?

Very briefly: Satya Nadella running Microsoft since 2014. Microsoft's cloud offering, Azure, is now a core part of the Microsoft's business. There's a lot of competition in the cloud business. Azure runs a lot of .NET code so they're incentivized to make it performant. Bing runs on .NET 6 for instance.

On a language level, there's been quite a bit of competition in the past decade with players like Node, Go, Elixir, etc, and even Java bringing for instance low latency GC such as ZGC/Shenandoah to the game.

On a technical level, Microsoft more or less rewrote NET to work for multi-platform/Linux with NET Core. NET Framework is tied to Windows and cannot move fast as a result for fear of breaking changes. They can make changes much faster with .NET Core 2/3 and .NET 5/6.

Last, you can't overlook that .NET is also a marketing tool. Having it on the top of benchmarks, getting people talking about it etc., will draw more eyes to Microsoft and Azure.

kinjba11··on Why Become a TypeScript Fan?
The word you're looking for is "IntelliSense". https://code.visualstudio.com/docs/editor/intellisense
kinjba11··on The Texas power outage is a nation-wide problem
I recently watched an interesting video* on the phenomena of extreme cold events increased by climate change. To massively simplify, one theory is the jet stream around the Polar vortex is being destabilized by climate change. While the North Pole is warming faster than ever, it is still very cold air, and moving that air further south means unusually cold weather. The jury is still out of course as you mentioned.

* https://www.youtube.com/watch?v=5W84bi9YEGY

kinjba11··on A Modern JavaScript Tutorial
Short variable names make code more readable in some scenarios, not less.

  fooBarBazThings.each(t => t.DoThing())
  for (int i = 0; i < len(things); i++) { // i used here }
Some local code patterns are seen so often you understand it in one go. Something like

  fooBarBazThings.each(fooBarBazThing => fooBarBazThing.DoThing())
  for (int thingIndex = 0; thingIndex < lengthOfThings; thingIndex += 1) { // thingIndex used here }
Just clutters things up.
kinjba11··on A new jailbreak for a new era
Why do you need two devices? iPhone hardware is faster than many laptops. In 2020 I should be able to trivially attach a external monitor, keyboard, trackpad, etc. to my phone and compile code on iOS for iOS. The fact that I can't is nothing more than the current zeitgeist. A laptop at this point should just be a big battery/screen/trackpad I attach to my phone.
kinjba11··on South Dakota nurse says many dying patients still insist Covid-19 'not real'
Beliefs don't exist in a vacuum - hoax memes spread much like COVID itself. Media literacy is scarily low among most people, even those who are brilliant in other ways. Metaphorically we are failing to vaccinate against misinformation in primary education, leaving tech giants the impossible task of policing misinformation on their platforms designed to maximize engagement for profitability. 'The Social Dilemma' documentary (Netflix) dips into this if you haven't seen it.
kinjba11··on Astonishing Performance of .NET 5
A lot of this thread feels like Microsoft's terrible naming having not surprising negative consequences. "ASP.NET" can mean so many things to so many people.

To me it's usually a synonym to the full-fat MVC with controllers, DI, everything. This is reinforced by most of the dotnet templates and documentation, which make it feel like if you ask for a banana you're given a gorilla and the entire forest whether you want it or not.

In comparison, if you look at Go you'll see the "net/http" package. It's the HTTP server. Extendable. Built in - not something to download from NuGet. Only does HTTP - not reinventing its own DI, configuration management, IIS, etc.

kinjba11··on Eleven Years of Go
> constant pain with reading and debugging C++ templates

C++ templates are a nightmare agreed. What C++ does is just one way, a poor way, to implement generics. Please do not conflate generics with C++. If you've ever worked with C#, Java, TypeScript, or others you'll know that "generics" come in many different flavors. Some are quite nice. Generics are coming to Go ([https://www.gophercon.com/agenda/session/233094]).

Slices, chans, maps, arrays are all generic in Go - and they are great! Stuff like the sync package (https://golang.org/pkg/sync/) with interface{} all over? Not so great. Generics solves a real problem.

kinjba11··on Pixel 5 review: Google spends its bill-of-materials budget unwisely
I have experienced a flaky connection for an iPhone as well - plug it in and Catalina would spin endlessly, and when it did manage to connect, it'd fail soon after. Yet other devices were fine. Sometimes QA can't catch every failure, assuming it was hardware and not software.
kinjba11··on What's so great about Go?
Technically you can use Gradle from the command line. Gradle isn't pretty though. `gradle init` for a simple Kotlin hello-world application generates 20+ files and folders, which to me is an incredible amount of bloat. Not exactly Unix-y. Agreed about Kotlin being made by JetBrains being a negative. It's a great language, but only working with one IDE, JetBrains', is a trap I'd rather not be in. They seem to be on the wrong side of history with the Language Server Protocol becoming more popular every day.
kinjba11··on What's so great about Go?
> I want a language that's as versatile as Kotlin, with the ease of use of Go

You can do that today with C# and .NET Core - initialize and build your project straight from the command line with standard tooling bundled with the language (of course .NET Core's tooling is a lot younger than Go's, and in a typical .NET environment you'd be expected to be using Visual Studio or some other IDE, and probably have to deal with legacy projects that depend on old tooling).

https://ttu.github.io/kotlin-is-like-csharp/ https://docs.microsoft.com/en-us/dotnet/core/tools/

kinjba11··on Dark’s new backend will be in F#
It feels like .NET focuses primarily on the library and language side of things. In C# you can write surprisingly low-level optimized code. See the introduction of Span<T> for instance: https://docs.microsoft.com/en-us/archive/msdn-magazine/2018/.... Or huge lists of improvements such as https://devblogs.microsoft.com/dotnet/performance-improvemen....

This is in contrast to the JVM where Java is showing its age, but mountains of work poured into the JVM keep it performant: OpenJ9 and Hotspot, Project Loom, Zero GC, as well as big non-Oracle investment such as Shenandoah GC contributed by Redhat, etc.

kinjba11··on A tech antitrust problem no one is talking about: US broadband providers
It is expensive to wire rural areas up. That is why the [government is paying for it](https://arstechnica.com/information-technology/2015/08/att-g...). Why isn't this a utility again?

Comcast and Charter essentially have a [duopoly](https://arstechnica.com/information-technology/2018/07/comca...) over much of the United States. Where is the competition? The actual competition is in lobbying local governments to make ISP-as-utility illegal. See the [case of Wilson, North Carolina](https://www.npr.org/2020/05/29/865908114/small-america-vs-bi...).

People seem to easily forget that every major corporation is evil by default. If it is profitable, it gets done. Laws and public image are the only thing holding them back.

kinjba11··on .NET Orleans
Just off the top of my head, there are .NET copies of:

- Akka https://github.com/akka/akka - Lucene https://github.com/apache/lucene-solr - Aeron https://github.com/real-logic/aeron - Retrofit https://github.com/square/retrofit

Not to mention projects like Apache Spark, Cassandra, Elasticsearch, Druid - Java projects. Many projects (Foundation DB, Scylla DB, I could find more) will have in-house support for Java and not .NET.

The .NET equivalents to these libraries tend to be playing catch up. Xamarin Android will always be playing catch-up to Android's Java/Kotlin APIs for Android. Big machine learning projects like PyTorch and TensorFlow tend to give first-class support of some fashion to a Java API (mostly due to Android). Is there a .NET equivalent to Deeplearning4j? Hadoop? Hive? Kakfa?

In Java there is a proliferation of web projects: Spring, Vert.x, Quarkus, Micronaut, Play 2, Spark Java; Netty, Jetty, Apache. In .NET all you ever hear about is Microsoft projects ASP.NET core; Kestrel, IIS.

Working as a .NET dev, when there is an SDK, if it's not from Microsoft, it's clear the .NET SDK is a lower priority for bug fixes and new features compared to e.g. the Java/Python/etc.

kinjba11··on Report: Most Americans have no real choice in internet providers
This is correct. What happened to Wilson, NC is fairly illuminating. Big ISPs convinced governments to pass laws that make it illegal to make an ISP as a utility.

Planet Money - Small America vs Big Internet https://www.npr.org/transcripts/865908114

kinjba11··on China suppression of Uighurs meets U.N. definition of genocide, report says
This reminds me of Evolution of Trust (https://ncase.me/trust/). A little way through the game you can see this play out over time. It's a great demonstration of how the winning strategy changes (or evolves) over time with different pressures.
kinjba11··on Apple rejects appeal from email app Hey
I think most can agree the OS should sandbox apps appropriately, and allow access via permissions and such. But like most things, it can be taken too far. The fact is you can't buy a console or iPhone of the shelf and easily (or legally) run your software on it without special permission from Apple or Sony etc.

The distinction is video game consoles are not general purpose. Just like nobody is going to write an essay on an Pinball machine, nobody will (ordinarily) do so on a console. If a game developer need to follow special rules to get into the console market, that's par for the course.

In contrast, on Windows/Linux/Mac/Android I can run whatever software I damn well like without talking to Microsoft/Canonical/Google/etc. It is truly 'general purpose'. There is no required gatekeeper for these systems (as much as they are try to make themselves one). iOS stands in contrast to these - it is not 'general purpose' if I can't run whatever. If Apple decides some software is not allowed on the store that is not 'general purpose'. That is something else - gatekeeping. So when they advertise 'general purpose' that is only true until they decide they don't like something. And they can change their rules anytime they want.

To the 30% thing, every retail store has markups they don't advertise and that's perfectly fine. If Apple or a retailer wants to charge me for access to their store, I'm happy to pay.

But when they force a change to a product and company in arbitrary ways to suite their whims that's pretty concerning because it's a sign they are abusing their power in a very historically been-done-before way. Think about it - 50-100% of a target market is controlled by them. You can do whatever you want - why not charge 50%? 70%? There is no competition - it's literally whatever the highest is you think your PR department can get away with. Not sure how you feel about anti-trust, but sure feels like abuse to me.

kinjba11··on Mark Zuckerberg faces employee blowback over ruling on Trump comments
People and systems are deciding what you see and do not see every day. From moderators on HN to the algorithms on every Facebook and Google product. When you search on Google and get a trillion results, you are letting Google choose for you by ranking pages. I am extremely thankful for those services as I would be sad if I had to wade through a trillion results and decide what to see/not see myself. I expect these companies and people to filter out BS I do not want.

None of that prevents me from hosting my own website, or going to a public space, and saying whatever I want.

kinjba11··on Sublime Merge 2
GitLens is great, if you like it use it. When I use VS Code I do, but VS Code is not the only tool I use in my work. You are free to your opinion of course, I am just not a fan of statements like "X is better than Y because Y costs money" with no evidence, as if it were obvious.

The GitLens website asks for monetary support and sponsorship front and center. If that's the way you prefer, that is perfectly OK. That doesn't automatically make it a better product.

kinjba11··on Sublime Merge 2
You can use both Sublime Text and Sublime Merge without paying if you choose to (as I did when I was a broke student).

Unlike VS Code, not all software can be open sourced and provided for free while many paid software engineers are employed to actively develop it by a trillion-dollar corporation. Software that is fast, native and cross platform without ads costs money to make. I support it with my dollars (I use SM and ST). Fortunately, there is a healthy market for GIT GUI clients as seen by Git Kraken, Source Tree, Fork, Sublime Merge, etc.

kinjba11··on Go + Services = One Goliath Project
There are two sorts of 'fundamental'. You are correct that the 'for' is just syntactic sugar for 'goto' which is more fundamental than map/filter in the sense that it translates into assembly/machine language, upon which all programs are built. Then you can say the silicon logic gates are even more fundamental, you can do even more things with them, etc.

The map/filter is more fundamental in a mathematical sense. If you turn a list of A turned into a list of A*, the 'mapping' is the fundamental concept, the 'for' loop is just an implementation detail. Maybe the computer did it in parallel, or in random order, or I asked you to turn a pile of towels into a folded stack of towels. The same way if I say 'want to watch a movie' - the movie the fundamental concept, whether it's digital, film, etc. is irrelevant.

kinjba11··on Why async fn in traits are hard
Semantic versioning isn't a silver bullet, unfortunately, due to the 'Diamond Dependency Problem'. That is, A depends on B and C, but B and C depend on different versions of D. Easy to fix, until you scale that up to thousands of nodes in a dependency graph. This talk is one of the better ones about this: https://www.youtube.com/watch?v=tISy7EJQPzI
kinjba11··on Why Go and Not Rust?
C++ has more historical baggage than any other mainstream language. Consider something as simple as initialization: https://www.youtube.com/watch?v=7DTlWPgX6zs
← PreviousPage 5 of 5