The best Hacker News stories from Show from the past day
Latest posts:
Show HN: dk – A script runner and cross-compiler, written in OCaml
I've always found it cool to be in roles where I can help a younger generation learn skills to have a bright future. That role is something I do in a few ways (as a parent, robotics mentor, school board advisor and Sunday school teacher) and I suspect most HN readers share the same role and appreciation. And for developing software skills, it was obvious that both the students and I had to have a productive software environment where we could work together. That theme of experienced/inexperienced engineers working together is the context in which I created `dk` as a scripting tool.<p>My testing ground has been students with one or two AP CS courses (high school computer science in the US), some of whom interned with me. I had to tackle a few problems:<p>- The development environment had to be simple to setup and the programming language couldn't be complicated
- The recognition that writing small, easily testable units of work (ex. "scripts") has been the only way I've found for very junior programmers to develop a large application
- Cheap, locked-down development hardware (ex. school computers with limited RAM and no Administrator privileges) is sometimes used for deployment to cheap hardware targets (ex. hand-me-down Android tablets)<p>My solution was to write a standalone binary called `dk` that uses scripts as the atom of work, cross-compiles to standalone executables, and downloads the runtimes and sysroots it needs on-demand. It sits roughly in the same space as Python and Go.<p>`dk` is available for Windows, macOS and Linux/glibc host machines with a growing list of cross-compilation targets.
Your `dk` scripts are written in an almost complete subset of OCaml 4: all `dk` scripts are OCaml, but not all OCaml code can run in `dk`. The other differences from conventional OCaml are that `dk` comes with a large library included, and that I treat any feature as buggy if the feature does not work on all supported OS-es.<p>The above origin of `dk` is admittedly odd (and abbreviated), so I was not expecting that `dk` would now be a general-purpose scripting tool. Yet it is. I can wrap, re-use and organize most of my hand-written software as a set of `dk` scripts.<p>Fair warning: The cross-compilation support in `dk` has had a recent overhaul and not every bug is closed. The error messages suck (you have to scroll up to see the root cause and resolution) but they will improve. Some progress bars are missing. There are also a few experimental features ... `uv`-style imports and an interactive interpreter are the big ones ... which are purposely under-documented because I am worried about `dk`'s API surface.<p>But it still works well, and you can see some real applications in the Examples section. I'd love if you could give it a kick in the tires and give `dk` some feedback! The issue list is at <<a href="https://github.com/diskuv/dk/issues">https://github.com/diskuv/dk/issues</a>>.
Show HN: I recreated 90s Mode X demoscene effects in JavaScript and Canvas
After 25 years of writing software, I was feeling nostalgic for the kinds of things that got me into programming in the first place: the old DOS demoscene. I spent a weekend seeing if I could recapture some of that INT 13H VGA magic using today's web tech, but with the old-school constraints of doing it from scratch.<p>The result is this portfolio of ten classic effects running in a single HTML file. It's all vanilla JavaScript writing to a <canvas> element, with no external libraries. It was a fun challenge to implement things like:<p>* The color palette cycling and smooth fading in the Plasma demo.
* The buffer-averaging algorithm for the Fire effect to make the flames feel more natural.
* The distance-based texture crossfading in the Tunnel to create the illusion of flying through different sections.
* A 2D scalar field for the Metaballs to calculate the surface normals for that classic blended, metallic look (I did the best I could with the given constraints).<p>It was a great exercise in getting back to first principles and a reminder of how much those early demo programmers could accomplish with so little. I hope it brings back some good memories for others who grew up with this stuff.<p>I'd love to hear about your favorite classic demos or if there are any other iconic effects you think would be a fun challenge to add.<p>Cheers!
Show HN: I recreated 90s Mode X demoscene effects in JavaScript and Canvas
After 25 years of writing software, I was feeling nostalgic for the kinds of things that got me into programming in the first place: the old DOS demoscene. I spent a weekend seeing if I could recapture some of that INT 13H VGA magic using today's web tech, but with the old-school constraints of doing it from scratch.<p>The result is this portfolio of ten classic effects running in a single HTML file. It's all vanilla JavaScript writing to a <canvas> element, with no external libraries. It was a fun challenge to implement things like:<p>* The color palette cycling and smooth fading in the Plasma demo.
* The buffer-averaging algorithm for the Fire effect to make the flames feel more natural.
* The distance-based texture crossfading in the Tunnel to create the illusion of flying through different sections.
* A 2D scalar field for the Metaballs to calculate the surface normals for that classic blended, metallic look (I did the best I could with the given constraints).<p>It was a great exercise in getting back to first principles and a reminder of how much those early demo programmers could accomplish with so little. I hope it brings back some good memories for others who grew up with this stuff.<p>I'd love to hear about your favorite classic demos or if there are any other iconic effects you think would be a fun challenge to add.<p>Cheers!
Show HN: Container-compose – A Docker-compose like tool for Apple containers
Hey HN, recently Apple release their own container manager tooling, but it's missing a "compose-like" tool.<p>I'm building this CLI as a side-project and a way to help on the usage with the main tool.<p>It's in a early version, then at the moment I'm trying to be as much as possible compatible with `docker-compose` config file, and in the current version we're supporting two commands: `up` and `down`.
Show HN: Nexus.js - Fabric.js for 3D
I was looking for a tiny library to easily transform both 2D & 3D objects with simple mouse / touch controls and a fixed camera, in the browser.<p>Like a simple 3D editor but without requiring the user to be a Blender expert.<p>Couldn't find anything lightweight, so I’m building one. Think Fabric.js but for 3D. Built entirely with Three.js / R3F.<p>Borrowed some inspiration from VR/AR interaction systems for controls.<p>Feel free to play with it and let me know what you think!
Show HN: Nexus.js - Fabric.js for 3D
I was looking for a tiny library to easily transform both 2D & 3D objects with simple mouse / touch controls and a fixed camera, in the browser.<p>Like a simple 3D editor but without requiring the user to be a Blender expert.<p>Couldn't find anything lightweight, so I’m building one. Think Fabric.js but for 3D. Built entirely with Three.js / R3F.<p>Borrowed some inspiration from VR/AR interaction systems for controls.<p>Feel free to play with it and let me know what you think!
Show HN: Nexus.js - Fabric.js for 3D
I was looking for a tiny library to easily transform both 2D & 3D objects with simple mouse / touch controls and a fixed camera, in the browser.<p>Like a simple 3D editor but without requiring the user to be a Blender expert.<p>Couldn't find anything lightweight, so I’m building one. Think Fabric.js but for 3D. Built entirely with Three.js / R3F.<p>Borrowed some inspiration from VR/AR interaction systems for controls.<p>Feel free to play with it and let me know what you think!
Show HN: Zeekstd – Rust Implementation of the ZSTD Seekable Format
Hello,<p>I would like to share a Rust implementation of the Zstandard seekable format I've been working on.<p>Regular zstd compressed files consist of a single frame, meaning you have to start decompression at the beginning. The seekable format splits compressed data into a series of independent frames, each compressed individually, so that decompression of a section in the middle of an archive only requires zstd to decompress at most a frame's worth of extra data, instead of the entire archive.<p>I started working with the seekable format because I wanted to resume downloads of big zstd compressed files that are decompressed and written to disk on the fly. At first I created and used bindings to the C functions that are available upstream[1], however, I stumbled over the first segfault rather quickly (it's now fixed) and found out that the functions only allow basic things. After looking closer at the upstream implementation, I noticed that is uses functions of the core API that are now deprecated and it doesn't allow access to low-level (de)compression contexts. To me it looks like a PoC/demo implementation that isn't maintained the same way as the zstd core API, probably that's also the reason it's in the contrib directory.<p>My use-case seemed to require a complete rewrite of the seekable format, so I decided to implement it from scratch in Rust using bindings to the advanced zstd compression API, available from zstd 1.4.0.<p>The result is a single dependency library crate[2], and a CLI crate[3] for the seekable format that feels similar to the regular zstd tool.<p>Any feedback is highly appreciated!<p>[1]: <a href="https://github.com/facebook/zstd/tree/dev/contrib/seekable_format">https://github.com/facebook/zstd/tree/dev/contrib/seekable_f...</a>
[2]: <a href="https://crates.io/crates/zeekstd" rel="nofollow">https://crates.io/crates/zeekstd</a>
[3]: <a href="https://github.com/rorosen/zeekstd/tree/main/cli">https://github.com/rorosen/zeekstd/tree/main/cli</a>
Show HN: Zeekstd – Rust Implementation of the ZSTD Seekable Format
Hello,<p>I would like to share a Rust implementation of the Zstandard seekable format I've been working on.<p>Regular zstd compressed files consist of a single frame, meaning you have to start decompression at the beginning. The seekable format splits compressed data into a series of independent frames, each compressed individually, so that decompression of a section in the middle of an archive only requires zstd to decompress at most a frame's worth of extra data, instead of the entire archive.<p>I started working with the seekable format because I wanted to resume downloads of big zstd compressed files that are decompressed and written to disk on the fly. At first I created and used bindings to the C functions that are available upstream[1], however, I stumbled over the first segfault rather quickly (it's now fixed) and found out that the functions only allow basic things. After looking closer at the upstream implementation, I noticed that is uses functions of the core API that are now deprecated and it doesn't allow access to low-level (de)compression contexts. To me it looks like a PoC/demo implementation that isn't maintained the same way as the zstd core API, probably that's also the reason it's in the contrib directory.<p>My use-case seemed to require a complete rewrite of the seekable format, so I decided to implement it from scratch in Rust using bindings to the advanced zstd compression API, available from zstd 1.4.0.<p>The result is a single dependency library crate[2], and a CLI crate[3] for the seekable format that feels similar to the regular zstd tool.<p>Any feedback is highly appreciated!<p>[1]: <a href="https://github.com/facebook/zstd/tree/dev/contrib/seekable_format">https://github.com/facebook/zstd/tree/dev/contrib/seekable_f...</a>
[2]: <a href="https://crates.io/crates/zeekstd" rel="nofollow">https://crates.io/crates/zeekstd</a>
[3]: <a href="https://github.com/rorosen/zeekstd/tree/main/cli">https://github.com/rorosen/zeekstd/tree/main/cli</a>
Show HN: Canine – A Heroku alternative built on Kubernetes
Hello HN!<p>I've been working on Canine for about a year now. It started when I was sick of paying the overhead of using stuff like Heroku, Render, Fly, etc to host some web apps that I've built. At one point I was paying over $400 a month for hosting these in the cloud. Last year I moved all my stuff to Hetzner.<p>For a 4GB machine, the cost of various providers:<p>Heroku = $260
Fly.io = $65
Render = $85
Hetzner = $4<p>(This problem gets a lot worse when you need > 4GB)<p>The only downside of using Hetzner is that there isn’t a super straightforward way to do stuff like:<p>- DNS management / SSL certificate management
- Team management
- Github integration<p>But I figured it should be easy to quickly build something like Heroku for my Hetzner instance. Turns out it was a bit harder than expected, but after a year, I’ve made some good progress<p>The best part of Canine, is that it also makes it trivial to host any helm chart, which is available for basically any open source project, so everything from databases (e.g. Postgres, Redis), to random stuff like torrent tracking servers, VPN’s endpoints, etc.<p>Open source: <a href="https://github.com/czhu12/canine">https://github.com/czhu12/canine</a>
Cloud hosted version is: <a href="https://canine.sh" rel="nofollow">https://canine.sh</a>
Show HN: Canine – A Heroku alternative built on Kubernetes
Hello HN!<p>I've been working on Canine for about a year now. It started when I was sick of paying the overhead of using stuff like Heroku, Render, Fly, etc to host some web apps that I've built. At one point I was paying over $400 a month for hosting these in the cloud. Last year I moved all my stuff to Hetzner.<p>For a 4GB machine, the cost of various providers:<p>Heroku = $260
Fly.io = $65
Render = $85
Hetzner = $4<p>(This problem gets a lot worse when you need > 4GB)<p>The only downside of using Hetzner is that there isn’t a super straightforward way to do stuff like:<p>- DNS management / SSL certificate management
- Team management
- Github integration<p>But I figured it should be easy to quickly build something like Heroku for my Hetzner instance. Turns out it was a bit harder than expected, but after a year, I’ve made some good progress<p>The best part of Canine, is that it also makes it trivial to host any helm chart, which is available for basically any open source project, so everything from databases (e.g. Postgres, Redis), to random stuff like torrent tracking servers, VPN’s endpoints, etc.<p>Open source: <a href="https://github.com/czhu12/canine">https://github.com/czhu12/canine</a>
Cloud hosted version is: <a href="https://canine.sh" rel="nofollow">https://canine.sh</a>
Show HN: Canine – A Heroku alternative built on Kubernetes
Hello HN!<p>I've been working on Canine for about a year now. It started when I was sick of paying the overhead of using stuff like Heroku, Render, Fly, etc to host some web apps that I've built. At one point I was paying over $400 a month for hosting these in the cloud. Last year I moved all my stuff to Hetzner.<p>For a 4GB machine, the cost of various providers:<p>Heroku = $260
Fly.io = $65
Render = $85
Hetzner = $4<p>(This problem gets a lot worse when you need > 4GB)<p>The only downside of using Hetzner is that there isn’t a super straightforward way to do stuff like:<p>- DNS management / SSL certificate management
- Team management
- Github integration<p>But I figured it should be easy to quickly build something like Heroku for my Hetzner instance. Turns out it was a bit harder than expected, but after a year, I’ve made some good progress<p>The best part of Canine, is that it also makes it trivial to host any helm chart, which is available for basically any open source project, so everything from databases (e.g. Postgres, Redis), to random stuff like torrent tracking servers, VPN’s endpoints, etc.<p>Open source: <a href="https://github.com/czhu12/canine">https://github.com/czhu12/canine</a>
Cloud hosted version is: <a href="https://canine.sh" rel="nofollow">https://canine.sh</a>
Show HN: Chawan TUI web browser
A terminal-based web browser in Nim.[1] Has acceptable (YMMV) CSS
rendering, some JS support, and inline images (sixel/kitty). It can
also use various protocols other than http(s) such as (s)ftp, gopher,
gemini, ...<p>Chawan started out as a w3m clone, and the UI still resembles it.
However, the architecture has turned out quite different, with pages
loaded in separate processes, and protocol/file type handling separated
out into external binaries. An interesting result is that you can even
register decoders for custom inline image formats, although practical
use cases of this are rather minimal.<p>There is a gallery showcasing some websites being rendered here:
<a href="https://chawan.net/gallery/index.html" rel="nofollow">https://chawan.net/gallery/index.html</a><p>[1]: <a href="https://nim-lang.org" rel="nofollow">https://nim-lang.org</a>
Show HN: Chawan TUI web browser
A terminal-based web browser in Nim.[1] Has acceptable (YMMV) CSS
rendering, some JS support, and inline images (sixel/kitty). It can
also use various protocols other than http(s) such as (s)ftp, gopher,
gemini, ...<p>Chawan started out as a w3m clone, and the UI still resembles it.
However, the architecture has turned out quite different, with pages
loaded in separate processes, and protocol/file type handling separated
out into external binaries. An interesting result is that you can even
register decoders for custom inline image formats, although practical
use cases of this are rather minimal.<p>There is a gallery showcasing some websites being rendered here:
<a href="https://chawan.net/gallery/index.html" rel="nofollow">https://chawan.net/gallery/index.html</a><p>[1]: <a href="https://nim-lang.org" rel="nofollow">https://nim-lang.org</a>
Show HN: Chawan TUI web browser
A terminal-based web browser in Nim.[1] Has acceptable (YMMV) CSS
rendering, some JS support, and inline images (sixel/kitty). It can
also use various protocols other than http(s) such as (s)ftp, gopher,
gemini, ...<p>Chawan started out as a w3m clone, and the UI still resembles it.
However, the architecture has turned out quite different, with pages
loaded in separate processes, and protocol/file type handling separated
out into external binaries. An interesting result is that you can even
register decoders for custom inline image formats, although practical
use cases of this are rather minimal.<p>There is a gallery showcasing some websites being rendered here:
<a href="https://chawan.net/gallery/index.html" rel="nofollow">https://chawan.net/gallery/index.html</a><p>[1]: <a href="https://nim-lang.org" rel="nofollow">https://nim-lang.org</a>
Show HN: Seastar – Build and dependency manager for C/C++ with Cargo's features
Hi hackers!<p>I'm a self-taught solo teenage dev working on Seastar, a unified build system and dependency manager for C and C++. It is capable of compiling and linking projects, managing recursive dependencies and headers, and even has a template system -- your C++ library is one `seastar new mylib --lang c++ --lib` away! Also, everything is configured in TOML, because TOML is awesome.<p>C is one of my favorite languages, but I usually end up writing stuff in Rust because I love Cargo. Unlike C, Cargo handles the dependencies, linking, globbing, and so much more for you. So I wrote Seastar to give that function in C and C++.<p>What's planned? A package registry like crates.io, compatibility with CMake projects, commands to migrate, and so much more. If you have more ideas, please give them!<p>I am trying to reach 150 stars by the end of summer, and thus a star would be greatly appreciated! This project is still in development, and a star helps out a ton.
Show HN: Seastar – Build and dependency manager for C/C++ with Cargo's features
Hi hackers!<p>I'm a self-taught solo teenage dev working on Seastar, a unified build system and dependency manager for C and C++. It is capable of compiling and linking projects, managing recursive dependencies and headers, and even has a template system -- your C++ library is one `seastar new mylib --lang c++ --lib` away! Also, everything is configured in TOML, because TOML is awesome.<p>C is one of my favorite languages, but I usually end up writing stuff in Rust because I love Cargo. Unlike C, Cargo handles the dependencies, linking, globbing, and so much more for you. So I wrote Seastar to give that function in C and C++.<p>What's planned? A package registry like crates.io, compatibility with CMake projects, commands to migrate, and so much more. If you have more ideas, please give them!<p>I am trying to reach 150 stars by the end of summer, and thus a star would be greatly appreciated! This project is still in development, and a star helps out a ton.
Show HN: Tikt.com – Remove the "OK" from TikTok URL's to Download as MP3 or MP4
Show HN: Tikt.com – Remove the "OK" from TikTok URL's to Download as MP3 or MP4
Show HN: Meow – An Image File Format I made because PNGs and JPEGs suck for AI
One of the biggest context AI LLMs can get from images is their metadata, but it's extremely underutilized. and while PNG and JPEG both offer metadata, it gets stripped way too easily when sharing and is extremely limited for AI based workflows and offer minimal metadata entries for things that are actually useful. Plus, these formats are ancient (1995 and 1992) - it's about time we get an upgrade for our AI era.
Meet MEOW (Metadata-Encoded Optimized Webfile) - an Open Source Image file format which is basically PNG on steroids and what I also like to call the purr-fect file format.<p>Instead of storing metadata alongside the image where it can be lost, MEOW ENCODES it directly inside the image pixels using LSB steganography - hiding data in the least significant bits where your eyes can't tell the difference, this also doesn't increase the image size significantly. So if you use any form of lossless compression, it stays.<p>What I noticed was, Most "innovative" image file formats died because of lack of adoption, but MEOW is completely CROSS COMPATIBLE WITH PNGs You can quite literally rename a .MEOW file to a .PNG and open it in a normal image viewer.<p>Here's what gets baked right into every pixel:<p>- Edge Detection Maps - pre-computed boundaries so AI doesn't waste time figuring out where objects start and end.<p>- Texture Analysis Data - surface patterns, roughness, material properties already mapped out.<p>- Complexity Scores - tells AI models how much processing power different regions need.<p>- Attention Weight Maps - highlights where models should focus their compute (like faces, text, important objects)<p>- Object Relationship Data - spatial connections between detected elements.<p>- Future Proofing Space - reserved bits for whatever AI wants to add (or comments for training LORAs or labelling)<p>Of course, all of these are editable and configurable while surviving compression, sharing, even screenshot-and-repost cycles :p<p>When you convert ANY image format to .meow, it automatically generates most AI-specific features and data from what it sees in the image, which makes it work way better.<p>Would love thoughts, suggestions or ideas you all have for it :)