frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

We Mourn Our Craft

https://nolanlawson.com/2026/02/07/we-mourn-our-craft/
105•ColinWright•1h ago•75 comments

Speed up responses with fast mode

https://code.claude.com/docs/en/fast-mode
22•surprisetalk•1h ago•21 comments

U.S. Jobs Disappear at Fastest January Pace Since Great Recession

https://www.forbes.com/sites/mikestunson/2026/02/05/us-jobs-disappear-at-fastest-january-pace-sin...
115•alephnerd•2h ago•71 comments

Hoot: Scheme on WebAssembly

https://www.spritely.institute/hoot/
121•AlexeyBrin•7h ago•24 comments

Stories from 25 Years of Software Development

https://susam.net/twenty-five-years-of-computing.html
61•vinhnx•5h ago•7 comments

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
826•klaussilveira•21h ago•248 comments

Al Lowe on model trains, funny deaths and working with Disney

https://spillhistorie.no/2026/02/06/interview-with-sierra-veteran-al-lowe/
55•thelok•3h ago•7 comments

Brookhaven Lab's RHIC Concludes 25-Year Run with Final Collisions

https://www.hpcwire.com/off-the-wire/brookhaven-labs-rhic-concludes-25-year-run-with-final-collis...
3•gnufx•36m ago•0 comments

The AI boom is causing shortages everywhere else

https://www.washingtonpost.com/technology/2026/02/07/ai-spending-economy-shortages/
108•1vuio0pswjnm7•8h ago•136 comments

The Waymo World Model

https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simula...
1058•xnx•1d ago•611 comments

Reinforcement Learning from Human Feedback

https://rlhfbook.com/
76•onurkanbkrc•6h ago•5 comments

Start all of your commands with a comma (2009)

https://rhodesmill.org/brandon/2009/commands-with-comma/
483•theblazehen•2d ago•175 comments

SectorC: A C Compiler in 512 bytes

https://xorvoid.com/sectorc.html
6•valyala•2h ago•0 comments

Vocal Guide – belt sing without killing yourself

https://jesperordrup.github.io/vocal-guide/
209•jesperordrup•12h ago•70 comments

France's homegrown open source online office suite

https://github.com/suitenumerique
556•nar001•6h ago•256 comments

Coding agents have replaced every framework I used

https://blog.alaindichiappari.dev/p/software-engineering-is-back
222•alainrk•6h ago•342 comments

I Write Games in C (yes, C)

https://jonathanwhiting.com/writing/blog/games_in_c/
6•valyala•1h ago•1 comments

A Fresh Look at IBM 3270 Information Display System

https://www.rs-online.com/designspark/a-fresh-look-at-ibm-3270-information-display-system
36•rbanffy•4d ago•7 comments

Selection Rather Than Prediction

https://voratiq.com/blog/selection-rather-than-prediction/
8•languid-photic•3d ago•1 comments

History and Timeline of the Proco Rat Pedal (2021)

https://web.archive.org/web/20211030011207/https://thejhsshow.com/articles/history-and-timeline-o...
19•brudgers•5d ago•4 comments

72M Points of Interest

https://tech.marksblogg.com/overture-places-pois.html
29•marklit•5d ago•2 comments

Unseen Footage of Atari Battlezone Arcade Cabinet Production

https://arcadeblogger.com/2026/02/02/unseen-footage-of-atari-battlezone-cabinet-production/
114•videotopia•4d ago•30 comments

Show HN: I saw this cool navigation reveal, so I made a simple HTML+CSS version

https://github.com/Momciloo/fun-with-clip-path
5•momciloo•1h ago•0 comments

Where did all the starships go?

https://www.datawrapper.de/blog/science-fiction-decline
76•speckx•4d ago•75 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
273•isitcontent•22h ago•38 comments

Show HN: Kappal – CLI to Run Docker Compose YML on Kubernetes for Local Dev

https://github.com/sandys/kappal
22•sandGorgon•2d ago•11 comments

Learning from context is harder than we thought

https://hy.tencent.com/research/100025?langVersion=en
200•limoce•4d ago•111 comments

Monty: A minimal, secure Python interpreter written in Rust for use by AI

https://github.com/pydantic/monty
286•dmpetrov•22h ago•153 comments

Software factories and the agentic moment

https://factory.strongdm.ai/
71•mellosouls•4h ago•75 comments

Making geo joins faster with H3 indexes

https://floedb.ai/blog/how-we-made-geo-joins-400-faster-with-h3-indexes
155•matheusalmeida•2d ago•48 comments
Open in hackernews

Interfaces and Traits in C

https://antonz.org/interfaces-in-c/
17•ibobev•2w ago

Comments

jamesmunns•2w ago
Speaking as someone familiar with C and Rust (not so much Go!), although there's a parallel here to Rust's Traits, this actually is much closer to dyn Trait in Rust, which uses vtables and runtime polymorphism, rather than "regular" Traits in Rust, which are monomorphized versions of similar interface constraints, much closer to C++'s templates (or concepts, I'm hand waving here).

This isn't necessarily a negative, sometimes you actually prefer vtables and runtime polymorphism for various reasons like flexibility, or code size reasons. Just wanted to add some flavor for folks that aren't as familiar with Rust, that this isn't exactly how things usually work, as "regular" Trait usage is much more common than dyn Trait usage, which you have to explicitly opt-in to.

EPWN3D•2w ago
I've wound up just putting the protocol state in a struct and making the "conforming" action to have that struct in the conforming object with a standardized field name. Then just use a macro to get the protocol pointer and pass it to the protocol's implementation functions.

But I really, really wish we could have a lightweight protocol/trait feature in C. It would remove a large source of unsafe code that has to cast back and forth between void *.

wasmperson•2w ago
I think it's best to avoid this kind of "re-inventing OOP in C" thing, even though it can be tempting when coming from other languages. Regardless, some notes:

- It's UB to alias one struct pointer with that of a different struct type, even if the two structs have the same first few members. Clang and GCC both exploit this for optimizations, although you can configure them not to.

- Casting function pointers is also problematic, although I think that one is more of a portability issue.

- If you want to "downcast" from a "base" struct to an "inheriting" struct, you can use the `container_of` macro, which is robust against member re-arrangement and supports multiple inheritance:

  #include <stdio.h>
  #include <stdint.h>
  #include <stddef.h>
  
  #define container_of(p, t, f) ((t *)((char *)(0?&((t *)0)->f:p)-offsetof(t, f)))
  
  struct reader { size_t (*read)(struct reader *self, uint8_t *p, size_t len); };
  struct zeros { struct reader base; size_t total; };
  
  size_t zeros_read(struct reader *self_, uint8_t *p, size_t len){
      struct zeros *self = container_of(self_, struct zeros, base);
      //...
  }
- Interfaces in other languages exist to add type safety to dynamic dispatch. You get none of that in C, though, due to the casting you have to perform regardless. Code which just "does the obvious thing" using void pointers will be much simpler, making it better IMO despite the lack of type "safety":

  #include <stdio.h>
  #include <stdint.h>
  
  typedef size_t read_fn(void *ctx, uint8_t *p, size_t len);
  
  size_t work(void *ctx, read_fn *read){
      uint8_t buf[8];
      return read(ctx, buf, sizeof buf);
  }
  
  struct zeros_reader { size_t total; };
  
  size_t zeros_read(void *ctx, uint8_t *p, size_t len){
      struct zeros_reader *self = ctx;
      for(size_t i = 0; i < len; i++) p[i] = 0;
      self->total += len;
      return len;
  }
  
  int main(void){
      struct zeros_reader z = {0};
      work(&z, zeros_read);
      work(&z, zeros_read);
      printf("total = %zu\n", z.total);
  }