News for hackers. Stuff that matters.

andreamancuso

Running Rust/Go on shared hosting for $5 a month

I wanted type safety without managing infrastructure. Here's how I run statically-linked Rust/Go binaries on shared hosting using PHP as a thin wrapper.https://dev.to/andreamancuso/running-rust-binaries-on-shared-hosting-a-practical-approach-to-type-safety-on-a-budget-jmb

( Read More... | 3 comments | 2 points | on HN )
Re:Ask HN: What are you working on? (March 2025) on Sunday March 30, 2025 @06:25PM (#43528319)
- Semi-automated job finder for a job site focused on non-mainstream programming languages [1]. - Eiffel-inspired programming language [2].

It's hard to juggle between the two.

[1] https://beyond-tabs.com [2] https://github.com/andreamancuso/rivar-lang

*

1 point by andreamancuso 0 minutes ago | next | edit | delete [–]

Good point, but there’s a key difference between what abstract base classes or protocols enforce and what this proposal aims to do.

- Abstract Base Classes (ABCs) and Protocols help define interfaces and ensure that methods are implemented, but they don't automatically ensure object consistency across the class. They focus on the shape of objects, not the correctness of their internal state over time.

- This proposal for class invariants would enforce state consistency automatically after every method call, regardless of what methods are defined in the class. It’s more about ensuring that the internal state of the object is always valid (like Balance >= 0) without requiring explicit checks after every method.

As for decorators: Yes, they could technically enforce invariants, but the key point here is consistency and minimal friction. Using a decorator still requires you to opt in manually, and can lead to potential mistakes, especially when inheritance or metaclasses are involved. The goal of this proposal is to provide an explicit, built-in way to define and enforce invariants, without needing a decorator for every class or method.

Ask HN: Should Python support native Design by Contract (class invariants)?

I recently proposed adding native support for Design by Contract to Python, starting with class invariants.The idea: if a class defines an `__invariant__()` method, Python would automatically run it before and after every public method call. No decorators or metaclasses—just opt-in, self-verifying code.Languages like Eiffel, D, and Ada support this natively. I tried implementing it as a C...

( Read More... | 3 comments | 2 points | on HN )

Show HN: Beyond Tabs – A Curated Job Board by Tech Stack

https://beyond-tabs.com

Hey HN,I’ve built beyond-tabs.com, a job board focused on tech stacks rather than generic job listings. Instead of sifting through vague job descriptions, you can discover companies based on the languages they actually use.Why? Most job boards focus on job titles, but developers often care more about the tech stack they’ll be working with. I’m personally curating listings and highlighting the...

( Read More... | no comments | 2 points | on HN )
Re:Need feedback on my open source library on Friday November 15, 2024 @01:02PM (#42149298)
XFrames is an open source library that is meant to facilitate cross-platform, GPU-accelerated GUI development in the browser and in native Node.js applications - no DOM, no CSS.

It runs, through native prebuilt modules, on Windows, Linux, Raspberry Pi. Once I get my hands on a Mac, I'll build it for Apple silicon too.

It's early days, but early feedback would be highly appreciated.

Thanks!