HNHacker News
TopNewBestAskShowJobs

banashark

349 karma · joined June 1, 2015

submissionscomments
banashark··on SQLx – Rust SQL Toolkit
One thing I don't usually see addressed with the pure-sql approaches is how to handle dynamic query building. The most common example being large configurable forms that display a data grid. Kysely[1] does a good job of starting from this angle, but allowing something like specifying the concrete deserialization type similar to the libraries here.

I'm a big fan of sql in general (even if the syntax can be verbose, the declarative nature is usually pleasant and satisfying to use), but whenever dynamic nature creeps in it gets messy. Conditional joins/selects/where clauses, etc

How do folks that go all in on sql-first approaches handle this? Home-grown dynamic builders is what I've seen various places I've work implement in the past, but it's usually not built out as a full API and kind of just cobbled together. Eventually they just swap to an ORM to solve the issue.

* [1] https://kysely.dev

banashark··on C# Language Design Meeting for June 30th, 2025
>> Can you use LINQ against databases like Postgres on Linux, without having to buy into a lot of Microsoft/.NET stuff?

>Probably not. This is usually done with EF Core and the Postgres provider.

You can use Npgsql[0] alone or with non-EF Core interfaces, since it's just a ADO.NET Data Provider (for others: the common interface for database access in dotnet).

The GP question is interesting because it asks about using LINQ with databases "without having to buy into a lot of Microsoft/.NET stuff". I'm going to assume they mean "without using all-microsoft-sourced libraries and frameworks like Entity Framework" (since LINQ is a .NET library interface thing anways).

A couple of example of alternatives that support utilizing Npgsql for database access:

1. Linq2DB: https://linq2db.github.io

2. Dapper: https://github.com/DapperLib/Dapper?tab=readme-ov-file#will-...

3. SqlHydra: https://github.com/JordanMarr/SqlHydra?tab=readme-ov-file#co...

There are a number of other libraries, some more or less complete/maintained than others. EF and Dapper are by far the most popular libraries folks are using on top of Postgres, but there are alternatives, and using the ADO interface on its own works fine (I've done this in very small projects to limit dependencies).

[0] https://www.npgsql.org/doc/index.html

banashark··on Migrating to Postgres
Vitess and planetscale seem to have quite a number of high profile users who have lauded its capabilities. A search through hn history pops up a few.

As someone who has primarily worked with Postgres for relational concerns, I’ve envied the apparent robustness of the MySQL scaling solutions.

banashark··on The One-Person Framework in Practice
https://docs.adonisjs.com/guides/authentication/introduction

"AdonisJS ships with a robust and secure authentication system you can use to log in and authenticate users of your application. Be it a server-rendered application, a SPA client, or a mobile app, you can set up authentication for all of them."

banashark··on Citus: The Misunderstood Postgres Extension
For those wondering how to make all of this HA and production-worthy, this talk was a good watch: https://www.youtube.com/watch?v=Mw8O9d0ez7E

Explains how to get HA for both the coordinator nodes and the storage nodes.

While I haven't put this into practice myself, I'd be interested in hearing how things like resharding/scaling play out, similar to some of the recent posts on postgres (re)sharding:

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

https://www.notion.com/blog/sharding-postgres-at-notion https://www.notion.com/blog/the-great-re-shard https://instagram-engineering.com/sharding-ids-at-instagram-...

banashark··on Making Postgres scale
Notion wrote about their experience before:

https://www.notion.com/blog/sharding-postgres-at-notion

https://www.notion.com/blog/the-great-re-shard

banashark··on New Java to WASM GC Transpiler: Run Java in the Browser, No Plugin Required
Agreed on c# having better low-level primitives available. I know Java has some long-term projects in flight (Valhalla and friends), but dotnet has all of that available today.

I’m curious in what industry you’re utilizing those features. I imagine you must be using mostly your own code since much of nuget contains things that don’t take performance as a first priority. I imagine it would be similar to the trading companies using Java where they toss out most of the standard library and most things on maven and create their own faster versions (which is also not dissimilar to gamedevs tossing out STL and making their own low-allocation libraries).

banashark··on New Java to WASM GC Transpiler: Run Java in the Browser, No Plugin Required
F# interop support has gotten way better. I have several f# services (suave, giraffe) in prod and agree that things have been only trending positive. I write rider fsharp most days, which is a pretty good experience compared to the old days of the mono fsgen tooling taking up 100% of cpu on macOS for no reason.

However, there are still some huge gaps that Kotlin doesn’t experience. Source-generation based tooling created a divide between c#/f# libraries (see ef.core.fsharp), mixed solutions have problems with aot, he’ll I spent 2 hours trying to get z3 to work with f# for an old advent of code problem before just writing it in typescript.

F# would be the language I would default to for 99% of things if the friction wasn’t ever present. I just somehow hit it on every project I use it on

banashark··on New Java to WASM GC Transpiler: Run Java in the Browser, No Plugin Required
I didn’t get a sense of anti-java-ism from the parent poster. While I enjoy Kotlin more than Java I see the benefits of both, and from most folks I’ve spoken to about the two they seem fairly level-headed about the situation.

I think that for all language discussion online that there is a very small percentage of people that get over-inundated by the emotional feeling of “investing their time” into a language and wanting to not feel like they made a mistake or that their time was a waste.

I wish f# got the same treatment Kotlin did tooling wise, because if I were to compare the “interoperability” of the two with the incumbent on their respective VMs, my experience has shown that developing with Kotlin incurs much less friction on a day-to-day basis.

I have no doubt that part of that friction is due to the radically differing foundations that f# vs c# were built on, which as a positive for f# gives it some very cool features that Kotlin won’t have, but it leads one to ponder the RoI of diverging from the primary language.

I do agree with you that googles choice to adopt Kotlin for android rather than invest further into modernizing the jvm capabilities to allow for Java to be able to keep up better was definitely a boost to Kotlin, I assume they made that choice in a calculated manner. I also wonder if Kotlin would be seeing as much server side use at places like Google, was, Airbnb, etc if not for that move on googles part.

banashark··on Inertia.js – Build React, Vue, or Svelte apps with server-side routing
Adonisjs, which is explicitly stated as taking major influence from laravel: https://adonisjs.com/
banashark··on Inertia.js – Build React, Vue, or Svelte apps with server-side routing
Adonis has great support for inertia builtin. Very quick to get started. https://docs.adonisjs.com/guides/getting-started/installatio...

Docs here: https://docs.adonisjs.com/guides/views-and-templates/inertia

Using inertia with SSR is very nice for the combination of:

* I want to have simple server-rendered views, with added client side sprinkling

* I want to be able to use off-the-shelf components like complex data grids to build fast

* I want to minimize API communication headaches

banashark··on Show HN: Skip – Build native iOS and Android apps from a single Swift codebase
Looks very cool!

Looking at the docs gives a good overview of how it works.

Regarding transpilation and the tradeoffs (https://skip.tools/topic/transpilation-tradeoffs/), does the limitation of certain Swift features cause any significant friction with using parts of SwiftUI or other core libraries?

Wondering how much those (understandable) limitations on the transpilation limit what a random iOS dev might be able to do compared to what they can do in iOS land.

Also, using SwiftUI cross-platform makes me think that many android libraries would be a no-go.

One of the reasons that Xamarin development was painful (other than the numerous bugs in trying to target 2 foreign platforms) was that you couldn't _really_ utilize the large native ecosystems of either platform, and you would end up spending a lot of time "rewriting" libraries in dotnet.

banashark··on Official proposal for Type Unions in C#
Java has been fine for infrastructure projects. There is so much out there that relies on things like elasticsearch, Kafka, or any aws service. Heck even the columnar dbs like pinot and Druid are most likely more used than clickhouse.

C# is also fine for this, just way less popular. Recently ms put out https://github.com/microsoft/Garnet when the redis debacle happened.

The Apache project has helped put out quite a few large infra projects, most of them in Java (I don’t know why this is but assume they have lots of resources to help with that, and also that people don’t like debugging memory crashes).

Ms has just been not the greatest collaborators with their open source community. A lot of the time it seems like they want to do the initial foundation, then leave “drawing the rest of the owl” to the community, which ends with lots of partially functional things. GUI frameworks, f# tooling, drivers for commonly used critical infra. At the same time, people get upset when ms tries to build a better version of an existing open source project, so there’s no winning. They’ve just put themselves in such a poor spot.

banashark··on Java EA Released: JEP 401: Value Classes and Objects
Over in /r/java, someone posted an online editor you can try out the new functionality in: https://run.mccue.dev/?release=23&gist=08f81022668c9f3419f67...
banashark··on C# almost has implicit interfaces
F# has an interesting way to achieve a similar function in Statically Resolved Type Parameters (SRTP)

Palatable blog post: https://www.compositional-it.com/news-blog/static-duck-typin...

Official docs: https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref...

banashark··on Java 23: The New Features Are Officially Announced
I think the links are tangential to the openness.

I think most agree that the watch debacle was bad, but what I (and from what I can tell others) may see from that is that the conspiracy theories of "M$ will close it back up as soon as they can capture the users" might have more weight to it than just conjecture, and is clearly out of the hands of anyone in DevDiv. Rebuilding trust is hard, and Microsoft is going to have a hard time reaching escape-velocity from EEE if there are things like this that continue to pop up. The other links where open source projects got moved into the private GH org (and causing issues with github sponsor money going towards the OSS contributors) is also pretty bad. The other divisions aren't helping with things like ads in the Windows start menu, etc.

I'm sure there are other companies that would pull off an open-source heist if they could (I keep an eye on things like GraalVM license changes to see whenever that rug-pull might happen), but agree that because of its past, Microsoft is under a finer microscope than others and the perspective is clouded by what the rest of the company does.

This all being said, I think C# and dotnet as technologies receive quite a bit of praise on HN and other platforms whenever they come up. The threads that make it to the front page about performance improvements and such are usually 80% praise.

banashark··on Nim Versions 2.0.4 and 1.6.20 released
Glad to see that the windows executables are working again (downloadable and not flagged as malware).

I had tried a little while ago to test things out on my windows machine after seeing the NimForUE project (https://github.com/jmgomez/NimForUE) and was sad to see that my computer would auto-mark any nim binaries as malware and delete them. I wasn't too invested so I just shrugged rather than looking for too many workarounds.

banashark··on Clojure's machine learning ecosystem
I'm happy with how usable F# is as the moment, though it's not hard to sympathize with the sentiments that get thrown around.

F# has had a good run with a lot of open-source efforts in different domains, but as some core parts of the domain evolve (asp.net), if there are changes made which make it more complicated or prohibitive to use F# (t4 templates, roslyn analyzers, custom code-behind behavior), it can seem like F# is on-track to become deprecated by the moving-target that is it's native platform tooling.

I don't have much of a doomer mindset about things, since from the evidence of the F# team's priorities, it's keeping up with CLR and C# specific features (check the F# releases for how many features are compatibility-focused) while also delivering on some very cool F# specific things (SRTP, nested record copy/update, etc).

banashark··on Clojure's machine learning ecosystem
Agreed on most of this except for the takeaway (seems to be a theme haha).

In the end, I still ended up using F#, since it was only about 30 minutes of copy/pasting the classes/etc over once, and for the rest of the time in development I got to stay in F# land.

To be explicit, I did do what you say here. I scaffolded things out in C#, then just copied/translated that over to F# calls. All the APIs still work just fine.

banashark··on Clojure's machine learning ecosystem
I understand where you're coming from on these 100%, but I believe some of the conclusions might be more dire than they are in practice.

Both identity and efcore both work fine with F#. What _doesn't_ work is the EF Core design-time support (having models auto-create your schema) and scaffolding razor pages with F# (razor pages just doesn't work in general).

Calling these APIs (authing your users, and interacting with the database) work fine.

I've used mostly database-first design, and tweaked the stock identity pages code anyways so these things haven't affected me a ton (though I _would_ like to use razor pages, since it seems nice and simple for the 80% use-case).

banashark··on Walmart is migrating the remaining F# code into Java
Dotnet and java usually have similar libraries for most things, but sometimes it comes down to how different they are or what they support.

Let's look at general distributed messaging abstractions.

The most modern-featureful one for dotnet I know of is MassTransit: https://masstransit.io/documentation/concepts. You can see it supports a handful of queues and some interesting patterns.

Compare this to the list of features in Apache Camel: https://camel.apache.org/components/4.4.x/eips/enterprise-in...

Additionally, the _support_ of the libraries for common open-source (and closed-source infra) is usually vastly different:

- https://pulsar.apache.org/client-feature-matrix/

- Small features being first party like https://github.com/awslabs/amazon-sqs-java-extended-client-l... vs https://github.com/raol/amazon-sqs-net-extended-client-lib

- Missing features or those that lag behind: https://github.com/confluentinc/confluent-kafka-dotnet/issue...

- Usually manually wired and configured vs the spring boot "starter" pattern of having libraries that automatically do some of the manual setup work for you: https://github.com/spring-projects/spring-boot/blob/main/spr...

I wish more client library sets had the feature-matrix that the pulsar one does, because in practice most end up being the same: Java supports everything because it's either built in the same codebase or is the most used client and gets the most support, while the dotnet client codebase has many feature-requests or performance improvement issues, often leading to a "third-party client" being created.

banashark··on Walmart is migrating the remaining F# code into Java
Jet.com was the original purchase by walmart to my understanding.

They contributed quite a bit of useful things to the ecosystem, and were one of the "F# companies that made-it".

Some of their projects live here: https://github.com/jet?language=f%23

An old HN thread on why they chose F# exists here: https://news.ycombinator.com/item?id=9971412 (though the link is broken, comments still exist).

As an F# enjoyer, it's not surprising that this happened. I've seen quite a few companies migrate to Java from various languages. Casting aside syntactical or language-feature niceties, there's just no substitution for the production-maturity of the Java ecosystem.

Plenty of open-source tested-at-scale libraries being put through their paces at large organizations taking in tons of traffic. Best-practices out-of-the-box adapter libraries for most infrastructure. First-party (actual first-party highest tier of coverage) libraries for communicating with the most common infrastructure (All of AWS, elasticsearch, kafka, cassandra, etc). Even with all of the open-source mindshare, most can have an extreme amount of information availability and support with the common core pieces like JUnit, Spring, Hibernate, and the accompanying set of libraries that usually join those. JFR is to my understanding still the only one of its kind.

I'm grateful for what everyone in the F# and dotnet community has done and continues to do, but even in dotnet (which is probably the closest competitor for production cloud web-services), you're spending a lot more time on writing and wiring up supporting libraries for things that the Java stack does for you out of the box. I prefer many small things in the dotnet world to the jvm world, but at the same time I can't deny that I'm much more able to focus on core business logic and concerns when working on a spring project than when I am on a .net 8 web project.

banashark··on The world of Yakuza fan magazines (2009)
I'd be interested in reading more about the evidence.

I just watched the show and though I'm sure it's got quite a bit of embellishment, anything I've read in the past made the yakuza out to be about the level they're shown in the show (have some power within their local communities, but not much in government unless they can blackmail someone via prostitution or otherwise).

banashark··on JVM Performance Comparison for JDK 21
Diffing the licenses shows that the only change was to add clarity around graalvm as opposed to a generic program:

"For clarity, those portions of a Program included in otherwise unmodified software that is produced as output resulting from running the unmodified Program (such as may be produced by use of GraalVM Native Image) shall be deemed to be an unmodified Program for the purposes of this license."

Other than that, it appears the same. The thing I'm wondering about is how this matches with everyone saying it's "free to use" when the following is in both versions of the license (underscore _emphasis_ mine):

"(b) redistribute the unmodified Program and Program Documentation, under the terms of this License, provided that __You do not charge Your licensees any fees associated with such distribution or use of the Program__, including, without limitation, fees for products that include or are bundled with a copy of the Program or for services that involve the use of the distributed Program."

This to me reads as if:

- You cannot charge for licensing fees on graalvm built distributed pieces of software (licensing for a desktop application, cli program, game, etc)

- You cannot charge for licensing fees on services that involve the use of graalvm built software (SaaS software that uses the graalvm built binary in a k8s container, lambad, etc as part of the service topology)

My gut reaction (since this is Oracle) is that this was an ambiguity oversight in the language that is now being corrected to lock down this "free" usage of the premium version, but I may be overly pessimistic.

Is anyone using this in prod based on it being "free" and has any info from their legal team or otherwise?

Mostly looking to be corrected in my likely misinterpretation.

banashark··on One Billion Row Challenge Shows Java Can Process 1B Rows File in 2 Seconds
https://github.com/praeclarum/1brc
banashark··on Bosque Programming Language
Very interesting, so this is another potential for Typescript-like -> Native code.

The feature set looks pretty neat, and it's probably the first project by a larger company that I've seen use deno (required for building).

Docs are pretty light, but there is _some_ here: https://github.com/BosqueLanguage/BosqueCore/blob/main/docs/...

banashark··on .NET Blazor
Very cool project!
banashark··on .NET Blazor
Referencing the site, I would categorize Blazor under both:

- Unknown unknowns (since it hasn't been out for as long and battle-tested by as many people)

- Shiny new tech (one could argue that C# is old, but that's a small part of the experience of a new and shiny API)

banashark··on .NET 8 Standalone 50% Smaller On Linux
Do you have any reference for this?

I'm very curious to see how they managed to pull this off since from my knowledge of the development patterns, .net has historically been much more allocation-heavy (not that it isn't very efficient with allocated data).

banashark··on Elixir and Phoenix can do it all
In a lot of these BEAM threads I see certain features listed as "part of the benefits", but when I look to see who is using them in production, most of the advice is "don't use that, use an established service to do that".

This is usually things around either ETS/mnesia for state storage or doing hot-releases, both of which I find most people in the community recommend _against_.

A few examples:

- Server-wide state - Persistable data - Background Jobs

Having worked in a heavy Erlang codebase and enjoyed some of the features of it, but realized some of the shortcomings where when reliability is a primary concern (medical/healthcare), a lot of the advice changes.

Though I haven't written any F# in a while, I was always curious to see how F# + https://learn.microsoft.com/en-us/dotnet/orleans/overview (virtual actors) would feel comparatively.

← PreviousPage 2 of 5Next →