Saturday
May182019

Lee Maze, a new rust crate on crates.io

Leemaze is my latest crate, offered as a MIT/Apache2 licensed, open source gift to the Rust programming community.  It's named after the Lee Algorithm https://en.wikipedia.org/wiki/Lee_algorithm.  It solves 2d, 3d, 4d and 5d block mazes.  A 5d block maze is basically your morning commute with moving walls (cars) and 2% driver crazies that cause ..predictably best avoided.. random daily events, so... yea... if you are trying to avoid things that haven't even happened yet you might be living in a 5d maze world.   

What does leemaze do?  It gives maze directions.  Feed it a boolean block maze and it will find one contender for shortest possible path.  Or maybe it returns a None().  Or if your entrance is your exit a empty vec![].  Any maze with a open 2x2 block may have multiple shortest path solutions.   

Why did I make leemaze?  I was learning the superb KISS3D rust graphics library in April and wrote a 3D block maze.  Then I decided to generalize my code - navigation is a common computing problem after all... and then realized that rust didn't have jump out at me obvious Lee Maze crate that did the same thing.

how does it work?  Forgive the unchecked code- i'm in a HTML editor but my intent is all goodnesss -

       use leemaze::{AllowedMoves2D, boolify_2d_maze, maze2dpath};

let mymaze = vec![

                   vec![0,1,0],

                   vec![0,1,0],

                   vec![0,0,0], ];

let maze = boolify_2d_maze[&mymaze, &0];  //convert type to boolean trues and falses,  

let northsoutheastwest = AllowedMoves2D {rules: vec![(0,-1),(0,1),(1,0),(-1,0)] };  //allowed x,y axis moves.  

let entrance = (0,0);

let mazeexit = (0,3);

let maze_escape_directions = maze2dpath(&maze, &northsoutheastwest, &entrance, &mazeexit);

And that's it, out comes a None() or a Some(contender_for_shortest_possible_maze_directions).  Um... are the directions indexed? YES, from the list of AllowedMoves2D you provide --> if your allowed moves were 'northsoutheastwest', maze_escape_directions might be vec![1,1,2,2,0,0] - for south south, east east, north north.  Use the directions to move your robotic death tank or NPC towards its goal.

Ok, all well and good but I want to do a 5d maze, hows that work?  Build a 5d maze and just replace AllowedMoves2D --> AllowedMoves5D,  boolify_2d_maze --> boolify_5d_maze, and maze2dpath --> maze5dpath.   

So a gift of code to the rust community, enjoy.  And good luck on your morning commutes.  :)     

Tuesday
May142019

A Round Up on why it sucks to be Bayer

A jury awarded a couple 9 billion dollars in damages for two cancers they believed related to the use of the herbicide roundup.  It pains me somewhat, but two human lives aren't worth 2 billion dollars, not according to various federal agencies put the value of a human life at somewhere between 2 million and 12 million dollars.  Drive off a road that was improperly built to tilt out (rather than into) the curve and your life is only worth 6 million.  Get poisoned because a business disposed of lead car batteries in your cistern well, and magically your life is now worth about 9 million plus multiple times property and collateral damage.  

Yes, a floating value on human life that depends on how special your death is ... curious.  But let us accept that some magic value per human life exists, round about 9 million.

So the couple in California, Alva and Alberta Pilliod, both came down with Non-Hodgkins lymphoma,  after a potentially misguided effort to keep lawns dandelion free.  Non-Hodgkins lymphoma has a 1 in 5000ish rate for singles, or about a 1 in 25 million-ish by chance alone odds for Alva and Alberta to both get the disease by bad luck.   Long odds, but the stats mean there should of been roughly 10 double diagnosis couple cases in the United States in 1973, the year before roundup's introduction. Their lawyers argue the primary cause of their cancers to be exposure to Roundup herbicide, and they have been awarded 2 billion dollars.   To me this seems a bit excessive by most measures.    

This is what 9 million times two looks like:  $18,000,000.  This is what 2 billion dollars looks like: $2,000,000,000.   See the three extra zeros?  ($18,000,000 : $2,000,000,000)  

If the jury accepts that Alva and Alberta (and presumably some of the other 14,000 pending court cases and anticipated 65,000 new diagnosises of Non-Hodgkins lymphoma each year) were harmed by roundup or, more plausibly, boogie man chemical impurities in roundup, why would they award enough to greatly limit payouts to other victims?  Bayer only makes 7.3 billion-ish in crop profits per year, so if each victim gets $1 billion for cancers weakly linked to herbicide use.. that be seven payouts before Bayer starts selling assets.

And, worst case senario by historical incidence rate and Roundup's 1974 introduction, I don't think Bayer is responsible for even one in ten of new cases of Non-hodgkins lymphoma.  Look at the data, I don't see a trend bump post 1974 in incidence or mortality.  A trend upward in risk for the elderly is present, largely as the population of the elderly grew between 1950 and 1990.  There is no off trend deviation after 1974, the year Roundup was introduced.  My conclusion: if roundup causes cancer at all, it's still way less dangerous than sunshine.  

[CANCER RESEARCH (SUPPL.) 52, 5432s-5440s, October I, 1992]. Non-Hodgkin's Lymphoma Time Trends: United States and International Data.  Susan S. Devesa2 and Thomas Fears. Epidemiology and Biostalistics Program, Division of Cancer Etiology, National Cancer Institute, Bethesda, Maryland 20892

Bayer (cough, monsanto, cough) helps keep food inexpensive and plentiful.  Bayer reduces world wide hunger and even heroically saves lives.  That said, its hard to be a fan of Bayer crop products - one can argue roundup kills beneficial wild plants,  their enviromentally persistant insecticides have encouraged bee colony collapse, reduced butterfly and moth species, damage animal immune systems in ways that encourage bat suceptibility to white nose fungus, kill fish, increased frog and amphedian fungal infections and maybe weakened some animal immune systems enough that they allowed some rare cancers to persist.

Insecticides kill bugs, herbicides kill plants, roundup is a herbicide, and they are necessary evils in the modern world.  Just take care with using necessary evil unnecessarily.  Maybe GM dandelion/lawn weeding/lawn mowing munch bunnies will be a thing someday, along with AI-assisted UV laser pest control that targets mosquitos, dandelion seeds and any stray much bunnies that happen to be getting a mosquito bites.?    

Marketing "necessary evil" to kill every harmless dandelion in every household lawn world wide might be where Bayer went wrong.

Thursday
Apr182019

Presently Indeed.com Lists 79 Positions wanted for Reality TV Show Writer

I don't know how many reality TV shows there are... but 79 open positions for a industry hints at a total of somewhere around 1500-1600 writers for those all those "reality TV" shows.  Google gave me a list of 50 reality TV shows so that puts the number of writers per reality TV show somewhere between 2 and 32. 

Why do they need so many writers for television that proports to be unscripted?

Monday
Apr152019

Notre Dame in Flame

I have memory, a book of guest's written prayers inside Notre Dame.  The line I added was, "I pray for love."   

Friday
Apr122019

Long Term Vaccination Survival Study

Every now and then I think facebook antivaxer's just hate children.  

Largely because it isn't seen as ethical, negative vaccination controls haven't really been done.  Maybe they should be, given a large perfectly intent and willing population. 

Like the six year old in Oregon with antivax parents that insisted he not get a $30 tetanus vaccine, same child injured his forehead and had a parent stitch it closed (ouch!), same child then contracted tetanus at a cost of $811,929 dollars for nearly two months of intensive care, needed a helicopter ride to the hospital, AND the same parents that then continued a vaccine free life for their child. ( https://www.nbcnews.com/health/kids-health/unvaccinated-boy-almost-died-tetanus-hospital-bill-was-more-800-n981256 ) Perhaps God's lesson in most things is beyond comprehension, but in this case, if there is instruction, it seems clear.    

So just how would a vaccinated vs unvaccinated negative control population fare in health outcomes and care cost after 18years?  

hmm... second thought that's really not ethical.