Was it too difficult to ask his friend to do right click -> create text document-> open it and write 'ren STAR.cha STAR.txt' -> save it as rename.bat and double click on it? Seriously, I'm not sure if this whole thing is a joke... edit: not sure why I cannot write the jolly character here
Using Rust for 'Scripting'
61–70 of 126 posts
Re: Using Rust for 'Scripting'
#62I love this idea. There's an implicit assumption that the reason scripting languages are suitable for scripts is that they play fast and loose with type systems, which allow enough shortcuts and escape hatches to be productive. But that's only part of the story. Along with typing, scripting languages also had the major advantage of being fast to bootstrap and run (`ruby script.rb`) and were fully "batteries included"…
What? Rust basically has no standard library. At least Python doesn't require pulling in third-party libraries to do globbing, create a zip/tar, create a tempfile or send/serve http. Hell, it doesn't even do command-line arguments outside of manually parsing and iterating over the args vector.
Re: Using Rust for 'Scripting'
#63For anyone else curious about Rust, my own learning spree was triggered after reading the "A very brief intro to Rust" Slide Deck [1] by Ashley Williams [2].
[1] https://ashleygwilliams.github.io/a-very-brief-intro-to-rust...
Re: Using Rust for 'Scripting'
#64>Writing it in Rust means I can compile it and hand it to him, and he can run it. And that’s it. As wonderful as they are, the fact that languages like Python, Perl, Ruby, JavaScript, etc. require having the runtime bundled up with them makes just shipping a tool a lot harder—especially on systems which aren’t a Unix derivative and don’t have them installed by default. I'm wondering what part of the twelve step compi…
> I'm wondering what part of the twelve step compilation process was found to be easier than simply installing Python on the target machine? That part is something that you can control. Giving instructions for someone non-technical to install Python and run a script with it, and then helping them figure out how to interpret those instructions, is a heck of a lot more complicated. And yeah, you can diddle around with…
Training someone to accept binary file and run it without question is just dangerous.
Re: Using Rust for 'Scripting'
#65Doesn't Windows have a built-in JavaScript runtime, the Windows Script Host? Sure, it may not be a very pretty language either, but it's still relatively sane compared to batch scripts. (I can't speak of PowerShell.)
Re: Using Rust for 'Scripting'
#66Earlier quoted context omitted.
> I'm wondering what part of the twelve step compilation process was found to be easier than simply installing Python on the target machine? That part is something that you can control. Giving instructions for someone non-technical to install Python and run a script with it, and then helping them figure out how to interpret those instructions, is a heck of a lot more complicated. And yeah, you can diddle around with…
> Giving instructions for someone non-technical to install Python and run a script with it, and then helping them figure out how to interpret those instructions, is a heck of a lot more complicated. Training someone to accept binary file and run it without question is just dangerous.
Re: Using Rust for 'Scripting'
#67Single file executable. Job done.
Of course, if you want to write something in Rust, it's not much use.
Re: Using Rust for 'Scripting'
#68Not true for js on Windows, though. Windows runs JScript natively (same language as JavaScript, only a different name).
Re: Using Rust for 'Scripting'
#69Earlier quoted context omitted.
> Giving instructions for someone non-technical to install Python and run a script with it, and then helping them figure out how to interpret those instructions, is a heck of a lot more complicated. Training someone to accept binary file and run it without question is just dangerous.
Big difference between "run a binary from me " and "run a binary from anyone "
Re: Using Rust for 'Scripting'
#70If one wants to be closer to the metal, Go's cross compilation works out of the box, without all the LLVM/MSVC work that Rust requires (for now, that is). As long as you use the standard library (and packages dependent on the standard library), it will work right away. I've cross compiled Go from my Mac for Windows users when I couldn't get my Python setup to do so, worked perfectly.
(Sure, you can script easy things as shown in other comments, this is a bit more general.)