-
Updates on 2018-10-23
23 October 2018Continue reading →My late 7th weekly update entry. Trip is ongoing.
This will be very minimal. I have no time to reflect right now!
-
Updates on 2018-10-15
15 October 2018Continue reading →My 6th weekly update entry. Trip begins!
-
Updates on 2018-10-07
07 October 2018Continue reading →My 5th weekly update entry. New Lanark, social.coop, Debt, Wobbly, 35c3…
-
Updates on 2018-10-01
01 October 2018Continue reading →My 4th weekly update entry. One day late this time. Maybe two by the time I’ve finished writing.
Lots on social.coop infrastructure, hosting my parents, …
-
Updates on 2018-09-23
23 September 2018Continue reading →Edition 3 of my weekly entries.
Moving into house, pondering about FareShare, bit of code stuff, buying a bike…
-
Updates on 2018-09-16
16 September 2018Continue reading →What I did last week
Visit foodsharing Edinburgh
I visited foodsharing Edinburgh and met up with Nicola Wilson from The Shrub Co-op. I hadn’t really planned what I was going to say, but gave a walk through of Karrot including how it works on the android app. I was pretty pleased with how it looked and worked :)
It seemed to fit their needs quite well - co-ordinating regularly scheduled pickups and recording the weight afterwards. At the moment they get people to sign up to a regular pickup, but that might just be because it is too hard to have a more dynamic structure - that’s something that Karrot allows more easily.
-
More direction
09 September 2018Continue reading →I have never been someone who is singularly focused on doing one thing really well. At various times I might feel admiration, appreciation, or jealously towards those people. It seems like it might be easier live like that and to know what to do at any given moment.
In any case, I am not like that. Maybe those people aren’t like that either.
At any one time there are many different directions that interest me - maybe I should work hard and save up some £££ so I can do some kind of project with it, maybe I should get more involved with existing initiatives that seem good and can use some of my skills, maybe I should find a bit of forest to live, maybe I should do more bike touring, walking, hitch-hiking, exploring, maybe I should finally leave the comforts of being in the first world, maybe I should stay in/near a city for long enough to get involved properly, maybe I should push to start a family, … I could probably go on.
I am liable to drift in between all of these things though, so want more tools to help that process.
-
Being productive whilst travelling?
13 June 2017Continue reading →I left this blog quite for a long time, I never really wrote much on it anyway. It was going to be for technical articles, probably to build my online presence as a computer programmer. It might still become that, but it will also be my general blog now too, where I write about my pondering, travelling, etc.
I also have my ponderings github repo, I am not sure how the content on these two sites should overlap.
Anyhow! I recently started nomadic bike touring again (nomadic meaning I don’t have a fixed base to go back to). I did this 5/6 years ago (see ontheroad.nicksellen.co.uk) and stopped because:
- my money was decreasing, it clearly had an end, if not now then when…
- I had a compelling offer to go back down south and do some work
-
How to escape text for adb shell input
11 August 2016Continue reading →Just a tiny script containing one sed command to escape input suitable for use with
adb shell input text
command.Make it exectuable then move it somewhere on your path :)
Makes it possible to enter complex passwords for example. Example in combination with pass:
adb shell input text $(pass amazon | adb-escape-text)
-
How to manage private npm modules
17 April 2015Continue reading →For a recent project I was wondering what the best way to share node.js code across projects without publishing modules publically to npm.
The node.js ecosystem is all about sharing code publically and it’s super easy to do this entirely from the comfort of the command line with
npm publish
and friends. It’s quite a joy actually.However, sometimes the code must stay private, but you still want nice modular npm modules. This scenario is less well supported by npm - npm themselves says:
Lots of companies using Node.js love the “many small modules” pattern that is part of the Node culture. However, splitting internal applications and private code up into small modules has been inconvenient, requiring git dependencies or other workarounds to avoid publishing sensitive code to the public registry.
Difficulties related this topic are well discussed:
- https://gist.github.com/branneman/8048520#comment-972519 - this is about 1.5 years worth of discussion on the topic, including some of the key node.js community
- http://injoin.io/2015/01/31/nodejs-require-problem-es6.html
- https://github.com/npm/npm/issues/7426
I actually found a solution pretty quickly that I’m happy with but I wanted to dig a bit deeper into the alternatives.
-
nREPL with laziness in Clojure
26 October 2013Continue reading →I was using Clojure to process github repos for use in libsearch.nicksellen.co.uk and ran into a problem. I had a function that was going through each repository and pulling out the useful information. This is quite time consuming as I use multiple API calls per repository and so I wanted to print some output to show progress.
The problem was that I was only seeing output printed after the entire operation had finished.
I'm quite new to Clojure and there are multiple things that might have been involved:
- Clojure uses lazy sequences in a lot of places - values are only calculated when needed
- in functional languages side effects are kind of special, and writing to
stdout
is a side effect - I was running the code inside Emacs Live in a Leiningen REPL - that's a lot of layers in which to add behaviour
-
A framework for writing graph-based apps
12 August 2013Continue reading →I've been working on a framework for building apps by describing them as a sequence of connected operations forming a graph. It's an early stage but reasonably functional. It's not publicly available at the moment.
It has some relationship to:
This is a quick overview of a few aspects of it.
-
Off to the USA (by boat)
12 January 2013For the next 10 days I’ll be somewhere in the Atlantic on this boat – Independent Voyager.
You can track it’s progress and see general details on the Marine Traffic website. Don’t worry if it disappears in the middle of the Atlantic, it doesn’t appear to track the boats all the way across.
-
MAMP with MySQL ruby gem
25 June 2011Continue reading →The problem
Installing mysql2 (0.2.6) with native extensions /Users/nick/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/installer.rb:533:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) /Users/nick/.rvm/rubies/ruby-1.8.7-p334/bin/ruby extconf.rb checking for rb_thread_blocking_region()... no checking for mysql.h... no checking for mysql/mysql.h... no ----- mysql.h is missing. please check your installation of mysql and try again. -----
Ok, so we need the headers
Fortunately you can download MAMP source form their website - this gives you a .dmg with lots of .tar.gz files, you just need the mysql one.
I tried just copying the include directory as it was - but loads of the header files have variables that need replacing.
Let's compile this thing
compilation uses cmake, so ensure you have that first.
tar zxvf mysql-5.5.9.tar.gz cd mysql-5.5.9 cmake . make mkdir /Applications/MAMP/include/ cp -r include/* /Applications/MAMP/include/ cp libmysql/*.dylib /Applications/MAMP/Library/lib
yay!
Installing mysql2 (0.2.6) with native extensions Your bundle is complete!
-
Listing files within a Solaris package
28 January 2010Continue reading →I don't often require this but always forget the command each time. Previously I had used:
pkgchk -l
| grep Pathname ...but whilst stumbling around I found the much more succinct (and undocumented as far as I can see):
pkgchk -L
-
Compiling Nokogiri gem on Solaris 10 with Sun Studio
28 January 2010Continue reading →It turns out the nokogiri build script makes a few too many assumptions:
- it tests for Solaris-ness by checking target_os is solaris2 where on Solaris 10 it is solaris2.10
- it assumes gcc and sets a bunch of invalid CFLAGS such as -Wall
- it doesn't let me specify a custom lib/include directories - it failed to find my iconv because of this (furthermore after adding the paths manually misleadingly it still said it couldn't find them but the problem was the options passed to cc were incorrect)
- further down the line something decided it knew where Sun Studio was. It was wrong. to be fair this probably wasn't nokogiri's fault.
Update
I've ended up using gcc for compiling ruby related things which knocks out problems 2-4.
However I started seeing problems with a vasprintf symbol not found (similar to this problem). The problem is the same as my point 1 above (in ext/nokogiri/extconf.rb line:22):
should read
For reference
# ruby -rrbconfig -e "puts Config::CONFIG['target_os']" solaris2.10
Update 2
It's fixed by this commit
-
Tools for extracting text from PDFs and Microsoft Word documents
07 January 2010Continue reading →This is a quick roundup of the tools that can be used to extract text from PDFs or Word documents.
-
What's the difference between an event and a notification?
05 January 2010Continue reading →A common thing to expect from a web app is some kind of event feed:
peter liked your photo
joe is also going to see blur next week
your mum returned home
Another common thing is to receive emails when things happen:
your photo has been approved
you are now friends with angie
john sent you a message
-
Modes of working
22 December 2009Continue reading →I've noticed a few things have a similar pattern of working:
- analyse environment and makes plans (logical orderly "left brain" thinking)
- get immersed in immediate goal, following intuition along the way (more creative "right brain" thinking)
- get lost or confused so goto step 1 (broken brain thinking)
-
Track my cycling progress
24 June 2009Continue reading →
In preparation for attempting a double dunwich dynamo (i.e. there and back) I made a web app to track my progress. I've had it on all week so far tracking my progress to and from work to observer how it works. I've noticed a few things:- it actually works, yay!
- I appear to be able to cycle straight through buildings
- I can't cycle very fast
- this is a gross self inflicted invasion of privacy