June 4, 2017

Javascript tries to keep the Memex down

I spent the majority of the last week feeling hopelessly overwhelmed by javascript and wondering if my tech skills had fallen off the wagon of relevance.

0

A reminder of what I’m working towards: I want an easily-installable version of the Memex so I can start the virtuous cycle that comes from users and feedback. The quickest path to that is 1) running the API in Docker and 2) an OSX app that will provide the interface, orchestrate the Docker scripts, and control the importers. I worked on the latter this week.

Electron is a framework for building desktop apps using html/css/js. It easily wraps an existing single page app and gives you additional APIs for interacting with the operating system using Node.

Unfortunately, the Node ecosystem is a steaming mountain of garbage (alternatively, I just don’t deeply understand javascript; probably a bit of both). Half my time this week was spent fighting Node, figuring out how to resolve incompatible packages, and deciphering unhelpful stack traces. Frequently, the solution to a problem was several rounds of rm -rf node_modules and reinstalling everything and things would mysteriously work the third or fourth time around. There’s no satisfaction when you get something to work but don’t understand why.

And over and over and over again:

45927DA8 EEB8 4081 91F1 99CE6037697F

By the end of the week though, I feel I’m now at a point where I have a pretty good handle on Electron and have that invincible feeling of knowing exactly how to build what I want to build. The highs and lows of programming!

What I got done this week:

  • a lot of research on how Electron works, which addon packages are available, etc
  • built the skeleton Electron app that wraps the Memex frontend
  • a tab system so I can have multiple instances of the frontend running through tabs and handle things like middle-button clicks, etc. The Electron app is running a new Ember app that controls the frame and tabs which run the existing frontend Ember app inside. It uses the new <webview> tag which is an exciting improvement on <iframe>’s.
  • Did some tests with using Electron to spawn and monitor processes which I’ll use to control Docker and the importers.

What I have to do next:

  • a screen for when the app first launches; users can choose to set up a new API instance via Docker or add connection info to a self-hosted instance
  • a preference pain for reconfiguring this stuff
  • a screen for configuring and monitoring importers

The Memex Book Club

I didn’t read much about the Memex this week but I finished this book about racial housing segregation and it was incredible.

© 2021