Live data from Hacker News

Apple is looking for engineers to convert its code from C to Rust

jobs.apple.com

161–170 of 240 posts

Re: Apple is looking for engineers to convert its code from C to Rust

#162

Earlier quoted context omitted.

Swift is not yet a zero-abstraction-cost language like C or Rust which might be one of their concerns.

C is far from zero-abstraction-cost. For example you can't do a generic qsort supporting user defined types with zero overhead, other than with preprocessor macros (ugly, unsafe, unmaintainable).

This sort of standard seems hard to meet for any language, if the bar is "all abstractions should be included and zero-cost." In practice, you probably write a specialized quicksort for a given type in C to work around the lack of generic quicksort. You do this in the same way you manually convert your suspendable forkable computations into a struct that has all your "local variables" and an "instruction counter" inside to work around the lack of copyable coroutines in almost every language.

Depending on your choice of compiler, a more legitimate concern with C is maybe the lack of computed goto. See here about the nonzero cost of missing this feature: https://eli.thegreenplace.net/2012/07/12/computed-goto-for-e...

Re: Apple is looking for engineers to convert its code from C to Rust

#163
post #143

Earlier quoted context omitted.

Who da hell wants to move BACK to Edmonton ?

Could you please stop posting unsubstantive comments to Hacker News? You've done it a lot, and we're trying for different than that here. In particular, please don't post regional flamebait to HN (or any flamebait). https://news.ycombinator.com/newsguidelines.html

How is he managing to post these comments repeatedly? I need to make a new account here every day or two because I get flagged almost immediately.

Re: Apple is looking for engineers to convert its code from C to Rust

#164
post #152

Earlier quoted context omitted.

I don't see any obvious arguments why. It integrates very well with existing C code, a lot can be done with structs and static dispatch, there are pointers, etc. Not Rust level capabilities, but pretty good.

> Not Rust level capabilities And you answered your own question. If you aim for performance, "pretty good" doesn't cut it.

Sad but true, performance is possible in swift but it’s not very idiomatic and usually not safe.

Rust still looks like Rust and it’s still safe when you have performant code.

Re: Apple is looking for engineers to convert its code from C to Rust

#165
post #98

Earlier quoted context omitted.

people who are very good at C or C++ will be able to learn Rust pretty quickly yes. People who LIKE C probably won't like Rust though. Its more like C++.

For what it's worth, I used to be big on C, and grew to very dislike C++ (because it's simple insane). Rust is my language of choice for years now. IMO, Rust shares the same inner-simplicity that C has, but combined with ability to build and use bulletproof higher-level abstractions. The same way I roughly knew what machine instructions (roughly) my C code produces, I know what machine instructions my Rust code produ…

Well yes, because LLVM generates the machine instructions

Re: Apple is looking for engineers to convert its code from C to Rust

#166
post #143

Earlier quoted context omitted.

Could you please stop posting unsubstantive comments to Hacker News? You've done it a lot, and we're trying for different than that here. In particular, please don't post regional flamebait to HN (or any flamebait). https://news.ycombinator.com/newsguidelines.html

How is he managing to post these comments repeatedly? I need to make a new account here every day or two because I get flagged almost immediately.

Ah, is this your 45th account @gasthem_1? :P

Re: Apple is looking for engineers to convert its code from C to Rust

#167
post #150

Why not Ada language?

My best guess: much more people have come in contact with Rust than with Ada. I have done a few hobby projects in Rust, but trying Ada hasn't even crossed my mind.

Rust has the better ecosystem. Ada has nearly nothing in terms of open source community.

Re: Apple is looking for engineers to convert its code from C to Rust

#168

Earlier quoted context omitted.

Uh, there's an entire software engineering program at the University of Waterloo: https://uwaterloo.ca/future-students/programs/software-engin...

Just throwing some info out there since I graduated from this exact program. We may graduate with an engineering degree, but we technically cannot use the word engineer in our title (in Canada) until we get our accreditations, which require a couple years working in Canada under a somebody else with their P.Eng license. The vast majority of us (definitely > 90% of my class) have moved to the US after graduation where…

Thanks for the clarification -- I'm in CS, and did not know that.

Re: Apple is looking for engineers to convert its code from C to Rust

#169
post #166

Earlier quoted context omitted.

How is he managing to post these comments repeatedly? I need to make a new account here every day or two because I get flagged almost immediately.

Ah, is this your 45th account @gasthem_1? :P

There don't seem to be any other gasthem_n users.

Re: Apple is looking for engineers to convert its code from C to Rust

#170

D now has an Ownership/Borrowing system implemented (though it is in its early stages). It will work with existing code, including DasBetterC code. You're able to incrementally adapt a program to O/B rather than rewrite it.

I really like the D community and the language itself. However, I cannot but feel a slight disappointment after Andrei had thoroughly dissed Rust's model, and had promised to have a novel approach to memory management that would also get rid of the garbage collector (a year back? Two years back?), and now we have D following Rust's model. Maybe that's why we should be careful what we say in public.

I have all the respect in the world for Walter and the Dlang community in general, and wish the very best for D!

Post reply on HN