Dart Experiment: Snake Game in Many Ways 2023-03-31

Yesterday I posted about how inspired I was to try to do server-side Dart again after watching this PeerTube video by Andy Balaam from way back in 2015. In it he was experimenting with the then very new Dart language in the browser doing his usual thing of writing a game of Snake. I’ve honestly never written a game of any kind. That is something I’ve also been really itching to try to do as well. I have been wanting to experiment with doing more server side dart. Snake is a relatively constrained game so it was worth me giving it a shot. The confluence of all that made the urge to try to do both too great to resist.

(More ...)
Kotlin Things I Miss In Dart, Part 1 2023-03-18

Starting in 2021 Dart replaced Kotlin as my favorite language. In the backlog of post ideas for my blog I had a whole bunch of language comparison ideas but haven’t written any of them yet. As I was cranking through some Dart code this week though I was thinking more and more about this. Dart as a language is still evolving. In the Dart 3 alpha notice they talk about some really neat things coming in future versions. With all that there are some Kotlin features big and small that I wish would be added to some future versions. This is the first but probably not the last of these posts, hence the “part 1”, where I figured I’d document it.

(More ...)
Dart for Raw TCP Applications Is Easy 2023-03-12

For most modern applications we do our network transactions using HTTP level. HTTP is riding at the top of the OSI Stack . Usually underneath that, several steps down the stack, at the so-called “Network Layer” is the TCP/IP protocol. There are times when you need to be able to do direct Network Layer calls. Because Dart comes with built-in support for networking for its HTTP needs it also comes with, and exposes to programmers the Network Layer sockets as well. Below is my tutorial on how to set up a very simple bi-direction TCP/IP client/server system using Dart.

The OSI Stack as shown with cats in stacked bins
(More ...)
Annual Review 2022: A Middling Year of Diet and Fitness 2023-01-01

This is a bit of a divergence from the usual annual review process because it is being done in the middle of the year. I therefore am just putting this up here as a way to do comparisons in the future and to have a more complete dataset.

(More ...)
Large Spinning Hard Disk Performance Study 2022-10-19

It started simply enough. I had a hard disk failure, an SSD ironically, which forced me to start rethinking how I was managing my storage. I decided to buy one giant 16 TB USB 3.0 spinning disk to add as a giant drive and leave the high speed internal SSDs for things like the host OS, development VMs, etc. The immediate question was if I should format it as one big partition or not. I thought it was a simple question but ironically there was a dearth of modern articles really exploring the question versus the how to do it. Does it matter or does the OS make it irrelevant? That’s a complicated answer but I have some data to help me make a decision on the matter that I’m going to share here.

(More ...)
Dart Result Monad 2.0 Updates 2022-10-09

Last year as I really got into doing Dart and Flutter programming I decided I needed a library that got me the same behaviors I had with the Result Monad library I had in Kotlin. In November I published the 1.x version of it which I wrote about in this post . There were some aspects which I thought were a little clunky even then. As I have been using this on a bigger project now I found some other shortcomings as well. This was the impetus needed for making those improvements and pushing out a 2.0 version of the library. This post goes through those improvements. The library source code and issue tracker is here with the pub.dev entry here .

(More ...)
Dart/Flutter Open Source Contribution Stats (and why I use it despite Google's dominance in it) 2022-09-30

This week Google did the totally not surprising move of cancelling Stadia. In some chat rooms I’m in the topic turned to Google’s penchant for cancelling major projects in general. That fed into a discussion of how can one choose Flutter as a viable tech stack if that is always hinging over our heads. In 2021 I created a series of tools for assessing open source projects through their Git histories. I wrote up my methodology in this blog post . I had intentions of analyzing many of my favorite projects at the time but never got past finishing Elastic/Kibana and starting OpenJDK. I’ve decided to turn that towards Dart and Flutter. The results for those projects can be found in this GitLab repository .

(More ...)
Supabase Flutter Quickstart With the New API 2022-08-10

I’m starting to experiment with a Firebase alterantive called Supabase . It provides a lot of the same centralized login/user management Firebase does but with a relational (Postgres) database and object storage for their storage layer. Javascript and Flutter are their big supported platforms. I wanted to give it a try through their Flutter Quickstart Guide (they have one for many different Javascript frameworks). After completing it though I ran across this blog post about the new SDK 1.0 Developer Preview . There are several changes to the Flutter SDK to make things better as they march towards the 1.0 release. I decided to tweak the Quickstart to work under the 1.0 version and document it here. Some of the earlier text is substantially from or copy/pasted from the original tutorial.

(More ...)
Tutorial: Setting up Apache Hosted PHP with Xdebug 2022-08-08

This is the second part of the PHP and Friendica Debugging Post Series . It is assuming that you have a ready to go Ubuntu 22.04 Linux computer or virtual machine ready for configuration, with sudo privileges for your user account. You can follow this post on how to get one configured in Parallels Desktop on macOS. At the end of this tutorial you will be able to do step-level debugging of a locally hosted PHP site on your computer using the PHPStorm IDE.

(More ...)
Setting Up Friendica Daemon as a Systemd Service Tutorial 2022-08-04

Friendica relies heavily on worker processes for doing things like federation, cleaning up the database, and many other tasks. It can either be run as a periodically running system cron job or in a daemon mode. A lot of this is personal preference of the administrator. I prefer to run it as a daemon process, mostly because posts are federated instantly rather than waiting for the cron job to be kicked off again several minutes later. The best way to use the daemon process is to have it be managed by systemd so that Linux will make sure it starts on startup, create a new one if it crashes, etc. On the Friendica links page I found this post by TauSys on setting up the daemon as a systemd process . None of the steps are hard per se, but it lays them out very clearly. It is unfortunately in German and some of the translation messes up some of the example configuration files etc. For that reason I’ve decided to write this post on how to setup the daemon as a systemd process, inspired heavily by the above post.

(More ...)