frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Show HN: Money Simulator

https://simulator.money/play
1•pattle•3m ago•0 comments

Show HN: Codeflowmap – map a codebase's read/write/auth data flows

https://github.com/man-consult/code-mapper
1•brian-m•4m ago•0 comments

Beyond the $7.4B Headline: DeepSeek's Series A signals Chinese AI alliance shift

https://asiaai.fyi/east-asias-ai-capital-surge-homegrown-models-challenge-west-amid-mineral-tensi...
1•dweisinger•5m ago•0 comments

LiveKit Solves Turn Detection

https://livekit.com/blog/solving-end-of-turn-detection
2•piyussh•6m ago•0 comments

Trump and Netanyahu Have Stepped in It Now

https://www.nytimes.com/2026/06/18/opinion/israel-america-iran-trump-vance.html
4•duxup•13m ago•1 comments

Typewriter Tinnitus/Morse Code Tinnitus

https://hearinglosshelp.com/blog/typewriter-tinnitus-morse-code-tinnitus/
2•austinallegro•18m ago•0 comments

Show HN: FERNme – agent memory that updates with ~zero LLM calls

https://github.com/mirkofr/FERNme
3•mirkofr•19m ago•0 comments

Giant Banana Pulled Over: Driver Says Cops Have Stopped Him 100s of Times

https://cowboystatedaily.com/2026/06/18/giant-banana-pulled-over-in-montana-driver-says-cops-have...
2•speckx•20m ago•1 comments

Show HN: HN Game Stories – mini-documentary of games that hit the front page

https://video.intellios.ai
2•coolwulf•21m ago•0 comments

Show HN: Submarius – Global water clarity for divers

https://submarius.com
3•celloer•23m ago•0 comments

Show HN: Starchart and Repo Header Generator

https://shieldcn.dev
4•justinlevine•24m ago•4 comments

Ask HN: What are some good benchmarks for different agent harnesses?

2•Bnjoroge•27m ago•0 comments

A Leaked GitHub Token Exposed the Exact Ozempic Formula

https://www.pentesty.co/blog/novo-nordisk-ozempic-fulcrumsec-breach-2026
4•johnzoro107•28m ago•1 comments

Ask HN: After you ship a feature, what happens to what you learned?

3•gaggle_dk•30m ago•1 comments

Show HN: Vitrus – the company brain that tells you what it doesn't know

https://github.com/ahmetvural79/Vitrus
2•ahvural•30m ago•0 comments

Hackingpal

https://github.com/hackingpal/hackingpal
2•jadamsl•34m ago•0 comments

Ask HN: What are your parameter count estimates for Opus 4.8 and GPT-5.5?

2•ahriad•36m ago•0 comments

Query with Curl

https://daniel.haxx.se/blog/2026/06/21/query-with-curl/
3•Sami_Lehtinen•37m ago•0 comments

Extracted Value

https://extractedvalue.com/
2•turtleyacht•41m ago•0 comments

Multi Pong – multiplayer pong game

https://multi-pong.projects.lasz.uk/
2•dr_kretyn•41m ago•0 comments

New V4 encryption format that supports hardware-bound encryption using Yubikeys

https://www.vaultsort.com/
4•VaultSort•43m ago•0 comments

Epoll vs. Io_uring in Linux

https://sibexi.co/posts/epoll-vs-io_uring/
19•Sibexico•46m ago•1 comments

The Tiny Sailing Game That Feels Surprisingly Real [video]

https://www.youtube.com/watch?v=30n_fdzgjJA
3•coolwulf•46m ago•0 comments

Russia's Putin is spending $26B to live forever

https://startupfortune.com/russias-putin-is-spending-26-billion-to-live-forever/
4•insanetech•47m ago•0 comments

First Pure-Go Cubrid Driver: Gocubrid

https://hexacluster.ai/blog/announcing-first-pure-go-cubrid-driver-gocubrid
2•avivallssa•49m ago•1 comments

South Korea Could Build Nuclear Submarines, but It Shouldn't

https://warontherocks.com/south-korea-could-build-nuclear-submarines-but-it-shouldnt/
2•bear_with_me•51m ago•1 comments

Show HN: Callimachus – Local search across your AI coding-agent history

https://github.com/BetaBots-LLC/callimachus
3•arishaller•52m ago•2 comments

Not just books: renting a sewing machine from the library can improve democracy

https://www.bbc.com/future/article/20260618-the-weird-and-wonderful-libraries-of-finland
37•sohkamyung•59m ago•13 comments

Jobflo – A local-first job tracker built with SwiftUI

https://lymegrove.com/jobflo/
2•jsrothwell•59m ago•0 comments

Adblock Plus doing just fine after updating to Manifest V3 two years ago

https://blog.adblockplus.org/blog/adblock-plus-doing-just-fine-after-updating-to-manifest-v3-two-...
3•twapi•1h ago•1 comments
Open in hackernews

Linux Eliminates the Strncpy API After Six Years of Work, 360 Patches

https://www.phoronix.com/news/Linux-7.2-Drops-strncpy
68•simonpure•2h ago

Comments

mrlonglong•2h ago
the zero terminated string is I think is computing's biggest mistake. Pascal style strings were much safer.
jackbucks•2h ago
It was definitely an interesting way to allocate pointers. I did once have a very large project where devs didnt understand this and resolved hundreds or more off by one and memory overwrites in C due to this feature.

But at the same time, I think blaming the software was kind of a cop out. Devs were in a hurry and simply didnt respect the rules. Given todays software engineer at large. Nerfing programming languages so they cant destroy things might not be a bad idea. But AI will nerf everything.

fragmede•2h ago
why is AI gonna nerf everything? sure it could be used as the easy button, but I just spent two hours this morning learning about the neuroscience of how memory works in the brain that I didn't mean to and now I want to run studies on how memory works.

Why do you assume that AI is gonna nerf everything?

dietr1ch•2h ago
I think it was NULL itself. It was a long way until we realised we don't want invalid values and could use the type system to help us use special values safely.
jkercher•1h ago
Meh, I think NULL is fine in C. It's an extra, valid state to represent pointers at no cost. Unlike the more hand holdy languages, it's quite rare for a pointer in C to have the ability to be NULL since, more often than not, it's pointing at something known. It's actually quite rare to see NULL checks unless it's API code or something like that. I can see this being more of a problem in a managed language where anything can be NULL at any time.
kelnos•1h ago
> to represent pointers at no cost

I wouldn't call "cause of bugs and security issues" "no cost".

> it's quite rare for a pointer in C to have the ability to be NULL

As a C programmer for more than 25 years, that is the exact opposite of my experience.

UqWBcuFx6NV4r•17m ago
This precise mindset is why the world has suffered for decades (wrt security/integrity/availability) at the hands of what can only be described as an industry led by completely unjustified male confidence. Why are there still people fighting the “it’s not that bad, guys! you’ve just got to be a good developer like ME!” fight?
bvrmn•3m ago
NULL as a concept is fine. Inability to declare something as non-null is not.

There is a huge gap between developer expectation "it's pointing at something known" and hard reality confirmed by zillions of CVE. That's the reason optionality is prevalent in modern languages and type checkers (python, typescript), nowdays even Java has sane non-nullable types.

themafia•1h ago
> Pascal style strings were much safer.

The limitations were brutal. Initially you could only have 255 bytes in a string. The length of a string and the size of the allocation are now separate and you may need to think about that unused memory in your design. The problem now doubles with the introduction of UTF-8. Your string size is in bytes and you need to track characters separately.

If you want to create an array of strings you either need to specify the length of all strings and accept the memory overhead or have an array of pointers to strings. If you use an array of pointers you may end up choosing to use the 'nil' value as a sentinel that means "end of list." So we're right back where we started.

--

Because someone decided to downvote this HN has limited the speed at which I can reply. This site is tragic and I'm fully done with it now. You can spread propaganda and poorly sourced zeitgeist and be among friends but if you try to have a genuine conversation about programming languages you are made to be unwelcome immediately. Screw this.

--

> No other data structure works like this.

The linked list.

> You can't mess this up in an array

C happily decomposes arrays into pointers. You can erase your length information from the type. This was an intentional decision.

> Strings are the only data structure that assume there will be a NULL at end.

Which is why almost every string API has a version that allows you to specify the maximum length. The fact that you can use a NUL doesn't mean you have to. Which is why the concept of "sentinel values" is broadly used in many types of applications you haven't considered here.

AlienRobot•1h ago
>The problem now doubles with the introduction of UTF-8. Your string size is in bytes and you need to track characters separately.

That isn't really a problem.

The problem with null-terminated strings is specifically what happens when you reach the end of the allocated array and there ISN'T a NULL character.

Every string function is designed to keep going until it finds the NULL character, so if a hacker gets rid of the NULL character, he can exploit pretty much any standard string manipulation function being used elsewhere in the program to manipulate whatever memory comes AFTER the string data structure.

No other data structure works like this. You can't mess this up in an array, because no function that manipulates arrays is just going to keep going until there is a null. That would be stupid because it would require users of the function to add a NULL to the end of their arrays before passing it to the function, so instead we just pass the size of the array to everything. Strings are the only data structure that assume there will be a NULL at end.

By the way, I read once that if you use UTF-32 every code point will be 4 bytes, constantly, but even then a single code point isn't necessarily a single character. Text is just complicated.

msla•1h ago
In addition to having to pick a size for the length counter and then, later, having to differentiate between lengths in bytes, codepoints, and glyphs, you can't subdivide a Pascal string using pointer arithmetic. To pass just the end of a string into a function, you have to either copy the tail of one Pascal-style string to another with a smaller size value, or your string has to be a struct with an integer and a pointer to the actual data instead of just an integer stuck on the beginning of the string. The first is a lot of copying in some cases, the second raises the specter of structs with invalid pointers. That's not to mention the potential problems that would cause with caches.
estebank•9m ago
The third option is to have a variable width length: the top most bit signals whether the next byte corresponds to the length or to the start of the string.
bsder•10m ago
Zero terminated string is a special case of sentinel value termination.

And sentinel value terminations make a lot of sense when you have punch cards and fixed length records that you need to carve into pieces.

Nobody expected any decisions they were making in the 1960s and 1970s to have any bearing on computing a half-century later. They all expected to have their mistakes long papered over by smarter people at some point.

But we ALL make the mistake of underestimating inertia.

larodi•2h ago
Wonder when is someone going to brave and fork the linux kernel and try to ffwd it with automatic programming.
fragmede•2h ago
why would you start there instead of creating something from scratch ?if you can port drivers just as easily meaning you don't especially give a shit about hardware you're running on in the first place, why even deal with linux? The battle tested LRU cache system?
literalAardvark•1h ago
It's much easier to use something with all the edge cases already handled as a starting point.
convolvatron•1h ago
I've seen several workalike kernels in various stages of completion. at least one of them was able to run some pretty substantial applications (Postgres, nginx, that kind of thing), and that is still I guess around 250kloc. but it only really has drivers to support hypervisor devices.

unfortunately as time goes by, the linux api surface gets larger and more convoluted. so there's going to be some coverage you're just never going to get.

but in the abstract, definitely. linux is so bloated at this point that its not clear that it can ever be 'made safe'.

PlunderBunny•2h ago
I worked on a Win32 app that used space-padded strings, i.e. the destination string was padded with spaces, but there was still a null on the last byte. You had to use special versions of the string functions for length, copy etc.

I’m not sure why this was - the source base was so old it might have had its origins in Pascal struct behaviour.

egorfine•2h ago
I think this behavior has its roots in COBOL, not pascal.
kps•16m ago
Which has its roots in punch cards, where pre-computer hardware operated on fixed-sized fields and an unpunched column is equivalent to a space.
bebe83939•1h ago
Perhaps prevent realocation when string size changes? Or aligning cpu cache lines?
jkfkfkj•1h ago
It can perhaps be due to the string originating from a sql database ”char” field, I.e. not ”varchar”. Char fields in databases are space padded.
naturalmovement•1h ago
A reminder that we've had strlcpy[1] for ~ 30 years but it was never accepted into the Linux world because of typical petty open source bullshit. This is why we can't have nice things.

[1] https://man.openbsd.org/strlcpy

BoingBoomTschak•52m ago
Actually, glibc 2.38 has it.
naturalmovement•14m ago
Wow it only took them 26 years to import a 30 line C function, a third of which is comments?

I should have sent them a nice fruit basket to commemorate the occasion.

ericbarrett•7m ago
The Linux kernel had strlcpy over 20 years ago. It was removed in favor of strscpy because the latter was judged a better interface. Here's a 2022 article: https://lwn.net/Articles/905777/
senfiaj•11m ago
I wonder, why not use a string buffer paired with its length? For example, maybe use struct that has char pointer, and 2 ints (occupied length + total buffer length). Almost like c++'s std::string. This null terminator thing really sucks, it's potentially insecure and often unperformant.
bellowsgulch•36m ago
Compared to scripting languages with actual tagged types, C doesn't really have a type system, and that's readily apparent to anyone who has written C in the last 43 years and debugged a program written in it.

C pretends types exist with you, but once bytes hit the road, it's all real-life and segmentation faults.

tredre3•42m ago
> No other data structure works like this.

In C most data structures work like this, you keep going until you find NUL (character) or NULL (pointer). E.g. Strings, array of pointers, linked lists, etc. Of course you can add length to most of those, but it isn't the canonical/traditional way of doing things.