frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: I implemented generics in my programming language

https://axe-docs.pages.dev/features/generics/
22•death_eternal•4d ago
It took a while to implement, though now I have generic functions working in Axe. Documentation, repository and site attached.

Comments

p0w3n3d•1h ago
This are merely instanceof switches. Generics mean that you write

  fun(a,b): return a+b 
and if the a + b is doable, it will be done. You don't need to specify the list of types that accepts this syntax. The difference between this and duck typing is that you can also specify interfaces (or traits in c++) that will say that this type is quackable so

  fun(a <? implements Quackable>): a.quack()
is reusable. What is the difference between this and simple interface implementation? It took me some time to find this example in the narrowest version possible.

  class <T has trait Number> Complex(a T, b T):
    Complex<T> operator+(Complex<T> other): return new Complex(this.a + other.a, this.b+other.b)
    Complex<T> operator-(Complex<T> other): return new Complex(this.a - other.a, this.b-other.b)
    Complex<T> operator*(Complex<T> other):
       return Complex(this.a * other.a - this.b * other.b, this.a * other.b + this.b * other.a)
The generic renders this code reusable, so if only you can create a new type, let's say vector, that supports +,-, and multiply you can have complex algebra on those vectors
mrkeen•1h ago
You implemented Specifics.

One of my pet-hates is fellow developers who call an implementation 'generic', but when you peek inside, there's just if-statements that (at best) cover the already-known input types.

Usually I point to Generics as an example of what "generic" actually means: You peek inside List<T>, it doesn't know about your type, it does the right thing anyway.

one-punch•53m ago
You have implemented a form of ‘ad-hoc polymorphism’.

This is different from ‘parametric polymorphism’, which is what people call generics.

Someone•1m ago
[delayed]
miellaby•50m ago
You should consider change the name, it looks like a lot like https://haxe.org/
Philip-J-Fry•13m ago
If your function changes it's behaviour based on the type, then it's not generic.

Your list_contains function should be able to just do a == comparison regardless of whether it's an int or a string.

This is effectively no different than adding a parameter to one of your non-"generic" functions and just swapping behaviour based on that?

Imustaskforhelp•9m ago
I saw your programming language on reddit and now here too. To me first looking at it, I think its built straight for parallelism, Didn't know you were on hackernews too, interesting stuff and I will try to keep an eye out hopefully for this language but what are some stuff where you think it can be really useful for?

GotaTun -- Mullvad's WireGuard Implementation in Rust

https://mullvad.net/en/blog/announcing-gotatun-the-future-of-wireguard-at-mullvad-vpn
213•km•3h ago•46 comments

Amazon will allow ePub and PDF downloads for DRM-free eBooks

https://www.kdpcommunity.com/s/article/New-eBook-Download-Options-for-Readers-Coming-in-2026?lang...
178•captn3m0•4h ago•89 comments

Beginning January 2026, all ACM publications will be made open access

https://dl.acm.org/openaccess
1833•Kerrick•22h ago•226 comments

Show HN: Stepped Actions – distributed workflow orchestration for Rails

https://github.com/envirobly/stepped
24•klevo•5d ago•3 comments

Getting bitten by Intel's poor naming schemes

https://lorendb.dev/posts/getting-bitten-by-poor-naming-schemes/
192•LorenDB•8h ago•99 comments

Texas is suing all of the big TV makers for spying on what you watch

https://www.theverge.com/news/845400/texas-tv-makers-lawsuit-samsung-sony-lg-hisense-tcl-spying
953•tortilla•2d ago•483 comments

We pwned X, Vercel, Cursor, and Discord through a supply-chain attack

https://gist.github.com/hackermondev/5e2cdc32849405fff6b46957747a2d28
969•hackermondev•19h ago•357 comments

1.5 TB of VRAM on Mac Studio – RDMA over Thunderbolt 5

https://www.jeffgeerling.com/blog/2025/15-tb-vram-on-mac-studio-rdma-over-thunderbolt-5
481•rbanffy•15h ago•152 comments

History LLMs: Models trained exclusively on pre-1913 texts

https://github.com/DGoettlich/history-llms
594•iamwil•15h ago•275 comments

Noclip.website – A digital museum of video game levels

https://noclip.website/
291•ivmoreau•11h ago•32 comments

From Zero to QED: An informal introduction to formality with Lean 4

https://sdiehl.github.io/zero-to-qed/01_introduction.html
94•rwosync•5d ago•12 comments

How to think about durable execution

https://hatchet.run/blog/durable-execution
26•abelanger•6d ago•5 comments

Show HN: I implemented generics in my programming language

https://axe-docs.pages.dev/features/generics/
23•death_eternal•4d ago•6 comments

GPT-5.2-Codex

https://openai.com/index/introducing-gpt-5-2-codex/
517•meetpateltech•20h ago•272 comments

Pingfs: Stores your data in ICMP ping packets

https://github.com/yarrick/pingfs
44•linkdd•5d ago•14 comments

Prompt caching for cheaper LLM tokens

https://ngrok.com/blog/prompt-caching/
178•samwho•2d ago•41 comments

Show HN: I open-sourced my Go and Next B2B SaaS Starter (deploy anywhere, MIT)

https://github.com/moasq/production-saas-starter
48•moh_quz•2h ago•26 comments

How China built its ‘Manhattan Project’ to rival the West in AI chips

https://www.japantimes.co.jp/business/2025/12/18/tech/china-west-ai-chips/
381•artninja1988•19h ago•447 comments

Designing a Passive Lidar Detector Device

https://www.atredis.com/blog/2025/11/20/designing-a-passive-lidar-detection-sensor
25•speckx•3d ago•0 comments

Show HN: UK Butchers Meat Price Tracker

https://offer-spider.onrender.com
4•wolfer•5d ago•0 comments

Reconstructed Commander Keen 1-3 Source Code

https://pckf.com/viewtopic.php?t=18248
102•deevus•10h ago•17 comments

Show HN: Picknplace.js, an alternative to drag-and-drop

https://jgthms.com/picknplace.js/
352•bbx•2d ago•126 comments

Show HN: CommerceTXT – An open standard for AI shopping context (like llms.txt)

https://commercetxt.org/
11•tsazan•2d ago•11 comments

Property-Based Testing Caught a Security Bug I Never Would Have Found

https://kiro.dev/blog/property-based-testing-fixed-security-bug/
40•nslog•14h ago•15 comments

Skills for organizations, partners, the ecosystem

https://claude.com/blog/organization-skills-and-directory
275•adocomplete•21h ago•152 comments

Show HN: Stop AI scrapers from hammering your self-hosted blog (using porn)

https://github.com/vivienhenz24/fuzzy-canary
286•misterchocolat•2d ago•207 comments

Making Google Sans Flex

https://design.google/library/google-sans-flex-font
80•meetpateltech•8h ago•59 comments

SMB Direct – SMB3 over RDMA

https://docs.kernel.org/filesystems/smb/smbdirect.html
41•tambourine_man•12h ago•12 comments

Great ideas in theoretical computer science

https://www.cs251.com/
145•sebg•15h ago•30 comments

Firefox will have an option to disable all AI features

https://mastodon.social/@firefoxwebdevs/115740500373677782
488•twapi•20h ago•455 comments