frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Matrix Live S11E04 – Gathering the Community

https://matrix.org/blog/2025/07/11/this-week-in-matrix-2025-07-11/
1•doener•7m ago•0 comments

Type Inference Zoo

https://zoo.cuichen.cc/research
1•fanf2•7m ago•0 comments

AI Running on a Gaming GPU Now Classifies and Values Ancient Chinese Ceramics

https://blogs.nvidia.com/blog/gaming-gpu-ceramics/
1•superdickduck•9m ago•1 comments

Ten Simple Rules for Mathematical Writing

https://web.mit.edu/dimitrib/www/Ten_Rules.html
1•__rito__•9m ago•0 comments

Dutch Childcare Benefits Scandal

https://en.wikipedia.org/wiki/Dutch_childcare_benefits_scandal
2•doener•11m ago•0 comments

Monorepo Tooling with NPM and Shell

https://greenvitriol.com/posts/npm-query
2•janesconference•11m ago•0 comments

How I use Emacs + Denote to take notes as a researcher

https://lambdaland.org/posts/2025-07-11_research_notes/
2•ashton314•14m ago•0 comments

Norilsk

https://en.wikipedia.org/wiki/Norilsk
1•vinnyglennon•15m ago•0 comments

Own, a new social media app, aims to tokenize the creator economy

https://techcrunch.com/2025/06/17/own-a-new-social-media-app-aims-to-tokenize-the-creator-economy/
1•PaulHoule•16m ago•0 comments

Why tariffs haven't raised inflation much (yet)

https://www.noahpinion.blog/p/why-tariffs-havent-raised-inflation
2•cwwc•20m ago•0 comments

Remember Corporate Training Programs?

https://hollisrobbinsanecdotal.substack.com/p/remember-corporate-training-programs
2•HR01•23m ago•0 comments

I spent $200 to test every LLM on a complex SQL query generation task

https://nexustrade.io/blog/i-tested-every-ai-model-on-a-complex-sql-query-generation-task-heres-where-grok-4-stands-20250711
1•sh_tomer•24m ago•0 comments

Preliminary report into Air India crash released

https://www.bbc.co.uk/news/live/cx20p2x9093t
7•cjr•26m ago•3 comments

How I Use ChatGPT in Notion to Write PM Reports Faster

https://koshy8.gumroad.com/l/ai-pm-free
1•aipmtools•30m ago•0 comments

US customs duties top $100B for first time in a fiscal year

https://www.reuters.com/business/trumps-tariff-collections-expected-grow-june-us-budget-data-2025-07-11/
6•TMWNN•34m ago•0 comments

Figma's $300k Daily AWS Bill Isn't the Scandal You Think It Is

https://www.duckbillgroup.com/blog/figmas-300k-daily-aws-bill-isnt-the-scandal-you-think-it-is/
6•mooreds•34m ago•0 comments

Preserving Traditions: Unveiling the Timeless History of Lacto-Fermentation

https://www.lazyscientistsauces.co.uk/post/preserving-traditions-unveiling-the-timeless-history-of-lacto-fermentation
1•thunderbong•35m ago•0 comments

Global Measles Outbreaks

https://www.cdc.gov/global-measles-vaccination/data-research/global-measles-outbreaks/index.html
2•andsoitis•36m ago•1 comments

Show HN: SaaS Template Optimized for AI

https://github.com/TeemuSo/saas-template-for-ai-lite
1•TeemuSo•38m ago•0 comments

Flux Kontext Image editing tests

https://www.flickspeed.ai/canvas/public/6871319e239a5c68830ee64f
1•taherchhabra•39m ago•1 comments

How to Interview AI Engineers

https://blog.promptlayer.com/the-agentic-system-design-interview-how-to-evaluate-ai-engineers/
1•jzone3•41m ago•3 comments

Can Performant LLMs Be Ethical? Quantifying the Impact of Web Crawling Opt-Outs

https://arxiv.org/abs/2504.06219
1•layer8•42m ago•0 comments

Creating a Website from Obsidian

https://lwgrs.bearblog.dev/creating-a-website-from-obsidian/
2•speckx•42m ago•0 comments

Talking Postgres with Shireesh Thota, Microsoft CVP

https://talkingpostgres.com/episodes/how-i-got-started-leading-database-teams-with-shireesh-thota/transcript
2•clairegiordano•44m ago•0 comments

Pasilalinic-Sympathetic Compass

https://en.wikipedia.org/wiki/Pasilalinic-sympathetic_compass
1•frabert•44m ago•0 comments

Ask HN: Advice for someone choosing a college path

2•spacebuffer•46m ago•3 comments

Chinese TV uses AI to translate broadcasts to sign language. It's not going well

https://www.theregister.com/2025/07/10/china_ai_sign_language_translation/
2•xbmcuser•46m ago•0 comments

Do Longevity Drugs Work?

https://www.economist.com/science-and-technology/2025/06/20/do-longevity-drugs-work
1•bookofjoe•49m ago•1 comments

I created an open source AI first Kanban tool

https://vibecodementor.net/kanban
1•wavh•52m ago•1 comments

Bela Gem Brings Ultra-Low Latency Audio to PocketBeagle 2

https://www.beagleboard.org/blog/2025-07-10-bela-gem-brings-ultra-low-latency-audio-to-pocketbeagle-2
2•ofalkaed•52m ago•0 comments
Open in hackernews

jank is C++

https://jank-lang.org/blog/2025-07-11-jank-is-cpp/
117•Jeaye•3h ago

Comments

almostgotcaught•2h ago
i commented on reddit (and got promptly downvoted) but since i think jank's author is around here (and hopefully is receptive to constructive criticism): the CppInterOp approach to cpp interop is completely janky (no pun intended). the approach literally string munges cpp and then parses/interprets it to emit ABI compliant calls. there's no reason to do this except that libclang currently doesn't support any other way. that's not jank's fault but it could be "fixed" in libclang. at a minimum you could use https://github.com/llvm/llvm-project/blob/main/clang/lib/Cod... to emit the code based on clang ast. at a maximum would be to use something like

https://github.com/Mr-Anyone/abi

or this if/when it comes to fruition

https://discourse.llvm.org/t/llvm-introduce-an-abi-lowering-...

to generate ABI compliant calls/etc for cpp libs.

note, i say all this with maximum love in my heart for a language that would have first class cpp interop - i would immediately become jank's biggest proponent/user if its cpp interop were robust.

EDIT: for people wanting/needing receipts, you can skim through https://github.com/compiler-research/CppInterOp/blob/main/li...

wk_end•2h ago
> the CppInterOp approach to cpp interop is completely janky (no pun intended). the approach literally string munges cpp and then parses/interprets it to emit ABI compliant calls.

So, I agree that this sounds janky as heck. My question is: besides sounding janky as heck, is there something wrong with this? Is it slow/unreliable?

almostgotcaught•2h ago
i mean it's as prone to error as any other thing that relies on string munging. it's probably not that much slower than the alternative i proposed - because the trampolines/wrappers are jitted and then reused - but it's just not robust enough that i would ever imagine building a prod system on top of it (eg using cppyy in prod) let alone baking it into my language/runtime.
refulgentis•2h ago
The delta between the title and the content gave me extreme pause, thanks for sharing that there's, uh, worse problems.

I'm a bit surprised I've seen two articles about jank here the last 2 days if these are exemplars of the technical approach and communication style. Seems like that wouldn't be enough to get on people's radars.

actionfromafar•2h ago
Given how the world works, that might mean we will all sit and curse Jank instead of cursing Node. :)
Jeaye•1h ago
Which particular delta between the title and the content gave you extreme pause?
refulgentis•1h ago
It said "jank is C++", which I assumed would be explaining that jank compiles down to C++ or something similar, i.e. there is a layer of abstraction between jank and C++, but it effectively "works like" C++.

On re-read, I recognize where it is used in the article:

"jank is C++. There is no runtime reflection, no guess work, and no hints. If the compiler can't find a member, or a function, or a particular overload, you will get a compiler error."

I assume other interop scenarios don't pull this off*, thus it is distinctive. Additionally, I'm not at all familiar with Clojure, sadly, but it also sounds like there's some special qualities there ("I think that this is an interesting way to start thinking about jank, Clojure, and static types")

Now I'll riff and just write out the first 3-5 titles that come to mind with that limited understanding:

- Implementing compile-time verifiable C++ interop in jank

- Sparks of C++ interop: jank, Clojure, & verifying interop before runtime

- jank's progress on C++ interop

- Safe C++ interop lessons from jank

* for example, I write a lot of Dart day to day and rely on Dart's "FFI" implementation to call C++, which now that I'm thinking about, only works because there's a code generator that creates "Dart headers" (my term) for the C++ libraries. I could totally footgun and call arbitrary functions that don't exist.

Jeaye•1h ago
My reasoning is this:

jank is written in C++. Its compiler and runtime are both in C++. jank can compile to C++ directly (or LLVM IR). jank can reach into C++ seamlessly, which includes reaching into its own compiler/runtime. Thus, the boundary between what is C++ and what is Clojure is gone, which leaves jank as being both Clojure and C++.

Achieving this singularity is a milestone for jank and, I think, is worthy of the title.

Jeaye•24m ago
> i mean it's as prone to error as any other thing that relies on string munging.

This is misleading. Having done a great deal of both (as jank also supports C++ codegen as an alternative to IR), if the input is a fully analyzed AST, generating IR is significantly more error prone than generating C++. Why? Well, C++ is statically typed and one can enable warnings and errors for all sorts of issues. LLVM IR has a verifier, but it doesn't check that much. Handling references, pointers, closures, ABI issues, and so many more things ends up being a huge effort for IR.

For example, want to access the `foo.bar` member of a struct? In IR, you'll need to access foo, which may require loading it if it's a reference. You'll need to calculate the offset to `bar`, using GEP. You'll need to then determine if you're returning a reference to `bar` or if a copy is happening. Referencing will require storing a pointer, whereas copying may involve a lot more code. If we're generating C++, though, we just take `foo` and add a `.bar`. The C++ compiler handles the rest and will tell us if we messed anything up.

If you're going to hand wave and say anything that's building strings is error prone and unsafe, regardless of how richly typed and thoroughly analyzed the input is, the stance feels much less genuine.

Jeaye•2h ago
Hey! I'm here and receptive.

I completely agree that Clang could solve this by actually supporting my use case. Unfortunately, Clang is very much designed for standalone AOT compilation, not intertwined with another IR generating mechanism. Furthermore, Clang struggles to handle some errors gracefully which can get it into a bad state.

I have grown jank's fork of CppInterOp quite significantly, in the past quarter, with the full change list being here: https://gist.github.com/jeaye/f6517e52f1b2331d294caed70119f1... Hoping to get all of this upstreamed, but it's a lot of work that is not high priority for me right now.

I think, based on my experience in the guts of CppInterOp, that the largest issue is not the C++ code generation. Basically any code generation is some form of string building. You linked to a part of CppInterOp which is constructing C++ functions. What's _actually_ wrong with that, in terms of robustness? The strings are generated not based on arbitrary user input, but based on Clang QualTypes and Decls. i.e. you need valid Clang values to actually get there anyway. Given that the ABI situation is an absolute mess, and that jank is already using Clang's JIT C++ compiler, I think this is a very viable solution.

However, in terms of robustness, I go back to Clang's error handling, lack of grace, and poor tooling for use cases like this. Based on my experience, _that_ is what will cause robustness issues.

Please don't take my response as unreceptive or defensive. I really do appreciate the discussion and if I'm saying something wrong, or if you want to explain further, please do. For alternatives, you linked to https://github.com/Mr-Anyone/abi which is 3 months old and has 0 stars (and so I assume 0 users and 0 years of battle testing). You also linked to https://discourse.llvm.org/t/llvm-introduce-an-abi-lowering-... which I agree would be great, _if/when it becomes available_.

So, out of all of the options, I'll ask clearly and sincerely: is there really a _better_ option which exists today?

CppInterOp is an implementation detail of jank. If we can replace C++ string generation with more IR generation and a portable ABI mechanism, _and_ if Clang can provide the sufficient libraries to make it so that I don't need to rely on C++ strings to be certain that my template specializations get the correct instantiation, I am definitely open to replacing CppInterOp. From all I've seen, we're not there yet.

almostgotcaught•1h ago
> which is 3 months old and has 0 stars (and so I assume 0 users and 0 years of battle testing)

ah my bad i meant to link to this one https://github.com/scrossuk/llvm-abi

which inspired the gsoc.

> is there really a _better_ option which exists today?

today the "best in class" approach is swift's which fully (well tries to) model cpp AST and do what i suggested (emitting code directly):

https://github.com/swiftlang/swift/blob/c09135b8f30c0cec8f5f...

Jeaye•1h ago
There are upsides to this approach. Coupling Swift's AST with Clang's AST will allow for the best codgen, for sure.

However, the huge downside to this approach, which cannot be overlooked, is that Clang (not libclang) is not designed to be a library. It doesn't have the backward compatibility of a library. Swift (i.e. Apple) is already deep into developing Clang, and so I'm sure they can afford the cost of keeping up with the breaking changes that happen on every Clang release. For a solo dev, I'm not yet sure this is actually viable, but I will give it more consideration.

However, I think that raising alarms at C++ codegen is unwarranted. As I said before, basically any query builder or codegen takes some form of string generation. The way we make those safe is to add types in front of them, so we're not just formatting user strings into other strings. That's exactly what CppInterOp does, where the types added are Clang QualTypes and Decls.

rjsw•1h ago
I think that some packages that generate Python bindings for C++ use Clang to do it as well.
xxr•2h ago
These recursive initialism PL names are getting out of hand /s
Jeaye•1h ago
I've pondered this for a while and I have no idea how jank is a recursive acronym. What're you seeing that I'm not?
eurleif•14m ago
Jank's A Native Klojure? :)
johnnyjeans•2h ago
I'm not surprised to see that Jank's solution to this is to embed LLVM into their runtime. I really wish there was a better way to do this.

There are a lot of things I don't like about C++, and close to the top of the list is the lack of standardization for name-mangling, or even a way mangle or de-mangle names at compile-time. Sepples is a royal pain in the ass to target for a dynamic FFI because of that. It would be really nice to have some way to get symbol names and calling semantics as constexpr const char* and not have to deal with generating (or writing) a ton of boilerplate and extern "C" blocks.

It's absolutely possible, but it's not low-hanging fruit so the standards committee will never put it in. Just like they'll never add a standardized equivalent for alloca/VLAs. We're not allowed to have basic, useful things. Only more ways to abuse type deduction. Will C++26 finally give us constexpr dynamic allocations? Will compilers ever actually implement one of the three (3) compile-time reflection standards? Stay tuned to find out!

almostgotcaught•2h ago
> LLVM into their runtime

they're not embedding LLVM - they're embedding clang. if you look at my comment below, you'll see LLVM is not currently sufficient.

> [C++] is a royal pain in the ass to target for a dynamic FFI because of that

name mangling is by the easiest part of cpp FFI - the hard part is the rest of the ABI. anyone curious can start here

https://github.com/rust-lang/rust-bindgen/issues/778

Jeaye•2h ago
To be fair, jank embeds both Clang and LLVM. We use Clang for C++ interop and JIT C++ compilation. We use LLVM for IR generation and jank's compiler back-end.
johnnyjeans•1h ago
> they're not embedding LLVM - they're embedding clang

They're embedding both, according to the article. But it's also just sloppy semantics on my part; when I say LLVM, I don't make a distinction of the frontend or any other part of it. I'm fully relying on context to include all relevant bits of software being used. In the same way I might use "Windows" to refer to any part of the Windows operating system like dwm.exe, explorer.exe, command.com, ps.exe, etc. LLVM a generic catch-all for me, I don't say "LLI" I say "the LLVM VM", for example. I can't really consider clang to be distinct from that ecosystem, though I know it's a discrete piece of software.

> name mangling is by the easiest part of cpp FFI

And it still requires a lot of work, and increases in effort when you have multiple compilers, and if you're on a tiny code team that's already understaffed, it's not really something you can worry about.

https://en.m.wikiversity.org/wiki/Visual_C%2B%2B_name_mangli...

You're right, writing platform specific code to handle this is more than possible. But it takes manhours that might just be better spent elsewhere. And that's before we get to the part where embedding a C++ compiler is extremely inappropriate when you just want a symbol name and an ABI.

But this is besides the point: The fact that it's not a problem solved by the gargantuan standard is awful. I also consider the ABI to be the exact same issue, that being absolutely awful support of runtime code loading, linking and interoperation. There's also no real reason for it, other than the standards committee being incompetent.

benreesman•2h ago
Carmack did very much almost exactly the same with the Trinity / Quake3 Engine: IIRC it was LCC, maybe tcc, one of the C compilers you can actually understand totally as an individual.

He compiled C with some builtins for syscalls, and then translated that to his own stack machine. But, he also had a target for native DLLs, so same safe syscall interface, but they can segv so you have to trust them.

Crazy to think that in one computer program (that still reads better than high-concept FAANG C++ from elite lehends, truly unique) this wasn't even the most dramatic innovation. It was the third* most dramatic revolution in one program.

If you're into this stuff, call in sick and read the plan files all day. Gives me googebumps.

johnnyjeans•1h ago
Any particular year?
o11c•2h ago
> the lack of standardization for name-mangling, or even a way mangle or de-mangle names at compile-time.

Like many things, this isn't a C++ problem. There is a standard and almost every target uses it ... and then there's what Microsoft does. Only if you have to deal with the latter is there a problem.

Now, standards do evolve, and this does give room for different system libraries/tools to have a different view of what is acceptable/correct (I still have nightmares of trying to work through `I...E` vs `J...E` errors) ... but all the functionality does exist and work well if you aren't on the bleeding edge (fortunately, C++11 provided the bits that are truly essential; everything since has been merely nice-to-have).

mort96•1h ago
Like many things people claim "isn't a C++ problem but an implementation problem"... This is a C++ problem. Anything that's not nailed down by the standard should be expected to vary between implementations.

The fact that the standard doesn't specify a name mangling scheme leads to the completely predictable result that different implementations use different name mangling schemes.

The fact that the standard doesn't specify a mechanism to mangle and demangle names (be it at runtime or at compile time) leads to the completely predictable result that different implementations provide different mechanisms to mangle and demangle names, and that some implementations don't provide such a mechanism.

These issues could, and should, have been fixed in the only place they can be fixed -- the standard. ISO is the mechanism through which different implementation vendors collaborate and find common solutions to problems.

vlovich123•45m ago
> Anything that's not nailed down by the standard should be expected to vary between implementations.

When you have one implementations you have a standard. When you have two implementations and a standard you don’t actually have a standard in practice. You just have two implementations that kind of work similarly in most cases.

While the major compilers do a fantastic job they still frequently disagree about even “well defined” behavior because the standard was interpreted differently or different decisions were made.

SideQuark•21m ago
> When you have two implementations and a standard you don’t actually have a standard in practice

This simply isn't true. Plenty of standardized things are interchangeable, from internet RFCs followed by zillions of players and implementations of various RFCs, medical device standards, encryption standards, weights and measures, currency codes, country codes, time zones, date and time formats, tons of file formats, compression standards, the ISO 9000 series, ASCII, testing standards, and on and on.

The poster above you is absolutely correct - if something is not in the standard, it can vary.

o11c•7m ago
This is like getting mad at ISO 8601 because it doesn't define the metric system.

No standard stands alone in its own universe; complementary standards must necessarily always exist.

Besides, even if the C++ standard suddenly did incorporate ABI standards by reference, Microsoft would just refuse to follow them, and nothing would actually be improved.

plq•1h ago
> the lack of standardization for name-mangling

I don't see the point of standardizing name mangling. Imagine there is a standard, now you need to standardize the memory layout of every single class found in the standard library. Without that, instead of failing at link-time, your hypothetical program would break in ugly ways while running because eg two functions that invoke one other have differing opinions about where exactly the length of a std::string can be found in the memory.

johnnyjeans•37m ago
The naive way wouldn't be any different than what it's like to dynamically load sepples binaries right now.

The real way, and the way befitting the role of the standards committee is actually putting effort into standardizing a way to talk to and understand the interfaces and structure of a C++ binary at load-time. That's exactly what linking is for. It should be the responsibility of the software using the FFI to move it's own code around and adjust it to conform with information provided by the main program as part of the dynamic linking/loading process... which is already what it's doing. You can mitigate a lot of the edge cases by making interaction outside of this standard interface as undefined behavior.

The canonical way to do your example is to get the address of std::string::length() and ask how to appropriately call it (to pass "this, for example.)

Jeaye•1h ago
I hear you when it comes to C++ portability, ABI, and standards. I'm not sure what you would imagine jank using if not for LLVM, though.

Clojure uses the JVM, jank uses LLVM. I imagine we'd need _something_ to handle the JIT runtime, as well as jank's compiler back-end (for IR optimization and target codegen). If it's not LLVM, jank would embed something else.

Having to build both of these things myself would make an already gargantuan project insurmountable.

kccqzy•1h ago
> de-mangle names at compile-time

Far from being standardized but it's possible today on GCC and Clang. You just abuse __PRETTY_FUNCTION__.

dmoy•2h ago
From two days ago: https://news.ycombinator.com/item?id=44482273
papichulo2023•2h ago
Recently I tried D lang and was surprise with the nice interop with C++ (the language in general feels pretty good), Carbon is nowhere to be seen and havent tried Swift's yet. I hope this is a good one.
actionfromafar•2h ago
Shedskin lang has excellent integration with C++.
almostgotcaught•2h ago
shedskin isn't actively developed ... or at least it wasn't for like 10 years https://github.com/shedskin/shedskin/graphs/contributors
Imustaskforhelp•1h ago
Now ofc jank already has gotten C++ support but if I may ask, if it had, let's say gotten D lang support, then would that have been easier/more doable/practical?
Mathnerd314•2h ago
Ok so jank is Clojure but with C++/LLVM runtime rather than JVM. So already all of its types are C++ types, that presumably makes things a lot easier. Basically it just uses libclang / CppInterOp to get the corresponding LLVM types and then emits a function call. https://github.com/jank-lang/jank/blob/interop/compiler%2Bru...
Jach•1h ago
Neat project, I can only marvel at your ability to deal with such madness. But it would be nice to have better C++ interop in higher level languages, there's some useful C++ code out there. I also appreciate the brief mention of Clasp, as I was immediately thinking of it as I was reading through.
netbioserror•19m ago
I used Clojure back in the day and use Nim at work these days. Linking in to C is trivially easy in Nim. Happy to see this working for jank, but C++ is...such a nightmare target.

Any chance of Jank eventually settling on reference counting? It checks so many boxes in my book: Simple, predictable, few edge cases, fast. I guess it really just depends on how much jank programs thrash memory, I remember Clojure having a lot of background churn.