t

Distract me

If you’re anything like me you are fairly desperate for good podcasts to make you forget your own thoughts exist, so today let’s share.  Here are the podcasts that are my new best friends as I walk into the kitchen … Continue reading




t

It’s a gift for you, really

I almost never do sponsored posts on this blog because I hate reading them on other people’s blogs so I only do it if it’s a product that I truly adore and think you’d love too.  I’ve written before about … Continue reading




t

It’s okay to not be okay

I feel bad that I haven’t written anything funny here in awhile.  I know you can tell that I’ve been up and down but I think that’s pretty common for everyone going through this.  I have a million things I … Continue reading




t

Lots of weird but interesting stuff

It’s Sunday so that means this is a good place to put all the stuff that doesn’t fit anywhere else, like: ONE Let’s Pretend This Never Happened has a new cover and it’s adorable.  This means that if you have … Continue reading




t

Book club time!

Hey.  I was going to write this all yesterday but then I didn’t because yesterday was very not good.  Nothing really bad happened but I fell into a full meltdown of depression and I basically just cried and curled up … Continue reading




t

Button, button, who’s got the button…

This isn’t a real post but I thought you might enjoy. I collect buttons.  I have for years.  And a few of you enjoy them as much as I do so yesterday when someone in the comments asked me for … Continue reading




t

Can I rise to the occasion?

We started going to a personal trainer at the end of the summer, and it’s been really good–building strength, getting healthier. But the one thing that she badgered me about was bread. “You have to stop eating bread! Gluten is terrible for you. It’s what’s making your knees hurt. It’s causing inflammation in your finger […]




t

Eating like a Flintstone

We began this year with a new food plan: paleo. ish. This is precipitated by the discovery that I am either gluten intolerant, allergic to wheat, or both. Said discovery was made when I gave up gluten for a week just to prove to my personal trainer that she was wrong when she said that […]




t

Get up, get up and get down

I work from home, and the marvelous company for which I work gave me a VariDesk standing desk. I can adjust it to either a standing position or a sitting position, and I do so multiple times per day. Sitting now being the thing that’s going to kill us, I try to make sure I […]




t

I am the camel

At the very end of 2017, I wrote about my lovely new sewing space and how much more work I’m getting done in there. One of the pictures I did not include was the view into the rest of the family room: As you can see, there is lots of lovely space in our library. I […]




t

Swinging into the final third

I went to the cardiologist the other day, and my numbers all look good. LDL cholesterol is still a wee bit high, but trending in the right direction. I’m exercising, eating right, doing all the things I’m supposed to be doing. But I had an odd thought. I turn 60 this spring. Ferrett and I […]



  • Health and fitness
  • Life and relationships
  • Philosophy

t

Playing hurt

We have been a house of virus this part weekend. I can’t say “flu,” because while Ferrett had a bad cough and sore throat, I’m not 100% sure it was actual influenza and not just some other nastiness going around (yes, we have had flu shots). In an unusual turn of events, Ferrett was sicker […]



  • Life and relationships

t

A slice of the past, preserved for the future

Did one of the most difficult things I’ve ever done: I cut up my mother’s wedding dress. Now, Mom always *loathed* her wedding dress. Her mother talked her into a waltz length, ballerina-y dress, and she never enjoyed looking at her wedding pictures. She put it in her cedar chest and never looked at it. […]




t

Gun stuff

I can make a colorable argument that I once defended my life with a shotgun. I was still a newlywed, and John and I had purchased a house in the woods north of Wasilla, Alaska. I was home alone, out in the yard splitting wood, when a car came down our cul de sac, turned […]




t

In which I am still a grade school child just trying to make this adult thing work

I’ve been working a regular, 40-hour week since December now. Before that, I had Fridays “off”–I worked on client work, yes, but I also ran all the errands and did all the chores, leaving me both weekend days pretty much to myself.   What I’ve discovered, in the past three months, is that I resent […]



  • Life and relationships

t

Мексиканская авиакомпания полностью перешла на Sukhoi SuperJet 100

Мексиканская авиакомпания InterJet полностью перешла на использование только российских самолетов Sukhoi SuperJet 100 (SSJ-100). По мнению руководства InterJet, SSJ-100 идеально подходят для перевозок в условиях пандемии коронавируса. В настоящее время российские самолеты обслуживают шесть оставшихся маршрутов.




t

SEA You Next Year: 2018




t

On The TURING Away




t

Shamrock Around The Clock




t

School of Hard TALKS




t

Wonderellita!




t

Concentration SCAMP




t

Today’s comic was selfish




t

DATE and Switch







t

Atlanta August 2007 4/23











t

Atlanta August 2007 12/23
















t

Wimpie Nortje: Database migration libraries for PostgreSQL.

It may be tempting at the start of a new project to create the first database tables manually, or write SQL scripts that you run manually, especially when you first have to spend a significant amount of time on sifting through all the migration libraries and then some more to get it working properly.

Going through this process did slow me down at the start of the project but I was determined to use a migration tool because hunting inexplicable bugs that only happen in production just to find out there is a definition mismatch between the production and development databases is not fun. Using such a tool also motivates you to write both the setup and teardown steps for each table while the current design is still fresh in your mind.

At first I considered a standalone migration tool because I expect them to be very good at that single task. However, learning the idiosyncrasies of a new tool and trying to make it fit seamlessly into my development workflow seemed like more trouble than it is worth.

I decided to stick with a Common Lisp library and found the following seven that work with PostgreSQL and/or Postmodern:

I quickly discounted Crane and Mito because they are ORM (Object Relational Mapper) libraries which are way more complex than a dedicated migration library. Development on Crane have stalled some time ago and I don't feel it is mature enough for frictionless use yet. Mito declares itself as being in Alpha state; also not mature enough yet.

I only stumbled onto cl-mgr and Orizuru-orm long after making my decision so I did not investigate them seriously. Orizuru-orm is in any case an ORM which I would have discounted because it is too complex for my needs. CL-mgr looks simple, which is a good thing. It is based on cl-dbi which makes it a good candidate if you foresee switching databases but even if I discovered it sooner I would have discounted it for the same reason as CL-migrations.

CL-migrations looks very promising. It is a simple library focusing only on migrations. It uses clsql to interface with the database which bothered me because I already committed to using Postmodern and I try to avoid adding a lot of unused code to my projects. The positive side is that it interfaces to many different databases so it is a good candidate if you are not committed to using Postmodern. It is also a stable code base with no outstanding bug reports.

The two projects I focused on was Postmodern-passenger-pigeon and Database-migrations because they both use Postmodern for a database interface.

Postmodern-passenger-pigeon was in active development at the time and it seemed safer to use than Database-migrations because it can do dry runs, which is a very nice feature when you are upgrading your production database and face the possibility of losing data when things go awry. Unfortunately I could not get it working within a reasonable amount of time.

I finally settled on Database-migrations. It is a small code base, focused on one task, it is mature and it uses Postmodern so it does not pull in a whole new database interface into my project. There are however some less positive issues.

The first issue is a hindrance during development. Every time the migrations ASDF system (or the file containing it, as ASDF prefers that all systems be defined in a single file) is recompiled it adds all the defined migrations to the migrations list. Though each one will only be applied once to the DB it is still bothersome. One can then clear the list with (setf database-migrations::*migrations* nil) but then only newly modified migration files will be added. The solution then is to touch the .asd file after clearing the migrations list.

The second negative point is quite dangerous. The downgrade function takes a target version as parameter, with a default target of 0. This means that if you execute downgrade without specifying a target version you delete your whole database.

I am currently using Database-migrations and it works well for me. If for some reason I need to switch I will use cl-migrations.

Using Database-migrations

To address the danger of unintentionally deleting my database I created a wrapper function that does both upgrade and downgrade, and it requires a target version number.

Another practical issue I discovered is that upgrades and downgrades happen in the same order as they are defined in the migration file. If you create two tables in a single file where table 2 depends on table 1 then you can not revert / downgrade because Database-migrations will attempt to delete table 1 before table 2. The solution here is to use the def-queries-migration macro (instead of def-query-migration) which defines multiple queries simultaneously . If you get overwhelmed by a single definition that defines multiple tables the other option is to stick with one migration definition per file.




t

Quicklisp news: April 2020 Quicklisp dist update now available

New projects:

  • anypool — General-purpose pooling library — BSD 2-Clause
  • avl-tree — An implementation of the AVL tree data structure. — MIT
  • cl-aubio — Aubio bindings for Common Lisp — GPLv3
  • cl-interval — Intervals, interval trees — NewBSD, LLGPL
  • cl-liballegro — Allegro 5 game programming library bindings for Common Lisp — Allegro 5 - http://alleg.sourceforge.net/license.html
  • cl-mime-from-string — A one function library to return a mime-type based on the file extension found at the end of a string. ie abc.txt -> text/plain. The common types implemented are from https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types — MIT
  • cl-telegram-bot — Telegram Bot API, based on sovietspaceship's work but mostly rewritten. — MIT
  • dns-client — A client for the DNS protocol. — zlib
  • feeder — RSS, Atom and general feed parsing and generating — zlib
  • perceptual-hashes — Perceptual hash algorithms for images — 2-clause BSD
  • portable-condition-system — A portable condition system for Common Lisp — CC0
  • ten — Template System for Common Lisp — MIT
  • trivial-custom-debugger — Allows arbitrary functions to become the standard Lisp debugger — MIT
  • trivial-with-current-source-form — Helps macro writers produce better errors for macro users — GPLv3
  • vom-json — A json-formatted logger for vom — MIT
  • vp-trees — Perceptual hash algorithms for images — 2-clause BSD
Updated projects3b-bmfont3bgl-shader3bmd3bza-cl-loggeralexandriaaprilasync-processbdefbpccldocchungacl+sslcl-anacl-capstonecl-cffi-gtkcl-collidercl-containerscl-environmentscl-gamepadcl-gservercl-inotifycl-marklesscl-packcl-patternscl-pythoncl-rdkafkacl-shlexcl-sparqlcl-strcl-tuicl-utilscl-webkitclinenoiseclipcloser-mopconcrete-syntax-treecroatoancserial-portdartscltoolsdefenumdeploydexadordiff-match-patchdissectdjuladoubly-linked-listeasy-routeseclectorescalatorfast-generic-functionsfast-ioflexi-streamsflexichainfloat-featuresfsetfuccfunctional-treesfxmlgendlgraphgtirbhu.dwim.computed-classhu.dwim.defhu.dwim.perechu.dwim.presentationhu.dwim.quasi-quotehu.dwim.walkerhu.dwim.web-serverhunchentoot-multi-acceptorironcladkeystonelispqrliterate-lispmaidenmaxpcmcclimmmapmodularizemutilitynodguinumclnumpy-file-formatoriginosicatoverlordparachutepatchworkpetalisppetriphoe-toolboxplumppolicy-condpolisherpostmodernpzmqqtoolsquilcqvmroanrpcqs-graphvizs-http-clients-http-servers-sysdepss-utilssanity-clausescalplsealable-metaobjectsselselect-fileserapeumsketchskippy-renderersnappysoftdrinkspinneretstaplestumpwmsucleswank-clientswank-crewtootertrace-dbtrivial-featurestrivial-file-sizevgplotwoo.

Removed projects: cl-password-store, fomus, rfc3339-timestamp, rpc4cl.

All the removed projects are removed because they no longer build. For the first two (cl-password-store and fomus), I was unable to get a response from the authors. The other two (rfc3339-timestamp, rpc4cl) the author was responsive, but has abandoned the projects.

To get this update, use (ql:update-dist "quicklisp"). Enjoy!

A number of people support Quicklisp with a monthly contribution through PayPal. I recently set up a Quicklisp Patreon page as an alternative - if you are interested in supporting Quicklisp, feel free to check it out.