frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Affinity Studio now free

https://www.affinity.studio/get-affinity
795•dagmx•10h ago•571 comments

Kimi Linear: An Expressive, Efficient Attention Architecture

https://github.com/MoonshotAI/Kimi-Linear
31•blackcat201•1h ago•0 comments

Phone numbers for use in TV shows, films and creative works

https://www.acma.gov.au/phone-numbers-use-tv-shows-films-and-creative-works
81•nomilk•4h ago•43 comments

The ear does not do a Fourier transform (2024)

https://www.dissonances.blog/p/the-ear-does-not-do-a-fourier-transform
352•izhak•9h ago•116 comments

Jack Kerouac, Malcolm Cowley, and the difficult birth of On the Road

https://theamericanscholar.org/scrolling-through/
25•samclemens•1d ago•2 comments

Springs and bounces in native CSS

https://www.joshwcomeau.com/animation/linear-timing-function/
135•feross•2d ago•23 comments

NPM flooded with malicious packages downloaded more than 86k times

https://arstechnica.com/security/2025/10/npm-flooded-with-malicious-packages-downloaded-more-than...
166•jnord•1d ago•102 comments

The Psychology of Portnoy: On the Making of Philip Roth's Groundbreaking Novel

https://lithub.com/the-psychology-of-portnoy-on-the-making-of-philip-roths-groundbreaking-novel/
25•lermontov•1w ago•0 comments

987654321 / 123456789

https://www.johndcook.com/blog/2025/10/26/987654321/
491•ColinWright•4d ago•86 comments

Free software scares normal people

https://danieldelaney.net/normal/
475•cryptophreak•10h ago•317 comments

Lenses in Julia

https://juliaobjects.github.io/Accessors.jl/stable/lenses/
69•samuel2•4d ago•14 comments

Denmark reportedly withdraws Chat Control proposal following controversy

https://therecord.media/demark-reportedly-withdraws-chat-control-proposal
185•layer8•4h ago•52 comments

Minecraft HDL, an HDL for Redstone

https://github.com/itsfrank/MinecraftHDL
113•sleepingreset•7h ago•15 comments

Show HN: I made a heatmap diff viewer for code reviews

https://0github.com
177•lawrencechen•11h ago•52 comments

Israel demanded Google and Amazon use secret 'wink' to sidestep legal orders

https://www.theguardian.com/us-news/2025/oct/29/google-amazon-israel-contract-secret-code
661•skilled•1d ago•273 comments

Launch HN: Propolis (YC X25) – Browser agents that QA your web app autonomously

https://app.propolis.tech/#/launch
89•mpapazian•9h ago•25 comments

Show HN: Status of my favorite bike share stations

https://blog.alexboden.ca/toronto-bike-share-status/
14•alexboden•5d ago•5 comments

A change of address led to our Wise accounts being shut down

https://shaun.nz/why-were-never-using-wise-again-a-cautionary-tale-from-a-business-burned/
192•jemmyw•3h ago•112 comments

A Defense of Philosophical Intuitions

https://hilariusbookbinder.substack.com/p/a-defense-of-philosophical-intuitions
14•Caiero•2d ago•3 comments

PlanetScale Offering $5 Databases

https://planetscale.com/blog/5-dollar-planetscale
147•ryanvogel•10h ago•58 comments

Zig's New Async I/O

https://andrewkelley.me/post/zig-new-async-io-text-version.html
248•todsacerdoti•1d ago•78 comments

Learn Multiplatform Z80 Assembly Programming with Vampires

https://www.chibiakumas.com/z80/
61•surprisetalk•5d ago•4 comments

Show HN: Front End Fuzzy and Substring and Prefix Search

https://github.com/m31coding/fuzzy-search
16•kmschaal•1d ago•1 comments

How to Use Zorn's Lemma (2008)

https://gowers.wordpress.com/2008/08/12/how-to-use-zorns-lemma/
13•perihelions•4d ago•1 comments

Show HN: Run a GitHub Actions step in a gVisor sandbox

https://github.com/geomys/sandboxed-step
55•FiloSottile•6d ago•0 comments

Independently verifying Go's reproducible builds

https://www.agwa.name/blog/post/verifying_go_reproducible_builds
98•speckx•1d ago•3 comments

ZOZO's Contact Solver for physics-based simulations

https://github.com/st-tech/ppf-contact-solver
71•vintagedave•10h ago•34 comments

Show HN: In a single HTML file, an app to encourage my children to invest

https://roberdam.com/en/dinversiones.html
192•roberdam•15h ago•357 comments

Show HN: ekoAcademic – Convert ArXiv papers to interactive podcasts

https://www.wadamczyk.io/projects/ekoacademic/index.html
34•wadamczyk•4h ago•7 comments

Show HN: Meals You Love – AI-powered meal planning and grocery shopping

https://mealsyoulove.com
45•tylertreat•3d ago•31 comments
Open in hackernews

Lenses in Julia

https://juliaobjects.github.io/Accessors.jl/stable/lenses/
69•samuel2•4d ago

Comments

eigenspace•4h ago
Nice to see this passed around on Hacker News. I think the whole concept of lenses is super cool and useful, but suffered from the usual Haskellificiation problems of being presented in an unnecessarily convoluted way.

I think Accessors.jl has a quite nice and usable implementation of lenses, it's something I use a lot even in code where I'm working with a lot of mutable data because it's nice to localize and have exact control over what gets mutated and when (and I often find myself storing some pretty complex immutable data in more 'simple' mutable containers)

verdverm•2h ago
Was hoping this was data lenses, like cambria from ink&switch

https://www.inkandswitch.com/cambria/

Not sure how "A Lens allows to access or replace deeply nested parts of complicated objects." is any different from writing a function to do the same?

Julia curious, very little experience

laszlokorte•2h ago
Yes lenses are pairs of functions that allow bidirectional data transformations. One function acts like a getter and one function acts like a setter. The signatures of the functions are designed to compose nicely. This allows to compose complex transformations from a few simple building blocks.

In the end it is really just function composition but in a very concise and powerful way.

In your cambria example the lens is defined as yaml. So this yaml needs to be parsed and interpreted and the applied to the target data. The rules that are allowed to be used in the yaml format must be defined somewhere. With pure functional lenses the same kind of transformation rules can be defined just by function composition of similar elemental rules that are itself only pairs of functions.

verdverm•2h ago
To be clear, cambria is not mine

> So this yaml needs to be parsed and interpreted and the applied to the target data. The rules that are allowed to be used in the yaml format must be defined somewhere.

I wasn't trying to get into the specific technology. The Julia still needs to be parse, and while Yaml has them separate, CUE does not (which is where I write things like this and have building blocks for lenses [1], in the conceptual sense)

In the conceptual sense, or at least an example of one, lenses are about moving data between versions of a schema. It sounds like what you are describing is capable of this as well? (likely among many other things both are capable of)

[1] https://hofstadter.io/getting-started/data-layer/#checkpoint...

laszlokorte•1h ago
Yes functional lenses are very good at transforming between between schematas.

You can think of it as an functional programming based embedded domain specific language for transforming immutable data structures into each other. Sure there are other ways to do it but its like generalized map/filter/reduce class of functions vs doing the same imperatively by hand or in other ways

verdverm•1h ago
hmm, that makes it sound closer to CUE, where all values are immutable

CUE is in the logical family with Prolog and is not Turing Complete

versteegen•39m ago
Lenses make it more convenient to use immutable structs, which Julia encourages (particularly as they unlock various optimisations).
kazinator•2h ago
Certain aspects of this me of the modf macro for Common Lisp:

https://github.com/smithzvk/modf

You use place syntax like what is used with incf or setf, denoting part of some complex object. But the modification is made to the corresponding part of a copy of the object, and the entire new object is returned.

binary132•1h ago
I have to admit I don’t really understand the point of doing this instead of just obj.a = 2 or whatever.
aap_•1h ago
Immutability is a central concept in functional programming.
dullcrisp•1h ago
You can uhhh abstract over the property which seems cool if you’re into abstracting things but also probably shouldn’t be the thing you’re abstracting over in application code.

Or on second look the sibling comment is probably right and it’s about immutability maybe.

laszlokorte•1h ago
Say you want to do obj.child.foo[3].bar += 2 but without mutation, but instead all the data is immutable and you need to do a deep copy along the path.

Lenses are an embedded dsl for doing this via syntax that reads similar to to the mutable variant. Additionally it allows to compose many of such transformations.

o11c•5m ago
This is equivalent to that for people who are irrationally terrified of mutability, and are willing to abandon performance.
Quitschquat•19m ago
Is this like setf in lisp?