Category: General

Programming and assorted nonsense

LunaMech has been converted to LMAV2.


19th of January 2022 at 03:12am SAST

I finally sat down and took the time to convert LunaMech over to the second version of my Matrix API. The conversion process did not take as long as I had expected. At the same time I converted my Matrix API library to parse JSON as a hash-table rather than as a plist (this is both faster and more secure and so it would be nice if Jonathans default behaviour was this...), anyway the conversion process was made quite easy because I had used a macro which I had called 'pkv' to access plist values from parsed JSON, by simply changing the definition of PKV to access a hash-table instead much of the conversion was done automatically, the rest of the conversion was adding a few missing features, changing instances of getf to 'get-key' and testing repeatedly.

Since the conversion has been complete LunaMech has experienced 0 downtime.

Ofcourse I have not updated the documentation so LunaMech is effectively totally unusable to the uninitiated despite the fact that Luna makes Matrix very usable... Oh well.

Sam T Francis and the problem of leftist Cooperatives

Incomplete ramblings written months ago...

31st of August 2021 at 18:00pm SAST

I have recently started reading Sam T Francis' Leviathan and its enemies. In the first chapter he is laying out the case that since the start of the 20th century 'capitalism' has morphed from its older bourgeoisie form (his words not mine) with its focus on the ascetic individual, which included sublimation of the individuals desires to duty, work as an ends rather than the pursuit of an aristocratic ideal of 'genteel leisure' and individual virtue, into the monstrosity he describes as 'managerial capitalism'. Managerial capitalism or Managerialism is the product of 'mass and scale', where you require many managers to run corporation sized businesses who are detached from any sense of real ownership because the ownership is dispersed through the share holders, the property moving into a state of 'dematerialized property', I will get back to this. Anyway the morphing into managerialism has created a new set of self interested elites who are selected through "merit" (haha I know, it was written in 1995) these are primarily recruited into three fields, managers, technical experts and sophists (my words not his), leaving the other two aside I'd like to focus on the 'technical experts', these are the types you see who create their 'cooperatives'.

Now if we leave aside the obvious economic problems with cooperatives that make them less competitive than their entrepreneurial counterparts, I would like to ask owners of coops or those who plan on starting coops how the means of collective ownership combats any of the issues of managerialism? It seems to me that a cooperative that is run by the anti hierarchy, egalitarian types, agree with managerial capital on almost every issue. Lets us compare and then we can contrast it with the positions of bourgeoisie capitalism, the capitalism the coop thinks they are fighting.

Megacorps do not explicitly believe in private property but rather in the dematerialized property, I will paraphrase the Joseph Schumpeter quote from page 52, "..Dematerialized, defunctionalized and absentee ownership does not impress and call forth moral allegiance as the vital form of property did. Eventually there will be nobody left who really cares to stand for it, nobody within and nobody without the precincts of the big concerns." as Sam T Francis explains in the next page that a managers wealth is not extracted from the property rather from the salaries they garner from their specialized skills. Now what is the cooperatives position on this? Well that is in the name 'cooperative', they believe in the collective ownership, or as I like to say the collective disownership as no one can be truly held accountable when everyone votes on decisions, just like the managers who do not own the megacorp.

Due to the dematerialization of private property the megacorp is not against regulation, regulation that achieves another one of its ends this is an end shared with the coop, the destruction of entrepreneurial capitalist, the old school type. Now this is a much worse position for the coop to take because A) its an absolute self own for the coop (making it harder for them to compete) and B) the megacorps position is purely material, it needs to crush its competition in order to perpetuate the managerial cycle, the coop cannot say the same, the coop does it out of spite for the perceived enemy.

Both the coop and the megacorp want to bring about the destruction of the old borgeuousie morallity that I described above, the megacorp works with mass advertising to sell a stereotypical consumer, for the obvious ends of creating a new class of people whose identities are defined by what they consume. While the coop wishes the same destruction because 'man was born free and is forever in chains', they see it as arbitrary constriction of human nature or effectively just "oppression". They both up with the same ends, materialistic hedonism.

The leftist coop and the megacorp agree on every social issue, whether its women in the work force, racial justice movements like BLM, or abortion, if you took a middle manager from Google and a member of one of these leftist coops you would be hard pressed to find a social issue they do not agree on, this is despite the fact that the lefist would claim that Google is their enemy. The megacorp holds these positions because it needs to homogenize the workforce and the consumer base, and not in a good way. Rather than having an order that exists as a local and decentralized society, a homogenous society where everyone is defined by what international product they have consumed or what netflix show they have watched, is susceptible to more generalized advertising (see globohomo blog art). The coop agrees on the social issues because they believe in overarching narratives of oppression, each new issue is a new imagined chain to break.

Both the megacorp and the coop demand the absolute sublimation of the individual into the collective metastructure, all individual ambitions, values and eccentricities must be moved aside and in its place the goals of the megacorp must be put in its place. Individual success is barely rewarded and excellence is often frowned upon, the megacorp is no place for the great man. In the coop the individuals will is ignored in favour of the collective will.

The final point is that both the megacorp and the coop think that capitalism is bad, there is quite a difference here as the coop thinks that capitalism is oppressive and the solution is cooperatives, while the megacorp, or at least their supposed representatives think that the solution lies in 'stakeholder capitalism' see the WEF.

My final point is that they are of the same stock. The coop recruits from the same pool of 'technical experts' that the megacorp does, there is no difference, in fact I imagine you could replace the average member of the coop with the average member of the megacorp, replaceable like drones due to the collective conformity of the mass corporation and the coop, as mentioned by Sam T Francis on page 48-49 "the collective conformity that the “organization man” of the mass corporation exhibits in his professional life is reflected in his social life as well in dress, tastes, uses of leisure, community, and home." colloquially we call these people 'bugmen'

Traditional capitalism

Nope didn't finish.

LunaMech is finally FOSS software

Source and website.

26th of August 2021 at 15:30pm SAST

I have finally taken the time to extract all the hardcoded private keys and place them in a persistent library, meaning I am able to make LunaMech FOSS. LunaMech has been running on the scyldings.com Matrix server for close to a year now and has been under constant active development. It will remain under constant active development into the future as well. As of the time of writing this entry the bot will not build from source because I wrote a new macro called 'defmodule' to wrap up the process of defining new modules, but this does not play nicely with the compiler by default which I have to fix at some point, I may even change the abstraction to a metaclass... I am not sure yet.

Right now there is only an outdated way to generate a functioning config file, obviously this code base has been in active development so I have been using a config file that was generated many moons ago and I have slowly adapted it to work with any incremental changes, but this does mean that the config generator is out of date. The documentation in the README is also out of date, regardless it does provide a general overview of the default features of the bot, that being said the fundamental design idea of communities is almost outdated now that Matrix Spaces are making solid progress.

There was some more up to date documentation that was hosted on a taiga instance, however this instance is gone and I no longer have the documentation so I will have to go through and make some new documentation.

Let me briefly explain Luna's functionality right now:

The core idea of Luna are 'communities' these are mappings of room ids to room names which maintain a list of all of the members within them and their administrators. Commands like 'ban' will ban a user from all of the rooms listed in the community, ofcourse this is becoming less relevant as Spaces progresses, however this is still in heavy use on our Homeserver, the same goes for invite. Invite is especially useful if you want invite only communities.

Luna maintains a list of communities with a file called 'communities.lisp' in a directory called config/, all persistent files for modules is also stored in this directory. The file communities.lisp is backed up roughly every 5 minutes, because Luna is effectively a naturally evolving program that was both the prototype and the product I still think that use the filesystem for persistence of the main file is a decent solution, although I could swap to Bknr.

Luna grabs messages for every 'listening-room' listed in each community and processes those messages, messages that start with '.' are assumed to be commands, however a completed command is something like '.<community-name>|<module name> <command-name> <args>', commands for modules are also invoked from within a community listening room. Once the prefix is checked the correct command is found within the global *commands* and invoked with the the arguments provided by the user. If the command is missing then its passed off to the default missing command generic which will decide whether to tell the user or not depending on their privilege.

After processing all of the messages for all of the communities and executing the functions as it should, Luna maps through all of the registered modules and hands the instance of the bot and the current sync object (I say object but its actually a list) off onto a method called 'on-sync' which every module is able to specialize, this is where much of the automatic functionality of Luna is found, because each module is able to perform actions based on the information in the sync object.

After doing this a few thousand times methods like 'on-save' are invoked so that modules can save themselves to whatever their persistent storage mechanism is, communities.lisp is also backed up.

Modules can be loaded and unloaded from Luna on the fly, loading invoked on-load-up, unloading on-module-unload. This is done either within your connected Sly session or using Lunas command invocation system.

This basic model is how all of the current functionality of Luna is implemented. Ofcourse this may change.

Anyway, hopefully I will get the time to write some developer docs and update the readme, I will host them on LunaMechs website.

Updates regarding Luna will be posted here for the foreseeable future.

An introduction to CL-BLOGGY

Blogging with CL-BLOGGY

22nd of August 2021 at 01:12am SAST

Okay, lets write an introduction to how you setup and use cl-bloggy.


CL-BLOGGY is a Common Lisp library that allows you to live code entries into your blog. It is designed to be highly extensible; the majority of the functionality has been implemented using Generic Functions, this means that as a user you can customize the behaviour of most of the system, although I imagine you would primarily be interested in customizing its appearance. By utilizing the CLOS I have created a webpage generator that allows the user to fully customize the appearance and the layout of their own blog. By writing a Lisp form you are able to produce a nicely formatted and ready to go blog post in your own instance of CL-BLOGGY.
At the time of writing this library handles the following:
List of cool things:
  1. Creation of blog posts.
  2. Deletion of blog posts.
  3. Direct links to posts (obviously)
  4. Ordering of posts by date.
  5. Ordering by date within an index.
  6. Ordering of posts by categories
  7. Nesting of categories, ie each category is a child of the former 'general <- programming <- common lisp <- cl-bloggy', a category can only have one parent but many children
  8. Creation of a primary RSS feed at (format stream "~A/rss.xml" (url (blog <acceptor>))
  9. Creation of category based RSS feeds at (format stream "~A/~A/rss.xml" (url (blog <acceptor)) (url category))
  10. Customizing the layout of the blog, entry and index using generic functions.
  11. Minimalist CSS, currently 3 external style sheets are imported by default: milligram.io, normalize.css, and Google's Roboto font (required for Milligram)
  12. Customizing the colour scheme of the blog, entry and index using generic functions.
  13. A simple 4 palette colour scheme using both CSS and Common Lisp global variables for easy theming
  14. Sane but currently as of the date of this article, changing default CSS.


The goal of the library is to allow a Common Lisp user to setup their own blog, on their own VPS where they can create and manage entries with ease. It's designed to be highly extensible, what is the point writing it in CL if it isn't built this way? It is designed to be open to the programmer, each object in the system has access to the others, even the instances of blog instantiated for rendering categories are aware of the top level blog. The library has been designed this way because it allows an experienced Lisper to customize the blogging system however they want. The code should also be easyish to understand, I know that every Lisp programmer has their own programming style, but my intention with this library is for it to be reasonably readable with minimal use of macros, so code readability over macrology
Programs must be written for people to read, and only incidentally for machines to execute. - Abelson & Sussman, in the preface to the first edition of SICP.

Hello World!!

My first live entry!

20th of August 2021 at 22:48pm SAST

Hello and welcome to my blog

I am an enthusiastic Lisp programmer, meme connoisseur, Linux user, tech antithusiast, enemy of the redditors, bane of the Javascript devs and King of Luna.

Unfortunately I am university "educated" whatever that is supposed to mean.

I wrote the library used to generate this blog website which you can find here, ofcourse it is all written in CL and that means I can connect to my blog while it is running and edit the blogs. I can live code the blogs, compile and see the change immediately. Creation of blog entries happens using a library that utilizes alien technology, it is called Spinneret; this is a HTML generation library like no library you would find in horseshit languages like Javascript (they are lucky if they get some basic templating), consequently I am sure that a Javascript dev would squeel and pass out if they possessed even a fraction of the power found in this single library. This library allows you to fully utilize the power of Common Lisp to produce HTML, while at the same time this blog is contained within a fully functioning Common Lisp image, neat huh? Yeh but probably over the top. I am able to inspect my running Blog while it runs#<K1D77A's blog @ https://k1d77a.com/blog/main Number of entries: 7. Description: Programming and assorted nonsense.> You see that? Thats the blog object in my lisp image, with a little bit of pasnaz we can find out everything about it:

Entry count: 7
Entry title: Thomas Carlyle, books, belief and attacking scepticism. Entry title: LunaMech has been converted to LMAV2. Entry title: The first Scyldings event Entry title: Sam T Francis and the problem of leftist CooperativesEntry title: LunaMech is finally FOSS softwareEntry title: An introduction to CL-BLOGGYEntry title: Hello World!!
I am also able to inspect the entry object while I write the entries..

This entries title is: Hello World!!
As this blog has content added you will see that this post is updating

Anyway because I am using a Lisp -> HTML generation library and not entering posts into a form that has to be post processed, or even worse Javascripted, I am able to add whatever HTML elements I want. I am also able to structure my entries using the markup language intended for writing webpages (I wish we could say that Javascript stayed in the domain it was designed for)