News for hackers. Stuff that matters.
Re:Cargo-style dependency management for C, C++ and other la... by aprdm on Wednesday October 21, 2020 @02:42AM (#24845316)
What is a serious language? Is being used in companies like Amazon to deliver runtimes used by a considerable % of the internet not serious?
Re:Cargo-style dependency management for C, C++ and other la... by papaf on Wednesday October 21, 2020 @03:25AM (#24845531)
What is a serious language?

I would call C a serious language. Its running your laptop, your phone, your car, the airplane you took on holiday, the fighter planes that protect your airspace, your washing machine, and if you are unfortunate enough to get seriously ill it will probably be running on the medical equipment that keeps you alive.

One of the reasons it is serious is because it is standardized and multiple implementations exist.

Re:Cargo-style dependency management for C, C++ and other la... by Xylakant on Wednesday October 21, 2020 @04:41AM (#24845926)
Brainfuck has a language specification (it's nice and short) https://esolangs.org/wiki/Brainfuck and a long list of implementations, some even hardware backed. https://esolangs.org/wiki/Brainfuck_implementations

So if that's the criteria, then brainfuck is a serious language.

Re:Cargo-style dependency management for C, C++ and other la... by blub on Wednesday October 21, 2020 @06:55AM (#24846544)
It seems implausible that you don't know the difference between an international standard and a specification document written (of all places) in a wiki, which means you're being purposefully obtuse and don't really have any counter-arguments.

If one wants to use a tool in a life-critical system, a system that might be in use for decades they're going to reach for one of the said "serious languages": C, C++, Ada, etc. That list's very short and it includes neither Brainfuck nor Rust for that matter.

Re:Cargo-style dependency management for C, C++ and other la... by Xylakant on Wednesday October 21, 2020 @08:45AM (#24847254)
Ok, I picked brainfuck as an - obviously extreme - example of how a language can tick both those boxes and still be not a serious language. I can pick a number of examples of languages that have no international standard and a single implementation and are used in systems that might be in use for decades. Let's take go. A single implementation, it does have a spec, but I'm not aware of an ISO standard. ADA, while having an ISO standard, isn't exactly blessed with many implementations either. Java, while having multiple implementations, is not an ISO standard.

The point is: neither of those two datapoints is a particularly useful metric on how "serious" a programming language is and much less even a useful metric on how well it is suited to any given task. Even how mainstream programming languages are is not a useful signal for that. Javascript is very much mainstream, but I hope no one ever will want to program a cars ECU in a JS dialect. Specialized applications are almost by definition the realm of specialized languages.

Re:Cargo-style dependency management for C, C++ and other la... by jschwartzi on Wednesday October 21, 2020 @12:10PM (#24849176)
They have, in the past, reached for LISP and various other languages. What matters for life-critical systems isn't the presence or absence of a formal specification. It's more important to foster a culture of design verification and validation of tooling. You can use Brainfuck in a medical device provided you can create the right organizational architecture to ensure the quality of your Brainfuck code. It's more about creating a rational engineering organization and having a process of searching for problems and solving them proactively rather than waiting for your customers to test your code.

Of course most rational engineering organizations wouldn't choose Brainfuck because it's harder to write code that other people can evaluate. But it's not automatically out of the question if you have a good reason for its use.

Re:Cargo-style dependency management for C, C++ and other la... by int_19h on Wednesday October 21, 2020 @08:49AM (#24847286)
It doesn't include JavaScript, either - and yet it's one of the most popular and successful PLs today. Very few people write code for a "life-critical system".
Re:Cargo-style dependency management for C, C++ and other la... by aprdm on Wednesday October 21, 2020 @03:39AM (#24845608)
I do wonder what other languages you consider serious apart from C. You could use similar examples for a lot of other languages, C isn't the only language used to keep our civilization alive.

I did a fair bit of development in C, and developed hard real time systems in VHDL that did involve life & death, but, wouldn't call any language used in the industry generating value as a non serious language...

Re:Cargo-style dependency management for C, C++ and other la... by papaf on Wednesday October 21, 2020 @07:35AM (#24846757)
I do wonder what other languages you consider serious apart from C.

Off the top of my head I thought C++ and Ada. However, you mention VHDL which I agree with and somebody else pointed out Javascript which is also a good point. The Javascript example (along with C++) make the point that serious computer languages are not necessarily great languages.

I would argue that Rust is not a serious language (at the moment [1]) because its still young, there is no specification and if anything happens to the one implementation it would be a disaster.

Despite C being a null pointer minefield, if someone was to sue a developer the argument could be made that it is an industry standard. In the less likely event that a Rust program hurt somebody what are you going to say?

[1] https://users.rust-lang.org/t/is-there-a-plan-to-get-a-forma...

Re:Cargo-style dependency management for C, C++ and other la... by afiori on Wednesday October 21, 2020 @03:40AM (#24845615)
So also javascript? :)
Re:Cargo-style dependency management for C, C++ and other la... by mmm_grayons on Wednesday October 21, 2020 @08:51AM (#24847297)
Spacex did launch a rocket with an electron interface...

In practice, though, V8 is the serious impementation. The interesting thing about C and C++ is that I don't know if any given dev is using Clang, GCC, or MSVC until I ask him. I know a JS dev is using V8.

Re:Cargo-style dependency management for C, C++ and other la... by terafo on Wednesday October 21, 2020 @05:32AM (#24846146)
Critical software for planes is written in Ada. C is not safe enough.
Re:Cargo-style dependency management for C, C++ and other la... by coldtea on Wednesday October 21, 2020 @06:09AM (#24846306)
That was the idea back in the 80s. Didn't turn out that way, planes, rockets, NASA, still use C just fine, and Ada was not that widely adopted in the end.
Re:Cargo-style dependency management for C, C++ and other la... by platinumrad on Wednesday October 21, 2020 @05:57AM (#24846254)
And yet C++ was (in)famously used in the JSF... A less notorious example is Airbus's use of Frama-C.
Re:Cargo-style dependency management for C, C++ and other la... by throwaway894345 on Wednesday October 21, 2020 @09:08AM (#24847469)
I’m not sure (but could be wrong) that lambda and Fargate (the services which use firecracker) service “a considerable percent of the Internet”, but CloudFlare’s network does and it has some routing components in rust IIRC.
Re:Cargo-style dependency management for C, C++ and other la... by otabdeveloper4 on Wednesday October 21, 2020 @04:00AM (#24845700)
No, "used for pet project by mismanaged megacorp" is not a sign of seriousness. (I'm sure there's some team inside FAANG that's using Brainfuck in production right now.)

"The Rust development team isn't interested in supporting your obscure embedded architecture" or "sorry, this platform was phased out due to technical debt" is what I mean by not serious.

Look at Python and how any attempts to make alternative interpreter implementations ultimately failed. (And they at least have PEPs.)

Re:Cargo-style dependency management for C, C++ and other la... by Xylakant on Wednesday October 21, 2020 @04:23AM (#24845828)
I'd hardly call for example firecracker a "pet project by mismanaged megacorp". It's running production workloads - and at AWS scale, I'm fairly certain it's running more work than most of us here ever touched in their career total. https://github.com/firecracker-microvm/firecracker

> And they at least have PEPs.

Rusts language development has been guided by RFCs since like the beginning. There's no comprehensive standard as in "somebody went and wrote down the current state", but it's also not the case that there's no written spec of how things should behave. You could base a new compiler on that and there's actually developments to have different backends to rustc. Cranelift for example https://github.com/bytecodealliance/wasmtime/blob/main/crane...

> "The Rust development team isn't interested in supporting your obscure embedded architecture" or "sorry, this platform was phased out due to technical debt" is what I mean by not serious.

So any compiler team that stops supporting some sort of architecture because it's either rare or no longer worth the effort is not serious in your opinion? Like GCC, that has a decision making matrix for that? https://gcc.gnu.org/backends.html And dropped various architectures along the way?

Re:Cargo-style dependency management for C, C++ and other la... by blub on Wednesday October 21, 2020 @07:06AM (#24846598)
Until Rust becomes at least a mainstream language (and if it becomes one), criticism addressing its lack of mainstream adoption and novelty are perfectly legitimate and these arguments are worth considering when deciding what to base a project on.

The fact that a specific corporation has implemented a specific project by using a specific tool is completely meaningless as to the appropriateness of using that tool in another context.

Re:Cargo-style dependency management for C, C++ and other la... by Xylakant on Wednesday October 21, 2020 @08:30AM (#24847113)
You're moving goalpost by quite a bit. Mainstream adoption and seriousness - whatever that might be exactly - are certainly not the same metric. For example, in your sibling comment, you mention ADA as serious language. ADA certainly is not mainstream.

> The fact that a specific corporation has implemented a specific project by using a specific tool is completely meaningless as to the appropriateness of using that tool in another context.

You're entirely correct. That's another goalpost move - nobody proclaimed that being used for business critical projects makes rust in any way magically fit for any and all other conceivable projects.

Re:Cargo-style dependency management for C, C++ and other la... by blub on Wednesday October 21, 2020 @11:42AM (#24848917)
I'm not moving any goalposts because I'm not the original person you were talking to. I was merely saying two simple things:

a) the fact that a corporation uses a language is meaningless and can't be used as an argument for anything - except maybe what to learn if you want to get a job there.

b) that all arguments based on Rust's novelty, call it "serious language" "mainstream language" or whatever - have merit. Rust is obviously not mature enough for many potential users and you can't convince them by talking about RFCs.

Re:Cargo-style dependency management for C, C++ and other la... by Xylakant on Wednesday October 21, 2020 @12:13PM (#24849217)
> a) the fact that a corporation uses a language is meaningless and can't be used as an argument for anything - except maybe what to learn if you want to get a job there.

I disagree with you here. This is a low level production grade application in a domain that requires secure and stable operation. The fact that a team picked a specific language for this application demonstrates a certain level of stability and suitability for various problem domains. There are more examples of large scale rust codebases. That does not imply that rust is magically suited to all problems or that you should pick rust for your project at all cost and without further consideration, but it does mean that rust is used in “serious” projects that have significant monetary value attached to it.

> b) that all arguments based on Rust's novelty, call it "serious language" "mainstream language" or whatever - have merit. Rust is obviously not mature enough for many potential users and you can't convince them by talking about RFCs.

You’re again arguing against points I never made. Rust has no ISO standard - true. But the point I was responding to was “the implementation is the spec” and that’s plain false. The RFC is written first and the implementation is tested against the RFC. There is a written document that specified expected behavior. Sometimes you need to follow the chain if RFCs modify existing behavior and there’s certainly cases where the implementation doesn’t follow the RFCs, but it not like all c compilers are 100% spec compliant all of the time.