
Apple is looking for engineers to convert its code from C to Rust - itvision
https://jobs.apple.com/en-us/details/200144575/software-engineer
======
mrpippy
Interesting, this is for encrypting server-server traffic. My question: how
did Apple end up doing this work in Camrose, Alberta?

~~~
seanmccann
My hometown. From what I heard, an engineer wanted to move home and started a
small remote office there. I think the office is moving to Edmonton.

------
alfiedotwtf
I honestly thought 2019 was going to be the year we saw Rust take up by
companies, but 2020 seems even more promising given the amount of people
already using it in production at the last Rust Melbourne Meetup. Rocketship!

------
1over137
Why wouldn't they use Swift? Seems odd.

~~~
greggman3
Why is this downvoted? It's a valid question. Chris Lattner, the creator of
Swift, has stated many times his goal of Swift being the best language for all
uses.

~~~
Dahoon
Either you misquote him or he has no idea what he is talking about. Maybe in a
walled garden as Apple's it could come pretty close in many instances but One
Language To Rule Them All is naive at best.

~~~
ksec
>Either you misquote him......

Not parent but no, I wish that was the case, he stated it numerous times and
he compare it to scaling from Low Level C to Javascript. That was 3 - 4 years
ago.

I was extremely sceptical of it because it was unrealistic, that is of course
very much against the silicon valley optimistic view so it wasn't a popular
opinion. But in a recent interview he has definitely rephrase and said it
doesn't need to be the best in everything.

Now I have another problem, It is not the best at anything, what is it
actually good at?

That is why I still think Objective-c is going stay for at least a few more
years.

------
rb808
I'd love a Rust job, but there are so few roles out there, nearly everything
is Javascript/Python/Java. Is it worth even learning?

~~~
pornel
IMHO it's worth learning at least to internalize the concept of ownership.
Ownership in some form exists in most languages, but Rust makes it very
explicit. It guides you towards clearly organizing program's data into
isolated tree-like structures, instead of a web of everything referencing
everything else. Like Lisp, even if you don't use it, it may change how you
think about code.

I see companies adopting Rust internally. Instead of hiring "Rust developers"
they just add Rust to the stack and let their devs learn it. For example,
Cloudflare writes most new code in Rust, but Rust is barely mentioned in the
job postings.

~~~
steveklabnik
> Cloudflare writes most new code in Rust,

I _think_ you might be over-stating this. We do write a bunch of Rust though!

~~~
pornel
I mean newly started projects. Of course there's a ton of existing code to
maintain, but — at least in my team — Rust is the default for new services.

~~~
steveklabnik
I am glad to hear it. My team doesn’t work that way :) (we actually just did a
spike in Rust and are going to end up doing the final version in Go, for a few
reasons.)

------
HugoDaniel
doesn't Apple prevent engineers from having related engineering hobbies when
they sign the contract ?

~~~
jeremysalwen
Apple makes you sign the same contract that e.g. google makes you sign, which
says basically "I sign away all rights to anything I create to the maximum
extent legally permissible under California law" (You can look up what those
exceptions). For companies like Apple, this basically means they own
everything you might do, since their "area of business" in essentially
limitless.

However, once I signed away my rights, the experience at Google and Apple was
quite different. At Apple, I waited months, with multiple follow up pings, to
get approval from a lawyer for a one line trivial patch for an OSS project. I
had to give an argument that my contribution provided a direct business
benefit to Apple, and generating goodwill in the community was explicitly
listed as a reason that is _not_ valid. I couldn't contribute to any Google
run OSS projects either (some issue with the CLA, not sure of the blame, TBH).

In contrast, at Google you are encouraged to contribute, don't need any
approval for normal OSS projects, and I have easily gotten approval to release
two personal projects.

~~~
DaiPlusPlus
And at Microsoft we didn’t need any approval at all for things done in our own
time and own equipment - provided it wasn’t competing with anything the
company was working on.

It gets better: during the Windows 8 launch and for the life of Windows Phone
8/10 we were _actively_ encouraged to build own apps for their respective App
Stores (cynically this was in-part to boost app count numbers, but also to
make us motivated to dogfood the platform, provide feedback, etc). IIRC we
were expressly permitted today use company hardware too - just not during core
business hours. That said, I openly worked on my never-released clone of “Lose
Your Marbles” during my downtime in our teamroom office during the day - right
in front of our team’s Partner-level director who didn’t bat an eyelid...

------
Cyph0n
> handle the encryption of every packet passing between servers within and
> across vast data centres

This sounds like it’s doing packet processing in software, which doesn’t seem
scalable, especially for the traffic volume I would assume Apple handles.
Anyone have a clue what kind of traffic volume and bandwidth we’re looking at
here?

Granted, I might be overestimating the requirements given the industry I work
in (service provider routing).

~~~
thedance
None of the big clouds use hardware network encryption. All of the resources
in your network are at the leaves, so you might as well use their CPUs to do
it. I think Google published that crypto and compression in their internal RPC
stack cost them less than 1% of their global CPU resources.

~~~
astrange
That doesn't mean you're doing crypto with integer operations. Newer CPUs
support AES in hardware.

~~~
thedance
Well, of course. Practically all of the primitives in openssl boringssl etc
are coded in assembly.

------
grecy
Wow, outside Edmonton... WTF. Do they have a data center there?

~~~
jrockway
I think big companies see a lot of opportunity in locations outside of Silicon
Valley. If you don't care about the weather in the Bay Area, which is quite
pleasant, or the other industries around you (be it for business or for
pleasure), then you can get an easier commute and a better house for the same
salary, which is appealing to some people. (You can also pay people less,
which seems to be a strategy used by companies without any Bay Area
locations.)

As for how these offices exist; sometimes the team lead is senior enough to
move the project there because they want it to be there, and other times a
company is acquired that has offices there and there was no reason to move
them. (I think Google got their NYC office by buying DoubleClick, for
example.)

~~~
cbowal
But then it's weird to specify a location. Camrose is a town of 18,000 people
– why not make it explicitly remote?

~~~
Teever
Yeah that's a really good point... Is this perhaps one of those hyper specific
job postings so that a company can skirt some sort of regulation about hiring
immigrants by saying they did a search? but why Apple? And why Camrose...

~~~
Apocryphon
The next Bend, Oregon!

------
WalterBright
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.

~~~
jacquesm
This is a 'mindshare' game. D had its chance, now Rust has its chance. Would
have been cool though if D had caught on more back in the day. Re-invention
seems to be impossible to avoid in the software world.

~~~
z3phyr
> D had its chance

What is stopping people to download a D compiler and write software in it
right now?

~~~
simonh
Nothing. The problem is, by and large they don’t. D is a fantastic project and
an important step forward, but Rust has won the mind share game.

[https://insights.stackoverflow.com/survey/2019](https://insights.stackoverflow.com/survey/2019)

------
hashbig
I am like many others here surprised that this is in Camrose, Alberta. I
didn't think big American companies would open an office here outside of the
typical tech hubs (Vancouver, Toronto, Waterloo, and Montreal).

~~~
guessmyname
Search _“apple engineer camrose alberta linkedin”_ on Google [1]

You will find a handful of people who either relocated during the last year or
were hired there.

This includes people like Jeff Davey, Steven Bromling, Tony Gong, Derek
Hausauer and Lucas Wagner who are brilliant.

[1]
[https://www.google.com/search?q=apple+engineer+camrose+alber...](https://www.google.com/search?q=apple+engineer+camrose+alberta+linkedin)

~~~
hashbig
That is nice. I think many inside Canada wouldn't mind relocating for a role
like this, but I doubt someone would be willing to trade California's winter
for Alberta's, regardless of the job.

~~~
grecy
> _but I doubt someone would be willing to trade California 's winter for
> Alberta's, regardless of the job._

I was just down around the LA area, and I'll gladly take -40 winters for the
rest of my life than deal with that traffic and air pollution.

~~~
trevyn
That's why they invented Santa Monica.

~~~
grecy
Spend a year away in the mountains or somewhere with fresh air, then come
back.

You'll be shocked.

------
mch82
Any thoughts on why they’d be using Rust rather than Swift for this work?

~~~
hombre_fatal
If you're writing performance sensitive code and/or correct code, Rust makes
more sense. Rust makes more sense for almost any use-case over Swift unless
you're building Apple clients.

Swift still hasn't really escaped its niche of being a language for end-users
to build clients for the Apple ecosystem with trade-offs in mind for those
end-users who are just building clients (rather than, say, implementing a
safer openssl).

For example, even Rust's web framework story is more mature and benchmark
competitive than Swift's. Go to
[https://www.techempower.com/benchmarks/](https://www.techempower.com/benchmarks/)
and filter for just Rust and Swift.

I say all this sadly as someone who builds iOS apps. I would find it very
weird that someone was using Swift of all language for infrastructure
projects.

~~~
mark_l_watson
At the present time, I agree with you, Swift is very good for user facing
software and because of the new built in support for auto differentiation it
looks very promising for deep learning. I have some bias here: I am working on
a book on Swift AI development. Common Lisp has been my go to language for AI
since 1982, and I wanted to explore an alternative. Specific to Apple’s
ecosystem, support via CoreML is very good, built in NLP libraries are also
good.

I wouldn’t build network software in Swift.

------
K2L8M11N2
Why not incrementally convert it to modern C++?

~~~
ancarda
I don't write C++ though I have written some C. I imagine it's easier to shoot
yourself in the foot with C++ compared to Rust; it's specifically designed to
be a safe language, whereas C++ had things like auto_ptr added

Why have a half-way solution of porting to modern C++ when you can just write
it in Rust?

~~~
saagarjha
auto_ptr is gone since C++17.

------
jayp1418
Why not Ada language?

~~~
tgv
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.

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

------
Guest42
Seems like a tough role to fill.

~~~
codr7
Why? I don't have any Rust experience, but the rest seems reasonable to me and
I figure I have enough C experience to make up for it.

If I happened to live in the area and was looking for a job I would definitely
consider applying.

~~~
thedance
Because C programmers are 1000x more common than Rust programmers.

Edit: "only" 50x according to TIOBE.

~~~
codr7
It said Rust and/or C though, and I imagine learning Rust is pretty easy
compared to C from what I've seen.

~~~
danudey
Arguably not. Rust has a lot of things that C doesn't, like classes,
lifetimes, and the borrow checker, which can be jarring to deal with for
programmers used to other languages.

And, unlike most other languages I've seen, you can't just sit down and write
a "bad" Rust program and then refine your abilities; the compiler won't let
you do the "bad" things, so you have to get everything write from the word go.

~~~
steveklabnik
Rust does not have classes.

~~~
hombre_fatal
In the wild, the meaning of class ranges from whatever it means in the bowels
of theoretical OOP, to a struct that has thing.method() invocation syntax. I'd
wager about 99% of people don't get more academic about what classes are
beyond the latter definition since it's the only way in their language to
create a group of state and then associate some methods with it, which is
exactly what Rust has.

~~~
steveklabnik
I think in the general case, you are absolutely correct.

In a sub-thread comparing language features of two languages to each other to
compare their overall complexity, I think it pays to be precise.

------
onida
Seems like rust is this year's new hot language.

~~~
kohtatsu
Rust is designed to be the language of the century. That's why it's named
Rust.

~~~
BubRoss
This year's hot new language of the century.

~~~
kohtatsu
I didn't mean "no this is the one that's gonna stick", I meant "code written
in this is explicitly designed to last a long time".

------
halite
As a human of color, don't think I could live in this town but maybe team is
really fun. Interesting to see a Camrose here! I've driven by numerous times.
Feel free to ask any questions about Alberta.

~~~
OJFord
> As a human of color, don't think I could live in this town

Are you saying it's a racist town, or yourself objecting to its current
demographic?

~~~
staplers
Not OP, but I would imagine being one of the only minorities in a town like
that is difficult if you just want a nonchalant life.

~~~
halite
Thanks, that's what I meant.

------
google234123
Converting code seems like an incredibly boring job.

~~~
tracker1
Maybe for you... I find it pretty interesting... though you have to first
learn, understand and document what it is doing, and then think about how you
can adopt the function into the patterns of the new language.

That last part is key. Nothing like seeing code in a current language written
like it's mainframe code. I've seen some really poorly ported code (and
written plenty). The learning curve is pretty steep but it's great work if you
enjoy it.

For me, my favorite part of working in software is the learning. New tools,
languages, platforms, systems not to mention domain knowledge. In my career
I've worked from government, banking, aerospace elearning, eCommerce and many
things in between. What other career is such a great opportunity for
continuous learning.

