Karl Matthias

Messing with #Golang KV DB Badger and finding it pretty cool. It's FAST.

Karl Matthiastoddsundsted
Release v2.4.0 of Ktistec

I just released v2.4.0 of Ktistec. This release encompasses a few things that I've been working on for a while: improved support for operating without JavaScript available/enabled and support for running scripted automations.

Except for a few items, Ktistec now works without JavaScript. Obviously, things like WYSIWYG editing of HTML don't work—I plan to add support for Markdown to compensate. Running in Lynx is a stretch, but...

lynx on osx displaying the authenticated home page

Since the early days, most controller actions supported both text/html and application/json.  I cleaned up support for the latter and have officially documented the Ktistec API in the README.

In addition, I've added support for running bots/automations (prior announcement). The Ktistec server will periodically run any executable script in the etc/scripts directory. These scripts have access to the Ktistec API and can post, follow, share, like, etc. This is experimental and obviously introduces an attack surface, though that shouldn't be a problem on correctly configured hosts.

Here's the full changelog:

Added

  • Support running scripted automations.
  • "Fetch Once" button on hashtag and thread pages. (fixes #108)
  • Support navigation to a post's threaded view. (fixes #108)
  • Add support for post name and summary.

Fixed

  • Improve support for operating without JavaScript available/enabled.
  • Only enforce CSRF protection on "simple" requests.

Changed

  • Replace use of multi-action controller with formaction. (fixes #101)

Other

  • API usability improvements.


#ktistec #fediverse #activitypub #crystallang

Karl MatthiasMihai Todor
Karl Matthias

I have been working in Swift recently, given that our frintend is iOS. I’m not impressed with the language. It doesn’t know what it wants to be.

It’s a functional language that has to run on a legacy stdlib that is object oriented, so it just mashes both together. The closest analogue I’ve used before is Scala, which I think is worse than Swift. Second, the way that Swift allows monkey patching of stdlib objects by libraries is concerning. This can be done OK if used carefully and in a very limited way. Worse is that lots of libraries do it in place of better implementations that are less invasive. It’s a lazy crutch. Because you can monkey patch stuff but then not re-open those patches elsewhere, it means that you have no control over the boundary of the library and the library may make other choices for your code impossible. Kind of a crazy thing.

It also has a weak collections library and poor time and calendar functions. It’s not all bad. The tooling is reasonable and there is at least one good testing framework. Still, for a modern language, it’s not at all impressive. I was hoping for better. 

Karl MatthiasCrystalLanguage

And we have a new release: Crystal 1.14.0 🚀
Read about the highlights in crystal-lang.org/2024/10/09/1.

Happy Crystalling!

#CrystalLang #release

Karl MatthiasCrystalLanguage

Today we celebrate the 12th anniversary of Crystal!
The initial commit was on September 4, 2012 🎉

github.com/crystal-lang/crysta

#crystallang #history #anniversary

Karl Matthias

I set up Supermaven AI-based code completion (Co-pilot competitor) using their #Neovim plugin. They have a free tier, which seems to work great, and the Neovim plugin could not be simpler to install and use. Only used it for less than a day so far, but I like it. It's fast. https://supermaven.com/ 

Karl Matthias

New blog post: "Parsing Protobuf Definitions with Tree-sitter" .  It's all about how I used #Treesitter to jumpstart some nice internal #Protobuf tooling at work in #Golang. https://relistan.com/parsing-protobuf-files-with-treesitter

Karl Matthias

I am working with protobuf files and wanted to write some new tooling for code generation that doesn't use Go's horrible protoreflect.

I started parsing the files with Treesitter (in Go), which works great. Writing query S expressions was kinda annoying but then I found that #Neovim has a built-in #Treesitter query editor and live tree/document playground.

Holy crap! This is sooooo nice. 🤯

Karl MatthiasJorro

#nybolt #ev #electriccars #ElectricVehicles #battery #tesla #elonmusk

This one is better than Musk’s Tesla:

“A British startup may have found the answer to one of the frustrations of driving an electric car — waiting around for the battery to charge.

Nybolt, based in Cambridge, has developed a new 35kWh lithium-ion battery that was charged from 10% to 80% in just over four and a half minutes in its first live demonstration last week.

That is much faster than the 20 minutes or so it currently takes some electric cars using a fast charger, such as a Tesla (TSLA) Supercharger. It is also much closer to the two minutes it takes to fill up the average gasoline-powered car.”

cnn.com/2024/07/01/cars/electr