nicholas joseph purry (take 2)

Dani Giroux, president of The Runaways Animal Rescue, holding Nicholas Joseph Purry, formerly Gumball

Monday we picked up our sixth cat, a male polydactyl ginger with one eye missing. His story hit my soft spot, so after talking a bit with my wife we decided to apply for his adoption. It’s tough placing an injured animal because so many possible pet owners want a perfect animal. Life in its myriad forms is never perfect, no more than we humans are. In the 24 hours he’s been with us he’s shown what a sweet little guy he truly is. As my wife remarked, Nick looks like he’s constantly winking at us.

Why did we give him such a long name? Because:

  • He’s missing his left eye, just like Nick Fury,
  • If you watched the movie “Captain Marvel” then you know a young Nick Fury lost  his left eye when he was scratched by Goose, the Flerken, who just happened to be portrayed by a ginger tomcat.

Why This Post was Posted Twice

I posted this the first time yesterday. In the process of writing the post I used the newer WordPress editor. During the writing process, I pasted some text into what would be the title, only to somehow corrupt the title. In the process of trying to re-edit the title after the initial post the new WordPress editor managed to wipe out the entire article. I was so angry that happened I closed up my computer and went to bed.

I don’t know what happened. All I know is that the original was totally gone. At this point, whatever good will I was feeling towards the new WordPress editor has been completely obliterated.

running rust python

If you’re interested in Rust and Python like I am, then you may reach a point where the two combine. In this instance I wanted to see if anyone was attempting to implement the Python language interpreter in Rust, and after a quick search, I found the project RustPython on Github ( https://github.com/RustPython/RustPython ).

I cloned a local copy of the source to my Windows 10 Pro itty bitty computer (a Minis Forum UM250 with an AMD Ryzen 5 quad-core CPU, 16GiB, 512GiB SSD). I also have Rust 1.55.0, the current latest release, installed. I followed the directions on the README and it compiled without errors. Unfortunately when it tried to execute it crashed out complaining it couldn’t find ‘encodings,’ and did I have RUSTPYTHONPATH defined. The RUSTPYTHONPATH message stopped me for a moment, as there was nothing in the readme about it. A quick search on Google found the solution.

So, here’s what I’ve discovered so far on Windows 10:

  • You need to set $RUSTPYTHONPATH to the full path to the project’s Lib directory. On my machine I do all my work in C:\Develop, and I have cloned Rust Python into C:\Develop\Rust\RustPython. The Lib folder is thus C:\Develop\Rust\RustPython\Lib, and I execute $env:RUSTPYTHONPATH=C:\Develop\Rust\RustPython\Lib. A quick alternative is to cd into the Lib folder and execute $env:RUSTPYTHONPATH=$PWD from the command line if all you want to do is test within that window.
  • The README says to execute cargo with the release flag to avoid crashing out due to stack overflow. You don’t need to do that anymore. I accidentally forgot to include the release flag in one run, and Rust dutifully built the debug version and ran it without incident.

I’m very impressed with this Rust implementation of Python. I’m no Python expert, but it has so far run a number of my scripts correctly. I am trying to determine how I might meaningfully contribute to the project. I doubt I could write decent Rust source for them, so I may just be on the sidelines watching. I just hope that this project continues on and doesn’t die a slow death like many other past open source projects that showed promise.