The Cranky Sysadmin A world of technology, fun, and ignorant rants.

December 12, 2017

You Blink and You Miss it. (Rust on Microcontrollers)

Filed under: Uncategorized — Cranky Sysadmin @ 9:09 am

I looked away from rust for about a year and a half because I couldn’t find tools for my embedded projects. In that time, it seems like I missed a lot. Rust on ARM Cortex-m looks pretty mature, with a fair amount of tooling. This video covers the highlights, and the presenter’s blog has more info (and some general embedded advice as well). A search for cortex, f3, f4, or arm on produces a lot of promising results. I need to play fewer video games and pay more attention!

December 8, 2017

Rust for Microcontrollers

Filed under: Arduino,Programming — Cranky Sysadmin @ 2:06 pm

When I started looking at Rust, I liked the fact that it claims to be a memory safe language with no garbage collector. I thought this would be great for microcontrollers. Sadly, at that time there weren’t any microcontroller targets easily available. Things seem to have changed a lot. I’m aware of 3 microcontroller targets available for rust:

  • AVR-Rust which is a functional but early port of rust for Atmel AVR controllers. I’ve been working on some basic examples similar to the basic arduino demos.
  • Rust for Arm Cortex-M microcontrollers. The most polished process is documented here.
  • There is also a crate and some language support for MSP430. There is an issue to track problems with the port.

I’m neither a rust expert, not a microcontroller expert, so I’ve spent a lot of time catching up. Most of my effort has been put toward understanding the AVR-Rust system. It has been fun but I haven’t produced anything noteworthy yet.

October 26, 2015

Developing Node in Emacs on Ubuntu

Filed under: Uncategorized — Cranky Sysadmin @ 8:00 am

I am impressed by my first impressions of node.js. It feels very Unix-like. If you want to develop node in emacs, a good place to start might be Truong TX blog. My setup differs a bit from his. You can find my whole emacs environment on github. Outside of emacs, you of course should have node and npm installed. I then installed Tern with ‘npm install tern -g’. The relevant snip from my emacs init is below

;; if you aren't running a package manager, you'll need to
;; require js2-mode, ac-js2-mode, tern-mode, tern-auto-complete
;; javascript using js2-mode and tern
(add-hook 'js2-mode-hook 'ac-js2-mode)
(add-hook 'js2-mode-hook (lambda() (tern-mode t)))
;; I have tern in a non-standard directory
(setq tern-command '("/home/FOOFOO/node/bin/node" "/home/FOOFOO/.node_modules/bin/tern"))
(eval-after-load 'tern
 (require 'tern-auto-complete)
(add-to-list 'auto-mode-alist '("\\.json\\'" . js2-mode))
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
;; if you don't want to warn on missing semicolons,
;; uncomment the following
;; (setq js2-strict-missing-semi-warning t)

I don't know why I never used yasnippet before, but I've been wasting a lot of time without it. Add the following above any auto-complete sections:
(require 'yasnippet)
(yas-global-mode 1)

And with that, you should be able to settle into some nice node tutorials.

October 19, 2015

What is this nodejs Thing You Speak of?

Filed under: Programming — Cranky Sysadmin @ 7:19 am

A very long time ago, I was interested in exposing javascript via apache in much the same way as mod_perl does. I got a working demo running based on (now dead) mod_snake code and the mozilla spidermonkey javascript engine. I abandoned the project due to other interests, but I still like the idea of serverside javascript. Now there is nodejs, which is a javascript engine based on the v8 engine. It has a reasonably complete standard library, and a nice package manager called npm. There is even a (old outdated) mod_node if you really want to hook it into apache. Node looks like it’s architected well and has good performance. If I were to judge a book by its cover I’d say node is worth learning and using.

April 24, 2015

Xubuntu 15.04 Emacs and Python Data Science Setup in Virtualenv

Filed under: Programming,System Administration — Cranky Sysadmin @ 1:20 pm

If you understand the title and want to see the instructions, see after the fold.

emacs and ipython and virtualenv oh my!

April 15, 2015

The Best Advice I Ever Received

Filed under: Life — Cranky Sysadmin @ 8:17 am

By quantity, my parents have probably given me the most good advice, but the most useful piece of advice was given to me over a game of chess with my English teacher, Mr. Matkowski. I had made some placeholder move. He shook his head and said to me, “Don’t do chicken shit moves”. That was 30 years ago and every time I do a chicken shit move, I still hear his disapproving voice in my head. I need to find him and thank him some day.

January 26, 2015

Rust and Project Euler

Filed under: Programming — Cranky Sysadmin @ 8:54 pm

I stumbled across a neat language called Rust recently.  What makes it interesting to me is that it’s billed as a replacement for C that is type safe and memory safe without a garbage collector. Rust has been ported to Arm Cortex M4 and the lack of mandatory garbage collector means that it should run well on constrained systems. Apparently it also has a good concurrency model, but I don’t know much about that yet. I also recently discovered Project Euler, which is a bunch of curated math problems. Well, now I’ve started solving the Project Euler problems in rust. If you’re interested, you can find the few problems that I’ve solved so far on github. They’re probably not ideal solutions since I’m not an expert at math, rust, or efficient algorithms, but one has to start somewhere.

January 17, 2015

Roped In

Filed under: Uncategorized — Cranky Sysadmin @ 2:34 pm

At our last meeting, the Pentucket Radio Association elected me to the position of president. I hope that I can represent them well.

The club participates in several events during the year and ultimately, I’ll be responsible for their success. Like many other local clubs, we have some recruitment and outreach challenges and I will need to attend to those as well. I’ll blog about the more interesting public facing stuff, names excluded to protect the innocent.

November 18, 2014

Catastrophe While Tapping the Last Hole

Filed under: Uncategorized — Cranky Sysadmin @ 5:48 pm

I finally tapped the last of the 38 holes for my milling table. On the last hole, I broke the tap because I was in a hurry and really bore down on the tap. I’m not sure there is an easy way to remove the tap, and I’m not going to waste the work piece. It looks like I’ll be staring at that broken tap for as long as I use the milling table. The good news is that it was a hole in the corner, so I’m not likely to need to use it often.

October 8, 2014

Still tapping holes

Filed under: machinist — Cranky Sysadmin @ 1:27 pm

The milling table is still a work in progress. Tapping the 3/8-16 holes by hand was a lot harder than I anticipated. I have about 12 holes left and at my current rate, I should be done in a couple of weeks. Some lessons I’ve learned are:

  • Ratchet taps are a lot easier than regular tap handles. $20 at harbor freight for one that has proved robust so far.
  • Even with a ratchet tap, tapping larger holes is hard on my hands and back.
  • A drill press with a laser is helpful for starting the hole and keeping it true. I use a chamfer bit to hold the tap into an indent in the top of the tap
  • Bolt down your drill press and clamp down your work securely. If you think it’s secure, it probably isn’t yet.

I use non-detergent motor oil as lubricant, and I back out a bit after each 3/4 of a turn. I’m sure professional machinists will shake their heads at my choice of lubricant, but that’s what I have on hand.

Older Posts »

Powered by WordPress