HNHacker News
TopNewBestAskShowJobs

GSGBen

261 karma · joined January 26, 2020

https://twitter.com/GSGBen
submissionscomments
GSGBen··on Show HN: unsafehttp – tiny web server from scratch in C, running on an orange pi
Ah yep, I read about the TCP RST problem in one of the RFC docs, then promptly forgot about it and never implemented anything to avoid it. Thankyou for the detailed notes.
GSGBen··on Show HN: unsafehttp – tiny web server from scratch in C, running on an orange pi
Noice!
GSGBen··on Show HN: unsafehttp – tiny web server from scratch in C, running on an orange pi
Oof, thanks.
GSGBen··on Show HN: unsafehttp – tiny web server from scratch in C, running on an orange pi
Should be back up now with a very temporary workaround in place.
GSGBen··on Show HN: unsafehttp – tiny web server from scratch in C, running on an orange pi
Still seems to have an issue, but no output before the crash. Will have to do some more debugging. Thanks for the test HN!

Source is here btw: https://github.com/GSGBen/unsafehttp/blob/main/src/main.c

GSGBen··on Show HN: unsafehttp – tiny web server from scratch in C, running on an orange pi
Found the issue - a use after free in send_response() if I close the session early due to an error. Was continuing to the next bit. Put a temp fix in place, will push a proper one later.
GSGBen··on Show HN: unsafehttp – tiny web server from scratch in C, running on an orange pi
Whoops, should be back up now. I'll have to check logs later to see why it went down.
GSGBen··on Show HN: The demo of my game that uses GOAP and Utility AI is out
(continued)

Other tips: I still had issues going too granular with GOAP actions at the start, so I recommend keeping your actions as coarse as possible. It's still a tool that you use with your AI designer hat on, it doesn't do everything on its own. But the power of being able to throw in a new goal, maybe one new action, and have the existing actions solve all the other prerequisites, is amazing. Defining world properties and states is a muuuuuuch lower mental load than using utilities for actions.

I wrote it all with performance in mind, and it seems to run fine. Basically lots of caching (each world property is only evaluated once per AI per tick then re-used, shared values are cached for all then re-used, etc); eliminating invalid paths early; and searching backwards from the goal instead of forwards from the current world state. I test with 4 AI players on an old i3 laptop processor from ~2016 without issue.

GSGBen··on Windows XP 2024 Edition is everything I want from a new OS
hmailserver is the replacement you want for this.
GSGBen··on Show HN: Send me an IRL message and watch it arrive
Hey thanks, this was a good catch. `--shutter 12000` fixes the screen, and is bright but not too bright.
GSGBen··on Show HN: Send me an IRL message and watch it arrive
Update 2: The servo's gears are absolutely grinding at the moment
GSGBen··on Show HN: Send me an IRL message and watch it arrive
Haha nope!
GSGBen··on Show HN: Send me an IRL message and watch it arrive
Hey, thanks! I was thinking about game ideas while stepping into the shower one day (where all great ideas are born), and "throwing people in a first-person view might be fun?" came across my mind. I mentally fleshed it out a bit, and wrote it down. When the idea I was already working on turned out to not be fun, I shelved that and started working on this instead. When I prototyped the basic throw feel and it already felt fun, I decided to run with it.
GSGBen··on Royal Mail to Issue “Terry Pratchett’s Discworld” Stamps
I started with The City Watch series, and it felt like a great introduction.
GSGBen··on GCP CloudSQL Vulnerability Leads to Internal Container Access and Data Exposure
Not sure if this is still true RE: Azure. AFAIK they use Hyper-V (hypervisor) containers which offer kernel isolation like other lightweight-VM-container runtimes.
GSGBen··on Microsoft to support Windows 11 on M1 and M2 Macs through Parallels partnership
Even more surprising: it's written in C#
GSGBen··on Ask HN: Just got a brand new server, what do I do first?
Not sure what the first thing you should do is, but the second is set up and test backups!
GSGBen··on Tailscale bug allowed a person to share nodes from other tailnets without auth
Isn't it more likely that this would have unfound vulnerabilities in it, and you'd still need to have this open to the internet to get similar benefits to Tailscale proper?
GSGBen··on PwshPaint: A pixel art editor for the terminal in PowerShell
Damn, and I thought I loved powershell. This is awesome.

Another of the author's projects sits solidly between awesome and terrifying: https://github.com/ShaunLawrie/PwshRayTracer

> A very slow raytracer in PowerShell that has been optimised from ~100 camera rays traced per second to 4000 rays per second on a 4GHz 6 core CPU with a few tricks

> Because I've been learning a bit of serverless stuff I was curious as to how much faster I could run this using PowerShell in a webscale™ setup by distributing the processing over as many concurrently running lambdas as I could get in my AWS account:

> By using Lambda with large memory sizes to get more cores I had >250,000 camera rays per second (~62x my laptop speed) but I managed to rack up a $200 bill over a couple of bad runs

GSGBen··on Obsidian 1.0 – Personal knowledge base app
Awesome, I've been waiting for proper tab support.

A tip that people on HN will probably enjoy: add --disable-smooth-scrolling to your shortcut to make scrolling more responsive.

GSGBen··on First make the change easy, then make the easy change (2021)
Question for everyone: do you refactor in a separate pull/merge request, or just a separate commit within the same pull/merge request?
GSGBen··on My productivity system
I used to use Trello for my entire personal KB, but the description editor grows unwieldy with large cards and you only get a few levels of nesting. It's still great software.

It took a few times to stick, but I've now fallen in love with Obsidian and am migrating everything except a large project's task-tracking system to it. The WYSIWYG editor, fully nested hierarchy and fast full-text search is fantastic and makes it better for my personal documentation.

I'm extending my Trello backup project to make the migration easier. Take a look if you're considering the same move. https://github.com/GSGBen/t2md

GSGBen··on Show HN: Python-automated lightweight BGP lab in GNS3
After I laid out this topology I didn't want to manually address it, so I set about automating the entire lifecycle. This ended up taking way longer than manually doing it but was more fun and is now much easier to reset!
GSGBen··on Quick Tip: Enable Touch ID for Sudo (2020)
The full article is a good read too. Such a great writing style.
GSGBen··on The case for LineageOS and the PinePhone
I think this is just the classic problem of two engineers talking past each other. I think by "general purpose computing devices" the other poster means "general-*use* computing devices".
GSGBen··on Unreal vs. Unity Opinion
Agree. I was so happy when I heard they were introducing an intermediate language and so disappointed when I found out it was custom.

I'm back to being quietly hopeful though:

- Epic ships games and has internal game developers. They're probably not going to create something too dynamic or untyped that has issues scaling. - I was worried about coverage but then realised all of BP is generated from code annotations using the unreal header tool, and they've already done it for Python (I think? maybe just editor functions).

If it's just a textual replacement of blueprint that will be enough to make me so much more productive for gameplay programming.

Might be more likely it'll be used for player-generated-content and their metaverse push ala roblox though.

GSGBen··on Unreal vs. Unity Opinion
What's the standard compile time for a short iteration in Unity's C#?

I use C++ in UE4 as much as possible and even the iterative compile time with LiveLink breaks my iteration flow. BP is great for iteration but I keep as much in C++ as possible and this has made things much easier to maintain. At the moment I'm trying to prototype in BP then move completed stuff to C++.

GSGBen··on Maestral – open-source Dropbox client
I tried out Google Drive on Windows years ago when I was already using Dropbox, but its performance was terrible. It might be better now. To fix sync I had to reinstall and resync, I couldn't just point it at an existing folder with the files I had. I've used various incarnations of onedrive and it also doesn't hold up to Dropbox's performance.

My main use case is all my audio recordings from my DAW - each take generates a small .wav and .reapeaks file. I use this as my live working folder - I read and write into my Dropbox folder while it's syncing.

These add up (more count- than total-size- wise). I currently have 378k files, 23k folders, 754 GB and Dropbox is the only client that hasn't skipped a beat with it (even before they rewrote it in rust - it used to be python???? insane). It runs well on a 10-year-old CPU and even ran well before I moved it to an SSD.

It's not perfect - onedrive keeps infinite document history, Dropbox a max of a year - but for anyone looking for sync performance I'd suggest looking at Dropbox first.

GSGBen··on Bashing the Bash – Replacing Shell Scripts with Python (2017)
> I was hoping someone finally had a library or something to make python good at the things shell does well (mostly, running stuff and piping output around). If only.

Good news, they did! Even better news: it doesn't require python, it's cross platform, and supports an easy-to-read verbose style for scripts but a quick-to-write terse style for interactive usage. It's an absolute joy to use for nested data structures, everything is an object and it has full native tab completion.

Unfortunately it came out of Microsoft so a lot of people haven't given it the time of day yet. It's honestly one of the joys of modern CLI usage though.

GSGBen··on How our free plan stays free
A generally available version of this would be a killer feature.
Page 1 of 3Next →