Ben's Blog

aesthetics, all out geekery, I.T., web development ben December 31, 2017

Been programming – Tessellation preview

Between the brutal cold and children, I haven’t had as many untainted brain cycles as I’ve been wishing for; still, I just finished the core engine for a universal way to apply translations to pen strokes. It allowed me to rewrite the mandala engine better, and expand it to allow for tessellations, and really any kind of translations on any center at any orientation. It’s been a ton of ground work so it’s nice to finally get some eye candy :).

I can’t wait to see what the internet does with it. Here’s a preview:

[mejsvideo mp4=”http://ben.akrin.com/videos/tessellation_preview.mov.mp4″ ogg=”http://ben.akrin.com/videos/tessellation_preview.mov.ogv” webm=”http://ben.akrin.com/videos/tessellation_preview.mov.webm” poster=”http://ben.akrin.com/videos/tessellation_preview.mov.jpg” width=”640″ height=”360″]

self sustainability, wood ben December 30, 2017

2 Ash 1 Saw

[mejsvideo mp4=”http://ben.akrin.com/videos/2_ash_1_saw_short.mov.mp4″ ogg=”http://ben.akrin.com/videos/2_ash_1_saw_short.mov.ogv” webm=”http://ben.akrin.com/videos/2_ash_1_saw_short.mov.webm” poster=”http://ben.akrin.com/videos/2_ash_1_saw_short.mov.jpg” width=”640″ height=”360″]

Feels very good to chainsaw, it had been a while and I had been itching.

They went right where I wanted them.

 

And for your viewing pleasure here’s just the tree going down, notice the little pine way out in the back getting utterly whipped.

[mejsvideo mp4=”http://ben.akrin.com/videos/ash_01_going_down.mov.mp4″ ogg=”http://ben.akrin.com/videos/ash_01_going_down.mov.ogv” webm=”http://ben.akrin.com/videos/ash_01_going_down.mov.webm” poster=”http://ben.akrin.com/videos/ash_01_going_down.mov.jpg” width=”640″ height=”360″]

Numero dos:

[mejsvideo mp4=”http://ben.akrin.com/videos/ash_02_going_down.mov.mp4″ ogg=”http://ben.akrin.com/videos/ash_02_going_down.mov.ogv” webm=”http://ben.akrin.com/videos/ash_02_going_down.mov.webm” poster=”http://ben.akrin.com/videos/ash_02_going_down.mov.jpg” width=”640″ height=”360″]

aesthetics, self sustainability, wood ben December 29, 2017

I heart wood

self sustainability, solar power ben December 27, 2017

x1.5

Another Winter another solar upgrade. Short overcast days are good at exposing a lower limit. After having lost power a couple of days it was time for an upgrade. The house is growing and so it our consumption, especially on the Summer months when we get used to abundant electricity.

Bringing the panels on site, I always said my son would make a great draft horse.

I’m becoming good at building in the cold, my fingers are not thanking me though.

All I need to do now is prop it off the ground and anchor it for heavy winds.

 

I like this frame, it takes 6 2x4x8 and this is the only scrap lumber left.

I did some quick back of the envelope math and so far our setup costed about as much as what we would have paid for grid electricity these past 2 and a half years. Seems like it costs about as much to learn how to fish than it does to buy fish, at least at the beginning. We have now entered the gravy zone.

aesthetics ben December 26, 2017

Scintillating world

miscellaneous ben December 26, 2017

We woke up to a world encased in ice

We have had ice storms before but this one was particularly thorough in covering every nook in cranny of our land.

The sun shone through pine trees and it looked just like a Christmas tree decorated with lights so I updated the list of traditions I understood since moving to Vermont.

I almost plowed what snow we had before the ice came, but in talking to a friend, she brought up letting the ice accumulate on the snow rather than on the ground so it’s easier to kick out.  Duh, what kind of flatlander doesn’t know that.

The storms are rolling in one after another, the tractor has been invaluable in taking care of all this snow. We have great paths, a flat driveway, and all I had to do was push a button and joyride around.

With all this snow and ice, the trees are taking a beating.

On the less glamorous side of things, emptying the portable toilet is a full on arctic expedition these days. We lost access to the septic tank and really, I prefer it this way.

We started on an igloo 🙂 this is the closed I’ve gotten to building one. We’ll see if we can finish the critical top.

homestead automation, I.T. ben December 16, 2017

Improved sensor metric visualization

Homestead Metrics

miscellaneous ben December 11, 2017

Just like that, Winter is here

miscellaneous ben December 11, 2017

Bring it on Winter

I got to play with the snowblower implement today, super fun. Attaching it took some doing but I’m getting to know the tractor way. Putting chains on is always a giant pain.

miscellaneous ben December 10, 2017

Protected: Snowy Trampoline

This content is password-protected. To view it, please enter the password below.

aesthetics, nature encounters ben December 05, 2017

Dawn Supermoon

 

Not the only morning glow

nature encounters ben December 05, 2017

Critter houses

aesthetics, nature encounters ben November 28, 2017

No words needed

self sustainability ben November 26, 2017

Protected: The dry space race before the snow

This content is password-protected. To view it, please enter the password below.

aesthetics, agriculture, apiculture, apple, canning, maple syrup, preserving, self sustainability ben November 26, 2017

Food Pantry Rainbow

I.T., web development ben November 25, 2017

A Universal Caching Algorithm for PHP using Memcached

Here is an elegant way to use the same caching logic for all function calls which should have a cache. With the proliferation of 3rd party APIs I was quite happy to find a way to address them all with a single mechanism.

[php]function expensive_third_party_call( $param1, $param2 ) {
// universal caching algorithm header
$result = memcached_retrieve( __FUNCTION__ . serialize(func_get_args()) ) ;
if( $result!==null ) {
return $result ;
}

// this is where the third party call actually happens, if we are hit the cache missed
$to_return = /* some super complex and time consuming logic, throw in a couple of web calls*/ ;

// universal caching algorithm footer
memcached_store( __FUNCTION__ . serialize(func_get_args()), $to_return, CACHE_TIMEOUT ) ;
return $to_return ;
}

////////// helper functions bellow //////////
$m = false ;

function memcached_retrieve( $key ) {
global $m ;

$new_key = md5( $key ) ;
if( $m===false ) {
$m = new Memcached() ;
$m->addServer( ‘localhost’, 11211 ) ;
}
$temp = $m->get( $new_key ) ;
$result_code = $m->getResultCode() ;
if( $result_code==Memcached::RES_SUCCESS ) {
return $temp ;
} else if( $result_code==Memcached::RES_NOTFOUND ) {
return null ;
} else {
echo "error: can’t retrieve memcached key {$key} with result_code {$result_code}" ;
}

return null ;
}

function memcached_store( $key, $data, $timeout ) {
global $m ;

$new_key = md5( $key ) ;

if( $m===false ) {
$m = new Memcached() ;
$m->addServer( ‘localhost’, 11211 ) ;
}

// a little heavy handed but we use null to represent that nothing was found in the cache so we can’t have this be the data
if( $data===null ) {
$data = false ;
}

$m->set( $new_key, $data, $timeout ) ;
$result_code = $m->getResultCode() ;
if( $result_code!==Memcached::RES_SUCCESS ) {
echo "error: can’t store memcached key {$key} with result_code {$result_code}" ;
return false ;
} else {
return true ;
}

return false ;
}
[/php]

Requirements

  • apt-get install memcached php-memcached
  • make sure to define CACHE_TIMEOUT

Functioning principle

Using PHP’s awareness of the current function it is in along with the parameters which are passed to it, we derive a unique key which is used so store and retrieve from the cache.

self sustainability, wood ben November 13, 2017

Protected: Stocking up on kindling

This content is password-protected. To view it, please enter the password below.

agriculture, self sustainability ben November 13, 2017

The garlic is in

A bit late and not super well done but we don’t want to skip a season. We planted ~400 cloves.

 

We got leaves from the forest, one the of many things trees give us.

 

Today’s insulation is tomorrow’s soil

maple syrup, nature encounters ben November 13, 2017

Must have been here a while

building, self sustainability ben October 22, 2017

The house addition has a roof

As for the gambrel, we outsourced this work. By the time I get to a roof, I’ve completely had it with ladders and I would never be able to do as good a job as professionals with standing seam tools.

miscellaneous ben October 21, 2017

Popping rocks out of the ground

I’ve been hitting a bunch of rocks with the mowers all Summer long. A few minutes with a tractor are all it takes to pop them out. I’m very happy to see these guys go. Except one which is too massive to go anywhere, I just put the soil back on it and pretended like nothing happened.

apple, self sustainability ben October 21, 2017

2nd cider batch bottled

We are at 10 gallons for the season. I wish I could say they suffice to our yearly consumption.

apple, self sustainability ben October 03, 2017

Cidre

Hard time taking pictures of the process, we’re at 15 gallons of cider, 5 of which are now laced with the inebriating nectar of the gods :). We followed an extremely simple farm recipe, the cider is good but not great. The 2 gallons with honey tasted best, maple syrup left no particular taste but did make the cider a little stronger. Good stuff!

 

Every batch labeled with a picture for the story of the tree it came from.

“Old man’s arch”, “Maple ghost moon”, Honey third from the left” are all there.

Posts pagination

← Previous 1 … 27 28 29 … 52 Next →

This blog is solar powered

Interactive

Handwriting Capture
Mandalagaba
IPv6 link-local to MAC converter
IPv6 MAC to link-local converter
Markov Text Generation
Markov Word Generation
Markov Music Generation
Duplogrifier
Flood Fill Algorithms
Homestead Metrics
RGB Playground
Web Games

Categories

  • aesthetics111
    • plots54
    • specular holography6
  • Books3
  • I.T.202
    • 3D modeling / printing21
    • AI6
    • all out geekery36
    • electronics27
    • homestead automation6
    • maniacal paranoia25
    • plotters49
    • unix / linux29
    • video games4
    • web development29
    • web games3
  • Lego / Duplo67
  • life in the U.S.42
  • miscellaneous202
  • nature encounters114
  • old vinyls3
  • organs2
  • self sustainability560
    • agriculture105
    • apiculture38
    • apple20
    • building131
    • canning3
    • crochet6
    • foraging6
    • hunting10
    • maple syrup47
    • poultry39
    • preserving2
    • solar power28
    • water23
    • wood84
  • trip to a new life6
Theme by Bloompixel. Proudly Powered by WordPress