16
votes
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
I’m working on an alternate lint tool for Deno projects. Deno has a lint tool, but it checks one file at a time, so it can’t determine whether an exported symbol is dead code. That requires whole-program analysis.
I’m using the ts-morph library, which wraps the official TypeScript library and I can use the same version that Deno uses. However, Deno’s import resolution is rather different from Node.js. It has its own config file and lock file. Deno maintains its own global cache directory of downloaded JSR and npm packages. Deno’s import resolution is written in Rust and I’m reimplementing it in TypeScript. It’s been fun figuring out how that really works.
A little toy touchscreen visualization of prime factors and the Sieve of Eratosthenes for my kids.
https://merveilles.town/@akkartik/116451313772306971
Continuing FreeCAD learning (using MangoJelly's tutorials among others) and I'm starting to get much more "muscle memory" with using the program now. A lot of simple actions one needs to take now feel like second nature to me- I don't even have to actively think about them. So I'm noticing my skill improvements tangibly! It's very fulfilling to be able to see that happen. Still a beginner but now it's taking a bit less time to go from imagining something I want to make and having the first prototype ready to print
3D printed an enclosure for small USB sticks that are USB fan voltage controllers/potentiometers. Tried Sunlu PLA (transparent) for the first time and am very satisfied with their filaments (and their dryer).
Now, printing someone else's existing design for knobs for those potentiometers since I want a lower profile knob for them
I achieved a 20-30° C average decrease in my CPU temps... by having my heatsink actually make contact with my CPU.
I switched to my current CPU cooler an embarrassing amount of time ago. I remember thinking that my PC sounded really loud, but I didn't really think much of it. Months later, I got around to checking my CPU temps which were hovering around 70-80°C when web browsing.
Seeing components I've bought years ago sell for 2-5x what I paid for them got my head out of my ass for long enough to order new thermal paste, and reinstall my cooler. I'm pretty sure I didn't tighten the screws to spec the first time, and now I'm seeing dramatically cooler temps and less fan noise.
This is all in the effort of getting my PC to run cooler, to minimize the chance of a component failure before PC prices return back to earth.
So, turns out dynamically loading a C++ library in Rust, in a cross-platform way, is hard. Who knew?
I depend on a third-party C++ library and was hoping to get updates for it on the fly by just loading the latest version on start-up. Not the most feasible apparently.
Android's mostly at fault for this one because apps cannot ergonomically inspect their own APKs in order to fetch an
.soand load it. A workaround I saw was downloading it to the user's internal storage and load it from there but it feels dirty and I don't like it.At the same time, the prospect of shipping my app to the web as a WASM bundle got more and more intriguing, and I'm not sure how dynamic loading looks in there but it's definitely not pretty.
So now I'm doing static linking, with all its benefits and drawbacks. My main concern is this library getting out of date before I can push an update (ideally we stay on the same versions for full cross-compatibility with another software that uses this library) but I'll figure out a strategy.
For a long time I've been curios about using unikernels. It is a neat concept. You essentially build a self contained app that can boot on an x86_64 processor. There is no OS, instead the application boots via a small harness that only contains the bare essentials. This is great from a security perspective! Even if your app has some sequrity flaw there's very little an attacker can do (unless you've done something exceedingly weird). They can't escape to a shell. The attack surface is much smaller.
So today I made my first foray into the wonderful land of qemu+rusty hermit to compile a tiny http server that just responds with a "hello". Quite a bit of config involved in setting up the rust stuff and how it should link to rusty hermit to build the app. What features need to be set and a bunch of small things. But, now it runs and the output (straight from my terminal):
Is this the same fundamental idea as distroless docker images? Obviously a qemu binary isn't the same as a docker image that needs the host kernel, but similar? You said it is good for security, which makes sense, but does it also provide a possible benefit for performance if the application can basically replace the kernel with optimized code paths?
A distrioless Docker image still runs with the same kernel as the Docker host. So if you know of a vulnerability in the kernel you could exploit it to get access to the host. With respect to performance I suspect you might be right. Since there is no kernel there's less switching between execution contexts etc. So it seems likely it could be faster. But, that said, as always with performance actually testing and measuring is the way to go. It might be that the hardware interactions that the kernel usually mitigates is crucial for the performance and the kernels implementation is super optimized already. Also if your mostly just executing computations then I suspect it won't make a difference (as long as your process has priority).
THE SERVER MUST GROW!
but yeah i'm at the point where I have all the parts, but I'm still confused about a few configuration things.
I went for cosmos cloud because it's basically a reverse proxy package with sane defaults that tries to be closer to turnkey so you don't blow your own foot off. I've got https up and working and it's been online for months now, but since i've got my NAS configured i'd like to do a final pass, maybe move the server to headless, and solve one problem....i can't connect locally.
With https enabled local connections bounce because they don't have certs and there's some additional struggles because the server is on its own DMZish vlan, so it seems like ubiquiti's local dns doesn't work (although i've seen it fail on the same vlan...so ??). That part is minor because I can just hit the IP, but it rejects the traffic.
I'm...unsure of best practices to solve this. The whole point was to try and keep things secure, but I don't fully understand the whole cert process so i'm not sure if i should just whitelist an address, do self signed certs, host something, or what.
Difficult issue to research since cosmos is a small project. Obviously i can find about a million articles on hosting your own reverse proxy, but finding the details I need has been harder than I hopped, especially since "oh just whitelist http traffic" or something like that seems wrong, but maybe is correct and I can't ask a doc for context.
If you have a domain name (not a .local) or want to sign a public IP address then Let's Encrypt is definitely the way to go:
https://letsencrypt.org/2025/07/01/issuing-our-first-ip-address-certificate
If it's a private IP address then this page has a few ideas:
https://old.reddit.com/r/selfhosted/comments/1fxaaza/ssl_with_local_ip_addresses/
Or just use SSH or VPN layer for security and use http
So this is where I get confused. It seems silly if i'm at home to route traffic to my router, out to the web, back to the router, and then to the server. With that in mind
I have a domain with lets encrypt. It has been working. It is how i currently access everything, even when local using the silly loop I just explained (which also comes with small limitations and is in theory wasting my bandwidth)
I do have a VPN for external as well (for smaller rare use cases), but its not the external traffic that's the problem, its the local traffic.
If i'm on my main computer, it's on VLAN A. The server is on VLAN B and only accepting Https.
I'm not sure how to handle that case, and what the best practice for that case is.
Let’s Encrypt doesn't care how you route to the server, only that the domain name in the browser matches the domain name on the certificate.
So one strategy for this is to use split-horizon DNS where you configure the DNS on each client to point to the private address when in your local network and the public address when outside your local network.
Let's Encrypt needs that public routing to verify you own the domain but after that you could copy the certificate to another machine and it would still be valid until it expires.
You will need to ensure VLAN A can talk to VLAN B on the specific port the server uses (443?) but as long as this is simply inter-VLAN routing and not crossing a NAT boundary then there should be no problem with this.
That kinda helps narrow things down, but it leads me back to thinking its a Cosmos Cloud thing.
Connecting locally from one VLAN to another gives
As this all sorta comes back to me, that of course reads quite clearly saying that the server itself, via cosmos, is ONLY allowing connections from domain.
So this is where I kinda hit my wall as I have found a few things that should help in both documentation and configuration, however odd behavior and unfamiliarity have kept this a dead end so far.
There is an option to enable http access via local ips, but it mentions you can already make ip:port urls for your apps, its just that this forces them to be http only.
Okay, lets make a local URL for jellyfin. No idea what i'm doing here, and I generally wind up making a few things that it accepts, but never work.
The doc's unfortunately seem to assume you know what you're doing https://cosmos-cloud.io/docs/urls/ so im still futzing around and asking questions to see if I can figure out what part of this puzzle im missing, and what the actual proper method for doing this is.
Edit-
And going through old notes and chat i had .local domains SORTA working (as there is an option to enable that which i have on) buuuut never consistently, and I've seen others struggle with it, so still trying to figure out alternatives and how to properly route to a host IP without possibly killing the whole thing
Edit 2:
miiiight have finally gotten the right combo of local host ip and path prefix settings to get some basic stuff working. Will have to keep poking and see if this lasts. Still very "in the dark" as to what the hell is actually going on under the hood between my ubiquiti router and my cosmos instance, and trying to figure out how exactly it determines where to route the traffic, and how I can better see that to debug on my own.
Digging through logs of course helps but god does it feel like there should be a cleaner way sometimes.
Edit 3:
Okay...I think I have A valid config.
I still need to confirm that, and have so far confirmed that turning off the insecure access via local IP leads to an odd situation in which cosmos claims the URL is live, but attempting to access gives 404 not found white page
Edit 4:
annnnnnnnd the fun part. Deleted the new url, tried recreating it with exact same steps, failure this time. Guess its back to the log mines to see what about the config was working and what's different and if there's just some time lag or what.
Final edit:
So just to poke the bear I tried doing a curl request.
http://ip/app
404 page not found
https://ip/app
SEC_E_UNTRUSTED_ROOT etc..
Sooo yeah. Best guess is that changes take some time to flow through the system and in screwing around I juked it into some invalid state. I'll just blow away the new url, revert the config, and try again later.
be sure to curl with the host header:
curl -H 'Host: www.example.net' http://ip/path/
If you don't want to roll your own DNS or certificates you can add host entries in /etc/hosts
I've been working on my server, which recently has been..... Painful to say the least. The bane in my side recently has been local HTTPS. Currently using Netbird on an outside VPS for outside access, and I tried self-signing certs and netbird's own version of local HTTPS, which worked for my local devices, but didn't work on my phone no matter what I tried. I've since switched to using a Cloudflare API to request SSL certificates from NPM through Let's Encrypt which I believe to be the better long-term solution once I get it working. Since switching, however, I still haven't been able to securely access services through the subdomains I've set up.
Now my biggest hurdle is one that I've tackled in the past, but don't remember what I did to resolve it: Pocket-ID on Firefox Linux. Whenever I try to setup a passkey, it prompts the browser for a hardware key, which I don't have. I'm not able to have the password manager come up at all to store a new passkey, or anything like that. Been scratching my head a bit in trying to come up with what I think should be an easy and straightforward solution
my funky lil notepad is going well, put a decent amount of mileage into it and been exploring the ergonomics a bit. the biggest thing so far has been the lack of an undo system but im still organizing my thoughts on how i want to approach that / being lazy. especially since i can just continue to do snapshot backups and not really lose much?
had a friend try it out and they found it quite fun which was nice, it did point out how i needed to visualize some things. in the clip below, there's a little gray box that shows up once i start typing. thats actually the "start of the line" and it gets set when you click or arrowkey around, but NOT as you type. when you hit return, we use that as the place to return to, and then we go down a cell. but it gets confusing when its not depicted and you correct a typo by arrowkeying back, because now your return has a huuuge indent.
maybe theres a better way to acheive that behaviour but so far this has been the most pragmatic approach, and im okay with there being a little teething adjustment while people go from linear editors to my funky new canvas system.
it being overtype is another big upfront diference. rewording something in the middle of a tight block of text is sometimes a bit fiddly, but i was always the kind of person that would delete 2 good words because i noticed the 3rd was typo'd so that feels about on par, especially for a v0.1
it was also kind of funny to realise how many different shortcuts i use in different edcecases. home, end, shift+home, ctrl+left, ctrl+shift+right... im slowly gonna add those in as i get a feel for how those translate to this canvas editor that has the concept of box selections and such. it would be really nice if i could be as dexterous at making selections on the keyboard as you can be with the mouse.
and then yesterday i got nerdsniped by realising i could have some fun with these https://en.wikipedia.org/wiki/Box-drawing_characters and make a sorta charmap popup, or have actual box drawing tools like paint.. but text
clip of notepad:
https://streamable.com/uk25z1
cleaned up my VPS, too many idle supabase instances caused a slow down.
And I wanted to make some reels/write somethign about Luna (the space sim I am working on)
Luna has been getting 2-3k viewers daily. It's great to see. Tons of feature requests are coming in.
Well I've looked into options to optimize my video creation. Only to build my own Recording tool with NextJS and Remotion (which is incredibly cool)
It's also a learning experience for me. I am working with AI Agents, but I haven't added my own MCP server to a tool yet. And I wanted to toy around more and more with it, since I think I should share more info on that. Well. It's incredibly fun. And now Claude code can also use the tool I built.
I also added an AI feature (openrouters free models) to Luna, where people can describe solar systems, and get them generated - I figured that might be more intuitive than letting people edit JSON manually. I'm still thinking about an interactive generation, and how people can actually learn with it, instead of just being fascinated by it...
Hi... is Luna - Free Browser Space Simulator | Online Gravity & Solar System Sandbox yours?
Yes! Why?
Oh I find it very interesting, thanks for putting that out there for public to look at.
Sorry for the very late response.