TRANSCRIPTEnglish

What’s the best programming language for AI?

32m 28s6,461 words920 segmentsEnglish

FULL TRANSCRIPT

0:00

Us programmers love to argue about

0:01

different languages. Which is best and

0:03

which is worst, which is fast, which is

0:05

slow, and so many other things about

0:06

them. But which language is best for AI?

0:09

Apparently, it's Polish. But we're not

0:10

here to talk about Polish or spoken

0:12

languages. We're here to talk about

0:13

programming languages. And just to be

0:15

even clearer, we're not talking about

0:17

programming languages that were made for

0:19

AI. There's already a few of these, like

0:20

Nanolang and Nerd, but as cool as those

0:23

are, they're nowhere near ready for real

0:25

world use. I want to talk about real

0:28

programming languages that we already

0:29

use every day. Autocodebench is a

0:32

benchmark made by Tencent specifically

0:33

to try and evaluate how different models

0:36

perform in different languages. Their

0:37

goal with this was to figure out which

0:39

models are the best at certain

0:40

languages. Well, we can go a different

0:42

direction with it. We can use this to

0:44

see which languages the models do best

0:46

with. And the results are genuinely

0:49

fascinating. I first saw these because

0:51

the author of a language that I'm

0:53

friends with showed it to me and we were

0:55

both just kind of standing there in

0:57

disbelief. It's a very interesting

0:59

bench. It has some very interesting

1:01

results that have very very interesting

1:03

implications. Whatever language you

1:05

think is the best, I'm almost certain

1:07

it's not unless you've already read

1:09

this. And spoiler, it's definitely not

1:11

Typescript as much as I would like for

1:13

it to be. And believe it or not, it's

1:14

not Python either. I can't wait to tell

1:16

you all about which languages are

1:18

topping this benchmark and why I think

1:20

they're doing that right after a quick

1:21

word from today's sponsor. Stop me if

1:23

you heard this one before. AI is great

1:25

at coding and it's better at code

1:26

review. That's why today's sponsor is

1:27

Graptile, one of the best AI code

1:29

reviewers. Okay, you've heard this. I

1:30

get it. I want to do something a bit

1:32

different today. I don't even have

1:33

permission from the team, but I I hope

1:35

that they'll be okay with this. They're

1:36

going to review this before we air it,

1:38

so it's kind of their thing. Regardless,

1:40

this is a post they just made about the

1:41

AI code review bubble. This was very

1:44

interesting to me and I thought it was

1:45

worth touching on because a lot of other

1:47

companies have started releasing AI code

1:48

review products as part of their

1:50

existing tools be it cognition linear

1:52

and more and I really like their takes

1:54

on this. Grapiles benchmarks say they're

1:56

the best but all of the benchmarks from

1:57

all of these companies say that they're

1:58

the best. We have to talk about this a

2:00

little bit deeper. The first big piece

2:02

they touch on is independence. We

2:03

strongly believe that the review agent

2:05

should be different from the coding

2:06

agent. We're opinionated on the

2:08

importance of independent code

2:09

validation agents. In spite of multiple

2:11

requests, we've never shipped codegen

2:13

features. We don't write code. An otter

2:15

doesn't prepare the books. A fox doesn't

2:17

guard the hen house. And a student

2:18

doesn't grade their own essays. Today's

2:20

agents are better than the median human

2:22

code reviewer at catching issues and

2:24

enforcing standards. And they're only

2:25

getting better. It's clear that in the

2:27

future, a large percentage of code at

2:29

companies will be auto approved by the

2:30

code review agents. In other words,

2:32

there will be some instances where a

2:33

human writes a ticket, an agent writes a

2:35

PR, and another agent validates,

2:37

approves, and merges it. This sounds

2:38

insane and I never would have believed

2:40

it, but I started doing it myself. They

2:42

talk a bit about feedback loops here

2:43

because they have a Claude code plugin

2:45

for Grapile. Yes, really. The plug-in

2:48

can be set up to give feedback to the

2:49

coding agent after it writes code. And

2:51

once the review comes in, it'll address

2:53

the feedback over and over again until

2:55

there isn't any left. And if there's

2:56

ambiguity at any point, the agents slack

2:59

the human to clarify. Do you know how

3:00

cool that is? you know how much longer

3:02

you can run agents for if they're

3:03

getting feedback and review, especially

3:05

if it's coming from a different harness

3:06

or a different model. I've tried the

3:08

local review things and they just aren't

3:10

as good. Grappile's understanding of

3:12

your codebase goes deep. I've seen it

3:14

call things out from many files away

3:16

that aren't even being touched in the PR

3:18

because it understands your code base.

3:20

Combine that with a coding agent and it

3:22

can iterate on itself way faster than

3:24

you can imagine. I guess there's a

3:25

reason everyone from Brex to Scale to

3:27

Post Hog is using them. They seem to

3:29

really get it. And from my experience,

3:31

they definitely do. Graile stop me from

3:33

shipping bugs. Let them stop you at soy.

3:36

Before we can determine what the best

3:38

language for AI is, we should probably

3:40

start with what makes a good language

3:42

and then also, of course, what makes a

3:44

good language for AI. So, what makes a

3:46

good programming language? I'm sure this

3:49

is a really simple question that nobody

3:51

will have contradicting opinions about.

3:53

What makes a good programming language?

3:55

Let's see what theories we all have.

3:57

Cotlin makes a good programming language

3:59

apparently. Types, type safety, simple

4:02

syntax, readability, no error handling,

4:06

long live go, lots of training examples,

4:09

great compiler, Apple beauty. Ooh, from

4:13

YouTube. YouTube's actually playing good

4:15

here. Pattern matching. That's one that

4:17

I love. That's a good feature. Human

4:18

readability.

4:20

Simplicity plus functionality equals

4:22

sophistication. How fast is it, bro? If

4:25

it's called Rust, good docs, emoji to

4:28

text ratio. Most languages suffer

4:30

immensely here in particular. I am

4:31

disappointed at how few languages let

4:33

you define variables and values as

4:35

emojis. Very frustrating. Higher kind of

4:38

types, macros, functors, decorators,

4:40

centralized tooling, standard library.

4:42

Interesting. I think hopefully from here

4:45

we can establish the one thing that

4:46

makes a good programming language for

4:48

humans. The human likes it. This is

4:50

really what it comes down to. As sad as

4:52

it is, I wish we could evaluate

4:53

programming languages in a more

4:55

meaningful way. But sadly, humans do not

4:57

allow us to do such. We project our

5:00

beliefs onto languages as a whole and

5:03

use those to evaluate them and as such

5:06

have preferences that go beyond anything

5:08

that can be measured. As Joel said in

5:10

chat, if you like it, it's good wine.

5:11

Yep. So, when we're talking about what

5:13

makes a good language for us, we're

5:15

going to obviously have our own

5:16

preferences biased into it. So let's ask

5:19

the next version of this question, the

5:21

one that we care about. What makes a

5:22

good programming language for LMS? What

5:25

are the traits and characteristics that

5:27

make a model good with a given language?

5:30

Simplicity, types, LSP, token

5:33

efficiency, that's an interesting one to

5:35

bring up. A word I'm not even going to

5:36

try to pronounce. concise syntax, high

5:39

verbosity that feels contradictory,

5:41

vector spaces, C style syntax, how much

5:44

training data that it was trained on,

5:46

the quality of the training data in the

5:47

language, how much data the language is

5:50

in the AI, and how specific and clear is

5:52

the syntax. There's a couple themes we

5:55

are seeing here. Those are simplicity,

5:59

token efficiency, amount of training

6:01

data, feedback mechanisms,

6:04

i.e. type safety. Anything else

6:06

important you guys feel like I'm missing

6:07

with this? How unique the syntax is.

6:10

That's an interesting one. Another one,

6:12

not loads of [ __ ] code in the training

6:14

data. So, amount of training data. I

6:16

will put underneath that quality of

6:18

training data. It's closure. Mandatory

6:21

return types. How similar are the

6:23

patterns to other languages. I guess

6:25

homogeneity is indeed a useful value.

6:27

Like how similar is it to other things?

6:29

So, let's take a handful of languages

6:31

and throw them against this and see how

6:33

we think they will rank. JavaScript

6:36

simplicity e no token efficiency

6:40

definitely no amount of training data

6:43

yeah there's a lot of training data for

6:45

this quality of that training data mixed

6:48

bag feedback mechanisms jack [ __ ]

6:51

JavaScript probably not great the

6:53

training data is huge so if you think

6:54

the training data is by far the most

6:56

important thing that you have a ton of

6:57

it and JavaScript should be pretty good

6:59

so depending on how you weight these

7:00

things should be near the top or the

7:01

bottom TypeScript similar overall I

7:04

would argue the TypeScript training data

7:06

available is of slightly higher quality

7:08

and the feedback mechanisms are very

7:10

important because type safety can be

7:12

checked for with a compiler and feedback

7:13

can be given to the model. Thereby I

7:15

would expect TypeScript to perform

7:17

better. Python interesting one probably

7:20

the most data and also the most

7:22

incentive from the labs to make it work

7:24

because they use Python a lot but also

7:27

no agreement around the type safety.

7:28

There's lots of different ways to do it

7:30

and all of them suck. There's a ton of

7:31

[ __ ] data for Python and the feedback

7:33

mechanisms are garbage. So, probably

7:35

mixed bag. Java definitely not hitting

7:39

simplicity or token efficiency anytime

7:41

soon. Probably has a good amount of

7:43

data. Probably is decent quality data.

7:45

Not great feedback mechanisms, but not

7:46

the worst either. It is kind of checked.

7:49

Sure. C++

7:53

I think C++ is the only thing to get a

7:55

straight zero on every one of these

7:58

other than amount of training data. It

7:59

has lots of training data, but it's not

8:01

a simple language. It is far from an

8:03

efficient language in terms of the token

8:05

efficiency. The quality of that data

8:07

varies comically, and the feedback

8:09

mechanisms are did it crash your system

8:11

or not. Good luck. C is probably a lot

8:15

better in these regards. I would, you

8:17

know what I'll do? I'll add one more

8:18

piece here. Thing I think is important,

8:21

documentation. And I'll say and ease of

8:23

accessibility. So, how good are the docs

8:25

and how easily are they accessed? And to

8:28

be fair, for everything up until this

8:30

point, I would say the answer to the

8:32

documentation access for that is [ __ ]

8:35

for C pretty damn good. The C# community

8:38

ecosystem and frameworks around Net and

8:40

everything have some of the best

8:42

documentation in the world. Whether or

8:44

not you like the language, it is very

8:46

good at this. How about Ruby? Honestly,

8:48

for docs, Ruby does pretty well.

8:50

Feedback mechanisms, it does utter

8:52

[ __ ] [ __ ] For quality of training

8:53

data, it is not very good. Token

8:55

efficiency, it is decent. Simplicity, it

8:57

could be decent, but Rails ruined that

8:59

for us. Could be fine. I would probably

9:01

guess it's higher up than Python and

9:02

Java based on what we know, but hard to

9:05

know. Elixir, my beloved. Simple,

9:08

depending on who you ask. Token

9:10

efficient, decently so, probably similar

9:12

to Ruby there. Amount of training data,

9:15

very, very small. Quality of training

9:17

data, I'll be a little conceited here

9:18

and say all of the Elixir devs I know

9:20

are some of the smartest people I know.

9:21

So, the quality of that data is likely

9:23

very high. Feedback mechanisms, [ __ ]

9:25

garbage. They are still introducing type

9:27

safety to the language. They are far

9:28

from it though. They're not that far

9:30

from it. It's coming very soon. But the

9:31

tools even understanding that's going to

9:33

take a while in the documentation

9:36

worldass. Golang simple to a fault.

9:39

Token efficient absolutely not. Amount

9:41

of training data decent. Quality of data

9:43

decentish. Feedback mechanisms garbage.

9:46

Documentation eh fine. Rust simplicity

9:51

no. Token efficiency no amount of

9:53

training data decent. Quality of

9:55

training data very decent feedback

9:57

mechanisms worldclass the best feedback

10:00

you could possibly get from a compiler

10:02

even if the compiler is slower than the

10:03

model is and documentation very good. So

10:06

just off of what we said all here, I

10:09

would guess we'd have Rust near the top.

10:11

Amount of data is important. So I would

10:13

guess Typescript would be decently high

10:15

up, right? C's probably decently high up

10:18

there. I know Go doesn't have the

10:20

feedback mechanisms, but the data and

10:22

the quality of the data and the

10:23

documentation probably helps it a lot.

10:26

C++ is not going to be anywhere near the

10:28

top. Python because they care too much.

10:30

Ruby because it exists and there's a lot

10:33

of it. There's probably a lot of good

10:34

examples. JavaScript because there's a

10:37

lot of examples. Java because there's a

10:39

good enough number of examples. C++

10:42

obviously near the end. What is the

10:43

other one we're missing? So JS. Oh,

10:45

Elixir. Huh. Where does Elixir fit here?

10:48

That's a tough one. I would just

10:50

instinctively say right below Ruby by

10:53

the nature of Elixir being very similar

10:54

to Ruby but less popular. This all makes

10:57

sense. Like given the biases we have and

10:59

what our thoughts are for what makes a

11:01

good programming language, Rust

11:02

obviously should be near the top. C++

11:04

obviously should be near the bottom.

11:07

Sure. Spoiler, this one's a pre-eread.

11:10

I've already seen the results here and

11:12

they are far from what any of us would

11:15

probably expect even with an exercise

11:17

like this. So, we look at the results

11:18

here by the average per language, we'll

11:20

see Opus one. And if we look at the more

11:23

recent version, they did a V2, we'll see

11:25

Opus 4.5 thinking crushed. So, overall,

11:29

Opus best language at this bench.

11:31

Doesn't seem like they did 5.2. And 5.2

11:34

Codex wasn't out at the time they did

11:35

this, so we don't know how that compares

11:37

yet. They probably do pretty well. But

11:39

we're not here to see what model is the

11:41

best. We're here for the languages,

11:43

which is this section here. So this is

11:45

the score based on all of the problems

11:47

they had for it. Most of the languages

11:49

had roughly the same number of problems

11:50

between 185 to 200 of similar problems.

11:54

And you'll see the top languages are not

11:56

the ones that we suspected. We thought

11:58

it would be Rust and Typescript. And the

12:00

numbers for Rust and Typescript are

12:02

respectively

12:04

61% for Rust and 61% for TypeScript.

12:07

Almost identical score, 61.3. The

12:09

languages we thought would be very good

12:12

were not. But then we get to some other

12:14

interesting ones like Java that got a

12:16

78.7 meaningfully higher scores than

12:19

Rust. Weird. C++ 74.7 meaningfully

12:23

better than Typescript. Even weirder.

12:25

Then we get to C sharp with an 88.4%.

12:31

But if you're actually looking at the

12:32

screen, which I know not all of you do,

12:33

you might have missed the thing I'm kind

12:35

of trying to cover up.

12:38

My favorite language, my beloved Elixir

12:41

got a 97.5.

12:44

Wild. Did I do this whole video to trick

12:46

you guys into listening to me rant about

12:48

Elixir for a bit? Kind of. And I think

12:50

I've earned the right to do that for

12:52

getting you here for this long. So, I'm

12:53

going to do that now. Elixir is an

12:55

incredible programming language. I love

12:57

it dearly. It was the first time I ever

12:58

felt productive as a programmer and the

13:00

result is that I felt very productive.

13:02

So much so that I did a lot of really

13:03

cool things. Ended up getting pretty

13:06

wild career starting a company and now I

13:08

am known as the TypeScript guy. But

13:09

believe it or not, my heart is not in

13:11

Typescript. My life is in Typescript. My

13:13

work is in Typescript. My heart will

13:14

always be in Elixir. Jaz Valim is a

13:17

personal hero of mine. I love that man

13:19

so much. I would not be the programmer I

13:22

am today without him. I have a whole

13:23

video I did that was actually a talk I

13:25

gave at Elixir comp about how Elixir

13:27

made me the engineer I am today. I

13:29

[ __ ] love this language. There's a

13:31

lot of things I like about Elixir. I'm

13:34

just going to talk about the language

13:35

ones because that's what you experience

13:37

when you write Elixir. Things like the

13:39

piping. It's so good. You just pipe

13:42

almost the same way you do in a

13:43

terminal. And when you do that, you're

13:45

taking the value of the previous return

13:48

that be a variable or a function and

13:50

piping it as the first argument into the

13:52

next thing. So here we take the string,

13:54

we break it down to graffims and then we

13:57

measure the frequency of each value from

13:59

that string. So here we see E occurs

14:02

once, I occurs twice, L occurs once, R

14:04

occurs once, X occurs once. This is such

14:06

an elegant way to write this instead of

14:08

storing a bunch of random variables and

14:10

keeping track of all of it. A way of

14:11

thinking of this is effectively that the

14:13

pipeline the data goes through is what

14:15

you're encoding rather than the

14:17

different values that exist throughout.

14:19

And this pattern is so powerful,

14:22

especially when you combine it with a

14:23

lot of the other really cool things you

14:25

can do in Elixir. One of my favorite

14:27

features in Elixir is how the pattern

14:28

matching with overloads works. You can

14:31

redefine the same function multiple

14:33

times with arguments defined as checks

14:37

effectively. So when you define the

14:39

arguments for a function, you don't type

14:41

them the way you do in other languages.

14:43

Like in JavaScript or TypeScript, you

14:44

say this function takes in an object. It

14:47

has name, which is a string, and it has

14:49

age, which is a number. In Elixir, you

14:51

can define specific values that match.

14:54

And if you have three versions of the

14:56

same function, it matches based on what

14:58

the values are encoded as in the

15:00

arguments. So here we have a Fibonacci

15:02

function. The Fibonacci function is

15:04

redefined four times. So this first one

15:06

is defined as zero. So if you call fib

15:09

with zero, it will hit this first. So it

15:12

returns zero. If you call it with one,

15:13

it will hit this and return one. If you

15:15

call it with n when n is an integer and

15:18

greater than two, then we will do this

15:20

where we call the same thing with n

15:22

minus one and n minus2. Instead of doing

15:24

an if statement inside of the function

15:26

to handle these cases, we are defining

15:28

the functions via those cases. And then

15:31

we have a fallback here which is what

15:33

catches if none of these other things

15:35

catch. Because effectively the way this

15:36

is evaluated by the language in the VM

15:39

is it goes through these one at a time.

15:41

It takes the value in the function

15:43

you're trying to call and it sees if the

15:45

value matches this one. If it doesn't,

15:47

it checks the next one. If it doesn't,

15:48

it checks the next one. And if it

15:50

doesn't, it checks this next one. It's

15:52

so cool. It's so readable. It's so easy

15:55

to gro. It keeps you from having to

15:57

deeply nest things because of complex

15:58

logic. And there are so many little

16:00

things you can do with this. Like you

16:02

can redefine the checkout function where

16:04

if user isn't signed in or if user is

16:06

admin

16:08

and I see a lot of people saying really

16:10

dumb things in chat right now like your

16:12

compiler for a statically typed language

16:14

can do this. Rust can do this. Haskell

16:17

can do this. Okay, Haskell can kind of

16:18

do things like this. But this this idea

16:21

of matching the expectations of an

16:24

argument as part of the function's

16:26

definition rather than part of the

16:27

contents of the function is really

16:29

really really cool. And there are a lot

16:31

of programmers who fell in love with

16:33

this concept, including funny enough

16:35

Primagen because I ranted to him about

16:36

this so non-stop every time we hung out

16:39

that he went and explored Elixir out of

16:40

curiosity. And while a lot of the quirks

16:43

of the language aren't for him, he did

16:44

fall in love with this aspect. It's so

16:46

[ __ ] cool. And there's just a lot of

16:48

these types of things in Elixir that are

16:50

weird one-offs that are novel to Elixir,

16:53

which I thought would make it way harder

16:55

for models to understand because

16:56

training data for other languages is not

16:58

going to map well to these patterns.

17:00

Maybe some ideas from Ruby will, but not

17:03

too many. And once you start combining

17:05

this with pipes, things get really

17:07

crazy, especially because nothing is

17:09

mutable in Elixir. Everything is an

17:11

immutable value. If you want to change

17:13

it, you create a new value. It's a weird

17:15

language and I deeply dearly love it.

17:18

It's so fun. But none of these aspects

17:20

are the ones that I think make it good

17:22

for tools to use like AI agents. If

17:25

anything, these might actually hurt a

17:27

little bit because they are so unique to

17:29

Elixir. Some part of that helps because

17:31

it's not able to use the training data

17:33

for other things and make those mistakes

17:35

because it's so different. And the

17:36

immutability definitely helps a lot too.

17:38

But the things I think help the most

17:40

aren't necessarily the syntax or the

17:43

language or its characteristics. I think

17:45

a lot of it is hex. If you're not

17:46

already familiar with this fact, Elixir

17:48

doesn't compile to machine code like a

17:50

C++ or a Rust does. Elixir compiles to

17:53

Erlang, which runs in a VM closer to how

17:56

Java works. But Erlang's VM, Beam, is

18:00

actually magical. The things you can do

18:02

with Beam are unfucking believable. Not

18:04

relevant right now. So, I will resist

18:05

the urge to deep dive on my loyalty to

18:08

that VM because of how absurdly powerful

18:10

and cool and fascinating it is. Let me

18:12

know in the comments if I can do that in

18:14

the future because I would love to just

18:15

sit here and rant about all the things

18:16

that make this ecosystem cool. Believe

18:18

me. But since Elixir is running on Beam

18:20

and is effectively just Erlang, Elixir

18:23

can use the whole Erlang ecosystem as

18:26

well as Gleam, which is another language

18:28

built on top of Erlang and Beam VM. It's

18:32

so cool. This ecosystem is great. The

18:34

reason I'm here though is not just

18:35

because I want to talk about Erling. As

18:38

tempting as it is, it's because I want

18:39

to show you guys some things. Here is

18:41

the most popular package on Hex JSON.

18:44

It's a blazing fast JSON parser and

18:46

generator in pure elixir. Let's click on

18:49

it. Here we can see all the things you

18:50

would expect from an npm type site. You

18:53

can also go to the online docs because

18:55

every single package on Hex has a Hex

18:58

Docs site. Every single package in hex

19:01

comes with documentation built in

19:04

because you document it as you build it.

19:06

There is syntax in elixir where when you

19:09

write source code, you write comments in

19:11

a specific format that result in

19:13

documentation being built out of it as a

19:16

result of just writing the code. You

19:18

document it by commenting it. And the

19:20

results are really, really good docs

19:22

when you're done. I see chat has this

19:25

starting to click now. That's so good.

19:26

Holy [ __ ] That's so cool. Wow. Yeah,

19:29

it's another one of those things where

19:31

it's cool for humans and it's even

19:33

cooler for models. Let's take a look at

19:36

the decoder module. Here's the file in

19:38

Elixir, of course, for this project for

19:40

decoding JSON. And as we scroll through

19:43

here, you see at module doc false. This

19:46

is saying don't include this in the

19:49

module docs directly.

19:51

So, this one is specified like don't

19:53

generate docs for this for me directly.

19:56

Let's find something where they do.

19:58

probably JSON.ex. Here we are. Module

20:01

doc, a blazing fast JSON parser in

20:03

generator in pure elixir. Look at that

20:06

right there.

20:09

At doc parse a JSON value from input IO

20:12

data options all described right here.

20:18

And they're even getting early on the

20:19

type stuff with specs.

20:22

All of this is in the source code

20:25

alongside the actual thing that you're

20:28

writing the code for. The code and the

20:30

docs are not just like in the same

20:32

codebase. They are intertwined together.

20:36

That means not only that the docs are

20:37

easy to access and generate, but more

20:39

importantly, it is significantly more

20:41

likely these docs are up toate and the

20:43

relationship between these docs and the

20:45

source code is very very tight. That

20:48

makes models really good at doing this.

20:51

As people are correctly identifying in

20:53

chat, collocation makes LLMs go burr.

20:56

Absolutely. It's great for context,

20:58

great for LLMs. For the same reason

21:00

Tailwind is good for models because it

21:01

colllocates the markup, the styling, and

21:03

the behavior, actual built-in

21:06

documentation standards in the language

21:08

make the modules we use much easier to

21:11

understand and adopt. I see a lot of

21:13

people saying this is like JSTOC. No,

21:16

it's not because JSTO is barely a used

21:18

standard. Nobody has an actual good

21:20

autogenerator for things that you do in

21:22

JSO doc. Nobody [ __ ] uses it and it

21:25

was added too late to be relevant. The

21:27

thing that's magic about the module docs

21:29

in hex docs is that every single package

21:33

has them. I guarantee you if we just sit

21:35

here and go through those top 10 here,

21:38

every single one of these I'll just pick

21:39

the top six. Okay, I I have self-owned

21:43

already. One of the first ones I checked

21:46

is an Erling dep, not an elixir dep. And

21:49

the Erling people aren't quite as good

21:51

about the documentation.

21:54

So, one bad one. Let's see how many more

21:56

bad ones we hit. Let's try the telemetry

21:58

one.

22:00

This one looks really, really good,

22:02

actually. Cool. The next package is

22:04

good. Cowib also Erlang, not elixir.

22:07

Sad. The Erling ones are going to be

22:09

worse. The elixir ones are all going to

22:11

be perfect. Again, when we go back to

22:13

the bench here, I don't know if Erling

22:15

made it in as a test language. I don't

22:17

think it did yet. Sadly, didn't. But I

22:18

would bet Erling would score much worse

22:20

because the Erling ecosystem, as insane

22:23

and powerful as it is, was started

22:25

before programming languages even really

22:27

existed. Erling is so [ __ ] old and

22:29

weird. And Elixir came out way later. A

22:32

big part of why Jose made elixir is that

22:35

he wanted to take all of these lessons

22:36

that he had learned about what makes

22:38

languages good and maintainable, what

22:40

patterns do we develop that are good

22:41

later on and bring as many of those in

22:43

as possible to elixir. So while this was

22:46

disappointing to see how many of those

22:48

aren't well documented, I would be

22:51

surprised if we go through any of the

22:53

elixir depths and saw any problems.

22:55

Yeah, again all the elixir ones are in a

22:57

very good state. I will resist the urge,

22:59

the deep, deep primal urge to keep

23:02

glazing elixir because there's other

23:03

interesting data here too like C scoring

23:06

so absurdly high compared to a lot of

23:09

other things. What would make C

23:11

similarly high up here? It's almost

23:14

certainly said documentation. Similar to

23:17

Elixir, there is a concept of doing

23:19

comments for documentation in the C#

23:22

language directly. You can in the middle

23:24

of a C# file, you can triple comment and

23:26

write XML that describes the section of

23:30

code that you're writing. You can just

23:31

do this at any point and do XML

23:33

definitions of the things you're working

23:35

on and similarly generate code and

23:37

generate more importantly documentation

23:40

as a result. The depth and quality of

23:43

these docs is absurd. I would argue that

23:45

if you were to go train a new model from

23:48

scratch purely on programming language

23:50

documentation, it would be better at C#

23:52

than anything else because the quality

23:53

of these docs is insane. But there are

23:56

other aspects here too, things that we

23:58

didn't necessarily touch on here.

23:59

Quality of training data definitely

24:01

fits. But another similar thing, how

24:03

many solutions to a problem? In

24:05

languages that I use a lot, things like

24:07

TypeScript for example, there are tons

24:10

like nearly infinite different solutions

24:12

to a given problem. But in languages

24:14

like Elixir and C, there are many, many

24:17

fewer. Languages that came in with a

24:19

strong design philosophy that knew that

24:21

there were only so many ways that these

24:23

things should be done that provided

24:24

those things alongside good

24:26

documentation, those tend to do very

24:29

well. The points I would think about are

24:31

quite different. How easy is it to find

24:33

the right solution? How hard is it to

24:36

find a bad solution? How easy is it to

24:38

understand code that you already have

24:40

available to you? How clear are your

24:42

external dependencies and their specific

24:44

behaviors? And one last one, this is

24:47

kind of in the realm of type safety, but

24:49

different in a way I think you'll

24:51

hopefully understand now. How easy is it

24:53

to assure that this code will only run

24:55

when my expectations are met? I would

24:57

argue, and again, this is all theory

25:00

crafting. None of this is stuff that we

25:02

know for sure. I would argue these

25:04

traits are ones that really affect and

25:07

shape how good models are with a given

25:09

language. In a language like TypeScript,

25:11

it's pretty easy to find a good

25:13

solution, but not the right solution.

25:15

There are so many different options that

25:17

it's easy to get lost in the sauce

25:19

trying to pick the right one. And if you

25:21

pick one in one place and a different

25:22

one somewhere else, things get much

25:25

harder to maintain over time. And more

25:27

importantly, how hard is it to find a

25:29

bad solution? In Typescript, it is

25:31

trivial. It is so easy to find bad

25:33

solutions. You can just press tab a few

25:35

times and you'll find a bunch. How easy

25:36

is it to understand code that you

25:38

already have available to you? This

25:40

one's also fun. Type systems and LSPs

25:43

are great, but they only help when you

25:45

have a cursor you can hover over them to

25:46

see what the type definition is. If you

25:48

give the right feedback mechanisms to a

25:50

model to find these things, it can help.

25:52

But if it has to hover over every single

25:54

thing to see what it does or run a tool

25:56

call to check it every single time, that

25:58

is going to perform much worse than if

25:59

the language describes the things that

26:01

they want to know. This is also an

26:03

interesting thing because token

26:04

efficiency does not map directly to

26:06

performance at all. A lot of people seem

26:08

to think token efficiency matters. I

26:10

certainly did myself. But if you look

26:11

here, C is one of the least token

26:14

efficient languages and it was one of

26:15

the best performers on that bench. How

26:18

clear are the external dependencies and

26:19

their specific behaviors? As a

26:21

TypeScript dev,

26:23

especially once you get into post

26:24

install hell, things can be rough. I'm

26:27

currently working on porting an old

26:28

codebase for the ping zoom product, the

26:31

video call app for streamers. The amount

26:33

of weird things those old packages do is

26:35

horrifying. And even getting the model

26:37

to understand the difference between the

26:38

old version and the new version can be

26:40

really, really rough. And how easy is it

26:42

to assure that this code will only run

26:44

when my expectations are met. Type

26:46

safety and type systems can help here.

26:48

But nothing will protect you better than

26:50

asurances in the language itself that

26:52

these expectations are met before the

26:54

code runs, which is again a thing Elixir

26:56

does. exceptionally well. So to go back

26:57

through all of these with Elixir, how

26:59

easy is it to find the right solution?

27:00

Pretty easy. How hard is it to find a

27:02

bad solution? Extremely hard because

27:03

there's so little Elixir code published

27:05

that all of the code that is published

27:07

is for the most part pretty good. How

27:08

easy is it to understand code that you

27:10

already have available to you? Trivial.

27:12

It is a very clear language once you

27:14

understand its idioms. It is very very

27:17

readable, especially once you start

27:18

chaining things. Again, just some

27:20

examples. With Elixir, you can pipe a

27:23

value to another function trivially. So

27:25

if we have an input, we can pipe it to

27:27

two string. String.trim, string

27:29

downcase, string.replace, and then

27:31

string.trim. Sure, in JavaScript, we

27:33

could do dots over and over. But that's

27:35

assuming that the type of the value

27:38

stays consistent throughout and that you

27:40

don't need to do other things and pass

27:42

other arguments. Like here, we want to

27:43

pass other arguments to thereplace

27:45

function. And it's also of note that

27:47

this is a value and that the functions

27:49

aren't things that exist on values. You

27:51

don't have input. Uppercase, you have

27:54

string.2 to uppercase and you pass it a

27:56

value. Since this is just strings, you

27:58

could rewrite this as a oneliner in JS,

28:00

but that's not going to look very great

28:01

or be very readable if we're being real.

28:03

But in a language like JavaScript, you

28:05

have to reassign these values over and

28:07

over again before you can get to the

28:09

result you're looking for. Oh, this is a

28:11

much better example. Take a query string

28:13

like a= 3 and bals 4. We have to parse

28:15

it, coersse it to integers, compute a

28:17

result, and then format it. So, we take

28:19

query string, we pass it to URI. code

28:22

query pass it to then extract ins. This

28:25

is a syntax for like catching it if

28:27

there's an error. Then fn a b maths

28:30

square root a * a plus b * b. This index

28:33

here is similar to in javascript where

28:35

you can dstructure the arguments. So

28:36

here it's being called with an object

28:38

that has keys a and b. And this is now

28:41

two values we can access here a and b.

28:44

And that function you can see right here

28:45

dstructured object a is a and b is b.

28:49

And here we now return string that to

28:51

integer a string to integer b. We have

28:53

now extracted this from the URI

28:55

decoding. So the extract ins function

28:57

will parse out the strings and give us

28:59

that. And now we have a and b is ins map

29:02

square root a * a plus b * b. Pass it to

29:04

float.round. Pass it to two string. I

29:06

was wrong. Then is a new thing which is

29:07

why I'm not familiar. It's for moving

29:09

the arguments around. Not too important

29:12

here, but you get the idea. There's a

29:14

lot of different indexes to change where

29:15

the argument goes. If you don't want it

29:16

to be the first or the last argument,

29:18

you can pass it around using helpers

29:19

like that, not too important. You get

29:21

the general flow here very easily. Even

29:22

if you don't know the syntax, you can

29:24

clearly read what this does, which is

29:26

really, really cool. Whereas with

29:28

TypeScript, you can read this and

29:31

understand it. But it takes a lot more

29:33

mental effort because the core syntax of

29:36

the function is no longer just

29:38

describing the flow of information. The

29:40

core syntax of the function is defining

29:42

a bunch of how we pass values around.

29:45

Since we have to assign every bare value

29:48

throughout this, the code is as much how

29:51

the memory is being used as it is what

29:53

we are doing. And this is the magic of

29:56

elixir that I love so dearly. The top

29:58

level function is describing what is

30:01

being done, not the how in the same way.

30:05

Good point in chat here is that it

30:06

almost feels like pseudo code. very much

30:09

does and that is why I think it is so

30:11

[ __ ] cool because it so clearly

30:14

describes what is happening not all of

30:16

the other details and let's be real you

30:19

don't know how the memor is being

30:20

managed here anyways when does this a

30:22

raw and b raw value get cleared up good

30:25

question I got 5.2 two to remove all of

30:28

the thens to make it a little easier to

30:30

read. You have to define the functions a

30:32

little bit more aggressively externally

30:33

as a result, but it's still very

30:35

readable. Like just this is so good.

30:38

It's so good.

30:41

And people are asking about effect TS.

30:45

Do you think this is actually more

30:46

readable? I say as a fan of effect.

30:50

Yeah, effect is just like elixir. It

30:52

even has pipes.

30:54

Sure. This is the equivalent of that top

30:56

snippet from before. Pipe parse params

30:59

query comma effect.flatmap p nested pipe

31:04

effect.all a pipe require param a p

31:08

effect flatmap to number a. No, I'm not

31:12

saying you shouldn't use effect. In

31:13

fact, if you're using typescript, I

31:14

think effect is a phenomenal way to

31:16

structure your typescript in a way that

31:17

is more reliable. You will never beat

31:19

the readability and elegance of this.

31:21

It's so good. It's so good. And that's a

31:25

large part of why the models like it so

31:27

much. It's extremely clear when you read

31:29

code what it is doing. And then the last

31:32

parts here, how clear are your external

31:34

dependencies and their specific

31:35

behaviors? Very clear because the source

31:37

code is bundled and has the docs

31:39

alongside it. And how easy is it to

31:41

assure that the code will only run when

31:43

my expectations are met? Incredibly,

31:45

because again, pattern matching. Here,

31:48

when we extract ins, we only do this

31:50

when we have an a value and a b value.

31:52

If we have a different value, we raise

31:54

an error. The fact that the argument for

31:56

the function itself is what defines if

31:58

it can be hit, not if it should be hit,

32:00

if it can be hit, is magical. I think

32:03

I've said all I have to here. If

32:04

somebody who's deeper in the C world

32:06

wants to do the equivalent of this

32:07

video, but for the C# side instead of

32:09

just me glazing elixir constantly, that

32:11

would be really cool to see. And please

32:12

let me know if you do that. I would love

32:14

to see that. But for now, it's probably

32:15

time for me to go back to the trenches

32:16

of Typescript instead of sitting here

32:18

glazing the language I love most. But

32:20

maybe, just maybe, in this AI powered

32:22

world, Elixir might finally win. Let me

32:25

know how y'all feel.

UNLOCK MORE

Sign up free to access premium features

INTERACTIVE VIEWER

Watch the video with synced subtitles, adjustable overlay, and full playback control.

SIGN UP FREE TO UNLOCK

AI SUMMARY

Get an instant AI-generated summary of the video content, key points, and takeaways.

SIGN UP FREE TO UNLOCK

TRANSLATE

Translate the transcript to 100+ languages with one click. Download in any format.

SIGN UP FREE TO UNLOCK

MIND MAP

Visualize the transcript as an interactive mind map. Understand structure at a glance.

SIGN UP FREE TO UNLOCK

CHAT WITH TRANSCRIPT

Ask questions about the video content. Get answers powered by AI directly from the transcript.

SIGN UP FREE TO UNLOCK

GET MORE FROM YOUR TRANSCRIPTS

Sign up for free and unlock interactive viewer, AI summaries, translations, mind maps, and more. No credit card required.