frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Show HN: I saw this cool navigation reveal, so I made a simple HTML+CSS version

https://github.com/Momciloo/fun-with-clip-path
2•momciloo•19m ago•0 comments

Show HN: Stacky – certain block game clone

https://www.susmel.com/stacky/
2•Keyframe•23m ago•0 comments

Show HN: A toy compiler I built in high school (runs in browser)

https://vire-lang.web.app
2•xeouz•45m ago•1 comments

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

https://github.com/valdanylchuk/breezydemo
266•isitcontent•20h ago•33 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
365•vecti•22h ago•166 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
338•eljojo•23h ago•209 comments

Show HN: Kappal – CLI to Run Docker Compose YML on Kubernetes for Local Dev

https://github.com/sandys/kappal
17•sandGorgon•2d ago•5 comments

Show HN: Nginx-defender – realtime abuse blocking for Nginx

https://github.com/Anipaleja/nginx-defender
3•anipaleja•2h ago•0 comments

Show HN: R3forth, a ColorForth-inspired language with a tiny VM

https://github.com/phreda4/r3
80•phreda4•19h ago•15 comments

Show HN: Smooth CLI – Token-efficient browser for AI agents

https://docs.smooth.sh/cli/overview
94•antves•2d ago•70 comments

Show HN: MCP App to play backgammon with your LLM

https://github.com/sam-mfb/backgammon-mcp
3•sam256•4h ago•1 comments

Show HN: Slack CLI for Agents

https://github.com/stablyai/agent-slack
52•nwparker•1d ago•11 comments

Show HN: BioTradingArena – Benchmark for LLMs to predict biotech stock movements

https://www.biotradingarena.com/hn
27•dchu17•1d ago•12 comments

Show HN: Artifact Keeper – Open-Source Artifactory/Nexus Alternative in Rust

https://github.com/artifact-keeper
154•bsgeraci•1d ago•64 comments

Show HN: ARM64 Android Dev Kit

https://github.com/denuoweb/ARM64-ADK
18•denuoweb•2d ago•2 comments

Show HN: I'm 75, building an OSS Virtual Protest Protocol for digital activism

https://github.com/voice-of-japan/Virtual-Protest-Protocol/blob/main/README.md
7•sakanakana00•5h ago•1 comments

Show HN: I built Divvy to split restaurant bills from a photo

https://divvyai.app/
3•pieterdy•5h ago•1 comments

Show HN: Gigacode – Use OpenCode's UI with Claude Code/Codex/Amp

https://github.com/rivet-dev/sandbox-agent/tree/main/gigacode
19•NathanFlurry•1d ago•9 comments

Show HN: XAPIs.dev – Twitter API Alternative at 90% Lower Cost

https://xapis.dev
3•nmfccodes•2h ago•1 comments

Show HN: I Hacked My Family's Meal Planning with an App

https://mealjar.app
2•melvinzammit•7h ago•0 comments

Show HN: I built a free UCP checker – see if AI agents can find your store

https://ucphub.ai/ucp-store-check/
2•vladeta•8h ago•2 comments

Show HN: Micropolis/SimCity Clone in Emacs Lisp

https://github.com/vkazanov/elcity
173•vkazanov•2d ago•49 comments

Show HN: Daily-updated database of malicious browser extensions

https://github.com/toborrm9/malicious_extension_sentry
14•toborrm9•1d ago•8 comments

Show HN: Compile-Time Vibe Coding

https://github.com/Michael-JB/vibecode
10•michaelchicory•9h ago•3 comments

Show HN: Falcon's Eye (isometric NetHack) running in the browser via WebAssembly

https://rahuljaguste.github.io/Nethack_Falcons_Eye/
6•rahuljaguste•19h ago•1 comments

Show HN: Horizons – OSS agent execution engine

https://github.com/synth-laboratories/Horizons
24•JoshPurtell•1d ago•5 comments

Show HN: Slop News – HN front page now, but it's all slop

https://dosaygo-studio.github.io/hn-front-page-2035/slop-news
17•keepamovin•10h ago•6 comments

Show HN: Local task classifier and dispatcher on RTX 3080

https://github.com/resilientworkflowsentinel/resilient-workflow-sentinel
25•Shubham_Amb•1d ago•2 comments

Show HN: Fitspire – a simple 5-minute workout app for busy people (iOS)

https://apps.apple.com/us/app/fitspire-5-minute-workout/id6758784938
2•devavinoth12•13h ago•0 comments

Show HN: I built a RAG engine to search Singaporean laws

https://github.com/adityaprasad-sudo/Explore-Singapore
4•ambitious_potat•14h ago•4 comments
Open in hackernews

Show HN: I implemented generics in my programming language

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

Comments

p0w3n3d•1mo 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
mikepurvis•1mo ago
At least in C++ there's also the matter that the type switching happens at compile time, not runtime. You get a new instance of the function for each type that it's called with.

That's why C++ libraries with generic interfaces need to have their full implementations in the header or else have explicit instantiations for known supported types. If you compile the library first and the project later, there's no way of knowing at library-compile-time which instantiations of the generic will later be needed, and like, the types might not even exist yet at that point.

p0w3n3d•1mo ago
You're right, C++ generic implementation is different than Java for example. That's why it was hard for me to nail the features the generic should have in general... C++ is more like duck typing with precompiled checking i.e. If you have no traits you still get integers summed for example because the generated code from the headers is compilable. On Java it's different: all the generics have types erased and there is typecasting later, unless they are inherited by other types
mikepurvis•1mo ago
I'm not a Java person, but my understanding is that in Java everything is boxed anyway, so the implementation of the "generic" logic is always just dealing with a pointer-sized entity and it's a matter of whether the dereferenced object on the other end of that has the required fields/methods.
renox•1mo ago
> Java everything is boxed anyway

Not true, there's int and Integer.

mikepurvis•1mo ago
Right but you can’t use them as type arguments to Java’s generics so they’re not really relevant in this context.
mrkeen•1mo 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•1mo ago
You have implemented a form of ‘ad-hoc polymorphism’.

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

Someone•1mo ago
I somewhat disagree. FTA: “If the callsite is some_function(2);, the compiler resolves T as i32 and selects the corresponding branch, returning the value incremented by one. […] The important point is that the decision is driven entirely by type information, not by runtime inspection”

Given that, this isn’t that different from C generics (https://en.cppreference.com/w/c/language/generic.html), and people call that generics, too.

Having said that, even ignoring that this requires all implementations to be in a single source file (yes, you probably could use m4 or #include or whatever it’s called in this language) I do not find this syntax elegant.

Also, one thing that it doesn’t seem to support is generating compiler errors when calling a function with a type that isn’t supported.

jadedtuna•1mo ago
Right, but C-style generics really are not generics at all. As other comments point out, they effectively are conpile-time if statements. A generic function would automatically instantiate and generate required code for different call types, and perform the correct operations. The C-style "generics" are a conpile-time switch statement, switching on types.
noelwelsh•1mo ago
The key concept in "parametric polymorphism", which is what programming language nerds mean by generics, is "parametricity" [1]. This is basically the idea that all calls to a generic function should act in the same way regardless of the type of the actual concrete calls. The very first example breaks parametricity, as it multiplies for float, adds for i32, and isn't defined for other types.

It's implementation has the same issues as generics in Zig, which is also not parametric.

It's ok to explore other points in the design space, but the language designer should be aware of what they're doing and the tradeoffs involved. In the case of adhoc (non-parametric) polymorphism, there is a lot of work on type classes to draw on.

[1]: https://en.wikipedia.org/wiki/Parametricity

Someone•1mo ago
I don’t see how that Wikipedia page supports your claim “The key concept in "parametric polymorphism", which is what programming language nerds mean by generics, is "parametricity"”. That page doesn’t even contain the character sequence “generic”.

IMO, https://en.wikipedia.org/wiki/Generic_programming is more appropriate. It talks of “data types to-be-specified-later”, something that this and C generic lack. That’s one of the reasons that I wrote “I _somewhat_ disagree”.

Also, I don’t see how one would define “act in the same way”. A function that fully acts in the same way regardless of the types of its arguments cannot do much with its arguments.

For example, a function “/” doesn’t act in exactly the same way on floats and integers in many languages (5.0/2.0 may return 2,5 while 5/2 returns 2; if you say it should return 2,5 instead you’re having a function from T×T to T for floats but a function from T×T to U for ints; why would you call that “act in the same way”?), “+” may or may not wrap around depending on actual type, etc.

miellaby•1mo ago
You should consider change the name, it looks like a lot like https://haxe.org/
poly2it•1mo ago
It's clearly distinct, like C# is from C.
tliltocatl•1mo ago
Also a name collision with a TI 84+ language.
Philip-J-Fry•1mo 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•1mo 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?
Towaway69•1mo ago
If I understand correctly, generics here are “type agnostic” functions in a strongly typed language?

Why not just use a weakly typed language and add type checking were needed?

It seems strange to put in so much effort for type checking then only to throw it overboard by implementing something that ignores type.

dragonwriter•1mo ago
> If I understand correctly, generics here are “type agnostic” functions in a strongly typed language?

They are not.

They are applicable to a well-defined range of sets of input types, instead of a single specific type combination, and produce a well-defined output type for each input type combination.

> It seems strange to put in so much effort for type checking then only to throw it overboard by implementing something that ignores type.

Generics do not ignore types. That's kind of the whole point.

tetha•1mo ago
I'm assuming you meant statically/dynamically type checked languages.

Generic functions to not ignore types. An `inThere::a list -> a -> bool` very much enforces that the list passed in, as well as the element have the same type. With a sufficiently powerful type system, this allows for statically checked code that's not much less flexible than dynamically checked code.

Observing current developments in Python, but also Rust gives me the impression that dynamically typed languages were more a reaction to the very weak type systems languages like C or Java provided back in the day. A lot of Python code has very concrete or rather simple generic types for example - Protocols, Unions, First-class functions and Type parameters handle a lot. The tools to express these types better existed in e.g. Caml or Haskell, but weren't mainstream yet.

b33j0r•1mo ago
You implemented type-checking. For a project this ambitious, I am surprised here.

“Generics” should mean that the compiler or interpreter will generate new code paths for a function or structure based on usage in the calling code.

If I call tragmorgify(int), tragmorgify(float), or tragmorgify(CustomNumberType), the expectation is that tragmorgify(T: IsANumber) tragmorgifies things that are number-like in the same way.

For a compiled language this usually means monomorphization, or generating a function for each occurring tuple of args types. For an interpreted language it usually means duck-typing.

This is not a bad language feature per se, but also not what engineers want from generics. I would never write code like your example. The pattern of explicit type-checking itself is a well-known codesmell.

There is not a good usecase for adding 2.0 to a float input but 1 to an integer input. That makes your function, which should advertise a contract about what it does, a liar ;)