►
From YouTube: Rust for Pythonistas
Description
Robert Collins
https://kiwi.pycon.org/schedule/presentation/136/
Rust is a new systems programming language iniated and sponsored by Mozilla thats making some waves - its the core for servo, Firefox's new parallel render engine, amongst other things. Find out how it is relevant to Pythonistas even in these modern mypy days, as well as interop between Rust and Python, and differences in programming style.
A
All
righty
welcome
everyone,
so
this
talk
is
rust
for
pythonist
by
rob.
Please
give
him
a
warm
welcome.
B
Thanks
so
questions
during
the
talking
completely
fine,
just
throw
your
hand
up
if
you're
over
there
make
a
sound
as
well,
because
I'm
going
to
be
looking
this
way
every
time
I'm
going
to
see
the
camera,
I'm
just
going
to
sort
of
gaze
off
into
it
for
a
while.
B
And
then
I
look
around
the
other
languages
like
yeah
I've
done
c
before,
and
I
know
what
that's
like
and
there's
go
but
go
does
the
screen
threading
thing
and
I
actually
wanted
to
have
stuff
that
works
directly
with
a
network
card.
I
care
intensely
with
that
particular
bit
of
code
about
threads
and
what's
going
to
execute
where
so
that
wasn't
a
good
fit
and
I've
been
interested
in
rust
for
many
years.
B
B
So
I'm
going
to
give
you
the
whole
talk
in
about
30
seconds
and
you
can
go
and
we'll
stay
and
talk
about
some
of
the
details.
So
rust
is
really
nice.
It's
it's
a
it's
an
interesting
language.
I'm
not
going
to
try
and
teach
you
the
language
today.
That
would
take
too
long.
B
There's
a
lot
to
it,
but
I'm
going
to
give
you
hopefully
some
of
the
flavor
of
it
and
some
of
the
bits
that
really
stood
out
to
me
has
been
different
from
python
things
that
make
me
stop
and
think
about
what
I'm
doing
you
can
call
it
from
python.
You
can
integrate
with
it
really
quite
well
and
you
can
use
it
for
python
extension
modules.
There's
a
poster.
You
should
check
out
tim
mcnamara's
poster
about
that.
B
It
is
enjoyable
and
productive
and,
like
all
things,
it's
it's
not
perfect
for
every
use
case,
but
you're
not
crazy.
If
you
still
sit
down
and
say,
hey,
I'm
going
to
do
something
and
it
could
be
something
that's
kind
of
scripty
or
could
be
something.
That's
you
know.
Hardcore
data
processing
or
whatever
and
russ
can
still
probably
do
a
pretty
good
job
of
it,
because
it's
a
modern
language
there's
been
a
lot
of
stuff.
That's
gone
as
language
design
over
the
last
25
30
years
and
the
rust
folk
learnt
from
that.
B
B
They
have
consciously
decided
what
sort
of
community
and
culture
they
want
and
they've
tried
to
build
that
from
the
way
code
reviews
are
conducted
to
whether
they
use
mailing
lists
or
forum
software
to
engage
in
discussions
about
the
community.
The
python
community
has
discussions
about
this
as
well,
but
russ
kind
of
started
with.
We
know
that
things
can
go
badly
here,
let's
think
about
how
to
make
it
go
well,
so
we've
both
got
good
communities
and
then
that
sort
of
thought
and
care
goes
into
it.
It's
a
general
purpose
language.
B
So
there
is
the
I.
I
can't
think
of
something
where
you
couldn't
sensibly
write
it
in
rust.
Even
shell
scripting
run
a
whole
bunch
of
processes.
Stuff
joey
hess
has
written.
I
think
it's
joey
hess
wrote
a
haskell
library
to
run
command
line
stuff,
so
you
can
do
shell
scripting
in
haskell,
which
is
even
more
pedantic
about
exactly
what
types
you're
working
with
and
so
on
the
rusters,
and
if
you
can
make
that
work
in
a
productive
way,
I'm
absolutely
sure
you
could
do
the
same
thing
in
rust.
B
So
I
want
to
talk
a
little
bit
about
python.
I
kind
of
went
off
the
deep
end
on
profiling.
This
rather
than
writing
the
talk.
It's
why
the
talk
took
a
while
to
write
so
it's
a
dynamic.
So
actually
let
me
just
do
a
check
because
I
know
this
is
a
python
conference,
but
there's
also
been
some
non-python
non-python
talks
here.
So
does
everyone
here
actually
write
in
python?
B
So
that's
a
type
failure
so
put
your
hand
up
if
you
don't
actually
write
in
python,
don't
as
a
regular
thing.
So
like
there's
about
five
or
six
slides
and
in
fact,
there's
some
ex
pythonistas
here
so
so
look
python
is
a
dynamic
language.
It's
interpreted
the
types
of
the
objects
in
it
are
examined
by
the
the
runtime
as
it
goes
forward.
It
doesn't
figure
it
out
in
advance.
B
It
has
the
ability
for
you
to
clear
what
sort
of
types
you're
working
with
with
the
my
pi
work.
That's
been
moving
into
python,
3.5
3.6
and
it's
evolving,
and
this
starts
to
bring
a
bunch
of
static
analysis
to
python
more
so
than
it
had
before,
and
that
can
greatly
aid
in
programming
in
the
large,
both
when
you've
got
complex
things
you're
trying
to
represent,
and
also
when
you're
working
with
large
teams
and
part
a
and
part
b
aren't
going
to
get
the
contract
quite
right.
B
B
However,
it's
slow-
and
I
know
people
are
gonna-
have
issues
with
this,
but
look
fundamentally,
it's
slow.
I've
spent
enough
of
my
life
working
around
those
issues
by
running
hundreds
of
separate
processes.
Doing
one
request
each
on
web
servers,
even
with
twisted
in
the
mix
to
say
it's
slow.
Honestly,
it
is
slow.
It
is,
however,
very
fast
to
create
them,
so
you've
got
that
trade-off.
B
B
So
that's
one
of
the
places
where
you
know
maybe
python
is
you're,
hitting
the
limits
there,
even
with
pi
pi
and
getting
compatibility
with
things
like
event,
lift
and
pi
pi.
I
believe
that
one
right
now
works,
but
that
sort
of
thing
is
often
a
edge
case
like
new
things
that
are
done
will
be
done
in
c
python
and
then
you've
got
to
wait
for
them
to
move
to
the
more
advanced
vms
in
the
ecosystem.
B
B
So
here
this
is
the
a
classic
recursive
definition
of
a
fibonacci
number,
and
I'm
also
going
to
highlight
this
n
column
int.
That
is
the
my
pi
syntax
saying
that
this
is
an
int
that
it's
taking
in,
and
this
can
be
completely
statically
analyzed
by
my
pi,
so
it
can
figure
out
the
types
of
everything
there
and
it
will
know
that
it
works
well
and
for
a
small
example
like
this
is
really
not
very
useful,
but
it
generalizes.
B
So
this
is
rust
code.
It
does
exactly
the
same
thing
and
you'll
note,
except
for
the
curly
brackets,
it's
almost
identical.
So
the
first
thing
is:
if
you
can
read
python,
you
can
read
a
lot
of
rust.
Straightforward
they've
got
very,
very
similar
roots.
The
fn
rather
than
def,
is
kind
of
the
first
thing,
and
the
arrow
is
the
syntax
for
returning
a
type-
and
I
couldn't
remember
the
syntax
for
that
in
my
pi,
which
is
why
it
wasn't
in
the
other
slide
e
time
anyway.
B
So
fibonacci
38
is
going
to
make
a
bunch
of
function.
Calls
one
interesting
thing
here.
This
exclamation
mark
says
that
this
is
a
macro,
so
the
rust
language
can
be
extended
in
two
different
directions.
You
can
write
macros
which
take
in
the
abstract
syntax
tree
and
can
manipulate
it
and
output
some
other
stuff
in
a
normal
compilation.
It's
built
in
and
the
other
thing
you
can
do
is
you
can
write
a
compiler
plug-in,
but
that's
only
in
the
nightly
branch
at
the
moment.
B
For
me,
the
takeaway
here
is
that
so
at
the
top
we've
got,
fib.pi
is
the
first
one
and
then
the
rust
binary
was
the
second
one
and
the
rust
binary
took
99
less
time
so
see
pythons
kind
of
interpretive.
We
don't
expect
it
to
be
fast
when
you're,
making
lots
and
lots
of
function
calls.
So
maybe
we
should
try
running
it
with
pi
pi,
89
slower,
so
pi
pi
is
10
times
faster
than
c
python
for
doing
that,
and
so
here
I've
got
pi
pi
versus
fibonacci
and
sorry
it's
80.
B
B
B
You
can't
do
any
of
the
tricks
you
can
do
in
python
where
you
have
descriptors
and
you
can
assign
new
functions
to
an
object
and
call
those
functions
at
runtime.
None
of
that.
Well,
you
could
implement
using
the
the
callable
trait
and
a
hash
table.
You
could
you
kind
of
implement
it
on
top
of
rust,
but
it's
not
going
to
have
any
of
the
performance
guarantees
that
you'd
want
the
other
rust.
So
I
really
don't
know
why
you
want
to
do
that.
B
It
is,
however,
duct
typed,
so
I
said,
classes
before
and
russ
doesn't
actually
have
classes.
It
has
structs
which
contain
data
in
a
particular
shape
and
it
has
traits
which
are
like
interfaces
or
abstract
based
classes,
and
they
tell
you
what
methods
you
can
call
on
those
structs,
but
you
don't
inherit,
you
can
compose,
you
can
nest
and
you
can
do
runtime
dispatch.
So
when
you've
got
a
trait
that
says,
I've
got
a
function
fred,
I
can
call
on
an
object.
B
You
can
have
a
an
abstract
pointer
to
that
which
you
can
hand
round
that
hides
out
the
actual
data,
so
kind
of
like
a
virtual
method
in
c
plus
or
like
everything
in
python,
but
yeah.
The
big
thing
is
you're,
not
looking
to
incorporate
implementation
by
deriving
from
something
you're
looking
to
have.
This
looks
like
a
duck.
It
quacks
like
a
duck.
I
can
use
it
like
a
duck
and
then
all
of
your
code
can
do
that
with
different
types
and
it
generalizes
it
does
that
through
generics
rather
than
through
interpretation.
B
B
B
If
you
run
on
iron,
python
or
jython,
or
some
of
the
other
pythons
that
people
have
created,
the
girl
and
the
single
byte
code
of
the
time
thing
does
no
doesn't
hold
true
and
there's
no
guarantee
that
the
underlying
data
types
are
going
to
be
safe
to
use
for
multiple
threads
and
even
if
they
are
safe
to
use
for
multiple
threads
without
locking
there's,
no
guarantee
that
the
kind
any
assumptions
you've
made
about.
What's
going
to
be
atomic
or
not
atomic
or
actually
going
to
hold
true.
B
B
Has
all
the
type
safety
stuff
of
a
strongly
typed
language,
but
it
also
focuses
on
data
races
as
kind
of
a
primary
thing
this
evolved
when
russ
started,
they
had
a
particular
vision
and
it
changed
and
changed
to
change.
What
they've
got
now
is
a
really
good
system
with
ownership.
I'll
talk
more
about
that
in
a
little
bit,
it's
also
really
really
crazy
fast.
B
So
there
are
a
couple
of
routes
you
can
take
to
fast.
One
is
to
have
very
abstract
definitions
of
things
and
then
compile
it
to
a
crazy
backend.
That
makes
absolute
sense
for
you
and
there's
some
stuff
out
there.
Empmata
was
doing
years
ago
with
pepsi
cola
and
the
steps
system
where
they
can
compile
high
level
representations
into
stuff
that
runs
on
your
gpu
and
that's
cool,
but
no
one's
using
it,
which
is
sad
but
reality
on
with
rust.
However,
everything
that's
on
the
heap
is
clearly
on
the
heat.
Everything
that's
on.
B
The
stack
is
clearly
on
the
stack,
so
you
can
write
programs
that
run
entirely
on
the
stack
if
you've
got
a.
You
know
a
a
problem,
but
that's
amenable
to
that
and
not
pay
any
overhead
for
heap
allocation
at
all,
which
is
where
that
you
know
eleven
thousand
percent
difference
in
fibonacci
came
from
because
it
was
making
all
the
function
calls
on
the
stack
all
the
data
was
on
the
set.
There
was
no
heap
allocation
at
all
for
that
program.
B
The
one
of
the
big
differences
that
you'll
run
into
is:
it's
got
explicit
compilation,
on
the
other
hand,
running
talks
to
run
your
lints
and
your
checks
and
your
tests
we're
almost
at
the
point
of
explicit
compilation
in
python
and
to
a
degree
I
think,
we'd
almost
be
better
off
by
saying
look
yeah
we're
going
to
have
that
and
make
the
I
want
to
run
a
script
without
explicitly
compiling
it
a
special
case
or
a
wrapper
like
what's?
Is
it
go
run?
There's
a,
I
think
it
yeah.
B
There
are
things
out
there
that
can
that
can
give
you
that
with
completely
compiled
languages
because
all
of
the
people
I
know
doing
professional,
I'm
writing
lots
of
python
are
actually
working
in
a
write
code,
run
a
command
to
compile
ish.
That
does
all
these
things.
So
it's
not
really
that
different.
B
It
doesn't
have
exceptions
in
the
same
way.
We
have
exceptions.
So
for
us,
exceptions
are
a
normal
part
of
flow
control
and
you
they're
not
exceptional
they're,
just
a
normal
part
of
flow
control,
which
is
weird
to
people
who
come
from
other
languages
and
tell
us
how
wrong
we
are-
and
I
actually
love
this
in
part-
and
it's
really
elegant-
it
works
quite
well.
B
Rust
does
have
stack
unwinding,
so
it
has
non-local
returns
and
it's
moved
from
being
a
thing
that
was
really
hard
to
get
out
to
a
thing
where
there's
a
supported
contract
around
it
and
you
can
use
it.
But
it's
not
intended
to
be
a
primary
case
flow
control.
It's
intended
to
make
sure
you
can
clean
up
properly
when
a
web
server
thread
completely
dies
or
something
like
that.
B
What
it
does
have
is
structured
returns.
So
this
is
very
similar
to
the
go
idiom
who
here
has
written
stuff
and
go
right
so
enough
in
the
room.
That's
worth
me
describing
this
so
in
in
go
the
idiom
is
that
you
return
a
value
and
an
error
as
a
tuple,
and
you
unpack
that
and
you
inspect
it
to
see
if
an
error
actually
occurred
and
then
you
manually
return-
and
this
is
extremely
tedious.
B
So
I'll
come
back
to
that,
but
structure
returns
are
kind
of
this
big
thing,
but
the
other
big
thing
about
russ
is
that
it's
still
really
small,
I
say:
there's
a
lot
to
learn,
but
there,
if
you
look
at
their
rfcs
the
list
of
things
that
they
want
to
do
to
the
compiler
to
the
language,
to
make
it
more
capable.
It
is
huge,
it's
a
really
ambitious
group.
B
So
what
we've
got
right
now
is
a
good,
solid
language.
It's
like
this,
but
there's
this
whole
space
of
stuff
around
that
they
want
to
enable
and
that
the
community
is
working
on.
So
that's
going
to
be
really
cool
as
it
comes
to
fruition,
all
right,
so
basic
stuff
about
rust.
There
is
a
single
tool
that
formats
rust
code
into
the
standard
thing.
There
is
no
debate
about
which
way
this
should
be
configured
or
anything
else.
You
run
it
your
code's
done.
You
will
move
along
with
your
life.
B
It's
got
a
package
manager
kind
of
like
pip.
It's
called
cargo.
Trying
to
write
russco
without
using
cargo
would
be
crazy,
don't
try
and
do
that,
so
this
is
a
bigger,
a
bigger
set
of
codes.
So
this
is
a
now.
Why
did
I
write
this
code?
Oh
yeah,
so
I
wanted
to
just
walk
through
some
of
the
sort
of
things
and
rust.
That's
really
start
to
look
different,
so
import
statements
are
used.
You
break
them
into
two.
B
You
say
that
you're
going
to
use
an
external
module
by
saying
that
the
crate
that
you're
going
to
use-
and
then
you
have
a
use
statement
which
actually
brings
it
into
this
particular
namespace,
so
use
standard
colon
colon
ita
gives
me
a
symbol
etter
that
I
can
use
the
same
as
import
thread.bar
as
bar
would
give
me
bar
so
the
default
is
that
just
gives
you
the
last
component
as
your
local
symbol,
the
struct
definition
is
equivalent
to
a
class
definition.
That's
giving
me
a
thing
called
fib.
B
B
B
This
here
is
the
actual
way
you
construct
one
of
the
fibs
you
just
pass
in
the
attribute
and
the
value
you
wanted
to
have,
and
you
can
use
that
directly,
but
it's
an
idiom
to
have
a
new
method
that
takes
whatever
parameters
you
want
and
maybe
massages
them
a
little
bit
and
gives
you
back
the
thing
that
you're
going
to
use.
B
Note
that
there's
no
return
statement
just
like
in
python.
If
you
run
off
the
end
of
a
function,
none
gets
returned.
If
you
run
off
the
end
of
a
method
here,
the
last
evaluated
thing
the
last
expression
gets
returned,
so
you
only
see
return
when
you're
doing
an
early
exit,
and
so
that's
actually
a
good
visual
thing.
You
can
see.
Oh
we're
exiting
early
and
it
really
stands
out
more
than
it
does
in
python.
So
I
kind
of
wish
python
did
this
here
here,
we're
implementing
a
trait.
B
So
tim's
question
before
was
is:
is
it
explicit,
I'm
saying
that
fib
is
something
that
you
can
iterate
over,
so
I'm
implementing
the
essay
an
iterator
trait,
and
this
trait
needs
two
things
implemented
for
it.
It
needs
a
type
of
the
item
that
you're
going
to
yield
as
you
iterate
and
that's
going
to
be
in
a
u64
and
it
needs
a
next
function
which
is
mutable,
so
I'm
mutating
state
when
I
iterate
across
this
and
it
takes
self
and
it
returns
an
option.
B
So
an
option
is
an
enum
and
it's
kind
of
like
a
union
type
for
focus
type
systems
for
folks
that
don't
it's
able
to
be
either
one
of
two
an
enum
can
be
one
of
many
different
things.
Enums
and
rust
can
hold
data
so
they're,
not
just
a
mapping
to
cnts
of
zero
one.
Two
three
four
five
they're
actually
able
to
carry
data
around
like
a
struct
themselves.
B
So
what
this
lets?
You
do
is,
if
you
were
thinking
about
pointers,
you
could
have
a
nil
pointer
and
a
value
that
you're
pointing
at,
but
we're
doing
this
without
break
dropping
down
to
pointers,
we're
doing
this
at
a
higher
level
in
the
system.
So
we
can
tell
if
there's
something
there
or
not,
and
if
there
is
something
there
we
can
pull
it
out
and
look
at
it,
and
so
you
know
this
is
pretty
simple
whatever.
What
else
is
there
that
we
need
to
talk
about?
B
Let
if
you
want
to
like
in
python
3
5
you
can
use,
let
is
it
lit?
No,
it's
just
it's
just
a
simon,
isn't
it
with
a
colon
yeah,
so
my
brain
is
making
mistakes,
so
you
say
let
to
declare
a
variable
you're
going
to
use.
That
goes
on
the
stack
and
the
current
function,
like
I
said,
stack
and
heap,
are
absolutely
clearly
identified
as
being
separate
things.
B
If
you
want
to
be
able
to
change
it,
you'd
say
let
mute
and
it's
very
similar
to
all
of
the
c
flavor
set
of
languages.
You
can
do
pointers
and
references
and
everything
else
you
can
put
let
expressions
anywhere.
You
want
they
don't
have
to
go
at
the
beginning
of
a
block
or
any
sort
of
crazy,
restrictive
thing
like
that
and
note
that
we
didn't
inherit
from
iterator.
This
is
this
is
an
iterator,
but
we
have
an
inherited
from
it.
B
The
type
within
next
has
been
inferred,
so
the
compiler
has
figured
out
all
the
types
from
the
only
information
it's
got
is
the
structure
itself
and
the
parameters
to
the
function,
so
I
didn't
need
to
use
an
explicit
type
there
at
all
type
inferencing
across
functions
depends
on
explicit
statements.
Every
function
has
to
be
explicitly
typed
and
that's
partly
to
do
with
the
linking,
but
also
in
the
haskell
community,
the
best
practice
there.
Even
though
the
compiler
can
infer
across
the
entire
program.
B
B
B
So
struck
baz
here
has
an
implementation
of
foo
and
an
implementation
of
fubar.
If
you
don't
have
that
line
there,
this
would
fail
to
compile.
So,
even
when
you
do
inherit
in
a
trait,
you
still
have
to
explicitly
implement
the
trait
for
each
each
of
the
traits
that
are
involved.
It
helps
with
reasoning.
You
can
very
clearly
see
what's
going
on.
B
Safety
bears
is
a
struct
and
I
sign
it
and
I
try
and
use
it.
It's
moved.
I
can't
access
it
anymore.
This
isn't
an
attribute
of
the
underlying
data
so
much
as
an
attribute
of
the
compiler.
It
knows
what
you
have
and
haven't
done
under
the
hood.
If
you
had
two
pointers,
for
example,
and
you
move
the
pointer
from
one
name
to
another,
the
data
that's
pointed
at
won't
have
been
moved.
The
bits
of
the
pointer
will
have
been
moved,
but
you'll
still
get
this
error.
B
This
is
involved
in
in
checking
for
safety
in
other
ways
as
well.
So
this
here
says
that
you
can't
have
multiple
owners
and
making
changes
to
a
thing.
If
you
want
to
have
two
people,
making
changes
to
addict
you've
got
to
broker
ownership
to
that
dict
somehow
same
for
lists,
and
the
api
is
a
bit
weird
to
get
your
head
around,
but
once
you
do,
it
really
starts
to
make
a
lot
of
sense.
B
You
can't
read
from
if
someone
else
is
changing
it
right
down
at
the
machine
level
or
you
can
have
as
many
read
references
as
you
want,
but
no
mutable
references
and
the
compiler
enforces
that
and
propagates
all
around
the
system.
The
other
thing
you
need
to
worry
about
is
when
you're
calling
into
something-
and
some
data
is
sitting
on
the
stack
and
you
return
back
if
someone's
taken
appointed
to
that
data
they're
now
pointing
into
garbage
land.
B
This
is
a
place
where
you
can
easily
break
things
in
c
or
c,
plus,
plus
and
so
russ
is
a
lifetime
concept,
and
it
says
you
know
if
you're
trying
to
hand
out
a
reference
to
something
where
the
lifetime
of
that
is
going
to
be
less
than
that
place.
You're
handing
it
to
expect
it
will
error,
compile
time
you
won't
find
out
at
runtime.
You'll
never
have
that
bug.
B
So,
given
we
don't
have
time,
I'm
going
to
jump
all
around
and
not
have
any
idea
where
we
are
in
the
slides
right
there.
So
this
is
the
exception
stuff,
and
this
is
like,
if
you
look
at
this
file
double
example.
I
just
took
this
out
of
the
error
out
of
the
book.
B
There's
a
wonderful
wonderful
book
that
first
line,
let
mute
file
equals,
try
exclamation,
mark
file,
open
path,
met,
er,
io
that,
like
there's
a
lot
of
noise
there,
the
first
time
you
see
it,
but
what
this
is
doing
that
tries
a
macro
and
that
result
at
the
top.
There
is
a
it's
another
one
of
these
enums,
but
instead
of
being
an
enum
with
none
or
some,
it's
an
enum
with
an
error
code
or
a
success
value.
B
So
that
is
exactly
the
same
as
the
go
idiom
in
terms
of
the
reliability
of
the
code
you
get
out,
but
with
about
one
tenth,
the
boilerplate
once
you've
got
all
your
your
your
scaffolding,
for
it
set
up
that
particular
expression
in
there
is
arbitrarily
long
to
show
mapping
from
options
to
results
and
a
few
other
things.
So
I
thought
I'd
have
time
to
talk
about.
I
did
time
to
talk.
I
swear
to
you
but
right.
B
So
this
is
the
equivalent
code
in
python
and
down
here
this
match
is
doing
destructuring.
So
it's
taking
that
structure
of
the
data,
and
this
is
why
the
structure
of
the
data
being
separated
to
the
code
is
so
important.
It
can
take
the
structure
of
the
data
and
introspect
it
to
give
you
back
a
whole
bunch
of
things.
So,
okay
n
is
giving
you
the
result
value.
B
I
was
talking
about
and
the
er
is
giving
you
one
of
an
e
number
of
errors,
because
it's
unwrapped
to
get
to
your
enum
and
then
this
is
actually
equivalent
to
except
io,
except
par0,
except
global
capsule,
and
this
is
the
machinery
to
implement
that
go
and
look
at
the
slides
are
up
on
github,
so
they
want
to
do
a
bunch
of
things
that
will
make
it
much
closer
to
python
like
directs
the
language
syntax
for
generators,
co-routines,
futurisation
gateway.
This
stuff
is
happening
right
now.
B
Incremental
compilation
is
happening
right
now
to
make
it
a
lot
faster
for
big
projects,
but
there's
a
huge
number
of
other
things.
Like
I
said,
the
rfcs
those
this
is
the
current
plan
features
algorithms
beat
everything
so
once
you
go
to
a
sensible
implementation
of
fibonacci,
c,
python's,
still
kind
of
slow,
but
pie,
pie
and
rust
get
right
down
to
the
nose.
B
However,
if
you
I
know,
we've
run
out
of
time,
but
if
you
call
from
within
python,
you
can
aware
of
my
slides
right
so
there's
stuff
in
there
that
you
can
look
at
for
bindings,
I'm
just
looking
for
a
there
right.
So
this
is
comparing
a
iterator
versus
calling
up
from
json
rpc
and
json.
Rpcs
are
slower,
but
it's
not
terrible.
So
my
advice
for
binding
is,
if
you
you've
got
to
go
down
to
your
c
data
types.
That's
what's
going
to
happen.
B
So
if
you
can
just
use
a
json
rpc
written
in
rust,
like
if
the
overhead
of
calling
is,
is
not
compared
to
what
you're
going
to
get.
That's
probably
a
lot
easier
to
manage,
but
you
can
do
a
pure
extension.
B
C
Hi
thanks
for
the
talk,
so
if
I
want
to
write
some
sort
of
new
green
field
project,
some
sort
of
server,
I
don't
mind
some
sort
of
threading
details,
go
or
rust
and
why.
B
But
you
it's
just
about
at
the
point.
You
could
put
a
macro
around
that
and
then
you
get
type
safety
and
ease
of
development.
So,
in
terms
of
the
other
stuff,
the
http
stacks
web
servers,
those
are
maturing
in
rust
and
they're,
probably
more
mature
and
go,
but
I
think
they're,
where
they
need
to
be
for
you
to
write
pretty
much
anything
these
days
and
the
languages
this.
What
you
get
from
the
safety
is
much
less.
B
Oh,
I've
got
to
go
back
and
spend
the
engineering
time
fixing
that
buck
it's
going
to
be
closer
to
correct
the
first
time
round.
So,
to
my
mind,
thinking
from
an
engineering
planning
perspective
saying,
look,
you
know
we'll
go
and
build
up
a
postgresql
module,
for
example.
If
one
didn't
exist
would
be
a
reasonable
thing
to
do,
because
you
can
be
confident
that
once
you've
done
that,
it's
going
to
be
rock
solid
and
you're
not
going
to
spend
a
lot
of
slow
bleeding,
actually
maintaining
it
forever.
D
About
film
that
rust
isn't
faster
than
python,
what
do
you
think
the
most
powerful
feature
in
rust.
B
Apart
from
that,
well
I
I
probably,
as
I
said,
I
kind
of
got
distracted
by
the
the
stats
and
went
down
that
path
for
the
talk.
So
I
think
the
the
biggest
thing
about
it
is
the
influence
of
language
features
like
the
destructuring
and
the
enums
that
carry
data.
B
I
really
like
those
because
they
give
you
a
very
high
scale,
feel
to
it
without
all
the
overhead
of
having
to
go
to
a
non-procedural
language.
So
if
I
write
three
lines
of
code
and
rust,
I
know
that
they're
going
to
execute
those
three
lines
of
code.
If
I
write
those
three
lines
of
code
in
half
scale,
they
may
or
may
not
write
them
depending
on
whether
or
not
they
get
evaluated,
and
it
becomes
a
lot
harder
to
reason
about
it,
but
a
lot
of
the
stuff
that
makes
ryden
haskell
really
powerful.
B
B
I
think
that
the
readability
and
the
ability
to
comprehend
what's
going
on
in
rust,
is
going
to
be
stronger
over
time
than
it
is
and
go
particularly
as
the
features
I
was
talking
about.
Like
actual
generators,
get
added,
there's
already
channels
in
it's
just
a
module
in
rust,
so
you
can
write
communicating
sequential
process
style.
I
o
things,
there's
a
futures
thing
in
nightly,
so
you
can
do
an
equivalent
to
async
I
o
and
rust
can
compile
down.
B
You
know
some
fairly
large
expressions
down
to
a
state
machine
for
you
and
get
really
cool
results
that
way
so
the
like
over
the
next
six
to
twelve
months.
I
think
we're
going
to
se.
I
wouldn't
call
them
killer
features,
but
we're
going
to
get
the
ability
to
write
very
easy
to
understand
direct
procedural
code,
easy
to
reason
about
that
compiles
down
to
the
absolute
best
possible
way
to
implement
that
thing
and
that
has
been
pulled
out
sideways
through
compiler
plug-ins
and
extension
modules.
A
E
I
didn't
fully
grasp
the
pointer
part
that
you
mentioned
before.
Does
it
essentially
mean
that
you
cannot
have
no
pointer
exemptions
in
in
rust.
B
B
So
you
do
an
unsafe
thing
where
you
say
to
the
system:
hey
forget
that
you
own
about
that
and
what's
actually
that
one's
safe
because
of
interesting
reasons.
But
when
you
come
back-
and
you
say
by
the
way,
I'm
making
a
call-in
with
that
struct
and
this
thing
is
actually
a
rust
source
struct
and
it's
owned
by
rust
for
the
duration
of
that
call,
you
want
all
the
rust
safety
to
apply.
So
at
that
point
you
do
a
very
unsafe
thing.
B
You
say
to
rust:
I'm
going
to
give
I'm
going
to
tell
you
that
this
is
a
pointer
to
one
of
these
things,
and
I
want
you
to
own
it.
So
you
make
that
you,
you
cast
it
into
that
and
that
you
have
to
wrap
with
unsafe
and
then,
after
that,
all
your
normal
rust
guarantees
apply.
And
then,
when
you
return
it
back,
you
say
memory
forget
it's!
B
You
know
it's
owned
by
python
again,
all
of
which
to
say
you
have
the
ability
to
shoot
yourself
in
the
foot,
but
you
can,
as
you
can
do,
that
in
python
you
can
use
the
ffi
or
cffi
or
an
extension
module
to
step
outside
the
bounds
of
the
vm
and
break
the
the
thing.
If
you
do
that,
you
keep
both
pieces,
so
I
would
say
that
what
you
want
to
do
is
you
want
to
contain
that
make
it
as
small
as
possible.
Put
it
in
a
separate
module
test.
B
A
B
Yeah,
I'm
happy
to
hallway
track,
I'm
here
and
barry
and
I
oh,
we
should
pimp
the
sprints
barry
and
I
are
running
sprints
to
get
people
developing
on
c
python,
so
monday,
tuesday
come
along
and
anytime.
I'm
happy
to
talk
about
this
and
as
the
url
is
there
for
the
slides
you've
had
lots
of
time
to
copy
it
down.
If
you
haven't,
I'm
sorry
get
it
from
the
video.
F
B
So
one
of
the
yeah,
so
absolutely
so
one
of
the
things
they
did
is
they
sat
down
and
talked
about
mailing
lists
versus
kind
of
stack,
exchange,
style
forums
and
so
on,
and
they
have
decided
they
decided
a
while
ago.
Now
I
I
wasn't
involved
in
any
of
this,
so
this
is
like
secondhand,
it's
all
been
blogged
about
and
and
so
on
they
got
rid
of
their
mailing
lists.
B
They
have
a
stack
exchange
like
thing
you
actual
stack
exchange,
I
think
for
user
questions
and
then
there's
a
developer
kind
of
look-alike
thing.
Where
you
discuss
things
that
you
want
to
build
consensus
around,
and
then
you
have
the
issues
in
github
and
you
have
irc
for
real
time
discussion.
So
they
don't
have
the
mailing
list.
Kind
of
some
of
the
patterns
that
occur
in
mailing
lists
don't
occur
elsewhere
with
people
dog
piling
over
a
period
of
time.
They
do.
B
On
twitter,
for
example,
twitter
is
like
mailing
lists
where
you
take
all
the
evil,
and
you
just
amplify
that,
so
they
went
the
other
direction.
They
said.
We
want
people
to
stop
and
think,
and
we
want
to
people
who
don't
have
any
engagement
in
the
community
have
to
earn
the
ability
to
to
comment
in
significant
ways
and-
and
you
know,
and
it
seems
to
be
working
like
they
have
a
lovely
community-
I
mean,
maybe
that
they
just
have
three
projects
using
it.
B
But
I
don't
think
that's
the
case,
because
there
are
operating
systems
written
in
rust,
entire
kernel,
everything
there's
the
servo
browser
from
mozilla,
which
is
a
replacement
engine
for
firefox.
That's
gradually.
Phasing
in
like
there's
some
really
big
things
that
are
big
open
source
projects
being
written
in
rust.
G
Simple
last
question:
what
does
russ
do
about
object,
lifetime
things
like
resource
acquisition
or
initialization
control
destruction?
What's
the
lifetime
of
objects.
B
Yeah
so
there,
where
is,
I
probably
can't
find
it
because
I'll
get
in
trouble.
So
there
is
a
drop
trait.
If
you
implement
the
drop
trait,
then
you
implement
the
function
in
it
and
that
function
runs
when
your
object
is
going
to
be
dropped.
B
Yes,
so
that
will
happen
so
there's
always
only
one
owner.
The
type
system
guarantees
that
the
drop
trait
will
run
in
two
places.
It
will
run
when
the
thing
goes
out
of
scope.
That's
when
it
runs.
If
you
wanted
to
make
it
go
out
of
scope
earlier,
you
can
invoke
drop
on
it
directly,
which
will
make
it
go
out
of
scope
right
away
and
the
thing
will
be
nil,
nil.
The
other
won't
try
and
run
again.
B
It's
not
guaranteed
that
the
drop
trait
will
always
run,
and
this
is
why
I
said
earlier:
there's
a
thing:
that's
actually
safe,
even
though
it
sounds
unsafe,
because
if
you
do
like
a
long
jump
or
something
in
a
stack
unlined,
you
can
get
into
situations
where
things
won't
run,
but
in
the
normal
course
of
stuff
and
if
you're
writing
routine
code,
it
will
always
run
so.
It's
like
there's
this
edge
case
and
you
have
to
be
aware
of
it,
but
by.
A
All
right,
thank
you
so
much
for
speaking,
and
so
can
we
all
just
give
rob
a.