Simple reason: because it’s open source software.

Specific advantages that Scite has over Sublime, because it is OSS:

  • It runs on Pi (because, like, WE HAVE THE SOURCE)
  • With a solarized setup, it’s just as pretty
  • No NAG SCREENS OMG kill me now

Sublime is great.  Scite is better.

There are three progressively-deeper methods of installing your node modules, all useful in their own way:

  • npm link sets up symlinks to your commands
    They will point directly to your code, which you can dynamically change to see the result.  This is best for early development.
  • npm install -g of a package with dependent modules listed on the local drive
    This will use the locally installed version of the dependent module that was also installed with [npm install -g].  Format:
"dependencies": {
  "rad-scripts": "file:///home/m/development/thedigitalage/rad-scripts"
},
  • npm install -g of a package with officially published dependent modules
    This will use the latest publicly available version of the dependent module.  In this example, the latest version above 1.0.3 will be used.  Format:
"dependencies": {
  "rad-scripts": "^1.0.3"
},

It is so easy to publish your own node modules.  I glided right through these and now have a published module of reusable scripts.

Here’s a quick summary of the lifecycle of publishing your module:

npm install -g 
# you can now test this module in another module if you use a [file:] dependency in the other module
# keep doing this until you are happy with local install
# when ready...
# update version in package.json
git commit -a -m "1.0.5"
git tag 1.0.5
git push && git push --tags  # NOTE: bitpost has a git hook to push changes all the way up to github
npm publish

I gave myself an hour to add multi-line search-and-replace support in my code.  It took 3, and C++11 std::regex_replace() gave me a hard crash with inline replacement.  The syntax can be annoying (for example, using double escape), so for reference, here’s a jumpstart.

Given:

using namespace std;
string str = "Lots of text to search\nacross lines";
string from = "text[\\s\\S]*lines";
string to = "rainbows";

Boost happily did the job:

#include 
 boost::regex reg;
 reg.assign(from);
 str = boost::regex_replace(str,reg,to,boost::match_default);

C++11 is even simpler, but it crashes with gcc 4.9.2 if you use the same string for source and target, like this:

#include 
 std::regex reg(from);
 str = std::regex_replace(str,reg,to);

You can fix that by using a swap string:

#include 
 regex reg(from);
 string newstr = regex_replace(str,reg,to);
 str = newstr;

But it isn’t working across lines, with this particular syntax, and I’ve seen others complain that they couldn’t get multiline syntax going.  I’ll stick with boost for now until this smooths out a little bit more.  Onwards.

 

At some point, refind stopped booting up my Macbook, and I had to use the Option (read: Alt if you’re not drinking the koolaid) key on startup to get back into OS X.  For which the drive was completely full.  Some things I went through to get going again:

  • deleted my partition table during a fit of aggressive frustration.  That was useful!  Fortunately I had gparted up and running when I did it, so with a litle math, I was able to rebuild the partition using sfdisk (also sgdisk and gdisk and … but sfdisk instructions here were clear).
  • I need to boot my Macbook with no keyboard or mouse plugged in (I suspect the mouse was nonstandard and causing driver issues)
  • Reinstall refind, and actually follow the instructions to put the boot driver in the specified place.
  • Use [nouveau.noaccel=1] with ANY recent ubuntu on my Macbook to get past nvidia hardware lockup – follow these steps to get a real nvidia driver installed that won’t lock up:
     sudo ubuntu-drivers devices      # get list of drivers
     sudo apt-get install nvidia-###  # choose ### from list
  • Make the call and reinstall OSes as needed.  Ubuntu was fairly painless to reinstall on top of existing install, now that I have great notes on setting it up, and I am getting pretty good at saving my configurations.  Remember to keep config files pushed to repo as you change them!

Down to three OSes now, ubuntu, windows, OS X.

I played around enough with different git repository structures to know what works best for my uses (a central repo that I can pull and work on anywhere, that may or may not need to actually be updated live on the central server).  The “git central shared repository” pattern on the wiki has the details.