Ossy: a maintainer’s CLI tool

ossy is a new release, by Piotr Solnica.

Solnica releases a lot of software packages, most of it, as Rubygems. Doing that, in the small, one package at a time, is not very time-consuming, and can be wonderfully automated on places such as GitHub: author a Release text in a textarea, press a big green button and then automation can happen for you.

It’s just that, when you run a family of packages, just look at the volume of packages, then even that can be a drag.

So, ossy would allow for… bulk maint. Pretty strong.

(I never published this post, but, hey, I decide when to!)

Ruby package maintainers in *nix distributions: thanks

I got an email from code hosting provider BitBucket.

“You were mentioned in a commit”, it said. OK. But, I don’t often use BitBucket. What could it be?


This long link led to pkgsrc – which sounds like package source to nerds.

It turns out that a NetBSD package maintainer puts together packages for each of its distributed RubyGem packages. A kind of packaging of a package.

Well, in the NetBSD package, there’s a Makefile with some information about its dependencies. These are the values taken from the RubyGem’s .gemspec file.

I wonder if they use tools to read out the gemspec values, or if this is powered by humans toiling together.

Ruby: Concurrent::ThreadLocalVar

Web framework behemoth Ruby on Rails is using the concurrent-ruby project for some internal book-keeping. I like that project. A bursting-packed tool bag of ready-to-use widgets and doodads – great, if you know how to use them.

One of those things is ThreadLocalVar. A variable? Local to a… thread?

Its documentation’s example is eloquent about what it does for you: In thread t1 we can read the ThreadLocalVar and have its starting value. Then, we can locally set and keep using that variable, without changing t2‘s value, nor the starting v‘s value.

Here, this is the example linked above:

v = ThreadLocalVar.new(14)

t1 = Thread.new do
  v.value #=> 14
  v.value = 1
  v.value #=> 1

t2 = Thread.new do
  v.value #=> 14
  v.value = 2
  v.value #=> 2

v.value #=> 14

I glanced at this, when Rails 6.1 is getting this new feature: being able to accept some deprecation warnings, while failing on all the other. See this Pull Request for usage in context.

I said book-keeping things, above: The only file in Rails which is currently using ThreadLocalVar is the one which manages deprecation warnings, ActiveSupport::Deprecation.

This was a short call-out of one of the Ruby Concurrency library’s many small tools, I can only invite you to explore it further. For example, by looking at these issues that are looking for a contributor.

A note on using parallel RSpec in CircleCI

Using parallel builds with RSpec in CircleCI? Yeah!

Perhaps you need a way to output what was actually run?

A ready-to-paste CLI invocation.

TL;DR: YAML example for RSpec in parallel on CircleCI with explicit --seed and reproducible CLI invocation.

What’s in the steps?

CircleCI steps start out looking a bit like these:

  • Run the tests

When CircleCI runs your tests in parallel, it offers a “split up the test suite” system based on earlier tests’ timings. The timings are gleaned from a JUnit XML format.

  • Run the tests
    • with a JUnit XML formatter

When the splitting the test suite selection now can be done by the CircleCI tool, pass the selections to RSpec.

  • Run the tests
    • with a JUnit XML-based formatter
    • on a subset of the files

When RSpec starts, you have set it to run in random order, to expose sequence-related bugs. Now, we are going to need to see this value, so in order to do that, we pick a number ourselves. Then you set the --seed to a given value, e.g. an integer between one and a million.

  • Run the tests
    • with a JUnit XML-based formatter
    • with a given ordering seed
    • on a subset of the files

Now when a test has failed, you, the human reader, needs a pasteable command-line invocation, to reproduce the error in your local computer environment.

  • Output a command of what will run
  • Run the tests
    • with a JUnit XML-based formatter
    • with a given ordering seed
    • on a subset of the files

Example YAML steps

This example is real-world: creates the necessary directories, stores artifacts.

      - run: mkdir -p test-results/rspec
      - run:
          name: run rspec tests
          command: |
            TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \
              circleci tests split --split-by=timings)"
            SEED_NUMBER="$(shuf -i 1-1000000 -n 1)"
            TEST_FILES_SPACE_SEPARATED="$(echo $TEST_FILES | paste -s -d ' ' -)"
            echo "INCLUDE_SLOW_SPECS=1 bundle exec rspec --seed ${SEED_NUMBER} ${TEST_FILES_SPACE_SEPARATED}"
            bundle exec rspec \
              --seed $SEED_NUMBER \
              --format progress \
              --format RspecJunitFormatter \
              --out test-results/rspec/results.xml \
              --format progress \
      - store_test_results:
          path: test-results
      - store_artifacts:
          path: test-results
          destination: test-results
      - store_artifacts:
          path: coverage
          destination: coverage

Bike park infrastructure

Pollards in the shape of an inverted U, spaced widely allows two bikes to use each.

A new-to-me set of bike parking has been set up at Nobeltorget. They look ordinary, but since they were new, I wanted to show them off here.

These larger things are nice, since you don’t have to press the front wheel of the bike into anything to make it work. Just lean against the pollard and lock your bike. Ah, you need a chain or the equivalent. Always.

The short stories of Alistair MacLeod, and the difficulty of communication

Having read a handful of Alistair MacLeod short stories on the plane: he describes a hard life of the people of Atlantic Canada’s fisheries, mines and farms.

Some of these stories hit you right in the feels.

Literature is wonder.

On the way to Canada, I read the very meta novel The Hour of the Star, by Brazilian modernist Clarice Lispector. That book also describes a hard life of limited possibilities, but the authorial voice couldn’t be more different. Someone summed up Lispector’s writing as “a deep distrust of the possibilities of the novel.” A wry, ironic, acerbic commentator on the writing of the story you’re reading, Lispector never tells a story from A to Z. Recommended for the adventure.

This makes me recall a failed exchange of book excitement I had this week.

In Charlottetown, during the lunch break, as I was making my way to 84 Fitzroy, after a very good cashew stir-fry with Peter at Mad Wok, I saw a bookseller’s, and was lured in by the double stacks of books in the shelves. After asking for some impossible things, I pored over the Literature section. It had several shelves – also packed, double rows. There was a copy of McTeague, the novel silent-film director Erich von Stroheim adapted into his very long Greed. Having seen this, I turned to the long-suffering bookseller, and tried to communicate the awesomeness of that cinematographic achievement (a very, very long director’s cut is said to have existed), but failed. Booksellers have to put up with a lot of customers like me, I guess: overflowing with inspiration from the presence of books. He was gracious about it all. A pro.

See Von Stroheim on Wikipedia for more gushing about that film.

I just thought about the fact that I know nothing about MacLeod. I should read all the short stories before learning more about the MacLeod biography.

Update: the notes on the Letterists and their insistence on their own radical originality, they made me laugh out loud. Good at naming, though!

Bryan Cantrill rereads Soul of a New Machine and has excellent comments

I talked to people about blogging this weekend. Words like The Golden Age of blogging were used. (That era passed, if you hadn’t noticed.)

Is it quizzical to want to have the kinds of slow, async conversation blogging can offer? Is it tilting at windmills to just do it anyway? Even if my interlocutor group would be down to the same group of people with whom I learned of blogging, it’d still be worthwhile, for me.

One computer personality who’s made some impact on me is Bryan Cantrill. Here, I tried to link to a video in which he talks about the re-closed-sourcing of Open Solaris. But instead, here’s his Talks page, which chronicles a prolific output. Also: “Goodbye, Sun“.

Bryan blogs infrequently, but with a serious tone. (His blog is calledThe Observation Deck.) Today, I saw a tweet of his, and I went to the bio and to the blog link. I reminded myself that I ought to add his feed to my reader. But I got distracted by this post where the comments are as good as the post.

Recommended: that book, and to restart your blogging.

Fantasy Cartography

The conference, oh unconference, had sessions on diverse topics such as “Phone nerding”, “Death Café” and “Coastal preservation”. These were proposed during an agenda session, placed in a matrix on the wall, and ta-da, that’s our schedule.

The second day (today, Saturday) will have the DO theme. In a spirit of sharing, and stressing the importance of having fun, I proposed to lead a session on how to make fantasy maps. So, that was put on the schedule, and I’m preparing links to show people. If you missed the session, or are curious, here are some things online which inspire me.

People sitting in a circle, looking at Peter Rukavina organising a wall-mounted conference schedule in real-time. Ton Zylstra facilitates.
Unconference prep day 2. Theme “DO”.

Dyson does maps with felt-tip markers. Beautiful monochrome maps. Crosshatch! Here’s a printable sheet of dungeon map tutorials.

The Cartographers’ Guild is an online forum where people who make fantasy maps share techniques and tool tips. Technical, computer-oriented. More “Gimp or Photoshop?” than “Which watercolor brush?”.

The Fantastic Maps website’s Category of tutorials were good at showing individual drawing techniques.

And in the joyous spirit of DM Scotty, the video-series maker and crafter of roleplaying game materials (made from scraps and quite quickly): be sure to express your exuberance and joy of having created. Praise your own work.


Output, after-the-fact

Some snapshot photos of the thing I made during the workshop:

First, an outline, with pencil, then watercolor pencil, then a waterline using a felt-tip pen.
Lots of things added.
Pulled the watercolor of the edges into the map picture.

A bonus session

I was inspired to run the event again, after a bibimbap lunch, and was joined by seven-eight other mappers. The mountain range above came from someone asking how to draw a mountain range. “Let’s find out!”

Also, during the session, the mappers began telling stories about their different maps’ dragons, actually a pack of five wild dragons, fiercely whipped by their pirate riders, hungry for gold. The dragons were addicted to razing castles, souring the pirates’ relationships to royalty.

Here’s the latest version of the Plugh map.

Keith’s retro computers

I walked upstairs in the office I work in this week and I met familiar faces, people who knew my name since a long while. A good feeling, being somewhere and being recognized.

An Amiga 2500, with a peripheral to read disk images off a USB drive.
A fancy C-64 set-up.
Some of these are rare. The VIC 20 ENCYCLOPEDIA, or whatever it was, had a list of all the components in the machine. Complete with the name of the maker and a description of its function.

I was shown the collection. How some items were handed over in exchange for “a bottle of iced tea” or for another vintage computer. The collection was focused. A VIC 16, black. A TRS-80. VIC Cartridges.

I related a bit of the local scene. Gubbdata. Linus Åkesson.

Retro games

On nanochess.org you can see their re-issues of Retro Games. 

That is: Games re-published in the past few years, for the Colecovision platform.

Also, this charming Jeff Minter (Llamasoft) game:

Hover Bovver (Intellivision, 2018)

I learned about this because I follow amazing programmer and writer Jess Frazelle on social media. You should follow her sometimes-updated weblog. If you like.

Today, at Silverorange, I saw a Coleco Adam home computer. Never saw one before. It came with a snazzy printed manual. Was it owned by Keith? This happened on the same day that I learned about the above retro games.