Tumgik
otrho · 10 months
Text
ZFS snapshots
If you're like me and you're running a long lived FreeBSD server, and it uses ZFS but you don't really need or use the ZFS features and are frankly confused by it and prefer the old ffs days and you're wondering where all your disk space has gone since zpool says one thing but df says another...
You probably have a bunch of snapshots of older versions of FreeBSD put there by freebsd-update taking up space you could reclaim.
zfs -t snapshot will give you an idea and zfs destroy will let you delete the old ones.
I recovered about 10GB this way recently, on my 20GB VPS this was very handy.
2 notes · View notes
otrho · 10 months
Text
Accidental victories
Today I found I had a stuck stepper motor, wouldn't turn when plugged in, but wouldn't even turn when disconnected.
I haven't dealt with steppers before, and the internet didn't have an immediate answer. It did tell me how they work which was useful when I pulled it apart.
There are only a few pieces within, and everything seemed to be in order. Except the rotor just wouldn't turn without a lot of force. So I carefully used my pocket knife to make sure each coil in the stator was fully separated, not touching its neighbor or anything.
And that seemed to fix it! Reassembled, plugged back in and now it's working as expected. Perhaps a bit lucky but I'll take it.
0 notes
otrho · 10 months
Text
Blunt
Speaking of compilers, I'm fiddling with a new language and interpreter for it now. It's a strongishly typed concatenative functional language called Blunt.
I'm taken with the idea of point-free programming: it's kinda elegant, yet tacit and often unreadable. (I don't expect Blunt to actually be used, but it's fun to make.) This means Blunt has no named variables, only definitions.
It's employing a novel (I think) mechanism for function application, allowing pairs of values to be applied as or passed to functions in specific ways. A pair is constructed with a comma operator:
(a, b)
Applying a pair to an argument applies both members in parallel:
(f, g) x => (f x, g x)
Using the 'at' operator applies a function to a pair as two arguments and the caret operator lifts a function into a pair:
f @ (x, y) => f x y f ^ (x, y) => (f x, f y)
And the dot . operator composes functions, while the left-pipe <| operator applies them:
(f . g) x => f (g x) f . g <| x => f (g x)
So functions are built with composition and a complete lack of named parameters. But it's been proved that valid and useful programs can be built with combinators like these, along with id which is a function that returns its argument, and const which returns its first argument, discarding its second. This is especially evident in the SKI calculus. Also flip which will reverse the parameter order for a function.
Here's an expression which will print the string "1/2":
putsln <| (join-str . flip join-str "/") @ (to-str ^ (1, 2));
Mentioning the SKI calculus had me thinking whether Blunt needed an S combinator in its library, since it has const and id already. But I found that S could be implemented with @ and composition. In SKI calculus:
S f g x => f x (g x)
And in Blunt:
((f @) . (id, g)) x => (f @) . (id x, g x) => f @ (x, g x) => f x (g x)
This made me quite happy.
0 notes
otrho · 10 months
Text
Tumblr eh ?
It's been 8 years since I posted anything on here. Holy cow. What has happened in 8 years? A lot. And nothing much.
It looks like I was chronicling my opinions of novels I read. I've kinda stopped reading fiction now. Used to be a novel a month, now it's 3 or 4 a year. Reading far more journalism, current affairs and other non-fiction these days.
And as a hobby I was playing with animation using webgl. Hrmm, I've always liked playing with renderers and graphics but never really finished anything. Haven't tinkered in that department for a while either.
Back then I'd just finished my career in anti-malware and was beginning working on compilers, which is what I do now.
So, OK. I'm not spending my spare time on the same stuff but otherwise 8 years hasn't made that much of a difference. I'm older, my family's older, the world and me sitting in it is pretty much the same.
0 notes
otrho · 9 years
Text
Slade House - David Mitchell
Set in the universe of The Bone Clocks, not quite a sequel but definitely continuing along the same themes, this one is shorter and perhaps a little disappointing.  Three stories told each nine years apart are superficially different but essentially the same and by the third telling a bit flat.  Felt a bit like a contractual obligation.  3.91 stars.
0 notes
otrho · 9 years
Text
Exo - Stephen Gould
Number four in the Jumper series which I really do like.  This one is probably the least enjoyable though.  Much like The Martian and Seveneves there is in my opinion too much space/orbit technological wankery and not enough story.  It takes half the book before the villain is introduced and the first bit of action resembling that from the rest of the series kicks in at the 93% mark and is obviously resolved lickety split.  It felt a lot more YA than the first two for sure, maybe even the third.  3.32 stars.
0 notes
otrho · 9 years
Text
The First Fifteen Lives Of Harry August - Claire North
I was particularly interested in reading this book because the premise–dying and waking as a child with your memories of prior lives–is that of Replay by Ken Grimwood, which I really loved. This book was good, but a bit annoying at times. I felt like the protagonist didn’t really belong in the moment for the first half, wasn’t really exploring all the possibilities of the situation. It finally gets interesting half way through and redeems itself with a story of mystery, friendship and vengeance. 3.9 stars.
0 notes
otrho · 9 years
Text
These Things Happen - Greg Fleet
A fantastic, well written and of course very funny memoir from Greg Fleet. His struggle with addiction is the main thread throughout and also the both positive and negative relationships he's had, all quite interesting, poignant and fun. 4.07 stars.
1 note · View note
otrho · 9 years
Photo
Tumblr media
This is parallax in action.
0 notes
otrho · 9 years
Text
The Martian - Andy Weir
Another moviebook which I enjoyed.  The protagonist is very likeable and the Mars exploration/survival tech is pretty interesting.  Will see the movie when it’s out on DVD I reckon.  The only small problem I had was the fairly haphazard switching between first person log perspective to third person narrative of the same subject, and to third person for other characters.  A little clumsy.  3.91 stars.
0 notes
otrho · 9 years
Photo
Tumblr media
The start of the Snail prototype, scrolls infinitely right to left.
0 notes
otrho · 9 years
Text
Time And Space - James Coventry
Historical look at how the rules to AFL have changed over 150 odd years and how players and coaches have exploited them, or innovated in general.  Pretty interesting.  The very early stuff was interesting because the rules were so fluid and quite different to the modern game.  The mid 20th century stuff was a little dull for me, but the modern history was interesting just because I was familiar with the people involved. 3.85 stars.
0 notes
otrho · 9 years
Text
Make Something Up - Chuck Palahniuk
More short stories, these all written by Chuck though and they're all brilliant. Loved this book. 4.78 stars.
0 notes
otrho · 9 years
Text
Seveneves - Neal Stephenson
No good. Neal Stephenson is one of my faves, I preordered this book which I don't do very often. Boring premise and dull writing, I read up to 50%, just couldn't finish it. 2 stars.
0 notes
otrho · 9 years
Text
The Girl On The Train - Paula Hawkins
Another ‘Girl’ thriller and NYT best seller and again, like Gone Girl, a well written novel with fairly unlikeable characters, not terribly challenging but hard to put down and obviously destined to be a movie.  3.8 stars.
0 notes
otrho · 9 years
Text
Playing To Win - Michael Gordon
This is a brief account of how the Hawthorn Football Club managed to acquire its 11th premiership, starting from 2009 when the club slumped after their 2008 win up to losing the Grand Final in 2012 and to winning in 2013.
It’s a fly-on-the-wall description of how the coaches and playing group and interestingly past legends of the game worked at the time.  As a fan and club member I found it fascinating.  Interesting how heavily Alistair Clarkson leans on military metaphor when coaching; players are ‘soldiers’ or ‘warriors’, certain historic battles used as examples, the US Navy SEAL’s credo was borrowed and of course they used Kokoda in the pre-season.  Four stars.
0 notes
otrho · 9 years
Text
All You Zombies-- - Robert A. Heinlein
I watched Predestination the other night, a fantastic movie, and this is the short story it's based on. It was only a dollar so why not read it too? Unlike all of the Philip K. Dick adaptations (yes, including Blade Runner and A Scanner Darkly) the movie was quite a bit better than the book. The story was written in 1959 and had some old fashioned (i.e., sexist) themes which the movie improved upon to a degree. And again unlike P.K.D's movies the story changes they made only improved the movie. Three stars.
0 notes