frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

NativeJIT: A C++ expression –> x64 JIT

https://github.com/BitFunnel/NativeJIT
41•nateb2022•6h ago

Comments

anon-3988•4h ago
Interesting, this is very similar to llvmlite.Builder which is a wrapper over llvm. I am probably going to create something similar for my Python -> C -> assembly JIT.
Twirrim•4h ago
There's also libgccjit, https://gcc.gnu.org/wiki/JIT, though all of the third party language bindings appear to be stale for it.
globalnode•4h ago
that project sounds interesting as well, but what do you do with libraries in python.. have the generated C code translate back to python calls?
anon-3988•4h ago
The point is not to compile entire Python programs, the point is to optimize specific parts of Python that matters. To illustrate, consider a calculating sum of 1 to N in python

def sum(N): x = 0 for i in range(N): x += i return x

There's absolute zero reason why this code has to involve pushing and popping stuff on the python virtual stack. This should be compiled into assembly with a small conversion between C/PyObject.

The goal is to get to a point where we can even do non-trivial things inside this optimized context.

Python will never be able to go down to assembly because Python support doing "weird shit" like dynamically creating modules, hell, even creating a Python file, running eval on that, and loading it as a new module. How are you even going to transpile that to assembly?

So I approach the problem the same way numba is approaching. But hopefully more modern and simpler (implementation wise). Planning on doing it using Rust and the backend should be agnostic (GCC, Clang, whatever C compiler there is)

lhames•1h ago
The LLVM ORC and Clang-REPL projects would be worth checking out if you haven't already: there's a healthy community of high performance computing folks working in this space over at https://compiler-research.org.

In particular, this talk might be interesting:

"Unlocking the Power of C++ as a Service: Uniting Python's Usability with C++'s Performance"

Video: https://www.youtube.com/watch?v=rdfBnGjyFrc Slides: https://llvm.org/devmtg/2023-10/slides/techtalks/Vassilev-Un...

b0a04gl•4h ago
how deterministic is the emit really. if i feed same expression tree twice,same node layout same captures. do i get exact same bytes out every time (ignoring reloc) or not. if output produced is byte stable across runs for same input graph ,that opens up memoized JIT paths.worth checking if current impl already does this or needs a pass to normalise alloc order
jdnend•3h ago
Why wouldn't it be deterministic?
xnacly•2h ago
Several possible reasons: - parallelism - concurrent machine code gen - different optimisations for different runs, producing differing machine code order, etc
nurettin•2h ago
It really sounds like a job for Java (Microsoft, I know, I know.)
adwn•2h ago
> It really sounds like a job for Java

Why?

kookamamie•2h ago
> auto & rsquared = expression.Mul(expression.GetP1(), expression.GetP1());

This is C++, no? Why not use operator overloading for the project?

plq•57m ago
This line is part of the code that creates an AST-like structure that is then fed into the compiler. The actual multiplication is done by calling the function handle returned from the Compile method.
izabera•58m ago
this looks convenient to use from c++, but the example code it generates is rather suboptimal (see https://godbolt.org/z/3rWceeYoW in which no normal compiler would set up and tear down a stack frame for that) so i'm guessing there isn't any support for optimisations? what's the advantage of this over just compiling + calling dlopen/LoadLibrary on the result?

Skin Deep: Source Code Release

https://blendogames.com/news/post/2025-06-26-skindeepsourcecode/
1•zote•2m ago•0 comments

High-flux and stable thin-film evaporation from fiber membranes

https://www.sciencedirect.com/science/article/abs/pii/S2542435125001564
1•simonebrunozzi•4m ago•0 comments

What's the difference between named functions and arrow functions in JavaScript?

https://jrsinclair.com/articles/2025/whats-the-difference-between-named-functions-and-arrow-functions/
1•jrsinclair•5m ago•0 comments

AxiomOS An AI system where agents generate and evolve under an Overseer

https://github.com/Linutesto/AxiomOS
1•yand420•5m ago•1 comments

Warzonemeta.io

https://warzonemeta.io/
1•evantheproduct•6m ago•1 comments

How we moved to Shadcn to standardize UI in LocalOps

https://localops.co/blog/new-ui-how-we-used-shadcn-ui-standardise-ui-ux-in-localops
1•luckydev•8m ago•1 comments

Show HN: RepoInsightAI – Learn about a GitHub Repository with LLM

https://github.com/TigerkidYang/RepoInsightAI
1•tigerkid•13m ago•0 comments

Why Americans are less likely to voice their opinions on political issues?

https://werd.io/self-censorship-and-the-spiral-of-silence-why-americans-are-less-likely-to-publicly-voice-their-opinions-on-political-issues/
3•furkansahin•23m ago•1 comments

Thousands in Norway told they had won life-changing sums in lottery error

https://www.theguardian.com/world/2025/jun/29/thousands-in-norway-told-they-had-won-life-changing-sums-in-lottery-error
9•zqna•27m ago•2 comments

PostgreSQL: HypoPG 1.4.2 Is Out

https://www.postgresql.org/about/news/hypopg-142-is-out-3094/
1•unripe_syntax•34m ago•0 comments

Recently, June 29, 2025 – island94.org

https://island94.org/2025/06/recently-june-29-2025
1•amalinovic•35m ago•0 comments

Show HN: Oomol – A local-first, code-first workflow automation engine

https://oomol.com
1•monica-guli•35m ago•0 comments

Android apps can now be officially developed in Swift

https://www.swift.org/android-workgroup/
3•skreep•38m ago•1 comments

OpenAI is doing a 1 week company shutdown

https://twitter.com/TheRealAdamG/status/1939447922006909376
3•tosh•40m ago•0 comments

Understanding Keyword Search

https://kentro-learn.com/free-content/keyword-search-fundamentals
1•sebg•40m ago•1 comments

"Sovereign cloud"? A Trojan Horse at Europe's digital gates

https://tuta.com/blog/sovereign-washing
6•01-_-•41m ago•0 comments

Intel will shut down its automotive business

https://fortune.com/2025/06/26/why-intel-will-shut-down-its-automotive-business/
3•Bluestein•41m ago•2 comments

NASA Mars Orbiter Learns New Moves After Nearly 20 Years in Space

https://www.jpl.nasa.gov/news/nasa-mars-orbiter-learns-new-moves-after-nearly-20-years-in-space/
2•01-_-•43m ago•0 comments

How [NOT] to Evaluate Your RAG

https://nixiesearch.substack.com/p/how-not-to-evaluate-your-rag
4•shutty•46m ago•0 comments

Compiling Brainfuck Code – Part 1: An Optimized Interpreter

https://rodrigodd.github.io/2022/10/21/bf_compiler-part1.html
1•SchwKatze•50m ago•0 comments

How Humans Solve Problems

https://theness.com/neurologicablog/how-humans-solve-problems/
1•flyingkiwi44•53m ago•1 comments

How Long Contexts Fail

https://www.dbreunig.com/2025/06/22/how-contexts-fail-and-how-to-fix-them.html
1•bittermandel•55m ago•0 comments

First Hack Contest for LLMs:)

https://github.com/yanndegat/gol-llm-challenge
4•parasitid•55m ago•1 comments

Using Advanced JSON Context Profiles to generate same-looking AI images

https://www.yurikoval.com/blog/generate-consistent-images-using-advanced-json-context-profiles.html
2•yurikoval•59m ago•0 comments

When the CTO Asks You to Use Autocomplete

https://idiallo.com/blog/when-cto-asks-you-to-use-autocomplete
1•WhyNotHugo•59m ago•1 comments

Show HN: VidVeo3 – AI Video Creation with Seamless Sound

https://www.vidveo3.com/
1•Viaya•59m ago•0 comments

Tripthesia – Create personalized travel itineraries with AI

https://tripthesia.travel
1•robyrocker89•59m ago•1 comments

Canada rescinds digital services tax to advance trade negotiations with the US

https://www.canada.ca/en/department-finance/news/2025/06/canada-rescinds-digital-services-tax-to-advance-broader-trade-negotiations-with-the-united-states.html
2•pghatedphones•1h ago•0 comments

Former NTSB IG: Boeing 787 FADEC may have caused AirIndia crash

https://sundayguardianlive.com/investigation/boeing-787-software-may-have-caused-ai-crash-aviation-expert
3•dz0ny•1h ago•2 comments

Would you use a chat app that auto-generates to-do list from chat?

https://markhub.ink
1•PaulShin•1h ago•4 comments