News for hackers. Stuff that matters.
Re:Why Perl? by raverbashing on Monday June 12, 2023 @05:56AM (#36290891)
> it’s getting rewrote in Go or Rust, not Python again.

Have you ever tried to recompile 1 yr old code in Rust with the latest compiler?

Re:Why Perl? by orwin on Monday June 12, 2023 @07:52AM (#36292014)
Why wouldn't you tag your 1 year old code with the compiler it was written for?

And same question for grandparents. I'm not a great dev, average at best, but at least I control my systems.

Re:Why Perl? by stonogo on Monday June 12, 2023 @12:20PM (#36296022)
If that's what best practices are for these languages, I now better understand my collegues who will not move away from C/C++. Having to identify a specific compiler version for each bit of code sounds like a nightmare.
Re:Why Perl? by zkldi on Monday June 12, 2023 @12:55PM (#36296709)
it's very easy. you make a file called `rust-toolchain` next to your `Cargo.toml` that contains the version of rust you intend this to compile for.

It will then compile for that version.

Re:Why Perl? by bamfly on Monday June 12, 2023 @04:14PM (#36300315)
C and C++ projects of any notably complexity & size often suffer from those exact same kind of "library or build tool or compiler updated—now the project won't build" problems. Absent some pretty heroic & unusual levels of discipline from all involved, anyway (which is also a way to avoid those issues in most other languages that have them).

[EDIT] Check out issue trackers for such projects, some time. "Build broke due to [thing] being too new" is a routine issue to encounter.

Re:Why Perl? by gkbrk on Monday June 12, 2023 @01:19PM (#36297217)
Why should you need to? Just use a stable language, or a language that has a standard or a specification.
Re:Why Perl? by chlorion on Monday June 12, 2023 @11:07PM (#36304660)
Rust is a stable language.

Stable features will never be removed or broken. If you don't use unstable features, and aren't relying on something that is unsound, your code will continue to compile. If it doesn't, this is considered a bug and should be reported.

This isn't just a hollow promise either, they run tests against most of the crates on crates.io when making changes to the language to ensure that old code is not accidentally broken.

Claiming that rust isn't a stable language is pure misinformation, but sadly not uncommon.

It's also worth noting that some of the language is specified informally, this is the "reference", there are also RFCs for new features that describe exactly how the feature is intended to work. This isn't a complete formal specification, and could use a lot of work, but I don't think a formal specification with a committee is any better than an informal reference, assuming the reference is exhaustive!

Re:Why Perl? by cesarb on Monday June 12, 2023 @04:35PM (#36300651)
> Have you ever tried to recompile 1 yr old code in Rust with the latest compiler?

I have, more than once; it worked perfectly fine.

The only time it's broken for me is when the code had unstable nightly-only features, hidden behind a "nightly-only" feature flag, which was rejected by the parser on a newer Rust compiler, even though it would not be compiled due to the feature flag being disabled (even though it wouldn't be compiled, it still had to be parsed; IIRC, it was the change to the inline assembly syntax, and the fix was just to change from "asm" to "llvm_asm").

Re:Why Perl? by raverbashing on Tuesday June 13, 2023 @12:42AM (#36305419)
Not my experience, though I think it was more due to libraries (but need to update a library -> needs newer compiler version -> needs to update another library, etc)