Hacker News new | past | comments | ask | show | jobs | submit login

Totally fair. I summed up that way because this is the kind of thing I'd have done with Python historically, and it struck me as neat that it's so easy to do with Rust. As someone pointed out on Reddit: this isn't really "scripting", and that's correct. I put it in "scare quotes" for a reason. ;p



Is it fair to assume the actual task was more complicated than renaming .cha to .txt and you just made it more generic here for example's sake?


No, actually: it really was that simple, and I told my friend it was a super simple thing.

I took the fact that it was so simple as an excuse to do the more complicated things alongside a very simple piece of code. That way, it's easy to see what the code does and then think about the implications of being able to run something like it (including something more complicated) cross-platform.


Yeah, I read further in the comments and saw you say what I had meant here. Either the example was stripped down or there was a bigger picture reason why to do this rather than invoking 'find'. Thanks for writing this!


For future reference the DOS command 'ren' does this.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: