HNHacker News
TopNewBestAskShowJobs

laszlokorte

1,199 karma · joined September 10, 2015

submissionscomments
laszlokorte··on AI usage generates a fragile codebase
I want to be rich, healthy, happy, young, smart, beautiful. Same for all my friends and family please. How many tokens?

PS: make no mistakes and tell me in advance if I forgot anything that I could regret later.

Or on a more technical side: I would like all problems that any app/company/product could solve to be solved in the best possible way, so that nobody has to even think about what kind of problems even could be solved. Go iterate on that but do not make any mistake, do not ask any questions, be done by tomorrow, do not interpret what I said in any bad way.

laszlokorte··on Library of Babel
https://libraryofbabel.app/ref/@39f7f497827f9eddb5a69db9011e...
laszlokorte··on Notes on the Complex Roots of Unity
I built these two interactive visualizations to gain some intuition for this. [1][2]

1: https://static.laszlokorte.de/complex-roots/ 2: https://static.laszlokorte.de/complex-plane/

laszlokorte··on A Visual Intro to Complex Numbers
I think the best introduction is by taking the geometric perspective: Addition is translation, multiplication with a positive number is scaling, multiplication with -1 is reflecting across the origin, multiplication with any negative number is scaling and reflecting at once. multiplying with a square root of a positive number does only part(half) of the scaling. multiplying twice with the square root does the full scaling.

Now the only question left is: what is the half of a reflection? a 90 degree rotation into a new dimension. Doing it twice returns to the original dimension but on the opposite side of the origin.

This also explains why division of 0 is a problem: multiplying by 0 scales everything to the origin (ie deletes the original size). Division would need to restore the original size. But as a sibling comment has already said. Division by zero could just scale everything to infinity. But then everything can only flip between 0 and infinity.

laszlokorte··on A Visual Intro to Complex Numbers
In your example 3 and 2 belong to different dimensions. you could write "3x + 2y" to express 3 steps along the x axis and 2 along the y axis. Just writing "3+2" would lead to the expectation that 5 could be calculated as reasonable result, which would not be the case.
laszlokorte··on A Visual Intro to Complex Numbers
For an interactive approach I built this some time ago. [1]

It allows putting complex numbers on the complex plane and doing addition, multiplication and exponentiation via drag and drop. It provides some intuition for addition==translation and multiplication==scale-rotation.

[1]: https://static.laszlokorte.de/complex-plane/

laszlokorte··on Rusty thoughts on "Parse, don't validate"
In rust this would simply be

   enum ConnectionStste {
        Connected(u32),
        Disconnected
    }
laszlokorte··on Show HN: Jev Plays Pokémon Red
Yeah I would have expected it to only decide which button to press, not something abstract like the choice of "go east to lavender town" for the goal of "in lavender town, climb the pokemon tower"
laszlokorte··on What About Rails?
What I do not understand with the "languages do not matter"/"frameworks do not matter" is ultimately the following:

What a good language or a good library (and to a lesser degree also a good framework) does is to pre-compress ideas into well understandable and composable chunks.

Examples:

`printf("foo %d, %3.2f %s", ...)` abstracts/compresses a general strategy of shuffling bytes into the correct ascii/utf-8... format. An LLM could also write the raw assembly or bytecode for doing the same thing, but for one it would take much more tokens and to apply this pre-invented concept, and second without the concept already invented there would be no "information pattern" in existence that the LLM could have learned or refer to.

`list.map(...).filter(...)...` are patterns that (when applied strictly in a functional sense) go hand in hand with laws like `map` not affecting the number of elements, and filter producing no new elements etc... These are also patterns that are already invented and depending on the language these restrictions are checked. Just reading `map` somewhere can tell you (and the LLM) a lot, and writing `map` instead of while, for or jmp will capture and express much more information. LLMs would not have been able to learn these concepts if they did not already exist. And even if such a general pattern would be discovered by an LLM somewhere inside its learnt parameters, it would not haven given this pattern a name that it could/would tell you. And if you do not know the name for such a concept how have a much harder time prompting the LLM.

Expressing computations in a well understood algebra allows for symbolic manipulation and simplification. like `5 + 3 == 3 * 5 == (1+1+1) * 5 == (5+5+5)...`. But algebraic manipulation requires a symbolic language with precise rules to describe what manipulation is allowed. In AI-speak you could say the language itself is a harness or a sandbox to guide and restrict whats possible. Doing advanced math proofs is only possible for LLMs because languages like LEAN provide a strict guideline to build upon.

In short, two extremes: If LEAN is so great at proofing correctness and LLMs are so good at LEAN, why is not from today on everything (windows, linux, basecamp, hey, gcc, rustc, blender...) translated into LEAN? Why bother with rust at all? On the other hand if languages do not matter anyway and LLMs are able to recognize all the pattern on their own, why not let the LLM output and iterate on the binary bytecode to generate a self contained binary directly?

laszlokorte··on The broadcast squeezeback, rebuilt with CSS Grid and WebVTT
Maybe prefer-reduced-motion?
laszlokorte··on Show HN: Rotation via Double Reflection
I have now added an extra section about higher dimensions.
laszlokorte··on Show HN: Rotation via Double Reflection
I have now reworked the colors and labels.
laszlokorte··on Show HN: Rotation via Double Reflection
Oh, you are right. My 3d example is bad indeed. Thanks for pointing it out.

I think my mistake from the very beginning was to frame „reflection“ as happening around a vector instead of around a plane. I did this because I thought of it to be easier to vidualize. The I carried it on into 3d but as you say it does not generalize.

Had I started with doing reflections across planes I think it might generalize correctly across dimensions.

I have to admit this kind of mistake might completely undermine the correctness and usefulness of the visualization. I will rework this. Glad you noticed it.

laszlokorte··on Could AIs Become Conscious?
As soon as you stop mimicing
laszlokorte··on What ORMs have taught me: just learn SQL (2014)
In my opinion Elixir Ecto is ORM done right:

1. the functional/immutable nature of Elixir makes read and writes much more explicit and there is no need to magically track deep mutations of nested objects to translate them back into UPDATE/INSERT queries

2. Elixirs support for lisp-like macros allows for an ergonomic embedded query languages that is syntax and schema checked, mirrors raw SQL really well and, frees you from string-oriented query building

3. the query builder DSL addresses one of the main weaknesses of SQL query statements not being composable

4. The automatic conversion between JOINed tables (on the DB side) and nested structs (on the Elixir side) is done on the right abstraction level to work reliable and and being explicit enough to generate predictable queries.

laszlokorte··on Box3D, an open source 3D physics engine
If the comment above is correct, he was only added to the credits after he had to ask for it after the fact.

So the ONLY thing the license asked for is to be named and that was supposedly violated. So a multi million dollar company can just violate a generous license and then after a fact cling to this exact license while arguing to not pay a single cent more than the license asked for. Alright...

laszlokorte··on Ray Tracer in SQL
Very cool! I did a similar (but much simpler!) experiment by implementing perspective projection via SQL, storing meshes (vertices, edges, faces), the camera position and the screen size in tables and building a single query that generates the SVG paths (including backface culling). Running via WASM SQlite inside the web browser. [1]

  SELECT project(...) as x, project(...) as y 
  FROM model, vertex, camera, transform 
  WHERE clockwise AND clipped IN BETWEEN -1 AND 1
[1]: https://static.laszlokorte.de/sql3d/
laszlokorte··on Should every baby's DNA be sequenced?
Then maybe install the strobe lights in all important rooms? Most people have there phone on silent/vibration anyway and recently everybody uses noise-canceling headphones outside to not be bothered by other people...

All the infrastructure that would support deaf people (like additional signal lights, vibration signals, subtitles...) are also very helpful for everybody else in specific situations.

Everybody is handicapped part of the time

laszlokorte··on Should every baby's DNA be sequenced?
I said nothing about banning performing surgeries or forcing parents to carry out a deaf child just for keeping some community alive.

I just wanted to point out that there is a path from "would like to prevent" to "stop everybody who does not match the profile from living".

The other responses in this thread already show in which bad light people look at deaf people. Maybe start talking to some of them.

laszlokorte··on Should every baby's DNA be sequenced?
"I would like my child to not be deaf" -> "Many (most?) people would prefer their child to not be deaf" -> (3) "Deaf community shrinks" -> "Social support for deaf people is reduced/seen as not necessary" -> "Parents of deaf children are blamed for carrying out the child" -> "Parents are nudged (forced) to terminate the pregnancy" -> goto (3)

In a some way this is already happening (eg Judges forcing cochlea implants on babies while denying the parents support in learning/teaching sign language to the child)

Many people see this as an attack on the deaf community and their culture - and I have to agree.

laszlokorte··on .self: A new top-level domain designed to support self-hosting

  write.it.your.self
  think.4.your.self
  written.by.my.self
all CNAME -> claude.ai
laszlokorte··on Preparing for KDE Plasma's Last X11-Supported Release
I know nothing about the detailed technical differences between X11 and Wayland but with Hyprland for me the PIP is working as expected so I assume its not just a Wayland issue but specific to the window manager you are using? Maybe somebody else can explain?
laszlokorte··on A desktop made for one
Semi-honest question: What do you need a window manager, code editor, chat app, etc for if claude is so awesome that it can do everything for you? Why spend 400$ on making tools that you wont use in any workflow because the only workflow that will be left is prompting and agent to run in a loop
laszlokorte··on Zed 1.0
I think it was even featured and praised in a recent zed blog post
laszlokorte··on Zed 1.0
yes there is a single toggle to disable all AI
laszlokorte··on Effectful Recursion Schemes
Recursion schemes are a topic too few people know about in my opinion. I wrote two simple and interactive introductions. One in Javascript [1] and one in Elixir as Livebook [2]. The Elixir version contains a few more practical examples.

[1]: https://static.laszlokorte.de/recursion-schemes/ [2]: https://github.com/laszlokorte/elixir-recursion-livebook/blo...

laszlokorte··on Show HN: M. C. Escher spiral in WebGL inspired by 3Blue1Brown
The main issue is that the image needs to have a high enough resolution to be sharp at all zoom scales. Currently my images are vector graphics that I rasterize depending on the screen resolution.

The Escher Print Gallery requires even larger scales as it uses a zoom factor of 256 across the image (vs 16 for my images)

Others have solved this by either vectorizing the Print Gallery or even rebuilding the scene as 3D signed distance field that can be sampled via ray marching.[1] The later yields the best result but I did not want to copy it.

[1]: https://www.shadertoy.com/view/Mdf3zM

laszlokorte··on Show HN: M. C. Escher spiral in WebGL inspired by 3Blue1Brown
I have not implemented proper multi-touch controls yet. Currently the gizmos need to be used for zooming, paning and rotating.

I will add multi-touch gestures soon.

laszlokorte··on Show HN: M. C. Escher spiral in WebGL inspired by 3Blue1Brown
Thanks for the suggestion! I added a slow initial auto zoom and updated the up/down arrows to work while being pressed.
laszlokorte··on Show HN: M. C. Escher spiral in WebGL inspired by 3Blue1Brown
I now updated the default view to already show the Escher effect :)
Page 1 of 12Next →