Paan's cave

Thoughts about tech & life


Beyond 1.1

I’ve not been posting anything on Linkstash for some time now. But that isn’t to say that nothing has been happening on the project right now, I’ve been using it every day as my main bookmark manager and got a few ideas in mind.

However, my tendencies to go down rabbit holes have been stopping any real tangible output. Here are some thing that I had in the back burner in various stages of completeness and reasonableness.

Stuff keeping me occupied

Stuff 1

I didn’t like that I have to relogin into the app all the time, that’s because I wasn’t using a refresh token to keep the auth alive. What would a perfectly reasonable product manager do when faced with such a clear user need that is missing from the product?

Well yes, of course I looked at it and said, well I should carve out the login section from Linkstash, and create a whole new standalone, auth provider, using a completely different language, handling both authentication and authorization and full audit coverage. And I was this close to spinning off that project to create standalone pluggable crypto library.

That is obviously too ambitious given the time that I even have to spend on it. The project is still chugging along, I work on it every now and then. I think I’m on my second rewrite of the provider architecture so that I can have extensible modules that people can extend to add process to run into the login flow.

I swear this is the last refactor, pinky promise!
I swear this is the last refactor, pinky promise!

I swear this is the last refactor, pinky promise!

If it sounds like it’s straight from a fevered dream about everything you hate about enterprise OOP, well that’s probably because it is.

If that’s the only thing that kept me busy, I might’ve had time to step back and maybe spend an afternoon just implement refresh token in Linkstash. There’s an example right there in Loopback’s documentation.

Stuff 2

But I also have been doing other stuff.

I have started to skim over chapters in Robert Nystrom’s Crafting Interpreters. I’ve caught the programming languages bug, you might say.

I have always had a fascination about programming language creators. They seem to be unreasonably wise wizard that can conjure magic, taking in syntax and converting them into runnable programs. All the fascinating things that the programmers are doing are nothing but using magical devices created by the actual wizards that are programming language creator.

I browse /r/programminglanguages in awe as I get to peek around the curtain of what these wise wizards are saying amongst themselves. Gandalf is having problem with his lexing and Sauruman suggested a solution and they both runs off into the sunset to craft more magical implements.

But the book Crafting Interpreters lets me dream that I, too, might be able to wield the magic of the ancient wizards. And so I gave it a try. I started with something simple, not a full language, just expressions that resolves to a value. Those expressions are read from a external script and parsed at run time to get the values, cool stuff.

I’m proud to say that I didn’t go crazy and create a full language around my toy expression parser. What I did instead was create a tactical combat game, and every entity in the game is defined by the user and all actions are described using expressions.

Crafting interpreters
Crafting interpreters

Crafting interpreters

My little tactical RPG sandbox
My little tactical RPG sandbox

My little tactical RPG sandbox

It was really fun, user define what each entity can do and how their attack resolve. With a fully free form entity properties system to even define what an entity is. That took a chunk of my time.

I also got a new job. And I guess I have to go to said job, so that also took up some time.

Plans for Linkstash

Those side quests are all fun and games, but seriously though, I did think quite a bit about what I want to do with Linkstash.

Technical changes

  1. Thinner frontend

    I kind of dislike the current state of web development. Huge NPM dependency graph and these megabytes worth of downloads before the first thing even drawn on screen. I’m guilty of that as well. NextJs is overkill for what Linkstash is doing. I want to take nextjs out of Linkstash and just do simpler html with some sort of templating language. There is like 3 pages in Linkstash, I could do without a lot of things.

  2. Thinner backend

    Loopback was great at the point in time that I started Linkstash. I needed to get familiar with these Springboot style DI framework and loopback was just the thing. But this is again too big for what I needed to do. What I really want to do is go down the rabbit hole of creating my own http server to serve the backend, but more realistically is just getting more lean, with maybe some sort of custom express based solution

These are all fine and dandy, but feel a bit self indulgence as they are all just my own technical curiosity. This is a bookmarking app, there isn’t too much that I feel you want or need in it.

But I must admit that looking at other bookmarking app, I probably have fewer things I’m looking for in it than most.

Bookmark features

But I do have a few things in mind.

  1. Website screenshot

    I used to think that this is just a fancy thing that is nice to put on your website hero banner but not really useful. But I think I starting to come around on this. When browsing through a long list of bookmark, having a visual reference is really helpful to find the thing you need.

    I will be using an external service that does it rather than having to have the whole thing in Linkstash. Gotenberg seems like a good fit. Along with website screenshot, being able to have the bookmarks shown in card view seems to go hand in hand with that. I’m not totally convinced on that part yet, but I think it’s worth having a toggle for it.

  2. More archive format.

    Using Gotenberg has got me thinking about various other archiving format. The readable copy works well for articles, which is what I use Linkstash a lot for. But some sites are really visual, being able to do a pdf copy preserving the formatting would really help.

Those are the major stuff, I have some other stuff on my personal wishlist. I personally really like to be able to do all kinds of search and filter on my bookmark list, so expect more search and filtering options, cause that’s my jam.

But all these are of course contingent on me not running down another technical rabbit hole for a few months.

AI and the future of software

AI is everywhere, everyone has an opinion on it and it’s really divisive. Here’s mine, with an emphasis on how it affect Linkstash.

Free/open source software landscape is changing, little personal app like Linkstash is going out of fashion. No one needs my specific take on bookmarking app if you can prompt one out exactly like you like it in a few hours.

That is fine, I never was in it to be popular, just to share a piece of me and my creation to whoever that wants to care.

Using AI to build software. There’s way too many aspect of this to even discuss. Legal, moral, technical, environmental, economical etc etc, I won’t get into any of those. For Linkstash, I already have some stuff that I use AI for:

  • it helped me with some of the problems github actions
  • bash scripts for the Docker entry points
  • I used it a lot with the README.
  • there’s some arcane regex that I needed help with
  • probably a bunch of other stuff I don’t remember.

If you are anti AI then, I’m sorry that this isn’t a fully organic, free range handcrafted software, you are free to not use this. But most of the actual code, I wrote myself.

Not because of some moral stance, but mostly because I did this to learn web development, and I like doing this, it’s my hobby. So asking the AI to do it would just defeat the point. But wrangling github action to get a build deploy is no fun and I let the robot loose on it to solve it for me. That’s my take on all of this, I am utilitarian on this, if it makes sense I will use it.

I do have one thing that I am really anti AI on, and that is any sort of human interaction. A pull request description/discussion or a question in the discussion should always be written by the human behind it. Pasting an AI response to another human is disrespectful, and super rude. Don’t do that.

Anyways, that’s it. It’s a bit of a ramble. I just wanted to give an update.

Pretending to work for the camera
Pretending to work for the camera