serverless-databases 2025-03-05 15:24:32 # "Serverless" databases There are quite a few players in this space now: - [Turso](https://turso.tech), "Cloud Sqlite" - [Neon](https://neon.tech/), Serverless PostgreSQL - [Supabase](https://supabase.com/), started as an opensource alternative to firebase.  engg-manager 2025-03-04 18:42:34 ## what does an engineering manager do? [From here](https://theengineeringmanager.substack.com/p/should-managers-still-code): > Andy Grove's equation for measuring a manager's impact, which states that the output of a manager is the output of their team, plus the output of the neighboring teams under their influence. Other ways to improve your output: - Hiring and retaining great people. - Owning the team's strategy and roadmap, and ensuring efficient execution. - Making decisions to ensure that the team is working on the right things and saying no to the things that don't matter. - Dealing with fires, escalations, and other crises that pop up all of the time. - Building a strong culture within the team so that people are engaged, challenged, and motivated. - Mentoring and coaching your reports so they get better and can have more work delegated to them, thus increasing output further. - Managing the team's stakeholders so they can offer their steer to the team early and often. - Actively performance managing the team so that superstars can continue to shine and underperformers can be coached or exited. - Building close working relationships with other teams so that smooth collaboration happens across the organization, leading to a better and more cohesive product.  trying-quartz 2025-03-04 16:58:22 Trying out [Quartz](https://quartz.jzhao.xyz/) to convert my main [site](https://www.btbytes.com/) to it. The nice thing about it is: * metadata already matches what I was already using - `date`, `description`, `tags` etc. * has good integration with cloudflare CI out of the box and [is documented](https://www.christopherklint.com/blog/building-a-static-website-with-quartz-markdown-cloudflare-pages)  uv 2024-08-20 18:16:55 Need to checkout [uv](https://astral.sh/blog/uv-unified-python-packaging) for python development workflows. I currently use poetry, and fairly ok with it.  on-migrating-content 2024-08-17 15:39:49 Things to keep in mind when migrating the website/blog to a new content management system: 1. What do you want to keep; don't break links 2. Build a simulator to compare what will change between the new system and the old -- is the new content management going to: * maintain the same URLs? * same content layout * same metadata at the page level?  skillz 2024-08-15 17:03:26 # create a skills matrix | Topic | Skill | Level | Supporting Evidence |  nim-mem-mgt 2024-08-14 11:41:31 # Nim memory management is tied to the type you use You either use: - an object. Which is on the stack and is either trivial or uses destructors and is suitable for embedded due to deterministic memory management - a pointer object. Which is a raw pointer like C *. Managed directly via raw malloc/free or Nim malloc/free. Suitable for embedded - a reference type. Which is managed by one of Nim GC or is an error if you use bc:none [via](https://news.ycombinator.com/item?id=22230734) on HN.  fly-proxy 2024-08-13 11:37:58 You can use `fly proxy` command to setup a SSH proxy to a running Fly.io instance. In the screenshot below, I used the connection to download the tohray database (a sqlite file) to my local machine for development. ![](https://files.btbytes.com/images/2024/08/fly-proxy.webp)  tohray-rss 2024-08-10 13:56:16 # tohray now has RSS feed I added the [RSS feed endpoint](/rss) to this blog as well as the software. ![Tohray RSS on firefox](//files.btbytes.com/images/2024/08/tohray-rss.webp) Also used the newly created [Convert to WebP]() MacOS QuickAction to convert the above screenshot to `.webp`!  fontmatter 2024-08-08 20:06:00 # Fontmatter [fontmatter](https://files.btbytes.com/fontmatter/index.html) is a new project to collect nice fonts, with sample of how they look, with a link where they can be downloaded, with licensing information. The grid layout on the page itself was created using Claude 3.5 (It will soon become implied that every coding project has Claude's "hands"). Check it out and suggest your favourite Open Source font (or commercial if it's reasonably obtainable).  tohray-edit 2024-08-08 02:03:32 # tohray now has edit and delete functionality. The `edit post` and `delete post` links show up for every entry when you are logged in. You can see the commit [here on github](https://github.com/btbytes/tohray/pull/2). I also want to thank [Nilesh](//x.com/lvnilesh) for sending a [PR to add docker compose](https://github.com/btbytes/tohray/pull/1)  pagespeed 2024-08-08 02:01:19 This website gets excellent [pagespeed scores](https://pagespeed.web.dev). ![](https://files.btbytes.com/screenshots/2024/08/tohray-pagespeed.png) 100 on everything except 85 on a11y, where I was dinged for `terminal.css`'s low contrast navigation links, and some links like "github" being too small for touch screen to click on :)  scinim 2024-08-06 17:40:46 [Scinim](https://github.com/SciNim)'s [Ecosystem overview](https://scinim.github.io/getting-started/overview/index.html) is a great collection of Nim related libraries for deep-learning, matmul, nlp etc.  tohray-export 2024-08-06 14:28:52 # Adding `/export` endpoint to tohray I added the `/export` endpoint to tohray. This allows the user to backup the whole blog in either JSON on Markdown format. A GET call to `/export` returns JSON (default format). And user can get all the posts in markdown format by attaching `?format=md` to the above endpoint, ie., `/export?format=md`. Added to `urls.nim`: ``` pattern("/export", exportAll, HttpGet, name="export"), ``` Added to `views.nim`: ``` proc exportAll*(ctx: Context) {.async.} = let format = ctx.getQueryParams("format", "json") db = open(consts.dbPath, "", "", "") rows = db.getAllRows(sql"SELECT slug, created, content FROM post ORDER BY created DESC") defer: db.close() if format == "json": ctx.response.addHeader("Content-Type", "application/json") var jsonArray = newJArray() for row in rows: var jsonObject = %*{ "slug": row[0], "created": row[1], "content": row[2] } jsonArray.add(jsonObject) resp jsonResponse(%*{"posts": jsonArray}) elif format == "md": ctx.response.addHeader("Content-Type", "text/plain") var res:string for row in rows: res = res & "\n" & row[0] & "\n" & row[1] & "\n\n" & $rows[2] & "\n\n" & chr(28) # ascii file separator resp res ```  nim-backends 2024-08-06 11:52:21 # Compiling nim programs with C, CPP and ObjC backends Nim supports [multiple compiler backends](https://nim-lang.org/docs/backends.html) like C, C++, ObjC and *JavaScript*. I did not try compiling the program with JS because many OS facing APIs are not available to the JS backend. - **C*** -- `nim c -d:release tohray` -- 2117992 - **CPP** -- `nim cpp -d:release tohray` -- 2443528 - **ObjC** -- `nim objc -d:release tohray` -- NA NA: ObjC compile failed with: ``` /Users/pradeep/.choosenim/toolchains/nim-2.0.8/lib/pure/math.nim(281, 11) template/generic instantiation of `isNaN` from here /Users/pradeep/.choosenim/toolchains/nim-2.0.8/lib/pure/math.nim(204, 20) Error: undeclared identifier: 'c_isnan' candidates (edit distance, scope distance); see '--spellSuggest': (1, 3): 'isNaN' ``` The CPP generated executable is slightly larger. I do not know if it's faster for the same compilation settings.  tohray 2024-08-06 03:14:53 # tohray The source of the software that is behind this blog can be found on my [github.com/btbytes/tohray](https://github.com/btbytes/tohray). The Readme file has the details on how to install it, and the technologies behind it. You can leave your questions and feedback to me on X - [x.com/btbytes](//x.com/btbytes) or on the github issues page of the project.  nim-learn 2024-08-06 03:08:38 # Things I learnt about Nim while writing Tohray * Karax's vdom is super sweet for building HTML interfaces. I like it lot more than using any kind of templates now. the mismatch between code and markup(HTML) is jarring after this. * I learnt how to write a `.nimble` for a working project. Nimble had always left me frustrated. * I leant about the `distros` package and specifically the `foreignDep` method. With this essentially, I was able to replace `apt-get install blah` with (see below), which captures the package dependency with the code and not in a script or a Dockerfile ``` import distros if detectOs(Ubuntu): foreignDep "libpcre3-dev" foreignDep "libsqlite3-dev" foreignDep "build-essential" foreignDep "wget" ``` * Once or twice, I thought using a class to share variables would have been nicer. I have to study that more. * Learnt about using SQLite's Full Text Search, mostly through the help from Anthropic Claude. The FTS felt finicky with it's inability to handle special characters. But, it's a start towards understanding a powerful DB feature - FTS. * Got a lot more comfortable with using multi-stage Docker builds * Tried my hand at statically building `tohray` binary. It was coming out to be 20MB ALL INCLUSIVE, which is a great small size for a full fledged web app. However, I could not figure out how to statically link `libpcre`. * The hunt for static building took me to [hello_musl](https://github.com/kaushalmodi/hello_musl), a *mere* `.nims` config, but it showed the power of nim scripting. I think the way forward for static linking pcre is to improve the above script.  about 2024-08-05 20:47:58 # About Welcome to the stream. Here you can find me small snippets of things I'm thinking about or woking on, or things I find interesting. This application is written using [Nim](https://nim-lang.org), with the help of [Karax](https://github.com/karaxnim/karax) and [Prologue](https://github.com/planety/logue) web frameworks. The styling is provided by [Terminal.css](https://terminalcss.xyz/) You can find me on [github](//github.com/btbytes), [my homepage](//www.btbytes.com/) or on [twitter/X](//x.com/btbytes).