frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

lsr: ls with io_uring

https://rockorager.dev/log/lsr-ls-but-with-io-uring/
218•mpweiher•5h ago•119 comments

Trying Guix: A Nixer's impressions

https://tazj.in/blog/trying-guix
61•todsacerdoti•3d ago•8 comments

CP/M creator Gary Kildall's memoirs released as free download

https://spectrum.ieee.org/cpm-creator-gary-kildalls-memoirs-released-as-free-download
176•rbanffy•8h ago•66 comments

I'm Peter Roberts, immigration attorney who does work for YC and startups. AMA

111•proberts•3h ago•151 comments

Fully homomorphic encryption and the dawn of a private internet

https://bozmen.io/fhe
379•barisozmen•14h ago•175 comments

CoCo1 composite video

https://www.leadedsolder.com/2025/07/15/tandy-trs80-coco-composite-mod-aquarius.html
14•zdw•3d ago•0 comments

When root meets immutable: OpenBSD chflags vs. log tampering

https://rsadowski.de/posts/2025/openbsd-immutable-system-logs/
112•todsacerdoti•9h ago•40 comments

HathiTrust Digital Library

https://www.hathitrust.org/
40•djoldman•3d ago•13 comments

Dear valued user, You have reached the error page for the error page

https://imgur.com/a/2H7HVcU
107•Alex3917•2h ago•17 comments

Hundred Rabbits – Low-tech living while sailing the world

https://100r.co/site/home.html
164•0xCaponte•4d ago•36 comments

Firefox-patch-bin, librewolf-fix-bin AUR packages contain malware

https://lists.archlinux.org/archives/list/aur-general@lists.archlinux.org/thread/7EZTJXLIAQLARQNTMEW2HBWZYE626IFJ/
21•rrampage•37m ago•7 comments

Meta says it wont sign Europe AI agreement, calling it growth stunting overreach

https://www.cnbc.com/2025/07/18/meta-europe-ai-code.html
16•rntn•29m ago•1 comments

The Art of Roland-Garros

https://www.garros.gallery/
34•pentagrama•3d ago•3 comments

Starbase injury rates outpace rivals as SpaceX chases its Mars moonshot

https://techcrunch.com/2025/07/18/starbase-injury-rates-outpace-rivals-as-spacex-chases-its-mars-moonshot/
20•rntn•1h ago•30 comments

Psilocybin decreases depression and anxiety in cancer patients (2016)

https://pmc.ncbi.nlm.nih.gov/articles/PMC5367557/
212•Bluestein•7h ago•192 comments

15 Years of Building Jefit

https://www.jefit.com/our-story
41•jasong•3d ago•27 comments

Resolve (YC W15) Is Hiring an Operations and Billing Lead for Construction VR

1•ugolino91•6h ago

Ask HN: Any active COBOL devs here? What are you working on?

187•_false•5h ago•149 comments

Exposed MCP servers across the internet

https://www.knostic.ai/blog/mapping-mcp-servers-study
47•gepeto42•4h ago•16 comments

Row Polymorphic Programming

https://www.stranger.systems/posts/by-slug/row-polymorphic-programming.html
35•todsacerdoti•3d ago•21 comments

Ask HN: GCP Outage?

67•grilledchickenw•3h ago•29 comments

A New Geometry for Einstein's Theory of Relativity

https://www.quantamagazine.org/a-new-geometry-for-einsteins-theory-of-relativity-20250716/
7•jandrewrogers•3h ago•0 comments

DuckDuckGo now lets you hide AI-generated images in search results

https://techcrunch.com/2025/07/18/duckduckgo-now-lets-you-hide-ai-generated-images-in-search-results/
101•moose44•1h ago•39 comments

LibreOffice slams Microsoft for locking in Office users w/ complex file formats

https://www.neowin.net/news/libreoffice-calls-out-microsoft-for-using-complex-file-formats-to-lock-in-office-users/
30•bundie•1h ago•7 comments

ICE is getting unprecedented access to Medicaid data

https://www.wired.com/story/ice-access-medicaid-data/
176•josefresco•3h ago•150 comments

Inspect ANSI control codes and escape sequences

https://ansi.tools
85•webpro•3d ago•42 comments

My experience with Claude Code after two weeks of adventures

https://sankalp.bearblog.dev/my-claude-code-experience-after-2-weeks-of-usage/
365•dejavucoder•23h ago•332 comments

H-1B program grew 81 percent from 2011 to 2022

https://twitter.com/USTechWorkers/status/1945999773825196492
93•DonnyV•2h ago•109 comments

Perfume reviews

https://gwern.net/blog/2025/perfume
301•surprisetalk•1d ago•160 comments

DIY Telescope Mods That Transformed My Astrophotography

https://www.youtube.com/watch?v=Efmzr_K4ApQ
65•karlperera•3d ago•16 comments
Open in hackernews

Row Polymorphic Programming

https://www.stranger.systems/posts/by-slug/row-polymorphic-programming.html
35•todsacerdoti•3d ago

Comments

skybrian•3h ago
What could you do with row polymorphism that you couldn’t do with generic functions that take slices in Go?
tines•2h ago
I think Go interfaces are row-polymorphic aren't they? I'm also wondering what the difference between row-polymorphism and ad-hoc polymorphism (a la C++ templates) is.
wavemode•1h ago
Yes, Go interfaces are row-polymorphic, in the sense that they allow you to write functions that operate on any struct which has a field with a certain name and type.

This utilizes the fact that structs implement interfaces implicitly in Go, rather than explicitly.

> I'm also wondering what the difference between row-polymorphism and ad-hoc polymorphism (a la C++ templates) is

C++ templates can also be row-polymorphic. They're a lot more flexible than just row polymorphism, though, because they essentially allow you to be polymorphic over any type for which a given expression is valid syntax.

Concepts were an attempt to allow developers to rein in some of that flexibility, since it actually became a pain.

skybrian•51m ago
Is this new with generics? I thought Go interfaces were just method sets?
jerf•49m ago
"Go interfaces are row-polymorphic, in the sense that they allow you to write functions that operate on any struct which has a field with a certain name and type."

It doesn't have it yet. Go is headed strongly in that direction which is why I add the "yet", but see https://github.com/golang/go/issues/70128 , especially the "future directions" note about issue #48522 which is not implemented. Prepatory work has been done but the change is not in yet.

You can embed something like compile-time row types into Go if you implement it in terms of accessor methods that can be included in an interface, rather than direct struct field access, which has its pros and cons.

But if you're reading this in 2026 or beyond, check in with Go, this may not be true anymore.

ryandv•2h ago
Nothing, all of this academic obscurantism and esoterica will soon become completely useless ivory tower knowledge.

The AI will produce functionally equivalent code at a tenth of the cost, without needing to hire somebody who studied high-falutin computer science concepts like "polymorphism."

aatd86•1h ago
highfalutin... I didn't know that word :D

I actually believe otherwise, AI risks fossilizing our programming languages expressiveness and developper experience, shunting any possibility of improvements that is not envoded in its data set.

I think that for tools made for human consumption, AI is always going to be limited (even AGI). A case of "for us by us" is necessary.

Unless humans completely delegate the machine coding to machines and we only remain with a few legacy systems, never inspecting new machine instruction corpus. Inthe future that is.

jerf•47m ago
As long as AIs are finite, they will need good concepts to help reduce the complexity of the world they are dealing with too.

They may need and/or prefer different ones than we do, but this stuff isn't going to go away. Your need to understand it may, but then, most programmers don't understand this and do OK anyhow.

aatd86•1h ago
When you want to abstract on structs "having" a given field (by name) of a given type, I think. Although that may come in Go at some point.
tines•1h ago
I'm not a Go expert but that's exactly what interfaces are, aren't they? In Go a struct automatically implements an interface if it contains all the required fields (duck-typing).
sparkie•57m ago
They're both a form of structural typing - the static equivalent of duck typing.

A difference with row types is that they don't have to be declared up front like an interface - they're basically anonymous types. You declare the row types in the type signature.

For example, a function taking some structural subtype of `Foo` and returning some structural subtype of `Bar` would be written in Go as:

    type Foo interface {
        baz Baz
    }
    
    type Bar interface {
        qux Qux
    }
    
    func (x Foo) f() Bar {
        ...
    }
In OCaml, you'd just inline the row types - there are no `Foo` or `Bar`:

    val f : < baz : Baz.t; .. > -> < qux : Qux.t; .. > 
    let f x = ...
You can typedef row types though

    type foo = < baz : Baz.t; .. >
    type bar = < qux : Qux.t; .. >
    val f : foo -> bar
Rows can be declared to have an exact set of members. For example, the types `< bar : Baz.t >` and `< bar : Baz.t; ..>` are two different types. The latter can have members besides `bar`, but the former can only have the member `bar`. A type containing the fields `bar` and `qux` would be a subtype of `< bar : Bar.t; .. >`, but it would not be a subtype of `< bar : Bar.t >`.

OCaml has another form of structural typing in its module system, closer to interfaces where a `module type` is declared up-front, and can be specified as the argument for a functor (parameterized module) - but this is incompatible with the row types in the object system.

moron4hire•1h ago
Also called Nominal Typing. I generally consider it a mistake. Interfaces aren't just a bag of fields and methods. They encode semantics, too. Otherwise, you could dismiss employees with a gun or by loading them into a kiln.
tines•1h ago
Nominal typing is the opposite, I think you're thinking of structural typing, no?
moron4hire•5m ago
Yep, sorry
taeric•1h ago
I am not entirely sure I disagree. I think context is often a big factor in semantics, though? The problem with interfaces is often that people think they do all of the work by themselves. But, that is only true within the context of how you use some data. And people tend to accidentally constrain themselves too heavily.

You can make the same argument for numbers, for an easy exploration. Just look at all of the tools that you can have at your disposal by thinking of things as numbers.

michael1999•1h ago
In the original relational papers, column names were basically types. In a OO world, that doesn't make sense, but in a relational world, it does.
pxeger1•1h ago
I think you mean structural typing; nominal typing is the opposite, where field names are lexically scoped.

Anyway, row polymorphism can technically be used with nominal typing, it's just that it usually makes sense to use structural typing instead.

The key benefit of row polymorphism is a bit of an implementation detail - it lets you get something resembling (a limited form of) subtyping in your language, without needing as complicated a type inference algorithm as fully-general subtyping requires.

Row polymorphism can be (IMO should usually be) made opt-in, so you can avoid problems like the scenario you describe.

daxfohl•25m ago
The only thing is I wish there was a way to safely lift a row-polymorphic record to a named record type if the compiler can determine it has all the required fields. Haven't seen any languages that offer this yet though.
continuational•15m ago
Firefly can construct any named record from any other record (named or anonymous):

    let point = (x = 5, y = 7)
    let point3d = point.Point3d(z = 0)
We included this feature specifically to make it easy to use named and unnamed records together.

More here: https://www.firefly-lang.org/

owlstuffing•11m ago
The manifold project[1] for Java provides that feature as "Structural Interfaces" which supports polymorphic variants.

The project also supports tuples that behave similarly.

    var person = (name: "Joe", age: 35);
    . . .
    Person p = person; // tuple's name, age properties satisfy Person record
1. https://github.com/manifold-systems/manifold
owlstuffing•16m ago
I hadn't come across the "Row" polymorphism term before, but it sounds more like structural typing -- for example TypeScript, and to a lesser degree Go, have structural interfaces that provide "row polymorphic" programming.

You could go further with variant structural typing, basically this is a broader form of type checking based on call compatibility, which answers the question -- is B#foo() callable as an A#foo()?

For instance, your `area` example requires `double` result types, otherwise a row type having `width` and `length` defined as `integer` columns doesn't satisfy `area`. But, result types are naturally covariant -- `integer` is a subset of `double` -- which permits us to accept `integer` in the implementation of `area`.

Similarly, parameter types are naturally contravariant -- `Shape` is contravariant to `Triangle`, thus `B#foo(Shape)` is call-compatible as a `A#foo(Triangle)`, therefore I can pass a Triangle to `B#foo(Shape)`.

The manifold project[1] for Java is one example where the type system is enhanced with this behavior using structural interfaces.

Note, this goes further with parametric types where function result types and parameter types define variance and other constraints.

1. https://github.com/manifold-systems/manifold