I've found myself using Rust for little one-off tools and scripts lately because it's so darn easy to type `$ cargo new --bin foobar` on any of the three operating systems I use daily.
There's already a pretty nice ecosystem of web servers, graphics libraries, crypto libraries, etc. -- Not to mention the bindings to existing libs.
At the end of the day I always end up with wicked fast binaries that I can run on Windows, Mac, or Linux with fairly minimal fuss.
I really haven't found a language that hits this niche the way Rust does, which is really strange to me considering Rust's mission statement.
No shell scripting language is that easily portable barring something like MinGW.
Go and Java probably come the closest to writing easily portable software, but I personally find writing Rust to be a more fulfilling endeavor.
The other day I wrote a tool to deduplicate my image library in Rust. The first binary to compile worked perfectly on both Mac OS and Windows, ran wicked fast (on my SSDs anyways), and it was really a pleasure to write. -- Rust's iterators alone really make for some beautiful code.
This was a really long-winded way of saying I love Rust, and thanks for all the hard work ^^,
I wanted to do some pre-build command execution/file moving/etc and was shocked at how little fuss was actually involved.
More work than bash/python? Sure. Worked first time barring logic bugs? Hell yes.
Also +1 on Rust iterators, they're a sublime mix of ownership semantics and functional constructs.
With go, I think it's easier to accidentally end up with some kind of not-quite-portable thing, despite the fact that go is a new language.
Interesting (and good!) that you have such a pleasant experience with Rust too.
> The other day I wrote a tool to deduplicate my image library in Rust.
Hm, did you by any chance share that somewhere? I'm planning to do some reinstalls and consolidation of storage, partly from having several machines, and partially from dual-booting (having extra file-systems). I'll probably figure it out with find and xargs or what-not, but a Rust-binary would be a welcome change of pace :-)
Perl is probably the tool you are looking for. There are official technet articles about how to use Perl on Windows. Older, now that powershell exists, but they're there.
If you're already familiar with Ruby I imagine it's not too hard to pick up most most of what you would want to know (except context! Probably the most important thing in Perl to grasp coming from other languages).
I did think about comparing images by similarity but ultimately tabled it for a later evening because:
- I quickly realized I had a lot of reading to do
- Resolving "similar images" conflicts is a fuzzier, more time intensive process since: (a) maybe the comparison is just plain wrong?, (b) maybe it's not strictly a worse crop, but rather two common aspect ratios which you'd like to keep, (c) maybe it's not actually "watermark" text but rather it's a meme or image macro, etc.
- Personally: my real problem with images of varying sizes is that I download thumbnails by mistake. That's just PEBKAC and no amount of software can fix that.
(Now that I think about it: it might be nice to have a script which iterates over low resolution images and tries to find a large resolution version w/ Google Image Search.)