Tuesday, March 28, 2023

Storm damage.

 Ladder got blown over by an 80 mph gust of wind. It  broke the arm of my porch swing. I glued the arm back together to use as a template for a new arm.



Spring is sprunging.

 Got a lot of plants started and planted already.







DiffusionBee ai image generator

 This program was an effortless install on my macbook air. It downloaded the models itself and let me add in another one.  It only took about 20 minutes to generate an oil painting of a flower. 



Wednesday, March 22, 2023

Running AI locally on your own computer

 Was looking into what AI program I could run locally on my computer. 

I found https://github.com/openai/whisper 

Followed the directions to install and run it. And it blew me away. It can translate just about any language into time stamped English text. Even if there is background noise. Even if the language is being sung.

I easily turned a few music videos into karaoke songs by creating srt files that VLC displayed over the video. Tough songs that I could barely understand. 

I had to give it a --patience .85 setting because it would get stuck on really challenging parts of the music. Better to get 99% right quickly than 100% sometime tomorrow.

I also was able to record me speaking Spanish and have it create a sub titles in English.

Monday, March 20, 2023

Still living the life soltastic.

 I got a 12 x 16 shed  that had a tiny window in one wall and was bare stud walls. I insulated, wired, sealed it, drywalled it, and put real wood paneling  on the ceiling.  Then I added shelves clear around the whole place. Built a big workbench. And put a light strip up powered from solar panels. Once I get a little more organized it will be a perfect woodworking shop.




This is what it originally looked like, after I added the two reused rv windows.


Variables have type. They should have units too.

A conversation on computer science I had today with a friend.


 OK, one of the things that always bothered me with computer languages is that data has a type, but not a unit.


I completely agree

I have thought about that as well


I would love to see a computer language that could automatically convert miles to km if used miles in the calculation, but the result was in km


It would catch errors much earlier in the process


at least throw an error

orange = 5 apples....   unit error, compilation halted.

One of the space craft nasa sent up crashed at full speed into the martian desert because one programmer used miles and another used km.


Wow, that's crazy. I'm surprised they didn't catch the trajectory issue earlier on.

But yes. 5 = 5 is rarely what is being compared

Only when you are comparing truly unitless numbers, which is rare.

It's almost always 5 of something = 5 of something.


Yeah, I have only found a few formulas where all the units cancel out and give you a number

I think ratio is the main one

but even that doesn't mater if you have 5mi/5km.  The answer is not 1. L


You could do this on top of most languages

const num = new Number.Miles()

But that doesn't mean someone somewhere doesn't convert it back into a raw integer

And you don't get all the standard operators


but I was thinking if the compiler had an extendable library of unit conversions it could do the right thing.


Yep, doing it "in" the language itself at the compiler level would be better.


nods

and if you had an error you could define a conversion to fix the error.

then the assumption could be spelled out.


I like the idea of

const distance = 5 miles;

const time = 30 minutes;

const speed = distance / time;

// speed -> 10 miles per hour

time > distance

// Error! No comparison operator between minutes and distance.

That would be amazing


exactly!


Instead of doing * 1000 * 60 * 60 * 24 you could just configure what units you want as output.

And have automatic localization for countries and regions


So then you could add a line that defined the formula and the compiler could do that math.

and the output box could have the local defined unit and just convert, as you say.

math happening at the web brower output box L

define formula miles = kilometers / 1.62;

and the compiler could be smart enough to know that km = miles * 1.62


Would only numeric types have units?

Would strings / objects / arrays have units?


a string could be xml or tcl data or csv


Ahh I like it


or a language

then if you have english input and french localization it could translate using ai

it could be cool to convert tcl{ tags} to <xml>tags</xml>

I am saving this conversation to a text file [en]. L