Skip to main content


LSP templates

I took a step back with my LSP and decided that what I really need is a template based system for building responses. Previously I had started creating the JSON on the fly but realised that the jsonrpc specification has what it called interfaces which are basically templates, so I wrote a Type that allows you to add templates and variables and then it joins them all together for you. It works well but I might find a better way at some later time. After getting the template system working and removing some debug messages that I think might be inadvertently picked up as responses. For reference, the LSP receives an "initialise" message from the client that contains a lot of data. In my case it was over 4k in size. The LSP then returns an "initialized" message and receives confirmation from the client in the form of an "initialized" notification. The "initialize" and "initialized" messages are very similar. Both contain "jsonrpc"
Recent posts


I've taken on the challenge of writing an LSP for BlitzMax NG to help with the integration of the vs-code extension.  For those who don't know what an LSP is; it is simply a communications component that is used by any IDE to obtain information regarding your source code. It then uses this information to create outline views, hover, help and diagnostics etc. Rather than use the BlitzMax JSON module, I decided to write a JSON parser specifically for this application that gives me a little more control to transpose JSON directly into BlitzMax Types. I will publish this on GitHub shortly. With the JSON module almost complete, the LSP application can now read/write to/from StdIO and I'm currently working on getting the "initialize" and "shutdown" event handlers operational. Watch this space.

A Hobbit house for my Tortoise

We moved house earlier this year in the middle of lockdown! It was rather unpleasant and a story for another time, however we realised recently that we didnt have a shed and therefore no where for the tortoise to hibernate this winter! So pencil went to paper and I drew this: The wife laughed, but I convinced her I could make it, so the next step was to draw up some plans: They are quite rough, but had everything I needed to build it, so I started by building a scale model: I was pretty happy with the model and the Wife was intrigued, so after a trip to various DIY stores and a few orders on Amazon, I finally built it: It took me ages to figure out how big the tiles should be. I cut three widths of three heights in two different coloured sheets of roofing felt and stapled them to the roof (which was already covered in felt). A fake grass door-mat finished it off nicely. I think it came out pretty well: I wrapped it in cling fi

Discord Gateway for MQTT

I have created a new organisation  on Github today as a place to add automation scripts and the first one I will add is a gateway for Discord. This core of this script was originally created when I needed to send crash alerts from an application I had written to my phone so that could act upon them quickly. This proved useful and I added it to additional scripts and applications, but found that it was a bit limited if I wanted the alert to be logged elsewhere so I updated my apps and scripts to send to MQTT. Once my alerts were in MQTT I could pick them up from NodeRed and perform various actions; but I missed having them arrive in Discord, so last night I created an MQTT-2-DISCORD module that includes  support for multiple discord channels. Installation is fairly simple and I have documented the process in the file associated with the repository. After installation, visit Discord and obtain a webhook for the channel you want to recieve messages into. You can name the webhoo

Wednesday morning!

I've not posted in a while.  I guess I'm not really used to telling the world about my life... must get better at that! Since my last post,  I have upgraded the disk and RAM on my laptop and installed Linux Mint 19.3 and found it handles my external monitor much better than the previous release.  While restoring my data and having a clear out I stumbled on a couple of unfinished projects that I really should complete, but more about that later.

Laptop rebuild

This morning my replacement hard drive arrived so I set about getting it installed. First I downloaded Linux Mint 19.3 and burnt it to DVD, booted on it and checked I could browse the internet etc... Ok. That works. I carefully replaced the physical drive, restarted my laptop and booted on the DVD again. Selected to install it and left it alone for a while.  After install and reboot, I connected it to the internet and let it install updates before taking an initial Timeshift backup. After my backup completed, I removed Libre office and Thunderbird, installed "atop", "kate", "Chromium", "Android Studio" and "Dropbox" then left it downloading my Dropbox whilst I dug around in the cupboard for my SATA USB adapter. Lastly, I copied my data from the old disk to my new one using my USB adapter.  I think it's time for a cup of tea...

Low disk space!

Typical. Just when I start to get on well with my Seventh Son project, I get a low disk space message on my Linux laptop.  It's my own fault to be honest: I had a drive failure about a year ago and I stuck a spare 70G drive in there temporarily and forgot to replace it... 70G! what was I thinking? I suppose at the time, all I needed it for was to write SD-CARDs for my RPi's and SSH to them, but still... 70G! So before I head off to eBay or Amazon, I need to have a look to see if there is anything better in my spares box and write a copy of Linux Mint to a DVD so I can rebuild.