« Oatmeal

Tagged "how to"

Follow this tag

How to install Uxn on macOS

Uxn is an esoteric stack-machine with 32 bit instructions. It exists someplace at the intersection of a GameBoy, 6502 ASM, an Apple II, Forth, RetroForth, the z80, a Sinclair ZX Spectrum, and what if Nausicaä from Studio Ghibli’s Nausicaä of the Valley of the Wind used a computer?” It is tiny, unlike most anything else around these days, and, once you wrap your head around it, pretty fun.

I won’t go into how to develop for it here (mostly because I’m not heaps good at that, not yet) but will walk you though how to get it running under a relatively recent release of macOS.

For more info on how to use it and develop programs for it see:

Assumptions

I’m assuming that you, at a minimum know how to find and launch the terminal application on macOS. Opening Launchpad or Spotlight and typing Terminal” should do the trick. Beyond being able to start the terminal application this assumes no prior knowledge of the command line nor Unix.

To run a Uxn rom you’ll need a Uxn emulator. There are a few of these out and about, but I’ll focus on the reference implementation here, Uxnemu.

This implementation has only one dependency, SDL2. SDL2 provides the audio/video bindings, as well as a few other niceties, to the host OS.

If you’ll be building Uxnemu from source you’ll need SDL2 to be installed on your machine. I’ll provide more information about that further on.

Quick and easy

If you don’t want to bother with installing anything other than Uxnemu you can download a build of it that includes SDL2 here.

When this downloads it’ll look sort of like a text file, not a normal application like you are probably used to. Before you run it you’ll need to change permissions on it to make the file executable (able to be run as a program). To do this you’ll have to launch the macOS’ terminal.

Once you’ve launched the terminal, either drag your downloads directory on to the terminal and press return on your keyboard, or type the following (assuming you’ve not changed the location of your system-standard downloads folder),

cd ~/Downloads

Then press retrun on your keyboard.

You’ve navigated to your downloads directory! Next up, we’ll make the freshly downloaded Uxnemu executable. To do this, type the following:

First, ensure that the file is present in the downloads folder:

ls

Then hit return.

You should see a list of all the contents of your downloads directory, including uxnemu. If you don’t see uxnemu you are either in the wrong directory or didn’t download it.

If you need to troubleshoot: check what directory you are in — type pwd and then hit return. This will display the current directory, it should return a string of text that ends in Downloads.” If you are in the downloads directory and still don’t see uxnemu download it again and check to where it is being saved.

Once in your downloads folder with your fresh copy of uxnemu run the following commands to make it executable:

chmod a+x uxnemu

Hit return!

This command will make uxnemu executable. To test that it worked, run the following,

./uxnemu

Then hit return — you should see output like, usage: uxnemu file.rom. If you do, that means that it worked! You’ve now got yourself a working uxnemu emulator.

Snag a rom and go nuts!

Give it a go, download the piano.rom from here.

Now run,

./uxnemu piano.rom

A new window will open. You should see something along the lines of this!

Uxn’s piano rom

Slightly more involved

Now, if you wanna get a little deeper into the weeds, you can assemble uxnemu from source. To do that, you’ll need to have some more pieces in place.

Preparing the way

Before we get started ensure that you’ve got all the necessary tools to build unxnemu’s C source. The easiest way to do this is to use macOS’ deeply middling package manager, brew. Before you install it, you’ll need to install the Xcode Command Line Tools (if you haven’t already, or if you haven’t installed the full, GUI, version of Xcode).

Here are directions for how to do that. Or, tl;dr wanna live dangerously xcode-select --install!

If you don’t explicitly needs Xcode, I recommend the command line tools over the full Xcode GUI because Xcode is ginormous, and will devour a computer’s disk-space.

Once you’ve got the Xcode Command Line Tools and brew installed you are almost ready. As mentioned above, Uxn depends on SDL2. We’ll use brew to install that.

Check that brew is working by looking for SDL2,

brew info sdl2

It’ll output something sort of like this if everything is working to plan,

Brew info sdl2’s output

With that command we ensured that sdl2 is available through brew, but haven’t yet installed anything. Eyes on the prize, you are ready to install sdl2. Do that by running,

brew install sdl2

That will output something along the lines of,

Brew install sdl2’s output

Note that brew can sometimes be bananas slow. Patience is key to this step.

Once brew is done doing its thing, and sdl2 is installed you are ready to start cooking with fire!

Doing the thing

The first step is to obtain the uxn source code. We’ll use git to do that. At the terminal,

git clone https://git.sr.ht/~rabbits/uxn

Then return.

This will download the uxn project. It’ll look something a bit like this,

Cloneing uxn’s output

Once that has completed, enter the directory you just cloned using git by typing,

cd uxn

Then return — from within that directory, now type,

ls

And then hit return on your keyboard. You’ll see a listing of the directory’s contents, like this

The contents of uxn’s repo

Now we’re reading to do the thing! Uxn comes with a handy script called build.sh. The script is a little program that can build uxnemu and a few other programs for you. To run it,

./build.sh

And return!

Uxnemu build and run

That will run the build script. The build script will build, and then run a default rom, like this!

Uxn’s piano rom

At this point you should be good to go!

Building from source means that you have the uxnemu as well as the uxnasm.

The uxnemu is an emulator, capable of running assembled Uxn roms.

The uxnasm is an assembler, capable of assembling Uxntal files into roms for the uxnemu to run!

As I learn more about about Uxn I hope to write more about it, in the meantime, check out the great tutorial!

Make a git whoops? Clean it up!

git rm --cached `git ls-files -i -X .gitignore`

This piece of magic uses your .gitignore to sort out what should be deleted from git history, but keeps files locally. Great if you’ve accidentally committed a file that you need locally, but don’t want to be tracked in git.

This assumes that you’ve already got a .gitignore file in place.

Link logging

How to land on the Moon

Diagrams. Many great diagrams. Even more switches. The quality of older NASA imagery is gorgeous. I’m always surprised by how non-clinical and how artful the compositions are.

BeepBox

For any lovers of nanoloop out there, this will be a nice little toy to play with.

For other fun game dev tools: Game Dev Tools for Raspberry Pi

(🎶 Here is a very tiny loop I made 👩‍🎤)

Tokyo became a megacity by reinventing itself

If you agree with Harvard economist Edward Glaeser that cities are humanity’s greatest invention, then Tokyo is perhaps our greatest example: a stunning metropolis, home to more than 37 million people and one of the world’s wealthiest, safest, most creative urban centers.

Even if you’re not particularly interested in how megacities shape human behavior, Tokyo is unavoidable—it has already changed your life. The city is the ultimate social influencer, the node through which the world connects to Japanese culture.

Seeking the Productive Life: Some Details of My Personal Infrastructure

…this is included for a single terrifying phone wallpaper. Scroll until you find it. It cannot be missed.

A play in a few acts:

  1. Colonialism is alive in the exploited tech work force
  2. The economics of package management
  3. ASDF, the version manager for all your languages
  4. Terry Pratchett Warns Of Online Fake News In 1995 Interview, Bill Gates Shoots Him Down
  5. Open gardens
  6. A highly opinionated guide to learning about ActivityPub
  7. Pleroma Hosting on Raspberry Pi
  8. Electric Zine Maker (early beta, be gentle, hug it often)

The cutting-edge of cutting: How Japanese scissors have evolved

I know of plenty of folks who like fancy stationary, pens, and pencils, but scissors seems much more up my alley, tbh.

The Invisible City Beneath Paris

I am a sucker for any sort of urban exploration stuff.

The Convivial Society, No. 17: Arduous Interfaces

And @kicks’ response, Reply: Arduous Interfaces. From the response:

We’ve long had some equivalent of Robert’s Rules of Order—now we see codes of conduct or forum guidelines. When we think of running an online group, we think of moderating’ it. Policing the conversations, cleaning up spam and so on. And this is fine: probably necessary and I wouldn’t have the foggiest idea of how to do it.

But I think we also need a librarian ethic somewhere among these groups. Maybe there are moderators out there who have this kind of commission. You are dealing with a community of writers, who are all filling the community up with their verbose output—this is all data that needs to be grappled with.

So, think of a librarian at work: putting books back under the proper heading, referring readers to specific titles, borrowing books from the outside—in fact, I wish communities were better about knowing what other communities are in the topical vicinity—to help everyone find themselves a home. (I do see this, though, in the Indieweb community—a person might be told to check out micro.blog or maybe TiddlyWiki. However, I think we’re lucky to be a meta-community.)

Toward the next generation of programming tools

I’ve long thought that the real next-generation programming language won’t be a rehash of LISP, C, or Smalltalk syntax. It won’t be character based at all: it will be visual. Rather than typing, we’ll draw what we want.

The Pizza Lab: Foolproof Pan Pizza

Make thee a pizza.

Black and white and RSS; Photos you can only see in a feed

Fans of RSS, unite!

I created a tag-specific rss feed for my blot.im site, and you can too!

I’ll be the first to admit that I post a lot of disperate stuff to my website. Maybe folks don’t wanna follow it all? Maybe you just wanna follow my link log posts? Now you can!

I’ve added the ability to subscribe to rss feeds for posts with a specific tag. From any tag page, you’ll now find a link that (as of this moment) says Follow this tag.” Clicking that will expose the tag-specific rss feed.

Do you use blot? Wanna do the same?

3 easy steps:

Step the first

Create a new view to use for the rss feed. I called mine tag.rss.

Step the second

Paste the following code into the newly created view.

Step the last

Access the new view, someurl.com/tag.rss?name=pineapple, where pineapple is any tag you’ve applied to content on your site!

Now that you’ve got a working tag-specific rss feed, expose it to your readers somehow.

As always, huge shoutout to David, the mastermind of blot.im.

Of note: this functionality is currently undocumented and could change down the road.

In reply to: How to Pick a Career (That Actually Fits You) - Wait But Why

When scientists study people on their deathbed and how they feel about their lives, they usually find that many of them feel some serious regrets. I think a lot of those regrets stem from the fact that most of us aren’t really taught about path-making in our childhoods, and most of us also don’t get much better at path-making as adults, which leaves many people looking back on a life path that didn’t really make sense, given who they are and the world they lived in.

Wait but Why is one of my favorite blogs. This post really resonated with me, because I’ve been thinking through a lot of this sort of thing lately.

My major critique of the post, however, is that it is wicked focused on you, whomever you may be, as an autonomous, singular unit. Solo. The Yearning Octopus” doesn’t take into account the other creatures and tentacles in the mess. Sometimes other folks’ yernings need to be considered and prioritized over your own when making career choices. This isn’t a bad thing, just something that felt missing from the piece.

How-to micro.blog, a micro.guide

I’m completely smitten. I’m in love with micro.blog. I’ve been using it for nearly a year and am more or less off of all other social media. I think micro.blog made me a developer. Before micro.blog came around I was a full time product designer and project manager, then micro.blog came along and I started hacking on my own CMS. Now I’m a full time PHP developer!?

To start

What is micro.blog?

At first glance micro.blog is like Twitter — a micro blogging service (clever name, eh?). But that isn’t all.

Micro.blog is both a micro blogging service and a blogging platform. What does this mean?

From a practical standpoint, this means that micro.blog users can post short, tweet-like posts, and longer wordpress-y posts…and photo posts (a la Instagram).

Users can also reply to one another, building threaded conversations starting from some initial post.

Quick recap

Micro.blog is a (micro)blogging service. With it, users can post short, tweet-length posts, photos, and long-form blog posts.

How-to

This is where things start to get interesting! Micro.blog is different from most any other service (that I’ve ever encountered) on the internet in that it isn’t a silo.

To use micro.blog you do indeed need to register an account (just an email, no password necessary).

(ノ◕ヮ◕)ノ*:・゚✧

After registering you’ve got to make a choice (a choice that you can change up at any time) — where do you want your content to live?

Brief digression

In the world of Facebook and Twitter you don’t choose where your content (posts, photos, comments, replies, etc.) are stored. They’re stored on Facebook/Twitter’s servers. Therefore, they own” your content. And your content becomes something they can mine.

Micro.blog is different. Your content lives wherever you want it to. As long as your content is accessible via RSS or JSON Feed, micro.blog can work with it.

Granted, there is a discussion to be had about data mining RSS feeds…but that’ll wait for another day.

How-to, continued

A micro.blog user-account is really just 1 or more RSS/JSON feeds all streamed through a single spot.

It allows you to aggregate RSS feeds into a single social feed” that represents you.

SO — back to that choice: where do you want your content to live?

Because it is also a blogging platform, micro.blog can host your blog for you for $5/month.

Alternatively, you can host your content elsewhere (e.g. using wordpress, tumblr, hugo, jekyll, coleslaw, etc.), and just add the RSS/JSON feed from that externally hosted blog to your micro.blog account. BOOM!

Up and running 🏃‍♀️💨

But how do you post?

Well — if you’ve opted for a micro.blog hosted blog you can post directly through the micro.blog website, or by using the micro.blog iOS or macOS apps, or even by using the dedicated photoblogging app, Sunlit 2.0.

If you’ve opted for a wordpress site, you can also create posts using the micro.blog iOS or macOS apps, and Sunlit 2.0, too! They’re interoperable 🕺

BUT WAIT!!! There’s more! All of the aforementioned apps (micro.blog iOS, macOS and Sunlit 2.0), are also micropub clients, so you can post to absolutely any micropub enabled website using them (that, however, is a longer discussion, so not fully explored in this here post).

Some closing notes

…this post ended up being a bad how-to” guide, and isn’t really all that micro in length 🤷‍♀️ 🌮

Micro.blog is young and still growing. It is by no means perfect, but @manton, @macgenie and co. are doing an awesome job on both the technical, and (more importantly) the social front. They’re doing a lot of really solid work building the community, striving for inclusivity, and thinking through design choices at these early stages that could have major ramifications down the road.

There can be a bit of a learning curve to get up and running with micro.blog, but, I’ve found the community to be wicked helpful, and they’ve got a great help blog that I imagine/hope will continue to grow, and become the go-to repository for all questions micro.blog.

A year with the IndieWeb

I’m approaching the 1 year anniversary of my being all in on the IndieWeb! NO REGRETS!

To celebrate, I thought I’d go crazy and write a brief description of what I think the indeiweb is, and how I IndieWeb.

What is the IndieWeb?

People

First and foremost, the IndieWeb is people — a really great group of people. I haven’t found a more welcoming group of folks online. I feel wicked lucky to have found this community, and to engage with it on the daily.

Standards

On a technical level, the IndieWeb is a collection of protocols and standards, namely:

  1. IndieAuth
  2. Micropub
  3. Webmention
  4. RSS
  5. Microformats

Separately, each of these is a powerful tool of the internet. Combine, they’re a nearly unstoppable, Voltron-style robot of webby-social-goodness.

  • IndieAuth turns a domain name into your IndieWeb identity (particularly when paired with h-card markup)
  • Micropub gives you a flexible way to create all sorts of content
  • Webmention and RSS allow you to connect with, respond, and subscribe to other IndieWeb folk
  • Microformats guarantee everyone is speaking the same language (at least on a machine-readable level)

NOTE: there are many other standards at play within the IndieWeb community, but I feel that this group make up the backbone of the IndieWeb.

How do I IndieWeb?

In a word: sloppily.”

But, it is getting better every day.

I started my IndieWeb journey using wordpress, but wordpress and I did not and still do not get along, so, I rolled my own IndieWeb CMS (which I will one day clean up and open source).

I call my CMS Pneumatic Post, and I think of it as less of a CMS and more of an IndieWeb micro-service. It has a couple moving parts:

  • Micropub and media endpoint
  • Display layer
  • RSS feed(s)

I post to my website using either Quill, Omnibear, the Micro.Blog macOS app, the Micro.Blog iOS app, Sunlit 2.0, or Indigenous. Each of these is a micropub client, so all play nicely with my website’s micropub endpoint.

My site currently supports a couple different posting contexts, namely titled posts, notes, replies, likes, and because I have a media endpoint in place, photos. I haven’t yet enabled any other posting contexts because my bases seem pretty well covered by this group.

When I post a like or reply-type post, my micropub endpoint automatically sends the liked or replied-to link a webmention, using telegraph.

I rely on brid.gy and webmention.io to handle all incoming webmentions. I don’t currently store or cache received webmentions, I just display them. Thanks to micro.blog, however, I’ve been having heaps of great webmention-fueled conversation, so I’m thinking I should build a way of storing incoming webmentions, rather than relying wholly on webmention.io.

The last bit is RSS. My site also supports a malformed JSON Feed, but I keep that hidden for the time being, since it relies on unsupported features at the moment and is generally a hot mess. My site spits-out two different RSS feeds, an easily discoverable public facing one that is just a stream of all content posted to my site, as well as a feed of all incoming webmentions. This means that the bulk of my IndieWeb-life is managed through an RSS reader…which is how I like things to be.

That, in brief, is how I IndieWeb.

The future!

What does the future hold? Well, for one, I’m most certainly gonna keep on keeping on as I have been, because I’m 100% in love with the IndieWeb and the IndieWeb community.

I recently stood up my own instance of quill, and imagine I may do some more things like that.

My BIG task is to clean up Pneumatic Post and open source it for others to use. My intention is that Pneumatic Post be as EASY as possible to get up and running with. I tried, and I’ve seen others try to get into the IndieWeb using wordpress, and it works, but there is a bit of a learning curve at times.

I’m also keeping an eyeball on projects like @dgolds nanopub and @hjertness micrpub. I think static sites are the bee’s knees, and I would love to be able to post to one using micropub.

The biggest frustration I have with Pneumatic Post at the moment is search. It sucks. because all of my content is stored as flat files (and there are a LOT of them) there isn’t a great way to index all the content. At the moment I search my past posts with either DuckDuckGo’s site search or JavaScript (I’ve played with both lunr.js and datatables). Neither option is great. I’ve started a project that I dream will become the go-to answer for everyones’ IndieWeb searching needs…but solr is a wee bit tricky…and I’ll admit that I’m a bit out of my depth. In the meantime, I think I may just run a little database alongside my flat files and search with good old fashioned SQL queries.

Finally, I’d very much like to attend an IndieWebCamp, and, host a Homebrew Website Club. From the digital to meatspace.

In conclusion

Do you IndieWeb? Do you want to IndieWeb?

I’d love to talk IndieWeb with you.

Sincerely and thank you kindly,
Eli

#indienews