WEBVTT

NOTE
This file was generated by Descript <www.descript.com>

00:00:13.518 --> 00:00:16.548
<v Amanda Majorowicz>This is Self-Directed
Research, our hosts, James and

00:00:16.548 --> 00:00:19.458
Amos get hyped about different
topics and take turns each week,

00:00:19.458 --> 00:00:20.958
presenting their ideas to each other.

00:00:21.318 --> 00:00:23.748
You can check out the website,
YouTube or Spotify to watch

00:00:23.748 --> 00:00:25.008
this episode's presentation.

00:00:25.308 --> 00:00:30.588
And visit sdr-podcast.com/episodes for
previous episodes with presentations,

00:00:30.618 --> 00:00:32.418
videos, show notes and transcripts.

00:00:32.718 --> 00:00:34.698
New episodes are
published every Wednesday.

00:00:35.688 --> 00:00:37.758
This episode is brought
to you by CodeCrafters.

00:00:37.998 --> 00:00:40.788
There's more info at the end of the
episode, or check out the link in our

00:00:40.788 --> 00:00:42.288
show notes to try it out for free.

00:00:42.618 --> 00:00:44.958
If you upgrade your plan,
it supports this podcast.

00:00:45.118 --> 00:00:47.728
The costs can often be covered
or reimbursed by your company,

00:00:47.728 --> 00:00:48.868
so it's worth asking about.

00:00:49.565 --> 00:00:53.250
Amos is up this week, exceeding the
arbitrary time limit, with 45 slides

00:00:53.250 --> 00:00:55.050
covering the topic "target triples."

00:00:55.170 --> 00:00:55.950
Hope you enjoy!

00:01:03.324 --> 00:01:03.954
<v Amos Wenger>Oh, that reminds me.

00:01:04.364 --> 00:01:08.524
Did you, James, were you alive when-
probably- people were passing around an

00:01:08.524 --> 00:01:11.284
ASCII art version of the Star Wars movie?

00:01:11.284 --> 00:01:13.534
Like you had to right size the
notepad window and then you could

00:01:13.544 --> 00:01:15.214
hit page down, just like hold it.

00:01:15.214 --> 00:01:19.844
And then the repeat would make the- like a
flip book, but in notepad for Windows 95.

00:01:19.894 --> 00:01:20.374
All right.

00:01:21.054 --> 00:01:21.844
I'm gonna share my screen.

00:01:22.312 --> 00:01:23.022
Is everybody ready?

00:01:23.260 --> 00:01:23.890
<v Amanda Majorowicz>No?

00:01:24.817 --> 00:01:25.230
Yes.

00:01:25.550 --> 00:01:25.920
Yeah.

00:01:26.039 --> 00:01:30.559
<v Amos Wenger>You know, the fun thing
is that every time I move my lips, it

00:01:30.559 --> 00:01:36.144
hurts because the interior of my lips
rubs against very sharp metal bits.

00:01:36.434 --> 00:01:41.204
And so I've started correcting by
just mumbling instead of pronouncing

00:01:41.204 --> 00:01:42.334
words because it hurts less.

00:01:42.354 --> 00:01:44.004
I'm optimizing for least pain.

00:01:44.174 --> 00:01:47.184
When we record the podcast, or
when I record a video, I need to

00:01:47.184 --> 00:01:51.074
consciously reverse that and make
it hurt so that it sounds good.

00:01:51.404 --> 00:01:52.054
It's fun.

00:01:52.404 --> 00:01:52.984
I love it.

00:01:54.042 --> 00:01:56.032
<v James Munns>I did three or
four years of braces too.

00:01:56.082 --> 00:01:59.042
So, I mean, I have not recently
felt your pain, but I've absolutely

00:01:59.042 --> 00:02:00.202
felt your pain in the past.

00:02:00.342 --> 00:02:04.192
To be fair, I didn't have a podcast
when I was in sixth grade, so...

00:02:04.332 --> 00:02:05.752
<v Amos Wenger>Maybe you should have, James.

00:02:05.862 --> 00:02:07.332
<v James Munns>That was a blessing, I guess.

00:02:08.162 --> 00:02:10.552
I guess a blessing for both me
and the world, I think, but...

00:02:10.557 --> 00:02:12.767
<v Amanda Majorowicz>What would it
have been about in sixth grade?

00:02:12.792 --> 00:02:15.172
<v James Munns>I don't know,
what was I into- probably video

00:02:15.172 --> 00:02:16.572
games or Pokemon at that point.

00:02:17.182 --> 00:02:18.622
<v Amanda Majorowicz>Oh yeah,
mine would have probably been

00:02:18.622 --> 00:02:20.636
like Spyro and Crash Bandicoot.

00:02:20.659 --> 00:02:21.439
<v Amos Wenger>Spyro?

00:02:21.659 --> 00:02:22.469
Sign me up!

00:02:22.469 --> 00:02:26.454
<v James Munns>Mine would have been
like, N64 games and Pokemon and...

00:02:26.484 --> 00:02:27.304
Anime, maybe?

00:02:27.304 --> 00:02:28.794
Like Dragon Ball Z and stuff  like that?

00:02:29.172 --> 00:02:29.682
<v Amos Wenger>Okay.

00:02:29.822 --> 00:02:32.262
Well, unfortunately, today's
podcast is about target triples.

00:02:33.142 --> 00:02:35.472
I have a subtitle here, because
I'm contractually obligated

00:02:35.472 --> 00:02:37.962
to come up with subtitles for
this podcast, against my will.

00:02:38.512 --> 00:02:41.242
And the subtitle is "Lies,
damned lies, and target triples,"

00:02:41.432 --> 00:02:42.322
which repeats the title.

00:02:42.322 --> 00:02:43.232
I don't know if that's legal.

00:02:43.302 --> 00:02:43.912
I have no idea.

00:02:44.147 --> 00:02:45.347
<v Amanda Majorowicz>I accept it, it's fine.

00:02:45.661 --> 00:02:46.181
<v Amos Wenger>Thanks, Amanda.

00:02:46.181 --> 00:02:46.801
What's a target?

00:02:47.071 --> 00:02:48.991
It's a machine that code can run on.

00:02:49.291 --> 00:02:51.941
James, you have 15 seconds to disagree.

00:02:53.061 --> 00:02:57.371
<v James Munns>It's more specific than that
because one machine can have different

00:02:57.381 --> 00:03:00.461
operating systems, ABIs, configurations...

00:03:00.601 --> 00:03:02.411
<v Amos Wenger>Yeah, we're getting
to that as you can imagine.

00:03:02.821 --> 00:03:06.347
.  It's called a target triple, which
has the prefix 'tri', so you would

00:03:06.347 --> 00:03:08.177
expect it to have three components.

00:03:08.537 --> 00:03:12.637
If you do check the target triple on the
machine that I'm recording this from,

00:03:12.867 --> 00:03:20.800
which is a Mac Studio- If you do rustc
-vV, like lowercase vV, which stands for

00:03:20.800 --> 00:03:25.110
'verbose version', then you get the full
version of rustc, which includes 1.82.0.

00:03:25.130 --> 00:03:26.150
That's the current stable.

00:03:26.280 --> 00:03:32.300
You get the commit hash, the commit date,
and the host shows aarch64-apple-darwin.

00:03:32.990 --> 00:03:35.900
So we're going to get into what
each of those components mean,

00:03:36.274 --> 00:03:41.084
So in aarch64-apple-darwin:
aarch64 is the architecture.

00:03:41.324 --> 00:03:45.524
In that case, it means 64 bit ARM-
we'll get into ARM naming conventions.

00:03:45.574 --> 00:03:47.154
I have 45 slides.

00:03:47.254 --> 00:03:47.814
Get ready.

00:03:48.364 --> 00:03:50.334
The second segment in
this case is the vendor.

00:03:50.334 --> 00:03:50.994
It's Apple.

00:03:51.254 --> 00:03:55.054
And the last segment in this case is
the operating system, which is Darwin.

00:03:55.504 --> 00:03:58.834
Funny, I don't remember installing
Darwin on this computer.

00:03:59.164 --> 00:04:03.584
Darwin is the name that Steve Jobs
came up with when he was interim

00:04:03.584 --> 00:04:09.864
CEO of Apple in 1999 because, and
I quote, "It's about evolution."

00:04:10.564 --> 00:04:12.434
I'm very glad that I found this slide.

00:04:12.474 --> 00:04:14.484
Again, if you're not looking at
slides you're missing out, you can

00:04:14.484 --> 00:04:19.404
go to sdr-podcast.com to find the
episode and find the slides for this.

00:04:19.440 --> 00:04:22.020
It's an article from Wired that
says "Apple Opens OS Code."

00:04:22.695 --> 00:04:25.155
<v James Munns>I'd like to interject for
a second, what you've been referring

00:04:25.155 --> 00:04:30.645
to as Mac OSX is actually Mac OSX
running on the Darwin kernel, or as I

00:04:30.645 --> 00:04:33.825
like to call it, Mac OSX plus Darwin.

00:04:33.895 --> 00:04:35.115
<v Amos Wenger>Yeah, well-

00:04:35.515 --> 00:04:36.795
<v James Munns>Can I be an Apple neckbeard?

00:04:37.345 --> 00:04:38.665
<v Amos Wenger>You can, you can.

00:04:38.685 --> 00:04:41.855
I started looking into this, there's
the whole history, like the lineage

00:04:41.855 --> 00:04:47.025
of like BSD and NeXTSTEP and OpenStep
and Darwin was supposed to be this

00:04:47.075 --> 00:04:50.375
open thing where like, they said, " We
believe that putting it out there will

00:04:50.375 --> 00:04:53.575
help us make it the best technology
collectively we know how to make."

00:04:53.575 --> 00:04:55.745
So it was Apple saying,
"Oh, we're open now.

00:04:55.745 --> 00:04:57.125
Everybody can come contribute."

00:04:57.545 --> 00:05:00.695
Nowadays it's like, yeah, they have an
ftp server essentially that are legally

00:05:00.695 --> 00:05:05.085
required to have where they dump source
code and you can look at it, I guess.

00:05:05.233 --> 00:05:07.073
<v James Munns>I'm just
here so I won't get fined.

00:05:07.728 --> 00:05:08.428
<v Amos Wenger>That's exactly it.

00:05:08.758 --> 00:05:10.448
So, uh, there's a whole history there.

00:05:10.448 --> 00:05:13.138
Which would make a fascinating other
episode because this is only slide eight,

00:05:13.138 --> 00:05:14.618
so I had to cut the research short.

00:05:14.675 --> 00:05:16.675
People will write emails about this.

00:05:16.725 --> 00:05:21.015
It is fine I accept the responsibility
on behalf of our producer Amanda who

00:05:21.015 --> 00:05:22.065
will actually have to look at those.

00:05:22.525 --> 00:05:24.905
So, there's other targets
that look like it.

00:05:24.905 --> 00:05:31.215
Mine is aarch64-apple-darwin, but
there's also x86_64-apple-darwin.

00:05:31.235 --> 00:05:34.265
I'm gonna be saying a lot of
punctuation out loud so get used to it.

00:05:34.445 --> 00:05:35.625
Those were Intel Macs.

00:05:35.645 --> 00:05:39.185
Those we had before
the Apple silicon Macs.

00:05:39.321 --> 00:05:41.701
So Apple M1, M2, M3, M4.

00:05:41.721 --> 00:05:42.741
Those are Apple silicon.

00:05:42.741 --> 00:05:44.131
They're aarch64.

00:05:44.331 --> 00:05:45.781
But before that we had Intel Macs.

00:05:45.801 --> 00:05:48.101
I still have one of them and you
can recognize them very easily.

00:05:48.101 --> 00:05:50.673
The fan makes a noise when they turn on.

00:05:50.673 --> 00:05:50.763
Yes.

00:05:50.848 --> 00:05:51.958
<v James Munns>They are loud and hot.

00:05:51.958 --> 00:05:52.374
<v Amos Wenger>Yes.

00:05:52.408 --> 00:05:53.138
Like me!

00:05:53.259 --> 00:05:54.448
<v James Munns>Yeah, I was gonna
say I was looking around.

00:05:54.668 --> 00:05:56.688
I have one in my house,
but not in this room.

00:05:57.113 --> 00:06:00.723
<v Amos Wenger>Before Intel
Macs, we had PowerPC Macs.

00:06:01.200 --> 00:06:04.221
James just is making big eyes
at my slide with a picture of-

00:06:04.221 --> 00:06:05.801
<v James Munns>Hell yeah, 68k Macs.

00:06:05.820 --> 00:06:08.290
<v Amos Wenger>A Mac Quadra 605.

00:06:08.290 --> 00:06:08.920
I don't actually know...

00:06:08.920 --> 00:06:09.090
<v James Munns>No.

00:06:09.945 --> 00:06:10.275
Oh, sorry.

00:06:10.275 --> 00:06:11.505
No, this is powerpc.

00:06:11.585 --> 00:06:13.145
68k is before that.

00:06:13.185 --> 00:06:14.095
<v Amos Wenger>Yeah, yeah, yeah.

00:06:14.175 --> 00:06:16.275
Oh, we'll get to 68k, don't you worry.

00:06:18.625 --> 00:06:20.225
Siri just woke up for some reason.

00:06:22.655 --> 00:06:26.360
I talked about the Quadra 605
and Siri was like, "I will help."

00:06:26.366 --> 00:06:26.876
<v James Munns>Friend!

00:06:26.976 --> 00:06:27.706
Friend!

00:06:29.136 --> 00:06:32.456
<v Amos Wenger>rustc, the Rust compiler,
has a bunch of PowerPC targets.

00:06:32.626 --> 00:06:36.121
There's three levels of support, which
we'll get into roughly what they mean.

00:06:36.351 --> 00:06:41.238
There's three power PC tier
two targets in Rust: powerpc

00:06:41.238 --> 00:06:48.159
-unknown-linux-gnu, powerpc64 - the
same thing, and powerpc64le for

00:06:48.159 --> 00:06:50.079
little endian dash the same thing.

00:06:50.289 --> 00:06:51.959
What devices are still PowerPC today?

00:06:51.959 --> 00:06:53.229
Because those are actually maintained.

00:06:53.299 --> 00:06:55.150
I was trying to find the
answer and I tweeted about it.

00:06:55.200 --> 00:06:57.290
You might've seen it and
answered something useful.

00:06:57.434 --> 00:06:59.534
Why is PowerPC still relevant today?

00:06:59.754 --> 00:07:03.440
A couple of answers: as recently
as the PS3, the Sony PlayStation

00:07:03.440 --> 00:07:07.580
3 console, they were using
PowerPC based processors on there.

00:07:07.630 --> 00:07:08.550
PS4 and PS5 changed.

00:07:08.550 --> 00:07:09.842
<v James Munns>That was the Cell processor.

00:07:09.902 --> 00:07:11.402
Was the Cell PowerPC based?

00:07:11.412 --> 00:07:14.707
Cause Cell was its own weird
architecture that  only the PS3 used.

00:07:14.761 --> 00:07:16.511
<v Amos Wenger>I have speaker
notes, I come prepared this time.

00:07:16.521 --> 00:07:21.201
The PS3 uses the Cell microprocessor,
which is made up of one 3.2 GHz

00:07:21.201 --> 00:07:24.071
PowerPC-based power processing
element and six accessible

00:07:24.081 --> 00:07:27.041
synergistic processing elements, SPEs.

00:07:27.050 --> 00:07:29.850
So yes, it is- at least
part of it is PowerPC based.

00:07:30.384 --> 00:07:33.184
And then also, Apple used to
make servers, remember that?

00:07:33.954 --> 00:07:37.879
They made the XServe G5, I think
that's the last one they released?

00:07:38.409 --> 00:07:41.489
We have a picture of it here with
typical Apple marketing, which

00:07:41.489 --> 00:07:44.919
means there's nice shadows and like
little reflections on the image.

00:07:45.069 --> 00:07:48.015
It says,  "More power, less energy,
introducing the fastest, most

00:07:48.045 --> 00:07:49.635
energy efficient Xserve ever."

00:07:49.732 --> 00:07:52.450
It has several configurations:
that come in single processor,

00:07:53.080 --> 00:07:54.050
dual processor, cluster node.

00:07:54.490 --> 00:07:59.680
And they're like roughly two- between
two and 2.3 gigahertz per processor?

00:07:59.807 --> 00:08:00.617
<v James Munns>Core, probably?

00:08:00.627 --> 00:08:01.377
<v Amos Wenger>Yeah...

00:08:01.677 --> 00:08:04.947
uses ECC memory with a
16 gigabytes maximum.

00:08:04.997 --> 00:08:07.427
I don't have the year here,
which is a shame, but it is a

00:08:07.427 --> 00:08:09.747
server from another era for sure.

00:08:09.884 --> 00:08:11.014
But it was PowerPC.

00:08:11.074 --> 00:08:11.694
It still is.

00:08:11.704 --> 00:08:13.114
Some people are still
running it, I imagine.

00:08:13.514 --> 00:08:17.737
IBM is probably the reason that
PowerPC is still a tier two target

00:08:17.767 --> 00:08:23.147
in rustc because they actually
forked PowerPC in the nineties.

00:08:23.247 --> 00:08:29.127
I was born, butterfly flapped its wing,
IBM forks PowerPC into an architecture

00:08:29.127 --> 00:08:32.837
called POWER, which is not at all
confusing, which is actually an acronym.

00:08:32.837 --> 00:08:35.567
It means "performance
optimization with enhanced RISC."

00:08:37.537 --> 00:08:40.883
And by "enhanced RISC," they mean an
instruction set that actually has a

00:08:40.883 --> 00:08:44.330
hundred plus instructions and that
supposedly has fixed width encoding,

00:08:44.350 --> 00:08:47.800
which is supposed to be a RISC thing, but
actually they do have prefix instruction

00:08:47.800 --> 00:08:51.910
because they have a lot of SIMD stuff,
like single instruction, multiple data.

00:08:52.220 --> 00:08:57.390
So, POWER is still used today, as sort
of a middle ground between like full

00:08:57.390 --> 00:08:59.853
on mainframe and like smaller things.

00:09:00.043 --> 00:09:01.493
Some people still have POWER hardware.

00:09:01.803 --> 00:09:02.783
<v James Munns>Do you know
where else they are?

00:09:03.019 --> 00:09:03.499
<v Amos Wenger>Banking?

00:09:03.819 --> 00:09:08.379
<v James Munns>A lot of radiation hardened
processors for satellites and Mars

00:09:08.379 --> 00:09:13.974
rovers and things like that are on
CPUs like the RAD750 which is a larger

00:09:13.974 --> 00:09:20.208
radiation resistant power pc architecture
designed to be resistant to the radiation

00:09:20.208 --> 00:09:22.418
you get in space or when there's
not an atmosphere or magnetosphere.

00:09:22.418 --> 00:09:22.828
<v Amos Wenger>That's true!

00:09:23.953 --> 00:09:27.233
<v James Munns>They run slow
and but they are generally

00:09:27.233 --> 00:09:29.063
qualified to be rad resistant.

00:09:29.934 --> 00:09:33.364
They get used in either embedded
systems including goofy rad-hardened

00:09:33.384 --> 00:09:36.274
embedded systems in space
as well, still, to this day.

00:09:36.294 --> 00:09:38.580
<v Amos Wenger>Yeah,  it's fun cause
like, designing for satellites

00:09:38.580 --> 00:09:41.810
is completely different from
designing for Earth, cause...

00:09:41.850 --> 00:09:43.290
yeah, you have to worry about these.

00:09:43.750 --> 00:09:46.630
Raptor Computing System came
up when I asked people about

00:09:46.630 --> 00:09:48.050
PowerPC on social media.

00:09:48.260 --> 00:09:54.780
They make workstations you can buy,
starting at $9,977, so I ordered a couple

00:09:54.820 --> 00:09:56.490
just to get a feel for them, y'know?

00:09:57.436 --> 00:09:57.729
<v James Munns>Business expense.

00:09:57.729 --> 00:09:58.771
<v Amos Wenger>Can we expense those, Amanda?

00:09:58.771 --> 00:09:59.201
Yes?

00:09:59.394 --> 00:10:02.425
Yeah, no, okay, no, sorry, I'll
just return them, it's fine.

00:10:02.645 --> 00:10:05.705
But they make new POWER9 workstations,
even though IBM's already doing

00:10:05.715 --> 00:10:08.975
POWER10, because POWER9 was the last
one you could still, like, all the

00:10:08.975 --> 00:10:12.345
bits were free, so Power10 is still
up in the air for licensing reasons.

00:10:13.285 --> 00:10:18.330
There is Debian, the Debian Linux
distribution makes a survey, a Popularity

00:10:18.330 --> 00:10:21.220
Contest, they call it, of which
architecture are you running right now?

00:10:21.430 --> 00:10:27.850
And so we are looking, and you should
be too, go to sdr-podcast.com/episodes

00:10:27.870 --> 00:10:29.150
and find this episode.

00:10:29.230 --> 00:10:32.340
you can look at the slide that says
"Number of submissions per architecture,"

00:10:32.340 --> 00:10:36.850
and we can see, because this ranges
from 2004 to 2024, so we got 20 years

00:10:36.850 --> 00:10:40.000
worth of like personal computing history
in there and servers and whatnot.

00:10:40.058 --> 00:10:45.058
You can see the rise of 64 bit
computing starting from zero in

00:10:45.058 --> 00:10:48.128
2004, going all the way to...

00:10:48.518 --> 00:10:52.614
well, it's just powers of twos
was like 262,000 respondents.

00:10:52.664 --> 00:10:56.498
And then you can see the slow
decline of 32 bit, in this

00:10:56.498 --> 00:10:58.478
case the i386 architecture.

00:10:58.688 --> 00:11:00.674
And you can see also the rise of ARM64.

00:11:00.961 --> 00:11:05.571
And then you cannot at all see PowerPC
on there The total responses for the

00:11:05.571 --> 00:11:08.632
last survey were 112 out of like a lot.

00:11:08.948 --> 00:11:09.188
<v James Munns>Yeah.

00:11:09.634 --> 00:11:11.710
<v Amos Wenger>I also got   an actual
response from someone who works on the

00:11:11.710 --> 00:11:14.300
Rust compiler: why is PowerPC 64 tier 2?

00:11:14.560 --> 00:11:17.400
The simple answer is because there are
people from IBM that care about fixing the

00:11:17.410 --> 00:11:18.960
target and therefore it gets to be tier 2.

00:11:18.980 --> 00:11:22.676
Tier 2 requirements essentially boil
down to: can we legally and without too

00:11:22.676 --> 00:11:25.236
much pain compile core and std in our CI?

00:11:25.986 --> 00:11:29.506
And two, are there people who we
can call when it stops working?

00:11:29.776 --> 00:11:31.256
So that's all it takes
to be a tier two target.

00:11:31.385 --> 00:11:33.085
<v James Munns>Yeah, there's two
different flavors of tier two.

00:11:33.085 --> 00:11:36.035
One is basically tier two hosted,
which means that they can compile

00:11:36.035 --> 00:11:38.325
and run cargo and rustc on it.

00:11:38.345 --> 00:11:40.305
And then there's ones particularly
for the embedded system.

00:11:40.305 --> 00:11:44.269
So like all the embedded systems
targets- -are all or mostly tier two

00:11:44.269 --> 00:11:45.729
because they are non hosted ones.

00:11:45.939 --> 00:11:48.749
Cause you can't run cargo on a
microcontroller, but you can compile

00:11:48.959 --> 00:11:50.649
to the microcontroller with cargo.

00:11:50.969 --> 00:11:51.279
<v Amos Wenger>Yes.

00:11:51.659 --> 00:11:55.969
There was an effort in July of 2023
to kind of sort out tier two targets

00:11:55.989 --> 00:11:56.939
because there were too many of them.

00:11:56.939 --> 00:11:59.029
And some of them didn't
have documented maintainers.

00:11:59.029 --> 00:12:00.169
So it was like: Oh, this one broke.

00:12:00.179 --> 00:12:00.749
Who do we call?

00:12:00.749 --> 00:12:01.289
We don't even know.

00:12:01.289 --> 00:12:02.139
It's not really clear.

00:12:02.369 --> 00:12:03.479
People change jobs.

00:12:03.479 --> 00:12:05.189
they started documenting that better.

00:12:05.409 --> 00:12:10.009
The thing with tier two targets is that
they can be either promoted to tier one

00:12:10.089 --> 00:12:11.709
or they can be demoted to tier three.

00:12:11.719 --> 00:12:15.249
So there's a lot of different
quality of targets in there.

00:12:15.819 --> 00:12:19.707
If we're looking at those PowerPC targets
again, you may notice that for target

00:12:19.707 --> 00:12:21.527
triples, they have four components.

00:12:21.727 --> 00:12:25.347
There's PowerPC, which is the
arch, there's unknown, which is

00:12:25.377 --> 00:12:29.597
the vendor, Linux is the operating
system, and then gnu is the ABI.

00:12:29.841 --> 00:12:32.891
<v James Munns>Did you ever read the
Hitchhiker's Guide to the Galaxies books?

00:12:33.209 --> 00:12:35.229
<v Amos Wenger>I pretended I
did, but I never actually.

00:12:35.391 --> 00:12:35.861
<v James Munns>That's fair.

00:12:36.101 --> 00:12:38.731
So they were writing the books and
they originally built it as the

00:12:38.731 --> 00:12:41.061
Hitchhiker's Guide to the Galaxy Trilogy.

00:12:41.291 --> 00:12:42.601
And then they made a fourth book.

00:12:42.621 --> 00:12:46.071
And on the title, they said, "The
fourth entry in the increasingly less

00:12:46.091 --> 00:12:50.411
accurately named Hitchhiker's Guide to the
Galaxy Trilogy" or something like that.

00:12:50.411 --> 00:12:52.981
So this is- -exactly
that experience again.

00:12:53.208 --> 00:12:54.108
<v Amos Wenger>This is exactly it.

00:12:54.218 --> 00:12:58.768
The ones we're looking at ends with
gnu for glibc, the gnu C library,

00:12:58.938 --> 00:13:02.568
but there's also musl variants,
which I say 'muzzle,' some people say

00:13:02.568 --> 00:13:07.237
'muscle,' but it's actually spelled
M U S L And interestingly, the gnu

00:13:07.237 --> 00:13:13.307
target for x86_64-unknown-linux-gnu
-that's the podcast you chose to

00:13:13.307 --> 00:13:18.107
listen, don't put the blame on us- is
tier 1, but the musl one is tier 2.

00:13:18.490 --> 00:13:24.156
And in most people's heads, the musl
target is there to serve as a fallback

00:13:24.216 --> 00:13:29.586
for when you download a binary that was
linked against the glibc but somehow your

00:13:29.626 --> 00:13:33.296
Linux distribution has a different version
of glibc than their Linux distribution

00:13:33.466 --> 00:13:37.786
so it doesn't actually run and so you
just get the musl one instead which is

00:13:37.826 --> 00:13:41.636
statically linked we're looking at the
slide that shows that the musl build

00:13:41.636 --> 00:13:44.886
of cargo dist for example is statically
linked it doesn't have any dependencies

00:13:44.906 --> 00:13:49.712
so it should be able to run on any Linux
system out there that supports LSB I

00:13:49.712 --> 00:13:51.062
guess, but that's been a thing forever.

00:13:51.452 --> 00:13:52.272
Where was I going with this?

00:13:52.732 --> 00:13:53.002
Right.

00:13:53.192 --> 00:13:55.422
That people assume that the musl
target is statically linked,

00:13:55.442 --> 00:13:56.892
but actually it shouldn't be.

00:13:56.892 --> 00:14:01.541
And in 2021, the Rust compiler team
accepted a major change that says:

00:14:01.641 --> 00:14:05.731
Oh, right now we default musl to be
statically linked, but that was a mistake.

00:14:05.971 --> 00:14:08.421
And it turns out that there's
people who actually care about

00:14:08.431 --> 00:14:10.281
dynamically linking against musl.

00:14:10.701 --> 00:14:14.131
And those people are the people who
develop musl and musl based distributions

00:14:14.131 --> 00:14:17.774
like Alpine and Void Linux and you can
do that on Gentoo as well, I believe.

00:14:17.893 --> 00:14:21.253
And so actually we should change
the default which is going to

00:14:21.253 --> 00:14:24.393
break everyone else's assumptions
of what the musl target is for.

00:14:24.514 --> 00:14:28.959
I have like a zoomed in part of the
slide that just shows how you are

00:14:28.979 --> 00:14:32.282
now, after that change, supposed to
actually enable static linking and

00:14:32.282 --> 00:14:39.272
it's -Ctarget-feature=+crt-static.

00:14:39.582 --> 00:14:43.632
And the way you're supposed to disable
it is to do =-crt-static or minus

00:14:43.632 --> 00:14:46.022
crt-static, I guess, in that sense.

00:14:46.717 --> 00:14:49.757
Which is the most confusing naming
scheme ever and I hate it personally.

00:14:49.880 --> 00:14:51.730
But yeah, the change was approved in 2021.

00:14:51.730 --> 00:14:52.780
what happened since?

00:14:53.000 --> 00:14:55.640
it's really hard to actually
make that change happen without

00:14:55.640 --> 00:14:57.260
making everyone instantly angry.

00:14:57.480 --> 00:14:58.150
And so...

00:14:58.190 --> 00:15:02.390
I think there's other like intermediate
changes that they want to do first, but...

00:15:02.825 --> 00:15:03.275
Yeah.

00:15:03.325 --> 00:15:04.555
The real life is messy.

00:15:05.305 --> 00:15:07.645
We're roughly halfway through
my slides I would say.

00:15:08.041 --> 00:15:11.361
We're looking now at i686-pc-windows-gnu.

00:15:11.422 --> 00:15:12.442
That's kind of a weird change.

00:15:12.472 --> 00:15:17.892
On the Debian graph earlier we saw i386
as a placeholder for 32-bit processors,

00:15:18.013 --> 00:15:19.853
and this is chosen to be i686.

00:15:19.873 --> 00:15:20.323
Why?

00:15:20.743 --> 00:15:23.758
Because if you look at the
history of Intel processors, you

00:15:23.758 --> 00:15:28.838
start in 1971 with the 4004, and
then you have the 8008 in '72.

00:15:29.048 --> 00:15:33.233
Then you have the 8080, I'm going to
call it, the uh, 8 bit successor, Then

00:15:33.233 --> 00:15:38.893
you have the 8086, the first in the x86
series, like the 186, if we had a 186,

00:15:38.893 --> 00:15:43.833
and then you have the 286 in '82, which
was 16 bit, and then the 386, which

00:15:43.833 --> 00:15:45.573
started the era of 32 bit processing.

00:15:45.573 --> 00:15:47.938
So that's why Debian calls it 386.

00:15:47.938 --> 00:15:51.418
It's because it is the first 32 bit
processor in the Intel line, at least,

00:15:51.418 --> 00:15:53.258
I don't know about any other vendors.

00:15:53.332 --> 00:15:57.902
Then you have the 486, then you have
the 586, which didn't actually get

00:15:57.932 --> 00:15:59.972
called 586, but it is like the Pentium.

00:16:00.152 --> 00:16:03.522
Then the 686 is the Pentium Pro
and then later the Pentium 2 and

00:16:03.522 --> 00:16:05.887
Pentium 3 also belong to that.

00:16:06.217 --> 00:16:10.537
And so actually in the Rust world,
when you're looking at an i686 target,

00:16:11.107 --> 00:16:14.338
what you're talking about is: it
has streaming SIMD   extensions.

00:16:14.357 --> 00:16:15.797
It has SSE support.

00:16:15.797 --> 00:16:21.293
So there's also i586 targets, which
I don't know who uses, but it's

00:16:21.303 --> 00:16:26.033
32 bit Linux without SSE, without
those streaming SIMD extensions.

00:16:26.190 --> 00:16:27.680
<v James Munns>Yeah, I'm trying to
think of another analog of this.

00:16:27.788 --> 00:16:31.128
It's sort of like, I know on Mac,
it's basically setting, like, your

00:16:31.138 --> 00:16:36.488
enablement list of that of, like: ah,
this is SDK version whatever and above.

00:16:36.488 --> 00:16:40.128
Where, like, 386 means you only
support the subset of features

00:16:40.138 --> 00:16:44.308
that that does, where, like, 586
or 686 gets you a larger superset.

00:16:44.598 --> 00:16:47.868
Or, it's also the reason why a lot
of people, when they're compiling for

00:16:47.868 --> 00:16:49.158
high performance stuff, they do...

00:16:49.198 --> 00:16:51.839
like native or whatever because
your, processor is probably like

00:16:51.867 --> 00:16:54.733
it's got a whole suite of things
that the Rust compiler is not going

00:16:54.733 --> 00:16:58.353
to turn on because you told it
like pretend that I'm compiling for

00:16:58.353 --> 00:17:04.033
a machine from 2011 and not your
wonderful machine in 2024 or whatever.

00:17:04.233 --> 00:17:06.393
<v Amos Wenger>But then if you do
that- like you built something with

00:17:06.393 --> 00:17:10.501
-march=native and -mtune=native   and
whatnot - and then you deploy it to like

00:17:10.581 --> 00:17:12.501
a Hetzner server you got on the auction.

00:17:12.691 --> 00:17:18.232
And then it actually is a processor from
like 2011 Then you might notice SIGILL,

00:17:18.232 --> 00:17:20.557
I think, just illegal instruction,
which is like: I don't have this

00:17:20.557 --> 00:17:23.115
extension, I don't have SSE 4.2, so, no.

00:17:23.350 --> 00:17:24.520
So that's why this target is there,

00:17:24.520 --> 00:17:27.570
<v James Munns>There's like two really
enthusiastic retro computer folks who

00:17:27.570 --> 00:17:31.430
are just very excited that they can run
their- I think you can run Rust on like

00:17:31.430 --> 00:17:35.530
Windows 95 or Windows 98 and I think
that's what that 586 target is for is

00:17:35.540 --> 00:17:37.522
for running it on like, Windows 98.

00:17:37.575 --> 00:17:38.355
<v Amos Wenger>Speaking of-

00:17:38.647 --> 00:17:39.167
<v James Munns>Oh cool

00:17:39.412 --> 00:17:42.992
<v Amos Wenger>If you're making Windows
binaries, I beg of you, please use

00:17:42.992 --> 00:17:47.552
the dash msvc ABI, because that's
what you should do on Windows,

00:17:47.572 --> 00:17:49.812
because it's like, not using Xcode.

00:17:49.842 --> 00:17:53.802
It's not using Clang to build binaries
for macOS, you could, but why would you?

00:17:54.092 --> 00:17:55.492
Just use the native toolchain, okay?

00:17:55.492 --> 00:17:56.452
Make me- make me happy.

00:17:56.452 --> 00:17:59.073
But if you don't want to, if you
want to make me sad, there's a

00:17:59.073 --> 00:18:04.313
gnu ABI thing, which then doesn't
correspond really to glibc.

00:18:04.313 --> 00:18:09.801
In this case, like it means you're
using MinGW or MinGW-w64, which

00:18:09.821 --> 00:18:12.391
also supports 32 bit and 64 bit.

00:18:12.538 --> 00:18:17.678
And so we have those windows-gnu
targets, which honestly is never what

00:18:17.678 --> 00:18:20.475
you want, unless you know already,
and then  don't listen to me.

00:18:20.655 --> 00:18:27.855
But then also usually the Windows
targets are like x86_64-pc-windows-gnu

00:18:27.875 --> 00:18:32.233
or msvc, but actually in the target
list for rustc, I find UWP, which is

00:18:32.233 --> 00:18:37.333
Universal Windows Platform, which doesn't
have all the traditional Win32 stuff.

00:18:37.333 --> 00:18:41.523
all the calls to like open files,
start processes, wait on objects

00:18:41.523 --> 00:18:42.553
and everything, none of that.

00:18:42.969 --> 00:18:45.569
Now everything is through
WinRT, the new system.

00:18:45.779 --> 00:18:48.837
I don't know what's the current
status of UWP to be completely

00:18:48.837 --> 00:18:50.597
honest, but we have a target for that!

00:18:51.215 --> 00:18:55.225
There's a specific target for Windows 7 as
well, which I believe was dropped from the

00:18:55.225 --> 00:18:56.885
rest, but there's still a target for it.

00:18:56.925 --> 00:18:57.695
I don't know if it works.

00:18:57.735 --> 00:18:58.275
No idea.

00:18:58.325 --> 00:18:59.045
Didn't even try.

00:19:00.150 --> 00:19:05.619
Let's now talk about the way ARM naming
conventions work, which is they don't.

00:19:05.999 --> 00:19:07.769
We have already seen aarch64.

00:19:07.789 --> 00:19:08.739
We have Apple Darwin.

00:19:08.739 --> 00:19:11.029
That's again, all the
Apple silicon processors.

00:19:11.221 --> 00:19:15.275
We have aarch64 unknown Linux
gnu, which you would get if you

00:19:15.275 --> 00:19:18.887
install Asahi Linux, for example,
on your M1 MacBook or something.

00:19:18.995 --> 00:19:22.644
But also, some laptops that are
made specifically to run Linux on

00:19:22.644 --> 00:19:26.655
ARM64, like the Pinebook pro,  the
HP EliteBook and everything.

00:19:26.755 --> 00:19:30.215
We have aarch64 PC Windows MSVC
because Microsoft's also been

00:19:30.215 --> 00:19:32.525
trying to introduce ARM 64 laptops.

00:19:32.825 --> 00:19:35.435
The Surface Pro X is an ARM 64 machine.

00:19:35.735 --> 00:19:38.945
They introduced support in like Windows
10 and they improved it in Windows 11

00:19:38.975 --> 00:19:42.080
'cause it lacked x86_64 bit emulation.

00:19:42.080 --> 00:19:45.500
So there was this weird moment where
you could have ARM 64 and it could

00:19:45.500 --> 00:19:50.840
emulate 32 bit x86, but not 64 bit x86.

00:19:50.840 --> 00:19:51.132
Yeah.

00:19:51.202 --> 00:19:52.412
Cause it's all emulation now.

00:19:52.646 --> 00:19:57.546
But if we look at ARM outside of
desktop and laptop computers, then

00:19:57.916 --> 00:19:59.236
that's- count with me, all right?

00:19:59.236 --> 00:20:03.629
So arm just means ARM version
six, and then you have armv7,

00:20:03.649 --> 00:20:05.059
which means ARM version seven.

00:20:05.349 --> 00:20:08.069
And then you have aarch64,
which means ARM version eight.

00:20:08.189 --> 00:20:08.489
Of course.

00:20:08.489 --> 00:20:08.819
James: disagree.

00:20:10.044 --> 00:20:10.284
.
<v James Munns>What?

00:20:10.484 --> 00:20:11.954
No, yeah, there's even more.

00:20:12.603 --> 00:20:16.434
Even in supported in Rust
there's armv5te, there's armv4.

00:20:16.464 --> 00:20:18.064
If you wanna run on like...

00:20:18.094 --> 00:20:21.014
what is it, like a
Nintendo 3DS or something?

00:20:21.014 --> 00:20:23.084
Is still using like armv4 or something?

00:20:23.114 --> 00:20:23.804
Oh, we'll get there?

00:20:23.804 --> 00:20:24.074
Okay, cool.

00:20:24.074 --> 00:20:24.514
<v Amos Wenger>We'll get there.

00:20:24.514 --> 00:20:24.944
Don't worry.

00:20:25.084 --> 00:20:27.184
<v James Munns>We're starting to
get into like- I get into a lot

00:20:27.184 --> 00:20:28.244
of this with embedded stuff.

00:20:28.244 --> 00:20:30.806
<v Amos Wenger>This is not the
single, the singular ARM slide.

00:20:31.126 --> 00:20:35.686
There's also armv7a, armv7r,
'cause there's different profiles.

00:20:35.686 --> 00:20:36.526
I don't know what those mean.

00:20:36.526 --> 00:20:36.736
There's-

00:20:36.743 --> 00:20:37.257
<v James Munns>Oh, okay!

00:20:37.276 --> 00:20:40.906
So real quick: ARM has three
major classes of processors now.

00:20:40.916 --> 00:20:43.946
They've got application processors,
which are 'a': those are all

00:20:43.946 --> 00:20:46.376
of your mobile phones, your
desktops and things like that.

00:20:46.676 --> 00:20:51.556
There's Cortex-R, which are the real
time processors, which are used in,

00:20:51.556 --> 00:20:53.996
like, vehicles and real time systems.

00:20:53.996 --> 00:20:57.666
And then you have the microcontroller
profile, which is what, whenever

00:20:57.666 --> 00:21:00.646
I'm talking about developing for,
like, USB devices and whatever,

00:21:00.646 --> 00:21:01.896
I'm talking about the M profile.

00:21:02.026 --> 00:21:04.886
So ARM has three profiles: A, R, and M.

00:21:05.186 --> 00:21:08.866
And they are specified in the
ARM Reference Manual: A, R, M-

00:21:08.901 --> 00:21:09.831
<v Amos Wenger>Mind blown.

00:21:09.941 --> 00:21:13.261
<v James Munns>and the compact
architecture used so when you want

00:21:13.261 --> 00:21:17.566
to use 16 bit instructions instead
of 32 or 64 on these target is thumb!

00:21:17.726 --> 00:21:19.376
That's the tiny version of ARM.

00:21:19.644 --> 00:21:20.634
<v Amos Wenger>That's my next slide!

00:21:20.634 --> 00:21:21.774
That's thumb mode.

00:21:21.993 --> 00:21:22.489
Yeah.

00:21:22.710 --> 00:21:24.090
James, I made this slide deck for you.

00:21:24.821 --> 00:21:26.881
<v James Munns>I've had to go
look up the arm arm before!

00:21:27.096 --> 00:21:30.476
<v Amos Wenger>Yeah, so Thumb Mode,
I discovered, I thought it was

00:21:30.476 --> 00:21:31.866
like, "What the frick is that?

00:21:31.866 --> 00:21:33.356
Is it the different class of devices?"

00:21:33.356 --> 00:21:35.876
No, it's just the mode, so you
can switch between like Thumb

00:21:35.876 --> 00:21:36.936
Mode and regular mode, right?

00:21:37.071 --> 00:21:37.491
<v James Munns>Well...

00:21:37.666 --> 00:21:38.646
<v Amos Wenger>Or just the startup?

00:21:38.646 --> 00:21:41.055
<v James Munns>A class
profiles can do either.

00:21:41.165 --> 00:21:43.235
So before armv8, you could switch.

00:21:43.235 --> 00:21:46.475
They actually had an instruction
that would switch the CPU from

00:21:46.475 --> 00:21:50.321
interpreting large ARM instructions
to small thumb instructions.

00:21:50.321 --> 00:21:53.691
So you could swap back and forth
on a Cortex-A if you wanted

00:21:53.691 --> 00:21:55.141
compact instruction encoding.

00:21:55.461 --> 00:21:58.411
That's actually the feature of the
Cortex-M devices though, is they

00:21:58.586 --> 00:22:01.006
only support thumb instructions.

00:22:01.016 --> 00:22:03.096
They cannot support ARM instructions.

00:22:03.286 --> 00:22:07.196
So they actually, you could run the same
instructions on your mobile phone and

00:22:07.196 --> 00:22:11.726
your microcontroller, as long as you
only use the thumb subset, which are the

00:22:11.736 --> 00:22:13.616
like sort of compressed instruction mode.

00:22:13.836 --> 00:22:14.046
<v Amos Wenger>Yeah.

00:22:14.046 --> 00:22:18.306
The arm mode instructions are 32 bits
and in Thumb Mode they're 16 bits,

00:22:18.306 --> 00:22:19.686
so the, the whole program ends up-

00:22:19.756 --> 00:22:21.086
<v James Munns>Except for
when they aren't, but yeah.

00:22:21.206 --> 00:22:23.156
<v Amos Wenger>I assume there's
prefixed instructions as well.

00:22:23.476 --> 00:22:24.676
<v James Munns>Yeah, there are more.

00:22:24.736 --> 00:22:27.176
RISC instruction sets are
not very RISC anymore.

00:22:27.271 --> 00:22:27.751
<v Amos Wenger>Yeah.

00:22:28.341 --> 00:22:32.641
So in terms of how they show
up, I'm showing just the  arch

00:22:33.011 --> 00:22:35.116
prefix of the relevant targets.

00:22:35.126 --> 00:22:41.616
We have thumb v6m, thumb v7m, thumb v7em,
I don't know what the e's doing there.

00:22:41.736 --> 00:22:45.516
<v James Munns>So V six- V six is
Cortex M zero, cortex M zero plus.

00:22:45.516 --> 00:22:47.556
V seven is Cortex M three.

00:22:47.916 --> 00:22:53.296
Cortex V seven EM is Cortex M four, M
seven and thumb V eight M are all the

00:22:53.296 --> 00:22:57.238
two digits, like Cortex 20 something
Cortex 30 something processors.

00:22:57.293 --> 00:23:00.160
<v Amos Wenger>That's the first time
I've seen a period in any of these.

00:23:00.172 --> 00:23:01.549
<v James Munns>They got weird
with the naming on this-

00:23:01.640 --> 00:23:04.320
<v Amos Wenger>Thumb v8m dot base?

00:23:04.320 --> 00:23:07.645
<v James Munns>It broke all of our
tooling when they did that, like both

00:23:07.655 --> 00:23:09.605
in rustc and in the embedded Rust world.

00:23:09.825 --> 00:23:12.355
There was like a couple of weeks
where we just had to rewrite-

00:23:12.355 --> 00:23:13.980
<v Amos Wenger>I mean, it's
not technically forbidden.

00:23:13.990 --> 00:23:15.780
There's no rules for target triples.

00:23:15.880 --> 00:23:16.800
They're not triples.

00:23:16.860 --> 00:23:17.760
They're not targets.

00:23:18.800 --> 00:23:21.000
Of course you can put dots
in there, who cares, like...

00:23:21.270 --> 00:23:24.120
but there was an understanding, like,
before that, all of them are, like,

00:23:24.130 --> 00:23:26.860
A to Z and 0 to 9, and that's it.

00:23:27.630 --> 00:23:27.970
Yeah.

00:23:28.150 --> 00:23:36.270
Speaking of saving memory, there's a
very interesting arm64_32-apple-watchos.

00:23:36.440 --> 00:23:37.430
And I learned about this one.

00:23:37.470 --> 00:23:42.434
It's arm64 but 32 bit pointers, and it's
used for the Apple Watch because they

00:23:42.454 --> 00:23:43.854
have lots of code in some applications.

00:23:44.344 --> 00:23:47.864
64 bit pointers actually use up a
bunch of memory, just the whole,

00:23:47.874 --> 00:23:49.374
the address of other things.

00:23:49.789 --> 00:23:51.719
And there's not that much memory
on the Apple Watch anyway.

00:23:52.019 --> 00:23:55.069
But you still want ARM64 because
like, I guess that's what you're

00:23:55.069 --> 00:23:58.409
manufacturing, and also you get
more efficient instructions for like

00:23:58.419 --> 00:24:01.609
SIMD and stuff, cause you do signal
processing on there, you do like voice

00:24:01.609 --> 00:24:02.829
recognition, you do a lot of things.

00:24:03.139 --> 00:24:04.419
So you get the best of both worlds.

00:24:04.439 --> 00:24:06.269
You get 32 bit pointers on ARM64.

00:24:06.519 --> 00:24:09.114
<v James Munns>There's something
similar on a Raspberry Pi, where

00:24:09.114 --> 00:24:12.754
they have a 64 bit kernel, but
user space is 32 bit, and they've-

00:24:13.144 --> 00:24:14.814
<v Amos Wenger>That's my next slide, James!

00:24:14.814 --> 00:24:15.964
You're so predictable!

00:24:15.964 --> 00:24:24.224
It's aarch64_be for big endian
-unknown-linux-gnu_ilp32.

00:24:24.554 --> 00:24:25.394
You didn't have a stroke.

00:24:25.394 --> 00:24:26.164
That is the entire name.

00:24:26.164 --> 00:24:29.174
I had to shrink the font
just so it fits in the slide.

00:24:29.244 --> 00:24:30.594
<v James Munns>I guess
it's still four pieces,

00:24:30.654 --> 00:24:32.634
<v Amos Wenger>It is four pieces
but there's underscores.

00:24:32.634 --> 00:24:32.974
Yeah.

00:24:33.314 --> 00:24:36.784
ILP32 is "Integer Long
and Pointer as 32 bits."

00:24:36.824 --> 00:24:41.274
And it's the exact same idea, but now
instead of being part of the architecture,

00:24:41.294 --> 00:24:45.634
like arm64_32 instead of being at the
beginning of the triple, it's just at

00:24:45.634 --> 00:24:49.204
the end with the ABI like gnu_ilp32.

00:24:49.320 --> 00:24:50.530
But yes, it's the exact same idea.

00:24:50.560 --> 00:24:53.120
It just takes too much memory
to have 64 bit pointers.

00:24:53.380 --> 00:24:55.643
We probably don't have more than
four giga bytes of RAM anyway,

00:24:55.643 --> 00:24:57.293
so let's just do 32 bit pointers.

00:24:57.293 --> 00:25:01.263
We are finally getting to the part of the
episode that's about more or less 68000.

00:25:01.625 --> 00:25:02.805
it used to be used everywhere.

00:25:03.325 --> 00:25:03.845
Pretty much.

00:25:04.135 --> 00:25:06.455
<v James Munns>Very popular
retro computing target, yeah.

00:25:06.458 --> 00:25:08.645
<v Amos Wenger>The Mega Drive was a 68000.

00:25:09.481 --> 00:25:13.001
I had a graphing calculator,
the TI-89, and some other models

00:25:13.001 --> 00:25:15.561
of TI calculators were 68000.

00:25:15.561 --> 00:25:17.131
That's how I first
learned about it as a kid.

00:25:17.131 --> 00:25:20.961
I printed the entire manual of like
68000 assembler just to learn it.

00:25:20.991 --> 00:25:21.981
It didn't go anywhere.

00:25:22.061 --> 00:25:22.891
I was too young.

00:25:22.931 --> 00:25:24.021
I was like 12.

00:25:24.051 --> 00:25:26.221
I couldn't follow, but I
could play Mario on it.

00:25:26.231 --> 00:25:26.741
That was fun.

00:25:26.961 --> 00:25:28.221
This has been a long recording.

00:25:28.221 --> 00:25:29.031
We're almost done.

00:25:29.031 --> 00:25:29.531
Don't worry.

00:25:30.391 --> 00:25:32.571
Next up we have, uh, the China slide.

00:25:32.731 --> 00:25:36.001
There's an architecture
called loongarch64.

00:25:36.021 --> 00:25:37.501
I'm not sure that's how you say it.

00:25:37.910 --> 00:25:39.990
<v Amanda Majorowicz>It's
not loooooong arch??

00:25:40.158 --> 00:25:41.188
<v Amos Wenger>It's not looong.

00:25:41.208 --> 00:25:43.748
At first I was like, "Oh,
they made aarch64 longer!"

00:25:43.844 --> 00:25:44.534
<v Amanda Majorowicz>Darn it.

00:25:45.203 --> 00:25:48.202
<v James Munns>It's actually a Chinese word,
I don't know if it's loong, but it's

00:25:48.202 --> 00:25:50.682
definitely like not just loooong arch.

00:25:50.885 --> 00:25:56.325
<v Amos Wenger>It started in 2001 as Godson,
and it was renamed in 2010 to Loongson.

00:25:56.535 --> 00:25:58.675
at first I was like, "Oh,
cool, a new architecture!"

00:25:58.685 --> 00:25:59.655
And then I was like...

00:26:00.055 --> 00:26:03.325
"in March 2023, the United States
Department of Commerce added Loongson

00:26:03.345 --> 00:26:05.885
to the Bureau of Industry and
Security's entity list for acquisition

00:26:05.885 --> 00:26:08.445
of American technology to support
the People's Liberation Army."

00:26:08.615 --> 00:26:09.865
And then you're like, "Oh!

00:26:09.905 --> 00:26:13.445
I accidentally opened the Cold
War between China and the U.

00:26:13.445 --> 00:26:13.705
S.

00:26:14.580 --> 00:26:17.650
it's pretty much like China
being progressively cut

00:26:17.650 --> 00:26:19.150
off from using American IP.

00:26:19.420 --> 00:26:23.110
So they had the contingency plan like:
oh, this is actually our own architecture.

00:26:23.110 --> 00:26:24.780
You cannot prevent us from doing that.

00:26:25.080 --> 00:26:29.890
It is a spiritual successor to like
MIPS and RISC V- that they fully

00:26:29.890 --> 00:26:32.030
own so they can just do whatever.

00:26:32.050 --> 00:26:37.835
In November 2023 they debuted the
3a6000 processor fabricated using a

00:26:37.835 --> 00:26:39.875
14 nanometer or 12 nanometer process.

00:26:39.905 --> 00:26:41.885
I love when Wikipedia is like:
we don't- we're not really sure.

00:26:41.885 --> 00:26:43.465
We didn't send someone to China to check,

00:26:43.705 --> 00:26:46.785
<v James Munns>a lot of the stuff that
I've seen is more focused on RISC-V

00:26:46.855 --> 00:26:49.965
because RISC-V also has 64 bit modes
and it seems like there's a lot more

00:26:49.975 --> 00:26:53.845
interest in around that, but maybe this
is more targeted at the classic x86

00:26:53.845 --> 00:26:58.560
domain where RISC-V is like a different
take on ARM and things like that.

00:26:58.705 --> 00:27:00.868
<v Amos Wenger>So  the Loongson
thing it was a research project.

00:27:00.878 --> 00:27:04.308
It was like part of China's policy
"Made in China 2025," and it was this

00:27:04.308 --> 00:27:07.658
long plan of like: we're gonna stop
just manufacturing other people's

00:27:07.688 --> 00:27:09.828
design, we're gonna have our own
designs like the whole thing is gonna

00:27:09.828 --> 00:27:13.868
be like designed and manufactured and
assembled and everything in China and

00:27:13.868 --> 00:27:15.898
so that was their thing for processors.

00:27:16.238 --> 00:27:20.138
Next up we have seen target triples
with 3 components, as triple

00:27:20.138 --> 00:27:22.348
would suggest, or 4 components-

00:27:22.443 --> 00:27:24.853
<v James Munns>I'm very interested
to see how you pronounce this.

00:27:24.988 --> 00:27:27.608
<v Amos Wenger>But we also
have ones with 2 components.

00:27:27.792 --> 00:27:29.002
<v James Munns>Especially being in Germany.

00:27:29.132 --> 00:27:30.002
<v Amos Wenger>You say it.

00:27:30.422 --> 00:27:32.361
Why should I take the risks, James.

00:27:32.851 --> 00:27:33.631
It's fuchsia.

00:27:33.661 --> 00:27:33.951
<v James Munns>Okay.

00:27:34.004 --> 00:27:36.382
In American English, I
would say "fyoo-shuh"

00:27:36.782 --> 00:27:37.712
<v Amos Wenger>"Fyoo-shuh".

00:27:37.932 --> 00:27:39.662
<v James Munns>In German, I'd
probably say "fooks-i-a".

00:27:39.927 --> 00:27:41.117
<v Amos Wenger>Fuchsia, sure.

00:27:41.247 --> 00:27:42.557
Well, I'm going to spell it out.

00:27:42.607 --> 00:27:49.104
It's f u- f u c- this isn't going
where you think it is: f u c h s i a.

00:27:49.354 --> 00:27:54.204
It's Google's permanently in a
state of research operating system.

00:27:54.214 --> 00:27:55.144
<v James Munns>It is in deployment.

00:27:55.234 --> 00:27:56.774
It's in quite a few devices,

00:27:57.019 --> 00:27:57.645
<v Amos Wenger>It is.

00:27:57.655 --> 00:28:00.585
In, some Google Nest Hub devices,
according to my research.

00:28:00.597 --> 00:28:01.772
<v James Munns>That they've
talked about publicly.

00:28:02.077 --> 00:28:03.617
<v Amos Wenger>Yeah, yeah, that's true.

00:28:03.707 --> 00:28:05.327
They could be running it more internally.

00:28:05.727 --> 00:28:07.407
And I guess, if you're big
enough, it's always good to

00:28:07.417 --> 00:28:08.867
have your own everything, right?

00:28:08.917 --> 00:28:10.689
Including your own operating system.

00:28:10.703 --> 00:28:13.523
But yeah, very annoyingly their
targets are only two components.

00:28:13.523 --> 00:28:15.303
They have like aarch64-fuchsia.

00:28:16.083 --> 00:28:18.643
I'm just going to say it the
French way because that's who I am.

00:28:19.102 --> 00:28:21.347
And underscore 64-fuchsia...

00:28:21.347 --> 00:28:23.780
I-  - I have nothing
more to say about this.

00:28:23.780 --> 00:28:24.330
Next up!

00:28:24.530 --> 00:28:28.090
We have other arches,  when you
have three components, you're

00:28:28.100 --> 00:28:29.020
like: which one did they omit?

00:28:29.030 --> 00:28:30.210
Did they omit the operating system?

00:28:30.210 --> 00:28:31.326
Did they omit the ABI?

00:28:31.536 --> 00:28:35.637
. So UEFI is the thing that  like,
has replaced the BIOS, I would say.

00:28:35.637 --> 00:28:39.907
The thing when your computer starts
up, it's running in UEFI mode, you

00:28:39.907 --> 00:28:42.803
can adjust the speed of your fans and
everything,  you can build for that.

00:28:42.843 --> 00:28:44.853
You can write Rust code
that will run in that mode.

00:28:45.193 --> 00:28:48.453
There's Redox, which is
the kernel written in Rust.

00:28:48.728 --> 00:28:51.948
There's
aarch64-nintendo-switch-freestanding, so

00:28:51.978 --> 00:28:54.068
that's not an ABI, that's the lack of one.

00:28:54.068 --> 00:28:56.698
It's like, you don't have a libc,
you have nothing, good luck.

00:28:57.903 --> 00:28:58.243
<v James Munns>Yeah.

00:28:58.348 --> 00:29:00.377
<v Amos Wenger>It's fun that
there's a Nintendo Switch target.

00:29:00.546 --> 00:29:01.506
<v James Munns>It's basically none.

00:29:01.536 --> 00:29:03.746
I don't know why they went with
freestanding instead of none, but

00:29:03.746 --> 00:29:04.726
I'm sure they have a good reason.

00:29:04.868 --> 00:29:05.728
<v Amos Wenger>I don't know.

00:29:05.728 --> 00:29:07.038
There's another Nintendo one.

00:29:07.038 --> 00:29:11.238
It's armv6k-nintendo-3ds and then no ABI.

00:29:11.728 --> 00:29:19.218
In terms of game consoles, there's
also armv7-sony-vita-newlibeabihf.

00:29:19.918 --> 00:29:23.958
We'll get into what that means right now,
actually, because if you look at the ARM

00:29:23.958 --> 00:29:26.468
target, so that would be armv6, right?

00:29:26.468 --> 00:29:29.858
You have arm-unknown-linux-gnueabi.

00:29:30.158 --> 00:29:31.168
And then the same thing.

00:29:31.473 --> 00:29:35.083
But E A B I H F, and the
H F stands for: James?

00:29:35.713 --> 00:29:36.243
<v James Munns>Hard float.

00:29:36.243 --> 00:29:39.383
<v Amos Wenger>Hard float, which means
that the one that doesn't have hard float

00:29:39.513 --> 00:29:42.743
has software-emulated floating points.

00:29:42.873 --> 00:29:47.098
So whenever you use F32, actually doing
all the multiplications and divisions

00:29:47.098 --> 00:29:50.298
and everything, like, in software
instead of just using a CPU instruction.

00:29:50.568 --> 00:29:52.308
<v James Munns>That's true, but
the reason why it shows up in the

00:29:52.338 --> 00:29:57.328
ABI is because those processors
have floating point registers.

00:29:57.568 --> 00:30:01.058
So like you normally have integer
registers that your processor uses.

00:30:01.238 --> 00:30:04.768
You have an additional set of floating
point registers on there, which you don't

00:30:04.778 --> 00:30:08.498
necessarily have to use for floating
point, but the ABI changes because when

00:30:08.498 --> 00:30:14.538
you pass, for example, a float by value in
a function call, on a soft float target,

00:30:14.548 --> 00:30:16.458
you would put that in normal registers.

00:30:16.708 --> 00:30:19.988
If you had a hard float target,
you would put that in there.

00:30:19.988 --> 00:30:24.608
So if you had a function that
took a U32 and an F32, the ABI on

00:30:24.608 --> 00:30:28.528
the soft float target would be to
put those in regular registers.

00:30:28.933 --> 00:30:31.278
On the hard float target, it
would be to put the integer in the

00:30:31.278 --> 00:30:34.918
regular registers and the float
in the floating point registers.

00:30:35.138 --> 00:30:38.348
So that's why it's in the ABI field,
because you're right: you have to also do

00:30:38.348 --> 00:30:42.928
all the software-emulated floating point,
but the reason that it shows up in the ABI

00:30:42.928 --> 00:30:48.198
field is because you get basically a whole
bonus set of registers available there.

00:30:48.321 --> 00:30:51.634
<v Amos Wenger>Right,  I'm tempted
to ask why even have floating

00:30:51.634 --> 00:30:55.094
point specific registers as opposed
to just having general purpose.

00:30:55.144 --> 00:30:57.484
I'm imagining it's like the
simplicity of the design

00:30:57.574 --> 00:30:58.104
<v James Munns>Yeah, I don't know.

00:30:58.104 --> 00:31:01.584
All of the floating point instructions
will draw from the floating point

00:31:01.594 --> 00:31:04.214
registers and they also have
some capabilities of like...

00:31:04.264 --> 00:31:08.284
how normally if you have 32 bit registers
and you have a 64 bit value, you put

00:31:08.284 --> 00:31:12.894
them in two neighboring registers and
floats are the same way for F32 and F64s.

00:31:13.444 --> 00:31:13.994
Why?

00:31:14.034 --> 00:31:14.774
I don't know.

00:31:14.824 --> 00:31:17.204
Probably because it's
easier on the silicon...

00:31:17.204 --> 00:31:18.154
but yeah, I don't know.

00:31:18.184 --> 00:31:21.934
<v Amos Wenger>Yeah, cause like on ARM64,
if you've reinterpret the bits of a float

00:31:21.934 --> 00:31:24.564
as an integer, that's a no op pretty much.

00:31:24.564 --> 00:31:27.945
It's like, it's just a type change
from your compiler's perspective?

00:31:27.945 --> 00:31:30.884
<v James Munns>I think it copies it
from the float registers to the...

00:31:30.900 --> 00:31:31.895
and the integer registers.

00:31:31.904 --> 00:31:32.094
<v Amos Wenger>Yeah.

00:31:32.094 --> 00:31:34.914
On those processors, it would have
to copy it to a different register.

00:31:35.178 --> 00:31:36.878
<v James Munns>It's probably
lazy, like until you actually

00:31:36.878 --> 00:31:38.138
do something integer-y with it-

00:31:38.138 --> 00:31:38.388
<v Amos Wenger>Probably.

00:31:38.388 --> 00:31:38.898
- <v James Munns>it does nothing.

00:31:38.898 --> 00:31:43.468
But if you want to do integer ops on it, I
think you have to move it from the float.

00:31:43.573 --> 00:31:47.137
Because the instruction encoding, you
only have a couple bits to describe

00:31:47.137 --> 00:31:48.517
what register you're talking about.

00:31:48.757 --> 00:31:52.117
So if you had just more registers,
you'd have to have more bits to encode

00:31:52.127 --> 00:31:53.787
which register you're sourcing from.

00:31:53.930 --> 00:31:55.120
<v Amos Wenger>That makes sense.

00:31:55.330 --> 00:31:58.340
So that's the hard float part,
the hf part of those targets.

00:31:58.340 --> 00:31:59.500
And then there's also E ABI.

00:31:59.500 --> 00:32:00.760
I was curious what the E stands for.

00:32:00.760 --> 00:32:02.220
It stands for Embedded ABI.

00:32:02.508 --> 00:32:07.633
It was the successor of O ABI, which
has been retronamed the Old ABI?

00:32:08.053 --> 00:32:10.923
Surely when they made it,
they didn't call it Old ABI.

00:32:11.143 --> 00:32:12.193
What happened there?

00:32:12.420 --> 00:32:14.667
<v James Munns>It's been gone for
more than a decade, but yeah.

00:32:14.918 --> 00:32:19.058
This is specified in the AAPCS,
which is the ARM Architecture

00:32:19.058 --> 00:32:21.378
Procedure Call Standard 32.

00:32:21.593 --> 00:32:23.963
<v Amos Wenger>And my next episode,
we'll be going through every page of

00:32:23.963 --> 00:32:27.203
the AAPCS and recording for 17 hours.

00:32:27.274 --> 00:32:28.004
<v James Munns>It's a good doc.

00:32:28.014 --> 00:32:30.054
It's actually on GitHub as a Markdown doc.

00:32:30.064 --> 00:32:30.604
It's good.

00:32:30.829 --> 00:32:31.729
<v Amos Wenger>I'm sure it is.

00:32:32.349 --> 00:32:36.689
next up is nvptx64-nvidia-cuda.

00:32:36.949 --> 00:32:39.159
I don't know if that's
still a real target.

00:32:39.699 --> 00:32:43.669
For a while there, it was something you
could build to, so that you could run

00:32:43.669 --> 00:32:45.519
code directly on your graphics card.

00:32:45.519 --> 00:32:49.779
But the thing is GPUs don't
really look like CPUs.

00:32:49.819 --> 00:32:53.559
They have assembly, they have
instructions, they have pipelines, but...

00:32:54.049 --> 00:32:58.149
they have like way too many registers,
they do everything in parallel...

00:32:58.819 --> 00:32:59.429
it's complicated.

00:32:59.429 --> 00:33:03.569
I know there's definitely ways to write
Rust code for the GPU, but I don't

00:33:03.579 --> 00:33:05.239
think it's through that target anymore.

00:33:05.239 --> 00:33:07.139
I might be mistaken.

00:33:07.139 --> 00:33:08.139
James, you're nodding.

00:33:08.199 --> 00:33:08.859
<v James Munns>I have no idea.

00:33:08.859 --> 00:33:11.729
I know that like shader compilation is
a thing and I know some folks like the

00:33:11.729 --> 00:33:16.180
Rust folks and stuff were working on that
but that's totally out of my wheelhouse.

00:33:16.247 --> 00:33:19.741
<v Amos Wenger>I don't have the notes here,
but readme for a project related to the

00:33:19.741 --> 00:33:25.201
nvptx64 target says: we got it working one
day and then three days later they added

00:33:25.385 --> 00:33:30.265
support for 128 bit wide integers and
that broke the targets, but unfortunately

00:33:30.265 --> 00:33:33.185
they did not release a nightly rustc
version between those two dates.

00:33:33.445 --> 00:33:36.305
So there is actually zero
versions of rustc that actually

00:33:36.305 --> 00:33:37.545
still builds this target.

00:33:37.691 --> 00:33:40.101
I don't know if that's still accurate,
but I thought that was very funny.

00:33:40.414 --> 00:33:43.304
We have s390x-unknown-linux-gnu.

00:33:43.474 --> 00:33:45.694
That's IBM System/390.

00:33:45.714 --> 00:33:48.654
I know very little about this
because it's mainframe, and I've

00:33:48.654 --> 00:33:50.094
never worked with mainframes.

00:33:50.094 --> 00:33:52.014
But it's a computer the size of a room?

00:33:52.024 --> 00:33:53.124
Not anymore, I guess.

00:33:53.144 --> 00:33:55.291
It's just the size of a big, like...

00:33:55.406 --> 00:33:56.356
where do you put your clothes?

00:33:56.866 --> 00:33:58.416
A big closet, right?

00:33:58.786 --> 00:34:00.110
Yeah, very pricey.

00:34:00.220 --> 00:34:01.760
Yeah, I ordered a couple as well.

00:34:02.190 --> 00:34:06.810
And, uh, you can run System Z, which is
IBM's operating system for mainframes,

00:34:06.820 --> 00:34:08.790
or you can run Linux on there.

00:34:09.130 --> 00:34:10.710
And so that's what this target is for.

00:34:11.445 --> 00:34:13.115
We have the WebAssembly targets.

00:34:13.325 --> 00:34:16.205
The first one we saw was
wasm32-unknown-unknown,

00:34:16.258 --> 00:34:17.548
uh, which has nothing.

00:34:17.788 --> 00:34:18.818
It has no operating system.

00:34:18.818 --> 00:34:19.618
It has no ABI.

00:34:19.628 --> 00:34:20.448
It has nothing.

00:34:20.458 --> 00:34:21.728
It can compute things.

00:34:21.755 --> 00:34:22.787
And that's all it can do.

00:34:22.817 --> 00:34:25.280
<v James Munns>This is our none or
freestanding target, basically.

00:34:25.280 --> 00:34:25.510
<v Amos Wenger>Yeah.

00:34:25.574 --> 00:34:30.438
So if you want to generate random
numbers, you have no random number source.

00:34:30.448 --> 00:34:31.068
So good luck.

00:34:31.088 --> 00:34:34.308
If you want to time something, you
have no timers, you have nothing.

00:34:34.668 --> 00:34:38.518
So what you do is because you're
probably calling this from JavaScript.

00:34:38.648 --> 00:34:41.638
You go back and forth between your
JavaScript world and the WebAssembly

00:34:41.638 --> 00:34:45.495
world, which results in your
WebAssembly powered thing probably

00:34:45.495 --> 00:34:47.705
not being any faster because you're
doing all those translations.

00:34:47.705 --> 00:34:49.205
You're crossing the bridge all the time.

00:34:49.544 --> 00:34:52.764
And so they made a different
thing called wasm32-wasi.

00:34:52.784 --> 00:34:56.196
We have the return of triplets
with only two components.

00:34:56.371 --> 00:34:57.891
And that one is also versioned.

00:34:57.901 --> 00:35:02.251
I did not include all the other ones
because I predicted we would be tired

00:35:02.251 --> 00:35:06.181
by this point, but there's preview one
preview two there's there's so many

00:35:06.181 --> 00:35:11.487
different things happening but they are
adding  apis for file io network io,

00:35:11.497 --> 00:35:14.547
timers, random number generation, all
you would expect from like a kernel.

00:35:14.987 --> 00:35:18.607
they're adding syscalls essentially
to WebAssembly so that you can

00:35:18.607 --> 00:35:19.787
actually do useful things with them.

00:35:20.487 --> 00:35:22.367
We are nearing the end
of the presentation.

00:35:22.527 --> 00:35:23.507
I want to reassure you.

00:35:23.717 --> 00:35:27.027
we've seen arm64_32-apple-watchos.

00:35:27.047 --> 00:35:28.837
There's a couple other WatchOS targets.

00:35:28.847 --> 00:35:32.807
There's aarch64-apple-watchos,
which is what I have on my

00:35:32.807 --> 00:35:34.027
wrist, Which you cannot see.

00:35:34.027 --> 00:35:38.250
Even if you go to
sdr-podcast.com/episodes, There's

00:35:38.250 --> 00:35:43.400
aarch64-apple-watchos- sim, which is
what you get if you run the WatchOS

00:35:43.410 --> 00:35:46.270
simulator on an Apple silicon Mac.

00:35:46.480 --> 00:35:52.470
And then there's x86_64-apple-watchos-sim,
which is what you get if you

00:35:52.470 --> 00:35:56.440
run the WatchOS simulator on
an Intel Mac, I would imagine.

00:35:56.460 --> 00:35:58.470
I didn't check, but that's the
only thing that makes sense to me.

00:35:58.698 --> 00:36:01.118
And then we have our final
target, which I love very much,

00:36:01.118 --> 00:36:06.018
which is x86_64-apple-ios-macabi.

00:36:06.628 --> 00:36:07.888
James, do you have any idea what that is?

00:36:08.086 --> 00:36:09.124
<v James Munns>I have no idea what

00:36:10.056 --> 00:36:12.616
<v Amos Wenger>not Maccabi, I said
it wrong on purpose to be funny.

00:36:12.866 --> 00:36:13.886
It's MacABI.

00:36:14.047 --> 00:36:14.982
Does that help a little bit?

00:36:15.062 --> 00:36:18.715
<v James Munns>I can imagine, but I have
no idea why they have, like, seven

00:36:18.715 --> 00:36:23.215
flavors of ABI's that they'd like to
play with, just to make programmers sad.

00:36:23.555 --> 00:36:27.138
<v Amos Wenger>No, it's to
run iPad apps on MacOS.

00:36:27.373 --> 00:36:27.828
<v James Munns>Okay.

00:36:27.850 --> 00:36:30.820
<v Amos Wenger>Remember a while ago when
Twitter made a new app back when it

00:36:30.820 --> 00:36:33.058
was still called Twitter and they were
like, "We have a desktop app now!"

00:36:33.058 --> 00:36:34.828
And it wasn't like a Mac app.

00:36:34.868 --> 00:36:39.408
It was the iPad app And that's a
technology Apple calls Catalyst.

00:36:39.718 --> 00:36:41.278
And that's the target for that.

00:36:41.474 --> 00:36:41.904
<v James Munns>Gotcha.

00:36:41.956 --> 00:36:42.886
<v Amos Wenger>we are finally done.

00:36:42.956 --> 00:36:46.376
Thank you for following me on this
journey through Target Triples.

00:36:46.566 --> 00:36:48.296
We didn't even talk about
some of the funny ones.

00:36:48.426 --> 00:36:51.525
There's QNX in there somewhere, there's
AIX, there's A lot of things happened.

00:36:51.535 --> 00:36:53.685
It's fascinating to me because it's
history because you look at them

00:36:53.685 --> 00:36:54.725
and you're like, "Oh, that's right!

00:36:54.725 --> 00:36:55.465
We used to do that.

00:36:55.465 --> 00:36:56.095
And now we don't.

00:36:56.215 --> 00:36:57.135
And it's better now."

00:36:57.217 --> 00:36:58.967
I want aarch64 all the things now.

00:36:58.997 --> 00:37:00.097
I don't, you know...

00:37:00.211 --> 00:37:03.271
<v James Munns>Every target triple made
sense when it was written, the problem

00:37:03.271 --> 00:37:06.201
is that it's been written over 40
years, which means the things that

00:37:06.201 --> 00:37:08.301
made sense then, no longer make sense.

00:37:08.301 --> 00:37:11.242
<v Amos Wenger>Because we talked about Thumb
Mode and it reminded me of the fact that

00:37:11.242 --> 00:37:14.892
even today my desktop computer, when it
wakes up, is in 16 bit mode and then it

00:37:14.892 --> 00:37:18.772
needs to switch to 32 bit mode and then
to 64 bit mode and then maybe it's awake.

00:37:18.822 --> 00:37:19.842
<v James Munns>ARM's gone the opposite way.

00:37:19.842 --> 00:37:24.372
Newer versions of aarch64 can't run thumb
instructions anymore to simplify the core.

00:37:24.432 --> 00:37:26.092
They can only support ARM instructions.

00:37:26.102 --> 00:37:29.712
So Apple's actually going the
opposite way in that they're removing

00:37:30.152 --> 00:37:32.892
legacy support because otherwise the
cool thing about ARM is it's kind

00:37:32.892 --> 00:37:35.532
of like the 386, 586, 686 stuff.

00:37:35.582 --> 00:37:39.872
you can run Arm V four on V five or
six or seven or eight, and I think V

00:37:39.872 --> 00:37:42.932
eight is the first one that really broke
something, in that it just said you

00:37:42.932 --> 00:37:45.482
can't run thumb instructions anymore.

00:37:45.492 --> 00:37:47.372
<v Amos Wenger>So that's
target triples for you.

00:37:47.782 --> 00:37:48.682
They're not triples.

00:37:49.182 --> 00:37:50.722
Don't let them tell you that.

00:37:51.116 --> 00:37:52.273
This is a good conclusion, right?

00:37:52.313 --> 00:37:53.493
This is what podcasts are about?

00:37:53.673 --> 00:37:54.033
All right.

00:37:54.403 --> 00:37:54.973
Bye everyone.

00:38:00.916 --> 00:38:03.196
<v James Munns>This episode is
sponsored by CodeCrafters.

00:38:03.384 --> 00:38:06.654
CodeCrafters is a service for
learning programming skills by doing.

00:38:07.324 --> 00:38:10.614
CodeCrafters offers a curated list
of exercises for learning programming

00:38:10.614 --> 00:38:13.624
languages like Rust or learning
skills like building an interpreter.

00:38:14.099 --> 00:38:17.639
Instead of just following a tutorial, you
can instead clone a repo that contains

00:38:17.649 --> 00:38:21.379
all of the boilerplate already, and make
progress by running tests and pushing

00:38:21.379 --> 00:38:24.719
commits that are checked by the server,
allowing you to move on to the next step.

00:38:25.359 --> 00:38:28.329
If you enjoy learning by doing,
sign up today using the link at

00:38:28.329 --> 00:38:32.449
sdr-podcast.com/codecrafters,
or use the link in the show

00:38:32.449 --> 00:38:33.679
notes to start your free trial.

00:38:34.099 --> 00:38:36.619
If you decide to upgrade, you'll
get a discount and a portion of

00:38:36.619 --> 00:38:38.159
the sale will support this podcast.

00:38:38.604 --> 00:38:42.294
That's sdr-podcast.com/codecrafters.

00:38:42.994 --> 00:38:45.374
Thanks to CodeCrafters for
sponsoring this episode.

