frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Show HN: LocalGPT – A local-first AI assistant in Rust with persistent memory

https://github.com/localgpt-app/localgpt
167•yi_wang•6h ago•58 comments

Haskell for all: Beyond agentic coding

https://haskellforall.com/2026/02/beyond-agentic-coding
82•RebelPotato•5h ago•21 comments

SectorC: A C Compiler in 512 bytes (2023)

https://xorvoid.com/sectorc.html
273•valyala•14h ago•52 comments

OpenClaw Is Changing My Life

https://reorx.com/blog/openclaw-is-changing-my-life/
16•novoreorx•1h ago•27 comments

Software factories and the agentic moment

https://factory.strongdm.ai/
213•mellosouls•16h ago•360 comments

LLMs as the new high level language

https://federicopereiro.com/llm-high/
82•swah•4d ago•149 comments

Speed up responses with fast mode

https://code.claude.com/docs/en/fast-mode
172•surprisetalk•13h ago•172 comments

LineageOS 23.2

https://lineageos.org/Changelog-31/
20•pentagrama•2h ago•0 comments

Hoot: Scheme on WebAssembly

https://www.spritely.institute/hoot/
185•AlexeyBrin•19h ago•35 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...
76•gnufx•12h ago•60 comments

Stories from 25 Years of Software Development

https://susam.net/twenty-five-years-of-computing.html
178•vinhnx•16h ago•18 comments

The Architecture of Open Source Applications (Volume 1) Berkeley DB

https://aosabook.org/en/v1/bdb.html
12•grep_it•5d ago•0 comments

Vocal Guide – belt sing without killing yourself

https://jesperordrup.github.io/vocal-guide/
337•jesperordrup•1d ago•102 comments

First Proof

https://arxiv.org/abs/2602.05192
139•samasblack•16h ago•81 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
89•momciloo•13h ago•18 comments

Substack confirms data breach affects users’ email addresses and phone numbers

https://techcrunch.com/2026/02/05/substack-confirms-data-breach-affecting-email-addresses-and-pho...
34•witnessme•3h ago•10 comments

The world heard JD Vance being booed at the Olympics. Except for viewers in USA

https://www.theguardian.com/sport/2026/feb/07/jd-vance-boos-winter-olympics
70•treetalker•39m ago•15 comments

Wood Gas Vehicles: Firewood in the Fuel Tank (2010)

https://solar.lowtechmagazine.com/2010/01/wood-gas-vehicles-firewood-in-the-fuel-tank/
39•Rygian•2d ago•13 comments

uLauncher

https://github.com/jrpie/launcher
11•dtj1123•4d ago•0 comments

Vouch

https://twitter.com/mitchellh/status/2020252149117313349
86•chwtutha•4h ago•23 comments

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

https://spillhistorie.no/2026/02/06/interview-with-sierra-veteran-al-lowe/
109•thelok•15h ago•24 comments

Start all of your commands with a comma (2009)

https://rhodesmill.org/brandon/2009/commands-with-comma/
593•theblazehen•3d ago•216 comments

Show HN: A luma dependent chroma compression algorithm (image compression)

https://www.bitsnbites.eu/a-spatial-domain-variable-block-size-luma-dependent-chroma-compression-...
42•mbitsnbites•3d ago•6 comments

The AI boom is causing shortages everywhere else

https://www.washingtonpost.com/technology/2026/02/07/ai-spending-economy-shortages/
318•1vuio0pswjnm7•20h ago•523 comments

FDA intends to take action against non-FDA-approved GLP-1 drugs

https://www.fda.gov/news-events/press-announcements/fda-intends-take-action-against-non-fda-appro...
117•randycupertino•9h ago•245 comments

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

https://openciv3.org/
909•klaussilveira•1d ago•277 comments

Where did all the starships go?

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

Selection rather than prediction

https://voratiq.com/blog/selection-rather-than-prediction/
37•languid-photic•4d ago•18 comments

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

https://github.com/valdanylchuk/breezydemo
305•isitcontent•1d ago•39 comments

Unseen Footage of Atari Battlezone Arcade Cabinet Production

https://arcadeblogger.com/2026/02/02/unseen-footage-of-atari-battlezone-cabinet-production/
149•videotopia•4d ago•49 comments
Open in hackernews

Binfmtc – binfmt_misc C scripting interface

https://www.netfort.gr.jp/~dancer/software/binfmtc.html.en
103•todsacerdoti•8mo ago

Comments

zx2c4•8mo ago
Similar project of mine from a long while ago: https://git.zx2c4.com/cscript/about/
Surac•8mo ago
So lovely
elitepleb•8mo ago
similar to http://www.iq0.com/duffgram/com.html
JSR_FDED•8mo ago
C is still my first love. You can hold the whole language in your head, and it’s fast. Yes there are footguns but it’s a libertarian programming language - you’re responsible for what you build. No hand holding.
ykonstant•8mo ago
I like that too, but the problem is that C doesn't keep its end of the deal. No hand holding, but make what you are doing transparent. It used to be the case back in the 80s, but not anymore. Not with our optimizing compilers and oodles of UB and spec subtleties and implicit actions.
radiospiel•8mo ago
Amazing; when I tried something similar I used a "#!" line pointing to a C compiler + runner of sorts (https://github.com/radiospiel/jit). https://git.zx2c4.com/cscript/about/ is also following that approach.

What is the benefit of registering an extension via binfmt_misc?

lmz•8mo ago
It's still valid C source code? Is the #! sequence valid C?
enriquto•8mo ago
was surprised that "sudo apt install binfmtc" works out of the box on my box (linux mint) and i can do the magic just as described here
rwmj•8mo ago
You can already do this without using binfmt ...

  #if 0
  gcc "$0" -o "$@".out && exec ./"$@".out
  #endif
  #include <stdio.h>
  int main () { printf ("hello, world\n"); return 0; }
Usage:

  $ chmod +x print.c
  $ ./print.c
  hello, world
(Could be better to use a temporary file though.)

There's a similar cute trick for compiled OCaml scripts that we use with nbdkit: https://libguestfs.org/nbdkit-cc-plugin.3.html#Using-this-pl...

mananaysiempre•8mo ago
Compiler errors won’t cause as many funny consequences with

  gcc "$0" -o "$@".out && exec ./"$@".out || exit $?   # I'd use ${0%.c} not $@
Love this trick too, but the difference, as far as I understand, is that it only works with a Bourne(-compatible) shell, whereas shebangs or binfmt_misc also work with exec().
AlotOfReading•8mo ago
You can also #embed the compiler binary, and execve it to much the same effect as binfmtc. I explored that trick for an IOCC entry that was never submitted because it ended up far too readable.
ckastner•8mo ago
Oh this is neat. Took me a bit.

The shell treats the first line as a comment. It executes the second line, which eventually exec's the binary so the rest of the file do not matter to the shell.

And the compiler treats the first line as a preprocessor directive, so it ignores the second line.

I initially misread/mistook the first line for a shebang.

teo_zero•8mo ago
The use of $@ doesn't look right to me.

In the trivial case exposed here where there are no additional arguments to pass to the .c program, the shell executes

  gcc "print.c" -o .out && exec ./.out
and it works "by chance".

In a more complex scenario where print.c expects some parameters, it won't work. For example,

  ./print.c a b c
will result in the shell trying to invoke

  gcc "print.c" -o "a" "b" "c".out && exec ./"a" "b" "c".out
which makes no sense.

Are you sure you didn't intend $0 instead of $@ ?

rwmj•8mo ago
It's true, that's a mistake!

OTOH we're trying to write self-compiling executable C scripts, so the safety, correctness and good sense ships sailed a while back.

suprjami•8mo ago
Is there a way to do this and have the shell remove the temporary file after exec?
1vuio0pswjnm7•8mo ago
There are many, no doubt

   #if 0
   cc -static -pipe -xc "$0"||exit 100
   exec ./a.out
   #endif
   int puts(const char *);
   int unlink(const char *);
   int main(int argc,char *argv[]){ 
   puts("it works"); 
   unlink(argv[0]);
   return 0; 
   }
teo_zero•8mo ago
Yes, but it's not worth it. It's better to forget gcc and use tcc instead, which has the -run flag to compile and run without creating any intermediate file. It's also much quicker than gcc.
pwdisswordfishz•8mo ago
Or even

    /*bin/true ; exec tcc -run "$0" "$@" # */
nrclark•8mo ago
I'd have expected this to need a hashbang (#!/bin/sh) at the beginning. Why doesn't it?
rwmj•8mo ago
Because your shell will execute anything that looks like a text file & has +x bit set as a shell script.
monocasa•8mo ago
There's also tcc, which has a shebang compatible extension to allow it to be used by scripts.
kazinator•8mo ago
This is doable entirely without a Linux-specific binfmt-misc hack.

https://rosettacode.org/wiki/Multiline_shebang#C

enriquto•8mo ago
This is a neat hack, but the whole file is not a valid C program.
kazinator•8mo ago
You mean it consists of a C program, plus non-C cruft to get it running?

Isn't that already legitimized by configure scripts, compiler command lines and Make files?

enriquto•8mo ago
of course it is legitimized. I just meant that the selling point of binfmtc is that the same .c file can either be compiled by any C compiler, or executed directly.
kazinator•8mo ago
We could perhaps split it into a two-file system where a "foo.sh" containing certain boilerplate will execute a "foo.c" that doesn't require any special conventions at all.

"foo.sh" could be identical for any .c file, and so we could symbolically link them all to a common file.

Of course, neither that file nor symlinks to it require a .sh suffix.

The contents might look like this:

  #!/bin/sh
  c_file=${0%.sh}.c
  x_file=${0%.sh}.bin

  # If cached executable file is missing, or out of date w.r.t.
  # the source file, compile it:

  if [ "$c_file" -nt "$x_file" ]; then
    cc $CFLAGS "$c_file" -o "$x_file"
  fi

  # Run cached executable file
  $x_file
codr7•8mo ago
I did a simple hack for doing the same thing from inside a C program for my book:

https://github.com/codr7/hacktical-c/tree/main/dynamic

rurban•8mo ago
(2006)