►
Description
by Owen Synge
At: MiniDebConf Hamburg 2019
https://wiki.debian.org/DebianEvents/de/2019/MiniDebConfHamburg
Room: main
Scheduled start: 2019-06-09 18:00:00
A
Okay,
so
this
talk
was
originally
a
talk:
I
gave
for
HEPA
can
die,
haven't
updated
the
date
and
time
that's
scientific
computing
data
center
manager,
conference
and
I
was
telling
them
about
rust,
which
was
my
latest
experiments
and
I've
updated
the
talk
a
couple
of
times
since,
but
I
obviously
haven't
updated
the
date.
So,
let's
get.
B
A
My
general
opinion
about
programming
language
is:
is
I,
want
them
to
work
with
other
programming
languages,
I
really
want
them
to
interface
with
C
I
want
them
to
have
a
really
significant
advantage
before
I'm
willing
to
invest
in
them,
and
Python
was
a
great
leap
forward
for
me
in
terms
of
productivity
and
that's
why
I
fell
in
love
with
it.
I
need
to
be
able
to
do
a
certain
series
of
tasks.
Usually
my
jobs
involve
writing
CLI
applications
with
a
database
having
logging
processing,
Jason
things
like
that
and
I've
tested.
A
All
of
these
use
cases
before
I've
presented
anything
about
rust
and
rust
is
really
passed
with
flying
colors.
So,
let's
jump
back
and
say
why
do
I
like
Python?
It's
really
fast
to
write.
It's
really
quick
to
debug
and
most
applications,
don't
need
performance,
and
so,
while
it's
100
times
slower
than
C,
roughly
it's
usually
fast
enough
and
duck
typing
is
wonderful.
A
It
was
a
revelation
to
me
when
I
came
to
Python
first,
where
things
are
like
the
things
that
you
expect
them
to
be
good
enough
error,
handling,
I,
really
disliked
C++
is
our
inheritance
models
and
stuff
like
that
and
I
thought
pythons.
There
was
so
much
cleaner
and
my
god,
the
tooling,
has
improved
over
the
year,
so
I've
been
using
Python
since
2006
with
talks
virtual
end
PI
tests
mock
really
is
a
pleasure
to
to
debug
things
into
PI
it
with
Python
and
make
things
solid.
A
Although
there
are
variants
of
Python
for
embedded
environment,
but
that's
another
story:
well,
please
don't
get
confused
by
that
one
memory:
usage
swig
these
things
have
all
caused
problems,
but
we
haven't
got
long
to
talk
about
all
these
slides,
so
I'm
not
going
to
read
everything.
So
how
do
we
work
around
pythons
limitations?
If
we're
working
in
Python?
Well,
you
can
rewrite
everything
there.
It
can
be
very
revolutionary
or
you
can
be
incremental
and
make
native
C
bindings
for
the
performance.
Critical
areas
yes
and
foreign
function.
A
Calls
from
Python
can
be
done,
but
it's
kind
of
one
of
those
problems
so
I
said
see
what
makes
me
avoid.
C
well,
I
find
for
me:
I
know
that
there
are
gurus
out
there,
but
I
find
development
is
really
really
slow
compared
to
Python
I
find
debugging
really
hard.
I've
I
got
to
write
C
reasonably
at
one
point
in
my
career
a
long
time
ago
and
I've
forgotten
it
all.
Okay,
not
all
of
it,
but
quite
a
lot
of
it
and
now
I
just
find
it
really
hard
work
with
compiler
errors.
A
Don't
have
that
many
memory
management
issues,
but
sometimes
the
libraries
I
worked
with,
did
and
in
terms
of
being
efficient
with
memory.
Well,
I
never
quite
got
the
hang
of
that,
because
I
was
more
focused
on
making
sure
that
didn't
get
leaks,
so
swings
and
roundabouts
and
C++
well,
people
told
me
this
was
gonna,
be
a
great
leap
forward.
I
pre
date
in
my
c++
time
all
the
big
advanced
things
that
happen
in
c++,
11
and
c++
17.
A
That
made
it
a
much
better
language,
I'm
told
by
my
friends
who
were
experts
in
C++,
so
my
memories
are
and
being
slow,
debugging
being
hard
multi-threading
being
hard,
compiler
errors,
STL
traces
that
go
off
the
screen.
Oh,
it
was
suffering
and
so
I
went
back
to
see
when
I
used
to
be
a
C++
programmer
under
GCC.
So
why
did
I?
Try
rust
well
I've
been
to
the
CCC
conference
in
Hamburg
last
time.
A
It
was
here
and
I've
been
to
false
gem
and
there
was
quite
a
buzz
around
a
lick,
sir
and
rust,
and
elixir
was
derived
from
Lang
and
I'd
already
had
a
look
at
that
and
realized.
It
was
a
great
programming
language,
but
not
really
fitting.
All
my
use
cases
and
I
wanted
something
bit
more
Universal
native
and
compiled
with
things.
A
I
had
a
use,
cases
for
and
I
wanted
to
extend,
Python
and
I
wanted
something
to
be
as
fast
as
C
and
C++,
but
with
need
when
needed
and
I
didn't
want
garbage
collection,
because
I
didn't
want
one
garbage
collector
to
fight
with
another
freeing
of
resources
in
Python,
because
I
wanted
it
for
embedding
in
other
languages
and
I'd
heard
something
about
rust
being
may
be
useful
for
multi-threading
and,
to
be
quite
honest,
I
wanted
to
pick
up
another
language
and
I
thought.
Maybe
something
had
happened
in
the
ten
years
since
Python
was
invented.
A
So
there's
some
interesting
design
decisions,
probably
most
important
factor
to
understand
about
rust,
as
it
was
designed
by
Mozilla
for
very
much
a
practical
purpose.
How
can
we
make
our
code
more
reliable
and
more
safe,
and
how
can
we
incrementally
improve
the
product
that
we
have
Firefox
I'm,
not
a
Firefox
developer,
but
that
was
their
use
case,
and
so
that
was
really
interesting,
incrementally
changing
to
a
new
language
that
really
stuck
in
my
mind
of
something
special
now:
zero
abstraction
overhead
philosophy
just
likes
C++.
A
What
that
means
is
it's
gonna
run
as
fast
as
we
can
yeah
and
it's
your
fault
if
it
doesn't
run
fast
rather
than
pythons
fault
or
someone
else's
fault,
no
big
garbage
collector,
but
a
borrow
checker.
Now
the
word
borrowed
check
is
going
to
come
up
a
couple
of
times
in
this
talk
and
I'm
gonna
try
and
not
go
into
it
for
a
few
seconds,
but
please,
at
the
end,
if
I
haven't
explained
enough,
let's
get
on
to
that
multi-threaded
support
baked
into
the
type
system.
A
A
Variables
are
immutable
by
default
now,
I
know.
One
person
here
is
an
inter
functional
programming,
and
this
is
just
how
he
would
like
the
world
to
be,
and
once
you
sit
there
and
work
in
a
world
where
variables
are
immutable
by
default.
You
think
this
is
a
major
bug
in
C
and
a
major
bug
in
C++,
and
you
realize
that
for
backwards
compatibility,
they
can
never
fix
it,
and
it's
kind
of
sad
but
life's,
like
that,
we
still
use
QWERTY
keyboards
enumerated
types
with
parameters.
A
Now
this
is
all
stolen
from
ml,
and
it's
absolutely
wonderful
and
I'll
show
you
an
example
later,
but
it's
a
very
long
word
for
saying
parameters
can
be
put
into
enumerated
types.
So
my
first
experience
about
rust.
Well,
a
lot
was
unfamiliar
to
me.
They
have
a
whole
ecosystem
around
them,
rust
up
a
tool
chain.
Updater
that
made
me
scream
cargo,
which
it's
an
entire
behavior
made
me
scream
and
I'll,
explain
why
very
soon,
and
then
they
flat
there
and
threw
away
object
orientation
which
made
me
initially
go.
A
Why
the
hell
are
you
reinventing
the
wheel
and
then
they
said
the
getting
rid
of
exception.
Handling
as
well,
I
wasn't
unhappy
with
the
idea
of
LLVM
that
initially
my
prejudice
was
okay
with
and
then
there's
Baro
checker
stuff,
which
pretty
quickly
I
felt
was
revolutionary,
but
other
concerns
came
in
just
as
I
was
getting
aware
of
these
things
about
maturity
of
the
tools.
A
So,
let's
get
on
to
these
things
and
see
why
they
made
me
scream
and
why
they
continued
to
make
me
a
little
bit
upset
yeah,
so
rust
up
is
the
default
way
to
get
a
rough
development
environment,
and
this
goes
completely
against
the
Debian
policy.
Basically,
you
don't
download
a
script,
install
it
in
the
system
or
what
slide
am
I
on
ok
I'm,
going
a
bit
too
slowly
and
it
downloads
all
of
the
build
tools
and
plug
them
into
your
directory
off
the
web.
A
I
wasn't
really
happy
for
it.
It's
got
good
reasons
for
it.
It
can
now
be
avoided
for
rusts
stable
on
platforms
like
Debian.
You've
now
done
a
great
job
of
packaging
cargo
packaging
rafts
they
now
exist,
but
if
you
want
to
work
with
cross
compiling,
if
you
want
to
work
with
rust
nightly-
and
there
are
occasional
reasons
why
you
might
want
to
do
both
of
those
things
then
rust
up
is
the
appropriate
way
to
do
it
at
the
moment
as
a
rust,
developer,
I
hope
Debian
has
another
solution
sometime
in
the
future.
A
Cargo
really
scared
me
at
first
this
you
sit
there
and
you
make
a
nice
tamil
file,
which
is
a
bit
like
a
Windows
any
file,
and
you
describe
your
build
dependencies
and
it
downloads
things
from
the
web,
and
that
was
a
bit
scary
to
me
at
first
I
was
totally
upset
by
this,
for
reproducible
builds
having
a
new
package
is
all
of
that.
The
cargo
team
have
changed
things
a
lot
since
I've
been
using
it
now,
there's
ven
during
which
means
that
you
can
download
all
of
these
dependencies
off
the
and
store
them
on
disk.
A
So,
even
if
you're,
not
working
with
Debian's
excellent
packaging
plans
for
rust,
you
can
still
have
a
repeatable
build.
It's
very
simple
to
use
and
there's
a
build
RS
thing,
which
is
a
pre
compete
of
rust
code
that
you
can
compile
before
the
rest
is
compiled
for
doing
things
like
extending
your
applications
automatically
generating
C
bindings,
all
the
sort
of
things
you
might
do
with
all
the
tools.
Sorry
I'm
a
bit
out
of
date,
I
don't
know
C
make
so
the
rust
compiler
is
slow,
really
really
slow.
It
makes
C++
compiler
seem
fast.
A
Basically,
there
is
a
panic
unrecoverable
thing
and
you
can
recover
from
it.
Just
like
this
kind
of
corner
cases,
I
said
you,
it
was
unrecoverable,
but
I
know
more
than
oh
did
when
I
first
wrote
these
slides.
There
are
recoverable
errors,
and
these
are
done
with
parameterised
enumerated
types.
So
you
basically
say
that
the
output
of
a
function
has
a
result
type
and
then
you
have
the
okay
type
and
the
error
type,
and
then
you
can
use
the
error
type
and
at
first
when
I
started
programming
in
rust.
A
My
code
was
growing
because
I
was
matching
on
which
types
am
I
getting
back
from
my
function
and
then
handling
the
error.
But
if
you
keep
the
error
type
consistent
between
the
functions,
you
can
just
pass
it
up,
like
an
exception,
would
up
the
stack
by
using
the
question
mark
operator.
So
that
makes
the
language
really
quite
succinctly.
A
Breeze,
like
error
chain,
is
starting
to
be
deprecated.
So
what
oh?
Why
is
rust,
not
quite
oo?
Well,
it's
almost
oo.
It
doesn't
support
inheritance.
They
don't
have
methods
directly
applied
to
objects
in
the
same
sort
of
syntax
goes
very
very
similar
and
I'll
show
an
example
in
the
next
slide
and
we
have
the
concept
of
traits
which
are
a
bit
like
interfaces
in
Java
or
polymorphic
behavior
in
arrow
and
I've.
Yet
to
see
no
downside
and
I'll
just
show
you
an
example
of
the
code
on
the
next
page
very
very
quickly.
A
So
here
we
have
a
structure
very
much
like
a
see
structure.
Here
we
have
a
oh
sorry,
yes,
so,
and
here
we
have
a
function,
that's
converting
point
to
string.
That
said,
that
exists-
and
here
is
an
implementation
of
points,
methods
and
there's
a
two
string
thing:
it's
really,
you
don't
actually
need
the
line
on
line
seven,
so
here's
an
example
of
a
hash
function
being
implemented
for
two
different
types,
and
this
shows
the
strength
of
using
traits
rather
than
arrow,
because
here
we
are
implementing
hash
for
bool.
A
A
Oh,
oh
I,
think
it's
rather
nice
and
here's
another
example
of
just
a
really
cool
library,
using
some
macros
to
decorate
a
structure,
and
that's
all
you
need
to
do
to
make
something
serializable
and
be
serializable
in
rust,
using
the
beautiful
surgery,
library,
which
goes
very
fast
and
is
great
because
it
gives
you
full
type
checking
which
you
also
get
with
rust.
Okay,
I've
really
got
hurry
because
I'm
running
out
of
time
and
I've
got
far
too
much
content
here.
A
The
burrow
check
are
basically,
the
concept
is
only
one
thing
to
know
in
the
own
memory
at
any
one
time
to
change
things
and
multiple
readers
can
happen
at
the
same
time
to
get
around
this
with
multi-threading.
You
then
have
a
reference,
a
reference
count
action
and
in
here
at
that,
with
a
lock
type.
So
you
can
get
a
mutable
access
to
the
reference
and
when
the
lock
goes
out
of
scope,
it's
automatically
unlocked.
A
But
the
whole
consequence
of
this
is
that
not
only
do
we
get
out
of
the
type
system
thread
safety,
but
we
also
get
something
like
garbage
collection,
but
without
the
periodic
stopping
of
garbage
collection,
we
get
something
quite
real-time
there,
so
if
that
is
really
rather
wonderful
and
Apple's,
going
to
steal
the
idea
and
put
into
Swift
very
soon
I've
heard.
Ok.
This
is
just
a
random
example
of
my
original
use
case
for
why
I
wanted
to
sit
there
and
play
with
a
more
low-level
language
like
C
or
C++
or
rust.
A
We
can
very
easily
embed
rust
into
Python
I've
had
I've
got
played
with
this
quite
some
depth.
It's
a
little
bit
too
naive
for
me
to
sit
there.
Sorry
a
bit
too
immature
for
me
to
sit
there
and
say
it's
properly
production.
You
do
need
to
work
with
rust
nightly.
This
is
not
readable.
On
these
slides,
I
decided.
A
I've
extended
this
example
and
played
around
with
Sergey
for
serializing
and
deserializing
to
make
some
benchmarks
against
Python
and
rust,
but
I
want
to
go
a
little
bit
further
before
I
release
the
figures,
but
I
sit
there
and
say
the
rust
is
so
much
faster,
so
rust
issues
I've
found.
This
is
probably
the
most
valuable
bit
of
the
talk,
because
people
don't
often
tell
you
things
that
they
don't
like,
so
it's
only
implemented
with
LLVM.
So
it's
not
100%
self-supporting
language
I
think
that's
a
really
important
failing
of
rust.
A
Actually
but
I
can
totally
see
why
it's
happened
from
an
engineering
pragmatic
perspective.
There's
no
stables,
see
ABI.
You
can
export
C
trivially
by
just
decorating
method
and
functions
and
types
it's
really
easy,
but
you
can
but
then
you're
using
the
C
API.
It's
like
C++
is
not
stable
and
rust
is
not
easy
to
learn
it's
nowhere
near
as
easy
to
learn
as
Python,
but
if
you're
familiar
with
Cu
C++
Pascal
those
sort
of
languages
Delfy
anything
the
way
you've
been
using
raw
memory,
ax
management
yourself.
A
A
Well,
that's
how
I
felt
about
the
Burrow
checker
I
think
it's
much
harder.
If
you
grew
up
with
JavaScript
by
default
cargo
downloads
from
the
internet,
you
have
to
work
a
little
bit
to
stop
it
doing
that
and
async
IO
is
a
weak
point
in
rust.
It's
only
the
past
year
that
there's
been
a
story
for
async
IO.
So
this
is
where
we
don't
do
blocking
requests
using
the
old,
traditional
C
API
from
the
70s.
We
start
modernizing
ourselves
and
using
the
1980s
api's
of
the
UNIX
kernel
and
that's
only
happening
now.
A
You
know
I
said
the
compiler
was
absolutely
lovely
soon,
as
you
put
the
unsafe
keyword
and
you
wrap
the
code.
Suddenly,
all
of
the
I
think
you
actually
meant
to
do
this
and
it
being
right
goes
away.
It
just
says
era,
yes,
you're
wrong,
so
it
does
encourage
you
not
to
use
the
unsafe
keyword
too
much
anyway.
A
So
from
Python
person's
perspective.
What
hurt?
Probably
most
was
the
semicolon
thing
so
functions
just
returning,
because
you
didn't
put
a
semicolon
at
the
end
and
this
then
not
matching
the
function,
signature
and
then
we're
getting
an
interesting
type
error
and
python
mocking
is
so
nice
and
it's
just
not
as
easy
in
rust.
You
don't
get
the
ability
to
monkey
patch
a
function
for
the
purpose
of
testing
and
I.
Do
miss
heissen,
sometimes
with
rust
and
rust
is
a
little
bit
more
verbose
anyway.
So
long
in
summary,
rust
is
fast.
A
The
code
nearly
always
does
exactly
what
you
expected
the
first
time
you
run
it
and
you've
successfully
fought
the
compiler.
It
has
great
libraries
to
get
things
done
and
the
quality
of
code
going
into
such
an
immature
language
is
amazingly
high
arc.
Pass
is
about
the
third
evolution
in
Python
and
clap.
The
command
line.
A
Processing
library
in
rust
is
just
way
ahead
and
lots
of
things
like
that
directly
inspired
from
C++
and
Python
libraries
all
over
the
place,
it
really
fast
executables,
you
are
I,
guess
a
parametrized
enumerated
types
are
probably
my
favorite
thing
about
rust
and
that's
totally
stolen
from
ml.
The
bourchek
is
a
great
compromise.
Last
things
I
met
will
sit,
there
and
say
is
rust,
is
really
new.
A
2015
may
the
15th
was
the
1.0
release,
but
it's
been
very
popular.
It's
got
a
huge
flow
following
on
Stack
Overflow
and
while
I
hear
from
C++
devs
that
C++
17
has
most
of
the
features
of
rust,
pi
I
would
say.
Rust
is
much
easier
to
get
your
head
around
and
you
don't
have
to
learn
all
things
that
existed
before
C++
17
to
learn
the
language,
and
it's
really
yet
to
disappoint
me
here
are
some
references
in
the
slide.
Here?