frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Apple M5 chip

https://www.apple.com/newsroom/2025/10/apple-unleashes-m5-the-next-big-leap-in-ai-performance-for...
736•mihau•6h ago•785 comments

Things I've learned in my 7 Years Implementing AI

https://www.jampa.dev/p/llms-and-the-lessons-we-still-havent
51•jampa•1h ago•18 comments

I almost got hacked by a 'job interview'

https://blog.daviddodda.com/how-i-almost-got-hacked-by-a-job-interview
451•DavidDodda•6h ago•226 comments

Clone-Wars: 100 open-source clones of popular sites

https://github.com/GorvGoyl/Clone-Wars
31•ulrischa•1h ago•0 comments

Claude Haiku 4.5

https://www.anthropic.com/news/claude-haiku-4-5
237•adocomplete•2h ago•89 comments

Pwning the Nix ecosystem

https://ptrpa.ws/nixpkgs-actions-abuse
189•SuperShibe•6h ago•28 comments

Claude Haiku 4.5 System Card [pdf]

https://assets.anthropic.com/m/99128ddd009bdcb/original/Claude-Haiku-4-5-System-Card.pdf
43•vinhnx•1h ago•3 comments

Show HN: Halloy – Modern IRC client

https://github.com/squidowl/halloy
204•culinary-robot•8h ago•64 comments

F5 says hackers stole undisclosed BIG-IP flaws, source code

https://www.bleepingcomputer.com/news/security/f5-says-hackers-stole-undisclosed-big-ip-flaws-sou...
73•WalterSobchak•6h ago•32 comments

A kernel stack use-after-free: Exploiting Nvidia's GPU Linux drivers

https://blog.quarkslab.com/./nvidia_gpu_kernel_vmalloc_exploit.html
93•mustache_kimono•5h ago•6 comments

C++26: range support for std:optional

https://www.sandordargo.com/blog/2025/10/08/cpp26-range-support-for-std-optional
47•birdculture•5d ago•28 comments

Recreating the Canon Cat document interface

https://lab.alexanderobenauer.com/updates/the-jasper-report
57•tonyg•5h ago•2 comments

Reverse engineering a 27MHz RC toy communication using RTL SDR

https://nitrojacob.wordpress.com/2025/09/03/reverse-engineering-a-27mhz-rc-toy-communication-usin...
54•austinallegro•5h ago•10 comments

I am sorry, but everyone is getting syntax highlighting wrong

https://tonsky.me/blog/syntax-highlighting/
12•robenkleene•50m ago•3 comments

Leaving serverless led to performance improvement and a simplified architecture

https://www.unkey.com/blog/serverless-exit
214•vednig•8h ago•148 comments

Garbage collection for Rust: The finalizer frontier

https://soft-dev.org/pubs/html/hughes_tratt__garbage_collection_for_rust_the_finalizer_frontier/
83•ltratt•7h ago•74 comments

M5 MacBook Pro

https://www.apple.com/macbook-pro/
239•tambourine_man•6h ago•289 comments

US Passport Power Falls to Historic Low

https://www.henleyglobal.com/newsroom/press-releases/henley-global-mobility-report-oct-2025
68•saubeidl•2h ago•82 comments

Recursive Language Models (RLMs)

https://alexzhang13.github.io/blog/2025/rlm/
10•talhof8•2h ago•0 comments

Breaking "provably correct" Leftpad

https://lukeplant.me.uk/blog/posts/breaking-provably-correct-leftpad/
57•birdculture•1w ago•16 comments

Show HN: Scriber Pro – Offline AI transcription for macOS

https://scriberpro.cc/hn/
106•rezivor•7h ago•98 comments

Helpcare AI (YC F24) Is Hiring

1•hsial•7h ago

Americans' love of billiards paved the way for synthetic plastics

https://invention.si.edu/invention-stories/imitation-ivory-and-power-play
31•geox•6d ago•19 comments

Bots are getting good at mimicking engagement

https://joindatacops.com/resources/how-73-of-your-e-commerce-visitors-could-be-fake
301•simul007•8h ago•227 comments

Pixnapping Attack

https://www.pixnapping.com/
263•kevcampb•13h ago•61 comments

iPad Pro with M5 chip

https://www.apple.com/newsroom/2025/10/apple-introduces-the-powerful-new-ipad-pro-with-the-m5-chip/
169•chasingbrains•6h ago•199 comments

FSF announces Librephone project

https://www.fsf.org/news/librephone-project
1324•g-b-r•20h ago•533 comments

Just talk to it – A way of agentic engineering

https://steipete.me/posts/just-talk-to-it
140•freediver•13h ago•83 comments

David Byrne Radio

https://www.davidbyrne.com/radio#filter=all&sortby=date:desc
75•bookofjoe•4h ago•17 comments

Flapping-wing robot achieves self-takeoff by adopting reconfigurable mechanisms

https://www.science.org/doi/10.1126/sciadv.adx0465
71•PaulHoule•6d ago•18 comments
Open in hackernews

Breaking "provably correct" Leftpad

https://lukeplant.me.uk/blog/posts/breaking-provably-correct-leftpad/
57•birdculture•1w ago

Comments

mattnewton•2h ago
The “random” choice of swift was quite fortunate since what this really seems to be testing is the ergonomics of the Unicode “character” definition in the standard libraries used, and swift has the best defaults of the languages mentioned haha
gipp•1h ago
Reading between the lines that definitely seems like an intentional choice
theblazehen•1h ago
The author explicitly notes

> The Swift implementation was indeed written by ChatGPT, and it got it right first time, with just the prompt “Implement leftpad in Swift”. However: Swift is the only language I know where an implementation that does what I wanted it to do is that simple.

JimDabell•1h ago
> Swift’s string implementation goes to heroic efforts to be as Unicode-correct as possible. […] This is great for correctness, but it comes at a price, mostly in terms of unfamiliarity; if you’re used to manipulating strings with integer indices in other languages, Swift’s design will seem unwieldy at first, leaving you wondering.

> It’s not that other languages don’t have Unicode-correct APIs at all — most do. For instance, NSString has the enumerateSubstrings method that can be used to walk through a string by grapheme clusters. But defaults matter; Swift’s priority is to do the correct thing by default.

> Strings in Swift are very different than their counterparts in almost all other mainstream programming languages. When you’re used to strings effectively being arrays of code units, it’ll take a while to switch your mindset to Swift’s approach of prioritizing Unicode correctness over simplicity.

> Ultimately, we think Swift makes the right choice. Unicode text is much more complicated than what those other languages pretend it is. In the long run, the time savings from avoided bugs you’d otherwise have written will probably outweigh the time it takes to unlearn integer indexing.

— https://oleb.net/blog/2017/11/swift-4-strings/

IshKebab•24m ago
> swift has the best defaults

Not really. Swift's defaults happens to match best to these particular requirements. Change the task and you will find other languages have the "best" defaults.

josefritzishere•1h ago
Further reading on the Knuth correctness quote https://staff.fnwi.uva.nl/p.vanemdeboas/knuthnote.pdf
michaelt•1h ago
Every time I hear people talking about ensuring software correctness, it reminds me of this story: https://horningtales.blogspot.com/2006/09/exhaustive-testing...

A university group in the 1960s finds a vendor-supplied binary-to-BCD conversion function sometimes produces an off-by-one error.

They devise a simple fix - but find it adds an extra 'drum revolution' and so write an even more refined fix, that produces the right answer without taking any extra time.

Then they test it, over the course of several weeks, counting from 0 to 9,999,999, both in binary and in BCD, converting the binary to BCD, and comparing the results.

They proudly send the perfected implementation to the vendor - who sends it on to other users of the machine. Soon after they receive a phone call: "Were you aware that your new routine drops the sign of negative numbers?"

Aurornis•1h ago
If you skimmed the article and missed the subtle notes, the author deliberately chose the wrong way to use the Rust version to make a point. Even ChatGPT told him it was wrong for his use case:

> As mentioned, the other way to use the Rust version has the same behaviour as the Haskell/Lean/etc versions. ChatGPT did actually point out to me that this way was better, and the other way (the one I used) was adequate only if the input was limited to ASCII.

dfee•1h ago
Yes, there was vibe coding throughout.

Should've probably been an article about how vibe coding results in incorrect software.

Aurornis•1h ago
It’s more than that. ChatGPT actually gave the right answer but they chose not to use it to make a point.
tracker1•59m ago
Not quite right... as there would still be 3 failures in the tests, like Haskel.

Realistically, I would expect to have a couple different methods available... one that split a string into groups of code segments that represent a single unit, and a display width of units (0-2). Alternatively another method that just counted the display width in numbers of character spaces (assuming mono-spacing). Then you could apply the padding more naturally.

The grouping of characters would be more for other tests for display beyond left padding.

IshKebab•21m ago
They were definitely trying to make Rust look worse than it is. They even sarcastically acknowledge that:

> I didn’t deliberately pick the one which made Rust look even worse than all the others, out of peevish resentment for every time someone has rewritten some Python code (my go-to language) in Rust and made it a million times faster – that’s a ridiculous suggestion.

And

> Rust, as expected, gets nul points. What can I say?

daxfohl•1h ago
So it's not really leftpad that's broken, it's that each language has a different definition of "String.length", generally corresponding to the definition of the underlying encoding, when dealing with accents, emojis, foreign characters, etc., and which notably does not always correspond to the number of spaces occupied by a string a monospace font.

IOW the proofs are correct: leftpad will result in spaces on the left, input string on the right, and String.length as specified. It's the spec itself that was incorrect: the last requirement should be based on "number of spaces occupied by the string in a monospace font", not "string.length", if that's what the desired requirement is.

That said, I think that's largely the author's point. You can prove that your code meets the spec, but you can't prove that your spec meets what you actually intended.

me_again•1h ago
Hillel Wayne posted a followup https://buttondown.com/hillelwayne/archive/three-ways-formal... which may be interesting. Essentially the issue is "what does the Length of a string mean?"
marginalia_nu•20m ago
> The leftpad function provided[1] didn’t take a string, but a char[]. Thankfully, it’s easy to convert from String objects, using the .toCharArray() function. So I did that.

Java's unicode handling is a monumental footgun of the most devastating variety where it works for most common cases, and almost all code that is not written with care to how it is handled will not deal well with code points that require more than 2 bytes to represent.

If you insist on using a char array (which is a bit unidiomatic), you should be using Character$charPointCount[2] to figure out how many code points are in the array, and even then you're probably SOL with regards to non-trivial emojis. String$charPointCount[3] is also an option if you want to use String and StringBuilder to do the padding, which arguably be more idiomatic.

[1] https://github.com/hwayne/lets-prove-leftpad/blob/ea9c0f09a2...

[2] https://docs.oracle.com/en/java/javase/25/docs/api//java.bas...

[3] https://docs.oracle.com/en/java/javase/25/docs/api//java.bas...

eterm•2m ago
For anyone else who was curious C#/.NET:

By default string.Length measures characters, but System.Globalization.StringInfo is provided to work with "text elements".

Unlike System.String, StringInfo doesn't have a built-in PadLeft function in it's base library. But it gets the length "right" by the author's standard.

Code to show lengths:

  using System;
  using System.Globalization;
     
  public class Program
  {
   public static void Main()
   {
    var weirdStrings = new string[] {"𝄞","Å","𓀾","אֳֽ֑","résumé","résumé"};
    foreach(var weirdString in weirdStrings){
     var asStringInfo = new StringInfo(weirdString);
   Console.WriteLine($"{weirdString.PadLeft(10,'-')} {weirdString.Length} {asStringInfo.LengthInTextElements}");
    }
   }
  }