Connected

I’m almost restored to my former glory. Bought a cable modem, shot some textual nonsense to Comcast in India, plugged everything in, and now I have my updated router and modem. Everything is all set for $30 in services and $50 in extra hardware.

Not bad. The only task left to tackle is getting my FreeBSD machine connected, upgraded, and ready to roll. I don’t feel that my setup is complete without remote access.

[]

The Linux Party

Taken from http://www.trollaxor.com/2001/12/linux-party.html.

First, there was a plan: how to bring together the two different development groups at work? My boss said there was a sort of tension he thought could be eased by some social interaction. Not easy. Both the different development groups despised one another, each thinking its “art” was more important and eloquent than the others'.

First there was the XML group. They worked on our website, documentation and formatting, and simple configuration apps and some front-ends to Java stuff. They also did our web sites. They used CSS, HTML, XSL, JavaScript, and a bit of Java. They typically dressed casually, drank coffee and tea, and liked to work straight from the spec: no ”Learn XSL in 30 Days” books were to be found in their cubicle farm.

[]

Ink

My New Tat

So I’ve got some new ink. Figured I’d show off. I’ve had the idea for it rattling around in my head for two years or longer.

The first part, “Pia Fraus”, is latin for “Pious Fraud”. It’s basically a catholic phrase that entails the idea that a religion is justified in lying and being unethical so long as it preserves the religion. The second part, “Temet Nosce”, means “Know thyself”. It was initially proposed as a warning to readers to know their limits. It has that meaning to me, as well, but also means to me that I should stay true to myself. Then, of course, there’s the dead tree.

[]

I Think I’ve Died to Death

For the last month, I’ve been busy. Stupid busy. Retarded busy. My employer has had me working 10 to 12 hours a day six days a week. Sometimes seven. I’m doing the same job I had been doing prior, just for a better situation. I can actually afford to live, now. I’ll be upgrading the accommodations for my family, upgrading my car, potentially upgrading my computer, and hopefully in the next ten years I’ll be upgrading my career as a professional metrologist.

[]

Chamfer Calculator in Rust

I’m going to go through my old TI-82 calculator and rewrite my most useful little trig tidbits in Rust for everyone to use. The first one I’m going to reiterate will be my chamfer calculator. This is pretty handy if you ever have to measure chamfer diameters in a production environment. You can quickly calculate the greatest diameter of any given print dimension chamfer with this tool. It ought to compile on the latest version of Rust without warning. Should. I’ve hit my Ballmer curve, so I’ll just throw that warning right away.

[]

Euler’s Totient Function in Rust

Figured I’d write a much quicker varient of the Totient Function in Rust. Excellent language. I don’t have a grasp on the finer points available to Rustaceans, but I can hopefully put concurrency and whatnot to use at some point. The code is quick, but I know it can be quicker if I just spend some time putting it together.

This is the quick crap I dreamt up:

use std::env;

fn gcd(mut m: u64, mut n: u64) -> u64 {
   while m != 0 {
       let old_m = m;
       m = n % m;
       n = old_m;
   }
   n
}

fn totient(mut a: u64) -> u64 {
    let mut y = 0;
    let o = a;
    while a != 0 {
        if gcd(o, a) == 1 {
            y += 1;
        }
        a -= 1;
    }
    y
}

fn main() {
    let args: Vec<_> = env::args().collect();
    let n: u64 = args[1].parse::<u64>().unwrap();
    let m: u64 = args[2].parse::<u64>().unwrap();

    let x = (n..m).collect::<Vec<u64>>();

    for i in &x {
        let o = totient(*i);
        println!("{:?}, {:?}", i, o);
    }
    
}

The code should compile with no problems. Yes, I realize that u64 is overkill. No, my code will never require unsigned 2^64 integers. It may be a quirky choice, but whatever. Change to u32 as needed, though I’m sure it won’t be a problem for anyone.

[]

Euler’s Phi Function in Ruby

I’ve taken a few implementations apart and I’ve tried to figure out what the intention of Euler’s Phi function is. I think I’ve got it. I found an interesting implementation in Ruby here but it wasn’t satisfactory. Sure, the code was incredibly minimalistic, but it was also recursive and overflowed the stack for anything over 7704 iterations. I didn’t like the inflexibility of it. So I rewrote it in big ugly moron code that isn’t recursive, but is capable of scaling to some decently large totients. I might see if I can code something similar in Rust, just for shits and giggles.

[]

Updates. Downdates. All-around-dates.

This is more of a ping than anything. Not that I really need to ping anyone or anything. Figured I’d let you know I still breathe. I’m still around, I’m still cooking up things to contribute, despite my complete lack of available time in which to do it. I have kids, I have gainful employment, and I have a significant other, so don’t expect much in the way of me contributing to this blog. Not that I’ve ever continually contributed to this damn thing at any point- I’ve mostly excised bits of my brain and shat them into text, all for you to analyze and use as needed.

[]