frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Python and C killer seekers rejoice

1•kvthweatt•1h ago
Flux is a new language that combines the performance and power of C with the readability of Python. Flux resembles the C-family of languages. It is neither C, nor a derivative of C. It has a fundamentally different type system while still being C ABI compatible.

I named it after flux paste used in soldering.

https://github.com/kvthweatt/Flux

Here's reversing bits:

```

#import "standard.fx";

using standard::io::console;

def main() -> int { byte x = 55;

    x[0``7] = x[7``0];

    println(int(x));

    return 0;
};

```

You can take bit slices of bit slices as well like `[x``y][a``b]`

Flux has seamless FFI with C, everything is stack allocated by default including pointers, and everything is zero initialized by default. You can opt-in to uninitialized declaration like:

`int x = noinit;`

You can also assign arbitrary bytes to a function pointer, and if its valid machine code for your arch, you can execute that function. Example:

```

#import "standard.fx";

def main() -> int { byte[] some_bytecode = [0x48, 0x31, 0xC0, 0xC3]; // xor rax,rax ; ret

    def{}\* fp()->void = @some_bytecode;

    fp();

    return 0;
};

```

Flux has macros, and contracts, and the ability to put contracts on operators:

```

#import "standard.fx";

using standard::io::console;

contract NonZero(a,b) { assert(a != 0, "a must be nonzero"); assert(b != 0, "b must be nonzero"); };

operator(int x, i32 y)[+] -> int : NonZero(a,b) { return x+y; };

def main() -> int { 0 + 4; // runtime error

    return 0;
};

```

C:

```

len_block[0] = (byte)((aad_bits >> 56) & 0xFF);

len_block[1] = (byte)((aad_bits >> 48) & 0xFF);

len_block[2] = (byte)((aad_bits >> 40) & 0xFF);

len_block[3] = (byte)((aad_bits >> 32) & 0xFF);

len_block[4] = (byte)((aad_bits >> 24) & 0xFF);

len_block[5] = (byte)((aad_bits >> 16) & 0xFF);

len_block[6] = (byte)((aad_bits >> 8) & 0xFF);

len_block[7] = (byte)( aad_bits & 0xFF);

len_block[8] = (byte)((cipher_bits >> 56) & 0xFF);

len_block[9] = (byte)((cipher_bits >> 48) & 0xFF);

len_block[10] = (byte)((cipher_bits >> 40) & 0xFF);

len_block[11] = (byte)((cipher_bits >> 32) & 0xFF);

len_block[12] = (byte)((cipher_bits >> 24) & 0xFF);

len_block[13] = (byte)((cipher_bits >> 16) & 0xFF);

len_block[14] = (byte)((cipher_bits >> 8) & 0xFF);

len_block[15] = (byte)( cipher_bits & 0xFF);

```

Flux equivalent

```

len_block[0..7] = (byte[8])(u64)aad_bits;

len_block[8..15] = (byte[8])(u64)cipher_bits;

```

Reworking a loop:

```

for (i = 0; i < 4; i++) { hash[i] = (byte)((ctx.state[0] >> (24 - i * 8)) & 0xFF);

    hash[i + 4] = (byte)((ctx.state[1] >> (24 - i \* 8)) & 0xFF);

    hash[i + 8] = (byte)((ctx.state[2] >> (24 - i \* 8)) & 0xFF);

    hash[i + 12] = (byte)((ctx.state[3] >> (24 - i \* 8)) & 0xFF);

    hash[i + 16] = (byte)((ctx.state[4] >> (24 - i \* 8)) & 0xFF);

    hash[i + 20] = (byte)((ctx.state[5] >> (24 - i \* 8)) & 0xFF);

    hash[i + 24] = (byte)((ctx.state[6] >> (24 - i \* 8)) & 0xFF);

    hash[i + 28] = (byte)((ctx.state[7] >> (24 - i \* 8)) & 0xFF);
};

```

Turns into:

```

hash[0..3] = (byte[4])ctx.state[0];

hash[4..7] = (byte[4])ctx.state[1];

hash[8..11] = (byte[4])ctx.state[2];

hash[12..15] = (byte[4])ctx.state[3];

hash[16..19] = (byte[4])ctx.state[4];

hash[20..23] = (byte[4])ctx.state[5];

hash[24..27] = (byte[4])ctx.state[6];

hash[28..31] = (byte[4])ctx.state[7];

```

Would love to take questions and see if anyone finds it useful for anything.

Trump's Canada trade war hits Jack Daniel's/Jim Beam with devastating $143M loss

https://www.fastcompany.com/91531349/trumps-canada-trade-war-hits-jack-daniels-jim-beam-devastati...
1•dj_rock•45s ago•0 comments

Mathematically Optimized Typing

https://cadence.theory-a.com/
1•notShabu•1m ago•0 comments

Kevin Weil and Bill Peebles exit OpenAI as company continues to shed side quests

https://techcrunch.com/2026/04/17/kevin-weil-and-bill-peebles-exit-openai-as-company-continues-to...
1•gmays•1m ago•0 comments

Show HN: ReadTube – Turn YouTube subscriptions into a personal Substack

https://www.read.tube/
1•marauderbot•2m ago•0 comments

Show HN: SRT-Adapter: 0.99 AUROC, perplexity win and 16.7× recall (0.19%)

https://huggingface.co/RiverRider/srt-adapter-v8a
1•spacebacon•4m ago•0 comments

Project Deal: Our Claude-Run Marketplace Experiment – Anthropic

https://www.anthropic.com/features/project-deal
1•ericol•7m ago•0 comments

Linux May Drop Old Network Drivers Due to Burden of AI-Driven Bug Reports

https://www.phoronix.com/news/Linux-Old-Network-AI
1•birdculture•7m ago•0 comments

Show HN: Semble – Fast code search for agents with near-transformer accuracy

https://github.com/MinishLab/semble
3•stephantul•13m ago•0 comments

TraceFree – unified Apt/Snap/Flatpak package manager with ghost file detection

https://github.com/somranimehdi/TraceFree
1•Somosranos•13m ago•0 comments

Lessons from Building Multiplayer Browsers

https://www.alejandro.pe/writing/sail-muddy-lessons
1•alejandrohacks•14m ago•1 comments

ASML: The Most Complex Machine

https://worksinprogress.co/issue/the-worlds-most-complex-machine/
1•dionysou•18m ago•0 comments

Scientists believe birds' skulls hold clues to inner lives of long-extinct dinos

https://www.theguardian.com/science/2026/apr/26/scientists-believe-birds-skulls-hold-clues-to-inn...
1•hkhn•19m ago•0 comments

Tell HN: Claude Code is unable to respond to this request

1•hmokiguess•20m ago•1 comments

What Is Dyslexia?

https://www.whatisdyslexia.org/
1•hkhn•21m ago•0 comments

Dyslexic thinking made me the scientist I am today. If we could harness its

https://www.theguardian.com/commentisfree/2026/apr/25/dyslexic-thinking-scientist-neurodiversity-...
1•hkhn•21m ago•0 comments

Show HN: Text Trace – Keynote-style SVG text trace animations for the web

https://github.com/Jannchie/text-trace
1•jannchie•22m ago•0 comments

List of personal sites that host Wander Console, a tool to explore the small web

https://susam.codeberg.page/wcn/
1•susam•22m ago•1 comments

Startups only remember backups after the crash

https://orchidfiles.com/backups-after-crash/
1•theorchid•24m ago•0 comments

GPT Image Generation Models Prompting Guide

https://developers.openai.com/cookbook/examples/multimodal/image-gen-models-prompting-guide
1•gmays•29m ago•0 comments

Anthropic created a test marketplace for agent-on-agent commerce

https://techcrunch.com/2026/04/25/anthropic-created-a-test-marketplace-for-agent-on-agent-commerce/
1•Brajeshwar•29m ago•0 comments

Musk Touts Universal Income as Remedy to AI-Driven Unemployment

https://www.forbes.com/sites/siladityaray/2026/04/17/elon-musk-touts-universal-income-as-remedy-t...
1•geox•31m ago•1 comments

Pratt parsing is a black box

https://vinipsmaker.github.io/blog/blog/pratt-parsing-is-a-black-box/
1•vinipsmaker•35m ago•0 comments

A high-performance 2D graphics painter that use SDL3 GPU API

https://github.com/n67094/SDL_gp
1•n67094•37m ago•0 comments

Query neural network weights like a graph database

https://github.com/chrishayuk/larql
1•james_marks•44m ago•0 comments

Network File Systems on Macs

https://eclecticlight.co/2026/04/25/explainer-network-file-systems/
1•chmaynard•46m ago•0 comments

Ask HN: How I find a job where what is needed is solid code, not firefighting?

3•speeder•50m ago•1 comments

London Reverse Marathon FAQ

https://london.apped.uk/faq
3•susam•51m ago•1 comments

Stealth browser survey, April 2026

https://incoherency.co.uk/blog/stories/stealth-browser-survey-april-2026.html
2•stavros•51m ago•0 comments

Show HN: Are AI competitor newsletters useful?

https://newsletrix.com/
2•beledev•52m ago•0 comments

Deep Moats and Platform Shifts in Computing

https://semiconductor.substack.com/p/deep-moats-and-platform-shifts-in
1•chmaynard•54m ago•0 comments