frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Effects of Zepbound on Stool Quality

https://twitter.com/ScottHickle/status/2020150085296775300
1•aloukissas•2m ago•0 comments

Show HN: Seedance 2.0 – The Most Powerful AI Video Generator

https://seedance.ai/
1•bigbromaker•5m ago•0 comments

Ask HN: Do we need "metadata in source code" syntax that LLMs will never delete?

1•andrewstuart•11m ago•1 comments

Pentagon cutting ties w/ "woke" Harvard, ending military training & fellowships

https://www.cbsnews.com/news/pentagon-says-its-cutting-ties-with-woke-harvard-discontinuing-milit...
2•alephnerd•14m ago•1 comments

Can Quantum-Mechanical Description of Physical Reality Be Considered Complete? [pdf]

https://cds.cern.ch/record/405662/files/PhysRev.47.777.pdf
1•northlondoner•14m ago•1 comments

Kessler Syndrome Has Started [video]

https://www.tiktok.com/@cjtrowbridge/video/7602634355160206623
1•pbradv•17m ago•0 comments

Complex Heterodynes Explained

https://tomverbeure.github.io/2026/02/07/Complex-Heterodyne.html
3•hasheddan•17m ago•0 comments

EVs Are a Failed Experiment

https://spectator.org/evs-are-a-failed-experiment/
2•ArtemZ•29m ago•4 comments

MemAlign: Building Better LLM Judges from Human Feedback with Scalable Memory

https://www.databricks.com/blog/memalign-building-better-llm-judges-human-feedback-scalable-memory
1•superchink•30m ago•0 comments

CCC (Claude's C Compiler) on Compiler Explorer

https://godbolt.org/z/asjc13sa6
2•LiamPowell•31m ago•0 comments

Homeland Security Spying on Reddit Users

https://www.kenklippenstein.com/p/homeland-security-spies-on-reddit
3•duxup•34m ago•0 comments

Actors with Tokio (2021)

https://ryhl.io/blog/actors-with-tokio/
1•vinhnx•35m ago•0 comments

Can graph neural networks for biology realistically run on edge devices?

https://doi.org/10.21203/rs.3.rs-8645211/v1
1•swapinvidya•47m ago•1 comments

Deeper into the shareing of one air conditioner for 2 rooms

1•ozzysnaps•49m ago•0 comments

Weatherman introduces fruit-based authentication system to combat deep fakes

https://www.youtube.com/watch?v=5HVbZwJ9gPE
3•savrajsingh•50m ago•0 comments

Why Embedded Models Must Hallucinate: A Boundary Theory (RCC)

http://www.effacermonexistence.com/rcc-hn-1-1
1•formerOpenAI•52m ago•2 comments

A Curated List of ML System Design Case Studies

https://github.com/Engineer1999/A-Curated-List-of-ML-System-Design-Case-Studies
3•tejonutella•56m ago•0 comments

Pony Alpha: New free 200K context model for coding, reasoning and roleplay

https://ponyalpha.pro
1•qzcanoe•1h ago•1 comments

Show HN: Tunbot – Discord bot for temporary Cloudflare tunnels behind CGNAT

https://github.com/Goofygiraffe06/tunbot
2•g1raffe•1h ago•0 comments

Open Problems in Mechanistic Interpretability

https://arxiv.org/abs/2501.16496
2•vinhnx•1h ago•0 comments

Bye Bye Humanity: The Potential AMOC Collapse

https://thatjoescott.com/2026/02/03/bye-bye-humanity-the-potential-amoc-collapse/
3•rolph•1h ago•0 comments

Dexter: Claude-Code-Style Agent for Financial Statements and Valuation

https://github.com/virattt/dexter
1•Lwrless•1h ago•0 comments

Digital Iris [video]

https://www.youtube.com/watch?v=Kg_2MAgS_pE
1•vermilingua•1h ago•0 comments

Essential CDN: The CDN that lets you do more than JavaScript

https://essentialcdn.fluidity.workers.dev/
1•telui•1h ago•1 comments

They Hijacked Our Tech [video]

https://www.youtube.com/watch?v=-nJM5HvnT5k
2•cedel2k1•1h ago•0 comments

Vouch

https://twitter.com/mitchellh/status/2020252149117313349
40•chwtutha•1h ago•6 comments

HRL Labs in Malibu laying off 1/3 of their workforce

https://www.dailynews.com/2026/02/06/hrl-labs-cuts-376-jobs-in-malibu-after-losing-government-work/
4•osnium123•1h ago•1 comments

Show HN: High-performance bidirectional list for React, React Native, and Vue

https://suhaotian.github.io/broad-infinite-list/
2•jeremy_su•1h ago•0 comments

Show HN: I built a Mac screen recorder Recap.Studio

https://recap.studio/
1•fx31xo•1h ago•1 comments

Ask HN: Codex 5.3 broke toolcalls? Opus 4.6 ignores instructions?

1•kachapopopow•1h ago•0 comments
Open in hackernews

Show HN: I built type-safe dynamic arrays for C after struggling with stb_ds.h

https://github.com/RolandMarchand/vector.h
1•Moowool•4mo ago
C doesn't come with dynamic data structures like vectors or hashmaps, so developers have to either develop their own on top of arrays and structs, or use an external library.

One of the most popular data structure libraries is stb_ds.h. It's a very easy to use single-header library that feels almost like Javascript arrays, but I was getting frustrated with its design.

First, iteration relies on index calculations, which is a slower technique than pointer comparison (that's what std::vector uses).

Second, the structure hides its array header behind the data pointer. This is done to allow for the square brackets syntax [ ], but it turns debugging into a horrible experience since we can't easily access the header, and this technique relies on undefined behavior which is unreliable, especially when using less popular compilers on different systems.

Third, stb_ds.h doesn't do bounds checking, so it silently corrupts memory out-of-bounds access. This is the worst possible way to manage errors, but C is limited on that department.

Fourth, stb_ds.h isn't fully type-safe. It relies on sizeof (a) for type-checking, but it's possible to pass different pointer types (char, double), different primitives of the same size (int, float), or different structs of the same size (struct { node next; }, struct { float x; float y; }) to violate the type contract. The user must enforce type-safety themselves.

Fifth, I personally do not like its licensing because MIT forbids re-licensing, and public domain is ambiguous internationally.

So I decided to make my own single-header vector library to fix all of those issues.

My vector library (vector.h) uses the same iteration technique as std::vector (3 pointers, one for the beginning of the array/elements, one for past the last element, and one past the last valid memory index). This results in faster iteration (which is the most common array usage), clearer debugging with all values being in the struct, and no undefined behavior surprises.

vector.h also panics on errors instead of silently corrupting memory. This may seem like a bad design decision, but lots of popular languages crash on out-of-bounds access (Rust, Go, GDScript, etc.). It's almost always a severe bug, and it's best to let the developer know by failing fast. But for those who cannot afford a crash, I implemented the flag VECTOR_NO_PANIC_ON_OOB that turns out-of-bounds access into no-ops.

The type-safety requirement was the trickiest to solve, but I landed on macro-generated functions. This is similar to what the Linux kernel sometimes uses like `list.h`, but Linux compiles with gnu89 which includes typeof(), while my vector is strict c89 ISO compliant, which doesn't have typeof().

Finally, for licensing, I chose the BSD Zero-Clause license which allows for re-licensing, is internationally unambiguous, and doesn't require attribution.

To make my library production ready, I included a robust test routine.

I'd love feedback from C developers who've struggled with similar issues. Code and benchmarks at https://github.com/RolandMarchand/vector.h