News for hackers. Stuff that matters.

mistivia

Re:Buy Your Friends Batteries on Monday August 17, 2026 @02:21PM (#49335384)
I don't think installing this kind of system at home is a good idea, especially considering the risk of fire. The amount of energy contained in a 5 kWh lithium battery is terrifing.
Re:The C ``Clockwise/Spiral Rule'' on Saturday August 01, 2026 @01:36AM (#49131357)
I think that in 2026, it's not a good idea to still be using human brainpower to parse gibberish that was hastily decided in the 1960s/1970s for the convenience of writing parsers. Just use tools like cdecl: https://manpages.ubuntu.com/manpages/focal/man1/cdecl.1.html
Re:Avoiding Trigonometry (2013) on Thursday March 12, 2026 @09:53PM (#47359787)
> we are performing an rather imprecise and expensive acos() call

No, the acos() call is not expensive at all. There is hardware acceleration.We can calculate acos() with in 12 CPU instructions.

https://git.musl-libc.org/cgit/musl/tree/src/math/i386/acos....

Re:Billion-Parameter Theories on Wednesday March 11, 2026 @12:36AM (#47331783)
> The deepest truths fit on a napkin.

If you have really done physics or engineering, you would never believe this. Simple and elegant formulas usually can only solve the "spherical chicken in a perfect vacuum" kind of problems. The real world is incredibly messy. Beneath those clean and beautiful-looking partial differential equations lies a mathematical nightmare. And these equations often only hold at certain scales or rely on extremely strict boundary conditions.

Re:Lisp-style C++ template meta programming on Monday March 09, 2026 @08:15AM (#47308058)
I've add exmaples of a toy EDSL and compile-time reflex in C++17 in GitHub readme, which wouldn't work with constexpr only.
Re:Lisp-style C++ template meta programming on Sunday March 08, 2026 @03:42AM (#47295406)
Template metaprogramming isn't really suited for this task, the prime sieve here serves only as a proof of concept, meant to show the capabilities of this style. But there are cases where `constexpr` is not applicable, especially when involving type manipulations.

On the other hand, C++ template metaprogramming, as an esolang, is fun to tame and experiment with.

Re:How AI destroys institutions on Wednesday January 21, 2026 @10:08AM (#46706723)
We have seen similar situations countless times before. Just as the Internet allowed people to bypass publishers to release text, and YouTube allowed creators to bypass TV stations and cinemas to release video, AI now allows people to bypass lawyers to read legal texts, which are often deliberately written to be indecipherable to an average person. AI will not destroy institutions, but it will pose challenges and lead to restructuring.
Re:Rust–: Rust without the borrow checker on Thursday January 01, 2026 @09:43PM (#46460817)
I don't want a Rust language without a borrow checker. I want a C language with a Borrow Checker. Rust's complexity is already approaching C++, and removing the Borrow Checker would turn it into a similar disaster. Austral looks like a good option to me, but it's not mature enough yet, and the Pascal-like syntax is also difficult to get used to.
Re:How to write type-safe generics in C on Saturday November 15, 2025 @01:34PM (#45939508)
I used similar method to craft my own type-safe algorithm and data structure library in C: https://github.com/mistivia/algds

Although it's a toy not for production, it's very interesting that the idea of traits/concept/typeclass just "emerge" out of the code, which made me suddenly understand why STL come into being.

Re:Show HN: I built a web framework in C on Thursday October 09, 2025 @03:42PM (#45532155)
It's very dangerous to write a http parser from scratch in C. This can be very vulnerable without rigorous testing. To get a useful web framework for production in C, I think it's a better idea to start from libmicrohttpd, libevent_http, or even fastcgi, which are battle-tested.

Show HN: EZLive – lightweight serverless self-hosted livestream

https://github.com/mistivia/ezlive

I recently made a small open source project `EZLive`. It lets you host your private live video without a server with public IP address. It can also serve as a build block of a more complex media system.EZLive will create a localhost RTMP ingest server, allowing OBS to stream video. Then EZLive converts the video into HLS files (.m3u8 + .ts). HLS files are uploaded to S3-compatible storage (like...

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