Live data from Hacker News

Ask HN: What are some tools / libraries you built yourself?

news.ycombinator.com

251–260 of 617 posts

Re: Ask HN: What are some tools / libraries you built yourself?

#251
For an issue tracker in Go I built a handful of reusable bits that I keep at https://code.soquee.net/ including a HOTP/TOTP multi-factor authentication library, something to "source" .env files, a library for building migration tools with Postgres and yet another HTTP router/multiplexer.

I also work on an XMPP library and related tools that has spawned other libraries for handling XML streams (basically duplicating all the functions in the io package but for XML tokens instead of bytes), a SASL authentication implementation, etc. https://mellium.im/

I have a ton more, but these are the two collections I more or less keep up to date and use the most.

To give an example of why I wasn't satisfied with the existing things, let's look at the library for migrations: prior to writing it I was using Diesel, but it didn't exist in many package repos and took literally hours to build on pretty good hardware (Rust is garbage in terms of build time, as much as I enjoy the language I almost never use it for this reason), and it had atrocious errors to the point that I'd call them bugs (I would frequently have errors that would spam the terminal with pages and pages of parenthesis, I'm sure they've fixed this, but at the time it was annoying). The various migration tools written in Go had similar problems so if I handed my nice single-binary application to someone to deploy on their own server I'd also have to hand them a zip file full of migrations and they'd have to figure out how to install a tool. Instead I wanted the binary to embed and be able to run its own migrations, so I wrote the library.

For the 2FA library it was a similar story: all the existing ones I could find had the abstraction wrong, they just did TOTP or HOTP and didn't seem to realize that they were the same thing just with a different "ticker" function. Having a simple 2FA implementation where you could create a token and pass in a custom ticker (or of course the package would have the TOTP one pre-defined) just "made sense". Also, the others I evaluated weren't tested very well. I wanted at least a handful of tests to make sure the tokens weren't going to break the next time I made an update.

Finally, for the HTTP router/multiplexer I wanted to be able to get the routes back out and match them to the URL components that matched various wildcards so that I could do easy normalization. Eg. if you had the route /u/{username string} and the URL /u/Me matched it, I wanted to be able to automatically redirect to /u/me. Most routers I tried didn't provide you enough information to do this (eg. if you had the path /user/User and you just did a naive find/replace that was more complicated than lowercasing, you'd accidentally change both when the route was /user/{string} so the first one shouldn't change). I also wanted typed route parameters to avoid the boilerplate of converting in my handlers every single time, and I wanted it to not have any ambiguous routes (eg. if I register /user/me and /user/{user string}, and the user creates a new account with the username "me" then should /user/me trigger the static route or the user page?). To fix all this I came up with the route syntax I've been using in these examples and made a muxer for it.

Re: Ask HN: What are some tools / libraries you built yourself?

#252
While building userTrack[0] I always encountered the need of various auxiliary tools. I had to implement a custom deploy system to build different variants of the product, to create a licensing server (to create and verify license codes and to allow downloads for valid license owners), a blogging platform[1], some JS snippets [2], etc.

Most of the times, the libraries/tools that you build yourself are either to connect and interact with a specific external service OR to have a simpler (only the features you need) or cheaper version of an existing product/platform.

[0]: https://www.usertrack.net/

[1]: https://github.com/Cristy94/markdown-blog

[2]: https://github.com/Cristy94/dynamic-listener

Re: Ask HN: What are some tools / libraries you built yourself?

#253

• https://webhook.site - for testing webhooks, evolved into a SaaS for building workflows from http requests and emails • https://instadj.com - simple app for making youtube playlists, wanted a simple app for playing music at parties (example: https://instadj.com/wam ) Both are open source.

Instadj looks great!

Tangent, but: I was dabbling with a YouTube webapp a while back, and ran into a problem where some of the music videos had a license that didn’t allow embedding - which was obviously necessity to play within my page. (Also at the time the api didn’t succeed in filtering out such videos within a search - tho I’ve not checked back to see if this is now fixed.)

Did you encounter this, and circumvent or fix it?

Re: Ask HN: What are some tools / libraries you built yourself?

#254

Last year I built Recut[0], a native Mac app that helps speed up video editing by automating the rough-cut process. It finds silence, gaps, and pauses and removes them, creating a cut list that you can import into editors like ScreenFlow, Final Cut, Premiere and Resolve. Here’s the Show HN [1] from a couple months ago. I built it because I was making screencasts and cutting out silence + mistakes was 90% of my editin…

Genius. You need to find a way to market to the right audience and up your price to $79 or something. The current price seems too low for all the time it saves (if I'm a serious vlogger).

I'll definitely check it out (and maybe purchase it before your price increase, haha).

Re: Ask HN: What are some tools / libraries you built yourself?

#255
I built commandeer, a library for seamlessly exposing python functions as command line calls.

https://commandeer.readthedocs.io/en/latest/

I was fed up with having to build the nth argparse parser and instead used my already existing python functions to create the cli for me.

Re: Ask HN: What are some tools / libraries you built yourself?

#256

I built a safe PostgreSQL driver for node from scratch with zero dependencies in about 1200 lines. I did this mostly because of the plumbing required to make the goto node driver tolerable to work with. In the process I made it 4-5 times faster as well. https://github.com/porsager/postgres

Very nice! I'd ditch pg-promise in a heartbeat for something simpler. I kinda dislike the tagged template literal helpers magic. I'd be more comfortable with explicit references to substituted arguments.

Though it seems like I can just use the unsafe api all the time for that.

The rest of the API is very nice, .stream, .cursor, notify support, all that.

Re: Ask HN: What are some tools / libraries you built yourself?

#257
I along with one or two others wrote a python toolkit for Palo Alto firewalls on top of their `pan-python` library. It abstracted all the XML API crap into pure python, and made it a lot easier for our team to do audit and compliance stuff on firewall security policy. Super helpful. To hell with XML! Unfortunately, my former employer had an old-school approach to open source (aka don't use it or contribute to it).

I may out myself to any potential former coworkers here, but oh well. I'm proud of it.

Re: Ask HN: What are some tools / libraries you built yourself?

#259
A couple of years ago, I built http://www.genewarrior.com

It's a suite of tools to work with DNA sequences (from simple tasks such as reverse complement to medium complex tasks such as multiple sequence alignments and primer design).

I built it because I wasn't very happy with the existing tools. It never got very popular, but after all these years I still think it's a very useful tool.

Re: Ask HN: What are some tools / libraries you built yourself?

#260
I built an app to design and print labels on thermal, inkjet and laser printers. It’s built with electron and it uses a handful of native modules to communicate with windows/mac usb devices. That way, a user can literally download my app, plug-in their printer, and start printing. Works great with zebra, ROLLO, and color inkjet label printers like Primera/Epson.

I’m trying to figure out how to market my app as a tool for desktop dynamic image generation. My app is kind of like bannerbear but for the desktop. For example, you can import a XLS or CSV and batch generate images from the data. That’s the essence of my app. It just so happens that “printing labels” is the marketable niche.

I’m selling licenses using a custom system I built using stripe/JWT and even do a subscription with expirations. It’s been a blast.

Revenue from MRR is in the thousands and one-time licensing sales is 6 figures. I couldn’t have built this without the awesome OSS JS community.

You can download my app here: https://label.live

Post reply on HN