►
From YouTube: Rust & Tell - May 2021
Description
All Details: https://berline.rs/2021/05/25/rust-and-tell.html
00:00 Introduction
04:13 Tim McNamara - 5 Traits for Beginners to Learn
33:12 Senyo Simpson - Ergonomic error handling in Rust
58:53 Konstantin Wünscher & Blas Rodriguez - Building a cryptocurrency derivative exchange with Rust
A
Good
evening,
good
afternoon,
depending
on
good
morning
as
well,
depending
on
where
you
are
on
the
planet
and
thanks
to
our
speakers
today,
this
is
another
roast
until
day.
So,
just
like
we
usually
do.
I
will
go
and
introduce
myself
so
me
as
the
co-organizer
here
with
jannery,
I'm
a
rust
station
from
guinea
republic
of
guinea,
that
is
in
west
africa,
and
I
currently
work
as
a
ros
developer
for
a
company
called
quick
with
develop.
A
We
are
developing
a
search
engine,
big
by
object,
storage,
and
we
are
also
the
company
behind
tv,
which
is
a
rust
search
library.
So,
if
you
have
time
you
can
probably
check
on
github
what
stan
tv
is
and
what
it
can
do
if
you
are
interested
or
if
you
need
search
functionality.
A
And
this
meetup
is
intended
from
for
beginners
level
to
expert
level.
We
are
here
to
share
our
struggles,
ideas
and
hacks
and
projects,
so
rosten
kelly
is
a
space
for
the
community
to
learn
and
grow
together,
and
we
expect
you
to
also
participate
and
help
us
in
any
way,
especially
through
speak
coming
out
and
speaking
here.
At
this
meeting
we
follow
the
code
of
conduct
from
berlin,
and
if
you
have
more
info
on
it,
you
can
go
to
berlin
code
of
conduct.com.
A
So
this
is
an
online
meetup,
so
we
have
it
available
here
on
zoom
and
then
we
also
have
the
zoom
chat.
Where
you
can
post
your
questions.
We
currently
have
three
talks
between
those
talks.
After
the
second
talks,
mostly,
we
will
hold
breakout
rooms.
A
This
is
an
opportunity
for
every
participant
to
talk
to
each
other
and
then
synchronize
with
each
other,
and
it
will
last
20
15
minutes
and
after
that
you
can
come
back
for
the
last
stop
if
you
will
be
randomly
assigned
to
break
up
rooms
so
if,
for
instance,
your
room
is
becomes
empty
before
the
end
of
the
15
minutes,
you
can
come
back
onto
the
main
room
and
we
will
always
be
able
to
assign
it
to
another
home.
A
A
A
B
B
Wonderful,
okay,
thanks
very
much
for
the
introduction.
It
was
very
kind
I'll
just
share
my
screen,
so
there
should
be
a
big
white
box
in
front
of
you
now
perfect.
How
does
one
start
these
things
stronger.
B
Or
something
like
that
I
used
to
be,
I
used
to
be
able
to
speak
german
these
days,
not
so
much,
but
I
miss
berlin
very
much,
I'm
currently
speaking
to
you
from
new
zealand.
If
I
make
mistakes,
please
accept
my
apologies.
It's
currently
five
past
or
seven
past
five
a.m.
B
Here
in
wellington,
okay,
cool:
where
do
we
go?
We
are
going
to
be
doing
a
beginner
talk
today
and
like
normal.
We
start
these
things
with
a
bit
of
an
introduction
about
who
I
am.
I
am
a.
I
see
myself
as
a
as
a
mentor
in
the
rus
community.
Follow
me
on
twitter,
youtube
and
twitch,
for
I
organized
the
russ
wellington
meetup
group.
Luckily,
we
are
covered
free
here
in
new
zealand.
B
We
haven't
had
any
cases,
I
think
for
well
over
six
months
now
so
yeah,
it's
actually
an
in-person
meetup,
which
is
interesting.
As
you
once
said.
I
am
the
author
of
rust
in
action
day-to-day
I
do
data
science.
Actually,
I
am
particularly
focused
on
data
engineering
and
at
a
small
consultancy.
Well,
actually,
large
consultancy
called
dragonfly
data
science
here
in
wellington.
B
Okay,
about
the
talk,
I
want
to
reiterate.
One
thing
to
emphasize
is
that
these
are
not
the
most
common
traits.
This
talk
is
designed
to
inform
you
about
how
rust
feels
like
as
a
programming
language
or
how
it
is
implemented,
and
so
my
intention
is
to
be
able,
if
you
have
only
used
java
or
c-sharp
or
python
or
javascript,
to
be
able
to
understand
a
little
bit
but
you're
having
difficulty
with
rust.
B
Partial
equality
is
the
trait
is
a
the
trait
that
relates
to
the
equality
operator.
All
operators
are
implemented
with,
or
are
defined
by
traits
display
is
how
you
ask
a
type
to
convert
itself
to
a
string
so
that
it
can
be
printed
to
the
console.
Clone
is
a
way,
a
mechanism
for
being
able,
as
from
the
beginner's
perspective,
to
avoid
the
borrow
checker.
B
While
you
are
understanding
or
taking
the
time
to
learn
ownership,
the
iterator
trait
is
how
is
one
of
the
the
first
steps
for
being
able
to
really
understand
how
rust
is
slightly
different
from
other
programming
languages
or
its
peer
languages
in
particular,
sort
of
c
plus-
and
this
provides
us
very,
very
ergonomic
or
very
friendly
way
of
using
a
for
loop
for
any
collection.
B
Drf.
Is
this
ability
for
the
dot
operator
so
method
calls
to
be
able
to
automatically
call
methods
that
you
can
drift
into,
and
that
sounds
very
confusing,
but
it
basically
allows
if
your
type
can
dereference
itself
to
become
another
type.
You
can
call
the
target
types
methods
from
the
from
the
parent
type
itself.
So
that's
the
22nd
version,
probably
a
bit
more
than
20
seconds.
B
If
you
have
started
with
rust
or
you're,
just
just
very,
very
new,
a
a
struct
is
just
a
type
which
can
be
composed
of
multiple
objects,
so
it
isn't
the
same
as
a
class,
but
it's
very
similar,
but
you
can
think
of
a
as
a
like
a
plain
object,
so
we
create
them
with
so
here
I'm
defining.
Oh
sorry,
it's
saying
that
I
this
ignore,
ignore
this
error.
It's
saying
that
I
it
doesn't
know
how
to
the.
B
I
can
define
a
cube
and
also
create
one,
but
there
are
no
methods
attached
to
this
struct.
Okay,
and
the
other
thing
that
I
want
to
just
spend
10
seconds
talking
about
is
the
notion
of
a
bit
pattern,
and
this
will
become
important
when
I
describe
something
about
floating
point
and
it
turns
out
that
a
well
just
the
term
bit
pattern
means
a
sequence
of
bits
that
represent
a
type.
B
It
is
the
rep.
The
internal
representation
for
every
type
is
a
at
some
stage,
turns
into
a
sequence
of
zeros
and
ones,
and
that's
what
I
mean
by
the
term
bit
pattern.
Okay,
so
now
we
are
ready
to
talk
about
what
a
trait
is
traits
are
the
foundation
for
all
behavior
inside
rust
and
it's
the
foundation
for
all
behavior
that
is
shared
between
types.
So,
if
you
have
all
floating
point,
numbers
or
all
integers
behave
in
a
similar
way,
even
though
they
are
different
types
and
that
is
enabled
through
traits.
B
You
can
think
of
traits
as
being
an
abstract
bass,
class
or
an
interface,
if
that
might
be
helpful
if
you're
from
an
object,
orientated
object-oriented
language,
so
almost
all
of
rust
is
actually
built
with
traits
operators
methods.
The
generic
system
is,
and
trade
objects
are
all
connected
to
traits
in
some
way.
B
B
So,
for
example,
I
can
define
a
so
I
can
import
to
the
trait
add,
and
if
we
ignore
what
we
say
is
it
I
can
this
triple
function
will
work
with
any
type
t
that
implements
add
and
out
in
the
output
of
the
edition
is
the
same
type,
oh,
and
by
the
way
it
must
be
copy,
which
means
that
type
t
will
copy
itself
instead
of
basically
duplicate
itself,
if
it
needs
to
if
it
was
going
to
encounter
any
borrow
problems
and
what
happens
if
I
you
know,
we've
seen
rust
generics
before
so
I
can
call
triple
with
a
floating
point
number
or
I
could
call
it
with
an
integer.
B
And
it
will
quote
unquote
just
work,
which
means
that
I
have
to
find
one
function
in
source
code
and
use
traits
to
be
able
to
specify
that
it
must
be
a
type
that
implements
addition.
But
for
some
some
types,
don't
well
many
types,
don't
implement
addition,
and
so
you
cannot
add
a
string
size
to
another
string
slice
and
the
type
system
will
protect
you
from
doing
things
that
are
illegal
and
it's
all
enabled
by
traits.
So
how
do
we
define
them?
B
A
trait
in
this
case,
movement
is
defined
by
a
set
of
methods
and
the
distinguishing
characteristic.
They
look
a
lot
like
a
class
without
any
data
and
structs
look
a
lot
like
a
class
without
any
methods,
and
so
I've
got
the
struct
here
with
node
members.
So
it's
just
a
what
we
call
a
zero
size
type
and
I've
and
a
sentinel
in
english
is
just
a
thing
that
never
moves
so
just
to
find
movement
here,
sentinel
and
but
a
cannonball,
let's
say
implements
movement.
B
It
can't
change
its
direction
once
it's
fired,
and
so,
if
it's
in
the
air
it
can
only
change
its
speed,
let's
say,
and
so
the
trait
system
does
not
impose
any
more
restrictions.
Apart
from
the
type
it
can
be
a
little
bit
more
sophisticated
we've,
not
we
saw
the
output
thing,
but
in
general,
if
you
define
a
trait
you're
free
to
implement
it.
However,
you
want,
with
whatever
type
that
you
have.
B
This
was
a
little
bit
confusing
to
me,
because
I
sort
of
thought
that
trac,
that
these
definitions
were
slightly
more
magical,
that
if
I
had
a
trait
like
movement,
that
I
would
expect
it
to
always
be
moving,
but
actually
it
turns
out
that
you
can
implement
it
just
with
with
with
doing
nothing,
hopefully.
B
Sense:
okay,
right
one
distinguishing
characteristic
is
that
traits
do
not
have
data,
so
we
can't
say
that
the
trait
movement
requires
that
the
type
it's
has
a
speed
attribute
and
a
direction
attribute.
It
doesn't
make
sense
from
rust.
Traits
only
relate
to
methods.
Okay.
So
now
we
get
to
our
first
trait
that
we
want
to
discuss
for
beginners
clone
and
the
reason
why
I
think
this
is
first
is
that
if
you're
a
beginner
I
want
you
know,
have
you
ever
seen
this
use
of
mood,
value
or
something
related?
B
I
I
feel
that
it's
okay
to
spend
a
little
bit
of
time
at
runtime
cloning
values
if
you're
spending
hours
and
hours
and
hours
learning
rust.
B
So
this
is
this
is
my
example.
So
I
have
this
func
a
function,
save
which
is
supposed
to
save
an
object,
or
this
is
this
vector
of
integers
to
disk,
let's
say,
and
so
here's
here's
my
list
of
my
event
vector
of
numbers,
and
I
try
and
save
it
once,
and
so
this
is
just
a
read,
only
method,
and
then
I
mutate
or
modify
the
value.
B
I
add
two
extra
elements
and
then
I
save
it
again
so
rust
when
you
start
will
give
you
this
horrible
error
and
it
turns
out
that
one
way
to
fix
this
is
by
asking
for
a
read
only
or
what
we
like
a.
We
can
take
a
reference
to
it,
but
another
way
to
do
it.
While
you
learn
it's
complicated,
so
we
can
we've
got
this
shortcut,
which
is,
we
can
add
a
clone
method.
B
Clone
will
duplicate
all
the
values,
and
this
one
will,
I
hope,
work
correctly,
and
in
this
case
it
actually
does
so
I'll.
Just
do
that
once
more.
B
B
In
fact,
I
can't
do
it
there
either
because
save
I'll
need
to
clone
it
twice.
If
I
want
to
print
it
out.
D
B
I
should
stop
playing.
How
do
I
implement
clone,
so
this
is
at
the
cheap
way,
so
I've
got
these
three
structures,
sorry
three
types
and
I
need
to
implement
phone
for
them.
So
how
do
I
do
so?
In
particular,
I
want
to
I
really
care
about
this
meeting
thing.
You
actually
saw
me.
B
And
now
it
that's,
that's
it
whenever
your
many
types
in
the
standard
library
already
know
how
to
clone
themselves,
and
so,
if
you
have
a
a
a
struct
that
only
includes
members
that
already
know
how
to
clone
themselves,
which
is
the
majority
of
your
of
the
majority
of
cases
when
you're
starting
out,
then
you
just
need
to
derive
clone,
and
then
you
will
have
access
to
a
clone
method,
which
is
quite
handy.
D
B
We
take
two
values
left
and
right
and
we
return
a
boolean
result,
and
so
that's
fine,
but
the
question
is:
why
is
it
partial
like
that
sounds
very
strange,
and
the
reason
is
that
rust
tries
very
hard
to
get
things
right
or
model
the
environment
model
reality
as
quick
as
accurately
as
possible.
Rust
is
very
precise.
It
is
a
systems,
programming
language,
which
means
that
it
really
cares
about
details.
B
So
floating
points
take
a
bit
pattern.
You
can
see
here
that
we
have
two
floating
point
numbers
with
different
bit
patterns,
this
one's
zero
and
this
one's
you
know
2
to
the
32
minus
1.
and
they
both
evaluate
as
true
so
there's
two
bit
patterns
that
are
not
the
same.
That
evaluate
is
true,
and
we
have
here
the
same
bit
pattern
on
both
sides
and
if
we
try
equality,
they
evaluate
as
false,
and
so
you
may,
if
you
haven't
encountered
this
behavior,
it
might
be
worthwhile.
B
Just
for
me,
pausing
to
explain
what's
actually
happening.
Floating
point
has
a
so
I'll.
Just
cheat
a
little
bit
has
the
notion
of
a
negative
zero.
B
So
this
is
zero,
with
the
sign
that
assigned
signed
it
flipped,
and
so
both
zero
and
negative,
zero
evaluate
to
are
the
same
numeric
value,
and
so
they
evaluates
evaluate
to
to
true
when
for
equality.
Now
this
one
here.
So
that's
that
first
example.
The
bit
pattern
is
a
bit
sneaky.
D
B
Floating
point
has
a
representation
for,
in
fact,
many
many
bit
patterns
that
evaluate
to
ex
result
from
expressions
that
are
mathematically
undefined,
so,
for
example,
division
by
zero
is
one
of
the
or
like
division
by
infinity,
for
example,
and
so
the
partial
equality
exists
for
floating
point.
B
Because
of
these
very
strange
circumstances-
and
this
is
what
I
mean
by
what
one
of
the
things
that
to
understand
about
rust-
is
that
it
is
pedantic
and
precise
okay
display
display
is
very,
very
practical,
because
one
of
the
first
things
that
you
want
to
do
when
you
start
out
with
programming
is
a
is
print
things
to
the
console.
B
And
one
thing
to
note,
however,
is
that
display
is
different
from
debug
oopsie.
Let's
mark
down
the
debug
tray
is
intended
for
programmers,
whereas
display
is
the
trait
that
you
will
use.
If
you
want
a
string
for
users
now,
there
is
also
a
subtle
link
to
error
handling.
B
But
let's
ignore
that
so
ich
been
in
berliner
relies
on
the.
If
I
want
to
print
that
to
the
screen
I
use
the
display
trait
and
the
syntax
here
uses
the
debug,
which
is
the
programmer
specific
representation.
B
So
this
question
mark
is
debug
and
just
curly
braces
is
display.
Now
how
does
one
implement
display?
B
So
I've
got
a
place,
let's
say
a
city,
let's
change
it
to
city
that
has
a
location
represented
as
a
coordinate
and
a
and
a
city
name,
and
then
I
want
to.
B
B
That's
a
bit
strange.
I
wonder
if
this
is
a
problem,
I
think
I
pushed
enter
twice.
B
I
said
that
you
know
what
it
would
just
say:
none
now,
because
that's
easy,
it's
off
the
west
africa
and
then
I
want
to
print.
B
B
B
Let's
see,
it's
all
gone
wrong.
B
B
Auto
drif
and
so
for
smart
pointer
types,
dref
provides
access
to
the
inner
type.
Here
we
have
a
box
of
a
string
slice
and
the
drf
operator,
which
is
the
star
thing,
actually
returns
the
the
string
size
itself.
So
I
say
this
is
the
right.
You
know
text
is
the
wrong
type.
It
is
a
box,
but
we've
asked
for
a
string
slice
and
I
can
use
the
d
reference
operator
to
access
what's
inside
it,
but
more
momentarily
it
will
actually
the
dot
operator,
which
is
the
method.
B
How
we
call
methods
in
rust
will
automatically
derive
things
if
the
target
type
supports
the
method.
So,
for
example,
I've
got
this
platooch
string
here
on
one
line
and
I
still
live
in
north
germany.
So
maybe
that's
a
dumb
joke.
Okay
anyway,
so
string
does
not
implement
make
s
key
uppercase,
but
string
slices
do
occasionally.
You
will
encounter
some
kind
of
counter-intuitive
syntax.
B
So
you
see
the
d
reference
operator
followed
by
the
reference
operator
and
then
type
t.
This
looks
like
it
should
do
nothing.
They
should
effectively
cancel
each
other
out.
But
what
is
happening
here
is
that
the
we're
taking
a
reference
to
t
and
that
type
the
referent
might
implement
something
else
with
drif,
and
so
it
isn't
purely
working
if
you've
only
used
pointers
before
just
remember
that
rust
is
doing
something
more
when
it
dereferences
values.
B
It's
actually
relying
on
the
trade
implementation
and
every
trait
every
type
can
define
exactly
what
it
means
by
every
trait.
So
just
as
we
had
movement
for
sentinel
did
not
actually
move
the
sentinel.
Here
we
have
a
dereference
operator
which
isn't
actually
dereferencing
a
pointer.
It's
just
doing
some
conversion,
so
here's
some
syntax,
oh
so.
Here's
some
some
wording
from
the
rust
reference.
Just
saying
that
on
non-pointed
types
star
x
is
equivalent
to
star
of
d
reference
of
reference
to
x,
so
yeah
I'll.
Just
leave
that.
B
Actually,
the
last
chat
that
I
wanted
to
talk.
I
think
this
is
the
last
one
is
iterator,
so
it
enables
us
to
go
through
four
loops
and
that's
nice.
So
one
one
question
is:
how
do
we
we
want
to
be
able
to
implement?
We
want
to
be
able
to
create
a
year
from
season,
and
so
how
do
I
do
so?
B
Well,
I
start
with
I've
got
the
the
way
to
implement
iterator
is
to
create
a
like
sister
type,
a
type
that
it
lives
alongside.
If
I've
already
got
one
implementation
excuse
me,
and
this
has
already
been
evaluated
evaluated
so.
B
B
This
is
the
internal
part
of
season
and
every
iteration.
I
check
like
what
follows
summer.
Well,
that's
autumn,
and
what
follows
autumn
winter,
and
then
I
mutate
the
internal
state
and
I
return
the
the
next.
I
return
the
next
item
and
I
apologize
for
this
just
stuff
at
the
bottom.
B
We
are
asking
season
to
call
into
iterator
or
into
it,
and
then
that
is
being
used
to
create
an
iterator,
okay
cool
right.
I
don't
know
if
we
have
any
extra
time.
I
think
I'm
about
at
20
minutes
sometimes
trades
have
nothing.
No,
no
time.
Sorry,
no
methods
and
they're
called
markers,
and
my
favorite
implementation
is
assisted
member
drop,
which
is
just
defined
for
every
type.
There
is
actually
no
no
contents
at
all.
I
think
this
is
my
like.
B
So
what's
actually
what's
actually
happening
is
that
drop
like
drf
acts
as
an
operator
implicitly
and
we'll
just
call
call
the
drop
method
on
on
the
type
when
it
ends
when
it
ends
this?
It's
scope.
Okay
and
I'm
finished
thanks
very
much,
I'm
more
than
happy
to
receive
questions.
Hopefully
you
enjoyed
the
talk.
B
A
Right,
thank
you
tim.
I
think
we
have
a
few
questions
like
grace
talk.
The
question
is:
is
that
a
jupiter
notebook
used
for
the
rust
code.
B
B
I'm
just
searching
for
it
now:
jobs
executed
the
end
of
scopes.
Oh
sorry,
oh
sorry,
I
just
saw
the
the
the
problem
with
the
font.
I
apologize
young
eric.
I
probably
should
have
yeah
made
that
question
so.
B
B
B
A
A
A
Senior
and
he's
going
to
be
talking
about
ergonomic
error
handling
in
ros
senior
is
a
software
engineer
with
focus
on
infrastructure
before
that
he
worked
as
a
data
scientist
building
computer
vision
model.
So
currently
he
lives
in
cape
town
and
he
works
for
a
startup
and
building
the
next
generation
of
smart
technologies.
For
agriculture
senior
talk
to
you.
C
C
Awesome,
thank
you,
evans
for
the
introduction,
yeah
cool
very
excited
for
this
yeah.
C
So
my
talk
is
on
ergonomic
error
handling
the
thrust
so
just
a
kind
of
like
overview
of
where
we're
going
so
yeah,
initially
just
an
overview
of
error,
handling
and
rust
kind
of
like
yeah,
just
how
it
works,
and
the
mechanics
and
for
the
veterans
will
probably
be
pretty
standard
and
boring
and
then
going
on
to
like
making
error
handling
ergonomic
and
how
yeah
rust
just
tries
to
make
the
whole
process
ergonomic
and
then
going
on
to
making
areas
informative
and
then
just
the
future
of
error,
reporting
and-
and
you
know
what
that
kind
of
like,
where
we're
going
with
with
error
reporting.
C
D
C
Evan's
already
introduced
me,
but
yeah,
I'm
a
software
engineer.
I
work
on
the
platform
team
at
aerobotics,
so
yeah
working
with
infrastructure
and
we're
an
agritech
startup
based
in
cape
town,
south
africa
and
passionate
about
technology
and
how
we
can
leverage
it
to
improve
the
world
around
us.
Iraq,
semi
sent
me
regularly
at
senior
simpson.com.
E
C
You
can
find
me
on
twitter
posting
annoying
tweets
at
saint
jesus.
This
is
just
a
picture
of
cape
town.
I
just
thought
I'd
show
everyone
what
it
what
it.
C
This
is
a
sunset
at
one
of
the
places
we
call
sunset
rock
yeah,
I'm
sure
all
the
europeans
are
jealous
awesome
so
getting
into
it.
Why
is
error
handling
important,
so
yeah?
The
most
important
thing
I
want
to
just
emphasize
through
this
talk
and
like
the
biggest
takeaway,
is
that
error
handling
is
really
just
about
communication
and
yeah,
just
being
able
to
communicate
to
developers
what's
going
on.
You
know
why
it
happened
where
it
happened,
etcetera,
etcetera,.
C
That
communication,
but
some
other
things
are
important,
so
it
prevents
undefined
behavior.
So
we
don't
want
our
programs
to
continue
executing
if
they're
you
know
in.
D
D
C
The
requisite
information
and
makes
developers
advocate
who
doesn't
want
happy
days
cool
so
how
rust
does
error
handling
rust,
has
no
exceptions
and
instead,
errors
are
returned.
So
it's
similar
to
golang
that
not
paradigm
and
it
takes
in
inspiration
from
the
immo
family
of
language-
is
so
different
from
curling
and
adapts
and
adopts
the
result
type
for
handling
recovery
errors
which
I'll
talk
through
later
in
the
slides
and
yeah
irrecoverable
errors
are
signaled
using
panic
again,
which
I'll
go
through
so
recoverable
errors.
C
These
are
obviously
areas
that
we
know
how
to
handle,
and
you
know
in
in
the
course
of
program
execution
we
kind
of
like
come
across
circumstances
which
we
know
what
to
do
and
how
to
handle
them
correctly.
So
a.
C
On
that
file
existing
that's
an
area
that
we
know
how
to
add,
so
the
result
type
is
is,
is
how
we
sort
of
like
denote,
fallible,
computation
or
variable
functions
in
this
case.
So
a
result,
types
in
enum
which
has
two
variants:
okay
and
error.
C
If
the
computation
succeeds,
it
returns
or
it
contains
the
value
from
that
computation.
Otherwise
it
contains
an
error,
and
this
is
really
it's
nice
and
super
beneficial,
because
we
get
a
quick
view
into
the
fact
that,
like
a
function,
is
fallible
just
from
the
function
signature,
so
you
know
again
just
about
communication
and
we're
easily
able
to
tell
like
okay.
You
know
if
I
run
this
function,
I'll
have
to
handle
the
error
if
it
crops
up
and
then
again
it
also
forces
us
to
to
handle
those
errors.
C
Awesome
so
just
like
an
example
of
using
results,
so
we
create
this
file,
ferrous
dot
text
and
that
returns
a
result
file.
Obviously
you
can
succeed,
otherwise,
result
error
and
then
we
have
to
unwrap
the
result
to
get
the
the
the
value
in
the
in
the
result.
C
So
in
this
case
we
can
use
sorry.
So
in
this
case,
we
can
obviously
use
match,
and
so,
if
it's
okay,
then
we
return
the
file
or
we
assign
the
file
to
the
variable.
Otherwise,
in
this
case,
we
just
panic
if
there's
an
error
code
and
then
similarly
one
and
the
last
thing
that
result
allows
us
to
do-
is
to
bubble
errors,
and
so
just
walking
through
that
so
oftentimes.
C
We
don't
want
to
handle
the
error
where
it's
incumbent,
because
we
don't
have
like
full
scope
and
full
knowledge
of
what
we're
trying
to
do
when
we're
trying
to
achieve,
and
we
also
don't
have
context
in
those
situations,
and
so
instead
you
want
to
propagate
the
error
to
the
caller
so
and
then
the
caller
implements
logic
to
handle
the
error
as
required,
so
the
caller
has
obviously
full
scope
and
knowledge
of
what's
going
on
and
can
decide
you
know
in
this
context,
I
want
to
handle
this
area
in.
C
Another
context
I
want
to
handle
it
in
a
different
way,
for
instance,
and
so
yeah.
The
important
thing
is
to
be
able
to
propagate
those
areas
back
to
the
chord,
and
so
we
can
do
this
quite
easily.
So
here
we
see
we
have
this
function
in
it,
which
has
a
results
with
the
unit
type
and
an
error,
and
then,
when
we're
creating
this
file,
so
we
obviously
match
them
on
the
result
type.
If
it's
okay,
we
assign
file
to
the
variable.
Otherwise
we
return
an
error.
So
we
have
like
this
early
return.
C
That
says
now
encounter
this
area,
I'm
returning
it
back
to
the
caller
and
the
caller
can
then
implement
any
logic
to
handle
it,
and
so
similarly
here
and
then
at
the
bottom.
We
have
this.
We
can
kind
of
think
about
this
as
the
call
of
the
function,
some
executable
code
and
yeah
we're
just
matching
on
this
function
call,
and
so
in
this
case
I
mean
it's
obviously
super
trivial.
But
if
it's
okay,
then
you
do.
E
C
And
if
it's,
if
there's
an
error,
then
we
panic
and
say
it
could
not
initialize
in
this
situation,
so
irrecoverable
errors
so
irrecoverable
errors
are
obviously
errors
that
we
can't
recover
from
and
those
tend
to
happen
like
when
we
encounter
bugs
so
we'll
come
across
situations
where,
basically,
what
we're
saying
is
that
hey?
I
don't
know
how
to
handle
the
situation,
and
I
think
that
the
best
approach
is
to
stop
combat
execution
and
that
again
is
important
for
cases
where
you
want
to,
for
instance,
just
stopping
valid
states
from
occurring
cool.
C
So
this
is
an
example
that
I've
obviously
shown
before
in
previous
images,
where
in
this
case,
we
routing
to
a
file
saying
hey
ferris,
and
if
it's
okay
do
nothing,
but
in
this
error
branch
we
panic,
and
so
when
we
panic
the
program
crashes
at
that
point
in
time
and
just
says
you
know,
there's
nothing
there's
nothing
further.
I
can
do
here
so
cool.
That's
just
like
a
quick
overview
of
yeah,
just
error,
handling
and
rust
level,
and
so
yeah
making
it
ergonomic
rust,
really
emphasizes
language
ergonomics.
C
I
think
it's
one
of
the
first
things
that
I
quite
like
picked
up
just
from
the
community
and
when
I
started
learning
rust-
and
this
is-
and
this
is
obviously
great
so
in.
D
C
So
an
example
of
this
is
the
tri
operator,
so
try
so
for
bubbling
errors.
It
requires
boilerplate
due
to
that
matching
syntax.
So
we
have
to
go
like
you
know.
If
you
you.
D
C
You
return
the
error
and
rust
so
introduced
the
tri
operator
or
the
question
mark
operator
as
I
like
to
call
it
as
a
solution
to
this
to
reduce
the
bullet
plate.
So
in
this
case
you
know
we
have
the
match
the
matching
syntax,
and
this
is
without
trying
or
without
the
top
rated
phone
and
yeah.
You
know
similar
thing.
So
if
it's
okay,
we
assign
that
file.
Otherwise
we
return
here.
C
So
we
can
simplify
this
by
using
the
straw
operator,
and
here
we
have
file
create,
and
then
we
have
appended
the
question
mark
at
the
end,
and
so
these
two
are
functionally
the
same,
achieve
the
same
goal.
And
so,
if
you
know,
if
the
function
succeeds,
then
the
variables
assign
and
execution
continues.
Otherwise,
the
error
is
returned.
Early,
basically
unwrap
is
quite
similar,
so
the
same
principle
can
be
applied
to
panic
where
we,
you
can
reduce
the
amount
of
boilerplate
that
we
write
and
it's
achieved
through
the
unranked
function.
C
In
this
case,
yeah,
obviously
it'll
automatically
panic.
If
an
error
is
returned,
so
here
we
have
this
in
it
function
and
on
the
file
create
call.
We
we
call
this
function,
dot
unwrap
and
that
will
basically
fail
if
the
if
an
error
occurs.
Otherwise
execution
will
continue,
and
so
in
this
case,
for
instance,
you
know
we,
we
tried
to
write
to
a
file
and
they
didn't
have
permission
to,
and
so
you
know
panicked
and
the
program
crashed.
C
So
those
are
like
some
small
things
and
there's
many
more
of
them
expect
mapper
and
many
others
yeah.
I
think
like
it's
worth
going
over
them
and
looking
into
them
as
you
as
you
continue
to
write
more
and
more
rust.
I
certainly
will,
since
I
need
a
handful
of
them,
but
it
just
shows
like
rust's
commitment
to
ergonomics
and
really
trying
to
make
the
language
easy
and
fun
to
use
and
have
a
great
developer
experience
so
making
informative.
This
section
just
really
ties
in
back
to
communication.
So
again,
error.
C
Is
all
about
communicating
to
developers?
You
know
what's
going
on
and
so
yeah
just
going
through,
that
good
areas
are
highly
informative.
They
improve
developer
experience,
I
mean
I'm
sure
everyone
has
incarnate.
Obviously,
if
you've
been
riding
rust,
you've
encountered
the
rust,
compiler
and
oftentimes.
You
know
it's
just
the
best
in
class
in
terms
of
like
the
error
reporting,
that's
that's
given
and
it's
a
it's
such
a
huge
quality
of
life
improvement,
and
so
that
really
improves
the
developed
experience.
D
C
Debug
issues
much
faster,
I'm
sure
you've
all
been
in
situations
where,
like
the
error,
you've
gotten
doesn't
really
point
to.
You
know:
what's
really
happened,
or
it's
very
opaque
and
and
doesn't
really
give
you
enough
context,
and
you
spend
hours
and
hours
and
hours
and
hours
trying
to
to
debug
an
issue
that
would
have
just
been
solved
way
easier
if
you've
got
like
a
more
informative
error
and
so
again
talking
about
communication
and
of
course,
they
make
developers
happy
to
make
developers
happy
to
get
highly
informative
errors,
but
routing
them
so
yeah.
C
When
we're
talking
about
informative
areas,
we've
got
to
think
about
them
in
two
types
of
ways
like
or
in
several
ways
when
it
comes
to
an
application
or
library.
So
this
just
really
has
to
do
with
how
we
structure
errors
and
the
kind
of
like
role
they
play
in
each
in
each
case.
So
for
a
library
yeah,
it's
important
to
create
meaningful
custom
error
types.
So
this
this
is
important,
because
obviously
your
application
works
in
a
certain
domain
and
and
failures
are
represented
within
some
certain
domain.
C
So
we
want
to
really
capture
like
areas
that
happen
in
that
domain,
with
these
custom
error
types
but
and
again
being
able
to
communicate
to
developers
that
these.
B
C
Kinds
of
errors
happen
in
this
sort
of
context
that
we're
in
another
thing
is
wrapping
standard
errors
where
necessary,
which
allows
applications
to
differentiate
between
various
areas.
So
you
can
imagine,
for
instance,
that
if
you
have
two
crates
crate,
a
and.
D
C
And
they
both
produce
io
errors.
For
instance,
you
want
to
be
able
to
differentiate
if
an
I
error
came
from
crate,
a
or
crate
b,
if
they,
because
I
errors
are
from
the
standard
rb,
for
instance,
and
if
they
came
from
crate,
a
or
crate
b,
and
so
we
wrap
them
in
in
our.
C
Types
or
our
create
specific
error
types
so
that
we
can
differentiate
for
apps
for
applications.
Custom
areas
should
always
implement
the
error
trade
from
the
standard
library.
C
This
is
just
important
because
it
allows
compatibility
within
the
ecosystem
so
before
there
was
a
popular
crate,
called
failure
which
had
its
own
trait
fail,
and
it
caused
a
lot
of
like
compatibility
issues
at
the
application
level
when
we're
trying
to
stitch
different
libraries
together
and
so
you're
kind
of
like
iterated
and
settled
on
always
implementing
the
error
trade
from
standard
library
and
which
just
again
improves
the
developer
experience
and
then,
ideally,
errors
in
a
library
should
never
panic
or
library
should
never
panic.
It's
it's
kind
of
against.
C
D
C
And
and
can
decide
how
to
handle
certain
situations
depending
on
on
obviously
what's
happening.
They
can
panic
so
at
the
application
level.
You
know
if
we
come
to
a
scenario
that
we
don't
know
how
to
handle.
It's
easy
to
say
you
know,
raise
hands
and
and
and
just
panic
and
crash
at
that
point
and
they're
also
responsible
for
deciding
how
errors
and
formatted
and
displayed
to
use
so
effectively
like
how
they
communicated
to
to
the
user.
C
So
for
an
an
application
like
adding
context,
is
extremely
important,
so
walking
through
that
areas
need
to
include
the
context
in
which
they
were
generated.
This
provides
developers,
clarity
on
the
error
case
and
it
improves
our
ability
to
discover
and
diagnose
failure
cases
so
like.
Obviously,
this
is
the
question
of
like
what
does
that
mean
so
just
walking
through
an
example,
sort
of
situation.
So
in
this
first
case
we
have
this
error,
no
such
file
directory,
which
is
not
extremely
informative.
C
We
don't
really
know
you
know
where
it
came
from
or
like
where
in
the
lab
would
like.
When
the
code
came
from
what
file
or
directory
it
was
whether
it's
a
file
or
a
directory,
and
so
we're
kind
of
like
left
open-ended
with
the
fact
that
we
just
know,
we've
got
this.
We
try
to
do
some
eye
operation,
but
there's
not
too
much
to
that.
So
we
can
improve
that,
for
instance,
by
adding
you
know
the
the
file
that
we
failed
to
read.
C
By
this,
no
such
file
directory.
C
Obviously,
what's
nice
is
that
we're
able
to
say
you
know
which
file
we
were
trying
to
read
and
which
one
failed
and
then
in
this
in
this
case,
we
can
augment
this
even
more
by
adding,
for
instance,
like
a
back
trace
just
as
an
example,
and
so
you
know
that
again
adds
more
context
and
information
to
to
the
error
report
in
this
case,
and
then
we
can
think
of
other
things
like
in
this
case,
there's
no
location
in
the
code
where
this
error
occurred.
D
C
We
can
add
something
like
that.
We
could
add
a
suggestion,
for
instance
like
create
the
file
ferrous.txt,
and
so
you
know
in
those
in
those
cases
we
can
keep
thinking
about
how
we
can
make
these
error
reports
or
error
messages
way.
C
C
Again,
in
this
case,
we're
just
using
this
area,
which
is
a
which
is
one
of
the
commonly
used
crates
in
the
rust
ecosystem
for
creating
like
custom
errors,
and
in
this
case
we
have
this
beat
maker
error.
So
some
of
the
areas
that
we
have
is
like
invalid
notes,
invalid
format
and
an
invalid
instrument,
name
whatever
and
then
an
interesting
one
here
is
that
we
can
wrap
all
I
o
errors
from
the
standard
library
and
into
like
our
own.
C
I
o
error
type
in
in
our
beat
maker
era,
and
so
that
just
speaks
to
again
that
that
idea
of
wrapping
errors
so
that
we
know
that
these.
D
C
Errors
came
from
like
the
speed
maker
library,
so
this
is
yeah.
This
is
just
a
simple
trivial
case
of
using
that
error,
so,
in
this
function
called
raise,
we
have
a
result
which
returns
it
or
can't
have
a
beatmaker
error,
and
that's
in
this
case
just
returned
simply
just
for
the
sake
of
this,
and
here
we
just
match
on
on
that
on
that
function
call,
and
so,
if
it's
okay,
I
mean
write
a
data
and
then
write
a
message
and
if
it's
an
error,
then
we're
too.
D
C
To
write
better
errors,
so
we
get
it
cool
and
then,
in
this
case
we
have
it
for
an
io
error.
So
what's
really
cool
here
is
that
we
can
return
an
io
error
from
in
this
case,
like
file.open
or
file
open,
and
this
returns
like
an
io
from
a
standard
library,
but
because.
D
C
Wrapped
those
errors,
we
can
still
return
like
a
beatmaker,
and
so
when
we
call
this
iras
in
this
case,
we
haven't
like
taken
any
knowledge
of
that
into
use.
But
we
can.
We
will
know
that
that
sort
of
eye
era
came
from
beat
maker
and
that
allows
us
to
to
basically
handle
that
like
higher
errors
from
different
crates,
quite
easily
cool
and
so
yeah
wrapping
up
towards
a
better
future.
C
So
error
reporting
obviously
can
still
be
better.
As
with
pretty
much
everything
in
that
and
some
ways
you
can
kind
of
think
about
that
is
making
masked
lead
error
reports.
So
again,
not
the
rust
compiler
areas
of
like
really
great
area
reports
and
that's
and
that's
like
best
in
class
and
kind
of
like
the
the
future
that
we're
thinking
about
here.
Providing
suggestions
to
resolve
errors
as
well.
So
that's
again
something
that
the
last
compiler
does
and
then
just
in
general,
like
jane
lesby's.
C
Air
library
is
a
experimental
library
that
serves
as
a
testbed
for
pushing
the
boundary
on
error
reporting,
and
so
I'm
just
going
to
do
like
two
sort
of
like
error
reports
that
come
from
that
library,
which
are
really
cool
in
my
opinion.
So
in
this
case
we
have
an
error,
and
you
know
it's
like
it
just
describes:
what's
happened
so
unable
to
read
the
conflict
and
then
command
exited.
So
we
get
like
an
error
messages.
C
Then
we
get
the
location,
which
is
something
that
I
mentioned
earlier-
that
we
can
sort
of
like
augment
to
our
error
messages.
So
in
this
case
we
get
this
location.
Then
we
get
the
the
standard
error
error.
So
no
such
file
directory
we
get
a
back
trace,
which
is
in
this
case
really
nicely
formatted
and
then
at
the
end
we
get
a
suggestion
so
try
using
a
file
that
exits
next
time.
C
Obviously-
and
that's
really-
that's
really-
nice
gives
a
lot
of
context
and
a
lot
of
information
as
to
what
happened
and
kind
of
and
kind
of
gives
you,
like
all
of
the
necessary
pieces
of
information
to
go
from
their
reports
sorted
out
directly
to
fixing
your
error
without
having
to
do
too
much
extra
leg
work,
basically
and
then
just
another
cool
example
here
where
in
this
case,
we're
chaining
errors.
C
So
multiple
errors
happened,
which
is
the
first
area
that
we
got
here
and
also
gives
us
the
location,
and
in
this
case,
then
we
get
these
chains
of
error
so
that
the
task
cannot
be
completed.
C
The
machine's
unreadable
or
unreachable.
Sorry
and
the
file
could
not
be
passed
and
that's
really
cool.
So
now,
we've
got
this
like
really
informative,
again,
error
report
that
kind
of
like
walks
through
you
know
the.
E
C
The
sequence
of
errors
happened,
and-
and
it's
like
nicely
formatted
and
easy
to
read
and
again
just
reduces
the
amount
of
like
extra
network
that
you
have
to
do
to
go
from
error
report
to
debugging
your
issue
and
or
fixing
your
issue
so
yeah.
That's
basically,
that's
basically
it
thank
you
so
yeah
again,
just
the
the
main
thing
about
this
talk
again,
just
highlighting
that
error.
C
Really
is
about
communication
and
that
that's
the
end
goal
when
we're
writing
errors
and
in
our
libraries
and
applications,
is
really
just
to
be
able
to
tell
or
communicate
to
other
developers
like
this
is
exactly
what
went
wrong
cool.
Thank
you.
A
Thank
you
senor.
We
have
a
couple
of
questions
coming
up,
so
the
first
one
is:
how
do
you
determine
which
error
type
e
should
be,
whether
it
is
an
I
o
error
or
something
else.
C
I'm
not
too
sure.
I
understand
the
question
too
well,
but
I
mean
that
that
would
come
from
you
like.
Obviously,
if
a
certain
function
call
returns
a
certain
error,
then
obviously
you
know
that
e
is
that
error,
otherwise
you
define
them
yourself
and
then
can
handle
that
logic
depending
on
what
you've
chosen.
I
don't
know
if
that
answers
the
question
well
enough,
but
yeah.
A
C
So,
for
me,
like
I
cut
like
and
also
I
think,
just
pushed
by
the
rust
communities
like
unwrap
usually
is
only
used
for
sort
of
like
prototyping
or
when
you
just
you
know
when
you
think
sort
of
like
development,
but
ideally
you
wouldn't
you
wouldn't
use
it
ever
really
in
production
code.
The
only
cases
where
I
do
know
it's
often
used
is
when
you
don't
expect
something
to
occur
and
like
there's
pretty
much
like
a
guarantee,
not
even
that
you
don't
expect
to
go
in,
it
should
never
occur
or
never
does
occur.
Really.
C
So,
if
you
have
like
a
strong
guarantee
that
this
thing
will
always
work,
then
you
can
just
use
tottenham,
but
in
those
cases
I
think
using
expect
is
probably
better
than
unwrapped.
Just
in
the
event
that
something
goes
wrong
and
then
you
do
get
like
a
at
least
some
sort
of
like
error
message
back
basically,.
A
C
Oh
yeah
yeah,
so
I
should
have
mentioned
that
that
was
my
mistake,
so
this
area
is
really
good
for
creating
custom
errors
and
that's
like
for
the
library
context,
context
and
anyhow
is
for
like
applications.
So
anyhow,
that's
also
like
another
commonly
used
really
like
great,
I
guess
great
use
for
application
areas,
and
so
that
one
obviously
allows
you
to
add
like
those
with
context
and
that
runs
at
the
application
level.
So
when
your
application
fails.
D
C
Any
reason
you
get
back
a
nice
air
report
with
your
custom
message
and
then
whatever
error
happened,
that's
from
your
library,
so
of
course
yeah
like
I.
I
really
advise
using
it
cool.
A
All
right,
I
think,
that's
all
we
have
thank
you
senior
for
the
presentation.
That's
all
we
have
for
the
questions.
Okay,
so
thank
you.
Everyone,
the
last
talk
for
the
night
would
be
building
cryptocurrency
derivative
exchange
with
rust,
and
this
one
will
be
given
by
constantine
and
blast.
They
are
from
collider.
A
E
Screen
can
everyone
see
my
screen,
appreciation,
sweet
cool
thanks
evans
for
the
introduction-
and
this
is
pretty
much
more-
a
more
applied
talk
about
how
rust
is
used
in
practice
in
a
business
sort
of
environment,
so
yeah,
I'm
constantine,
I'm
the
co-founder
of
collider
and
pretty
much
everything
even
said.
We
do
it's
not
necessarily
super
important,
because
it's
a
lot
of
like
jargon
that
he
threw
in,
and
I
don't
expect
anyone
to
understand
what
he
said,
and
so
the
aim
of
this
talk
is
basically
to
do.
E
You
basically
share
our
experience
with
russ
our
love
hate
experience,
because
we
have
been
used
rust,
sort
of
in
production
since
pretty
much
day,
one
and
yeah.
So
the
talk
is
on
building
a
derivative
exchange
in
rust
and
first
thing
I
I
want
to
say
it
doesn't
matter
whether
it's
a
derivative
or
an
equity
or
stock
stock
exchange.
The
basis
is
the
same.
So
I
don't
want
you
to
be
confused
about
derivatives.
E
Basically,
just
forget
it
from
now
on
and
also
I
don't
assume
any
knowledge
of
what
an
exchange
is.
You
know,
because
I
guess
it's
also
very
specific
to
finance.
So
I'm
just
giving
you
a
little
primer
on
on
what
an
exchange
is
and
essentially
what
an
exchange
is.
It's
pretty
much
just
you
know
a
database
which
we
call
the
order
book
where
buyers
and
sellers
come
together
to
make
an
exchange
of
any
type
of
good
could
be.
E
E
So
one
wants
to
give
the
other
person
dollars,
for
example,
and
the
other
one
wants
to
give
apples
four
dollars,
and
this
order
book
is
pretty
much
just
a
place
where
you
know
they
come
together
and
the
the
task
of
the
exchanges
is
pretty
much
matching
these
buyers
and
sellers
together
so
basically
making
the
the
price
discovery
of
the
of
the
exchange
and
when
it
happens,
they
match,
and
at
that
point
the
exchange
or
the
the
trade
becomes
finalized
and
the
two
parties
exchange
sort
of
the
goods
whatever
it
is.
E
Apples
oranges
doesn't
matter,
and
then
at
that
point
the
exchange
sort
of
gets
a
small
cut
from
that
transaction
and
we
call
exchange
fees,
and
you
know
that
is
a
very
simple
and
beautiful
business
model,
because
you
know
the
exchange
always
makes
money
because
it
doesn't
matter
whether
prices
go
up
or
down.
They
always
take
a
small
small
cut
of
the
money
and
you
might
be
thinking
now
awesome.
You
know
I
could
do
that.
You
know
I
just
set
up
a
exchange,
you
know
get
copy
trading.
E
You
know
it's
awesome
because
you
know
it's
it's
a
very
bulletproof
business
model,
but
you
know
sorry
that
was
actually
I
was.
I
jumped
this
slide
ahead,
but
yeah
there's
this.
Basically
this
business
model.
E
You
know
it
attracts
a
lot
of
people,
because
it's
so
simple
and
beautiful
in
a
way
and
that
that's
basically
it's
the
reason
why
the
cryptocurrency
of
markets
is
it's
massive
and
you
know
last
year
it
tops
3.5
trillion
dollars
in
volume,
which
is
basically
saying
that
people
traded
3.5
trillion
dollars
with
each
other,
which
is
amazing
in
a
way
and
that's
just
cryptocurrency
so
financial
markets.
So
traditional
financial
markets
are
not
even
included
money.
E
What
I
was
going
to
say
is
that
you
know
this
is
great
in
a
way.
You
know
everyone
could
just
build
an
exchange
and
get
people
to
trade,
but
you
know
the
truth
of
the
matter.
Is
it's
quite
hard
actually
and
that's
sort
of
what
we
experienced?
You
know
sort
of
first-handed
and
why
is
it
hard?
Well,
you
know,
first
of
you
really
have
to
process
a
lot
of
messages
when
people,
trade
and
the
whole
process
is
really
hard
to
parallelize.
E
Just
to
give
you
an
example
of
like
a
decent
sort
of
like
exchange,
it's
not
even
like
a
fast
exchange.
You
have
to
be
able
to
process
1000
measures
per
second,
you
have
to
sustain
a
capacity
of
5
000
orders
per
second
and
you
average
trade
latency,
which
means
the
the
time
it
takes
from
submission
of
the
order
to
response.
E
You
know
shouldn't
take
longer
than
three
milliseconds
and
that's
basically,
wherever
you
are
on
the
sort
of
in
the
world
and
a
lot
of
money
is
on
the
line
which
means
you're
dealing
with
you
know
people's
money,
so
you
have
precise,
you
have
to
be
correct,
you
have
to
be
deterministic
and
whatever
you
do
just
to
give
you
a
little
example,
the
the
five
largest
exchange
and
derivatives
in
crypto,
they
d,
they
process
200
billion
dollars
in
in
transactions
every
day,
so
yeah.
E
It
is
very
small
sort
of
sort
of
a
margin
of
error,
and
another
thing
is
that
you
have
to
guarantee
fairness,
audibility
and
availability,
and
that's
just
to
make
sure
you
know
people
sort
of
come
come
back,
because
you
cannot
allow
people
to
queue,
jump.
E
You
know
front
running,
you
have
to
be
audible
and
that's
because
in
every
transaction
needs
to
be
sort
of
traceable,
that's
again
from
from
the
from
a
regulation
part,
but
also
you
know
in
instances
where
your
your
platform
crashes,
you
have
to
basically
be
able
to
reverse
every
you
know
state
in
the
system,
and
you
have
to
be
highly
available
with
what
means
that
you
know
this.
E
This
platform
has
to
run
24
7
seven
days
a
week
and
it
can
never
go
down
because
you
know
a
second
of
sort
of
outage.
That
means
you
lose
revenue
and
you're
constantly
under
attack,
and
that's
because
you
know
you
are
sort
of
a
honey
pot
you're
dealing
with
a
lot
of
money.
You
so
have
a
lot
of
money
and
people
try
to
either
steal
it
from
you
or
they
try
to
you
know,
gain
your
system.
E
You
know,
if
there's
a
little
bug
in
it,
you
can
imagine
that
you
know
a
small.
You
know.
A
small
bug
in
a
small
transaction
error
can
lead
to
like
massive
amounts
of
money.
You
know,
if
you
repeat
it
like
millions
of
times,
and
there
are
many
stories
about
about
these-
these
problems
so
yeah
I'll
hand
you
over
to
blas
to
basically
explain
or
share
with
you
some
problems
that
we
face
running
this
platform.
D
Yes,
so
essentially
trying
to
put
in
practice
a
bit
all
these
points.
That
constantly
mention
in
terms
of
why
it
is
so
hard
to
to
build
an
exchange.
I
like
to
go
a
bit
more
lower
level
and
explain
some
of
these
particular
issues
that
we
we
have
been
dealing
with
and
why
they
are
relevant
to
us
and
also
somehow
how
we
try
to
go
around
them.
So
the
first
one
is
whenever
we
need
to
deal
with
money,
accountancy
and
everything,
we
have
to
think.
D
Okay,
how
we're
going
to
model
these
accounts,
and
one
of
the
problems
that
we
do
have
is
a
floating
point
is
first,
is
not
even
like
the
steps
between
each
of
the
the
different
points
on
the
on
the
sort
of
the
the
the
line.
So
so
you
actually
have
to
go
into
something
that
you
control
more
and
understand,
which
is,
in
this
case
the
decimal
expression,
but
essentially
that
that
means
that
you're
moving
from
a
lot
of
good
things.
D
That
hardware
gives
you
and
a
lot
of
auditability
and
things
that
work
across
all
platforms,
and
you
somehow
model
your
problem
a
bit
more
with
hardware
software.
Instead
of
hardware,
and
essentially
a
lot
of
things
that
you
thought
they
were
in
certain
way,
they're
not
necessarily
like
this.
Also
you,
you
have
sometimes
issues
with
the
library
panicking
and
it's
funny,
because
this
is
something
we
talked.
D
It
was
mentioned
before
the
library,
soon
panic,
but
essentially
this
is
an
issue
that
we
do
have
sometimes,
and
particularly
something
we
I
wanted
to
to
mention
is
that
when
we
think
of
floating
point
operations,
one
thing
they
are
constant
time,
so
one
can
think
of
them
as
being
free,
but
for
us
it
happened
once
that
we
were
doing
a
benchmark.
D
Let
me
show
you
the
flame
graph
that
we
had
on
on
our
on
our
benchmarking
and
and,
as
you
can
see,
this
is
this
is
one
method,
but
it's
quite
important
one
and
you
can
see
like
on
top
of
it.
It
appears
all
the
time
rust
decimal.
That
was
one
of
the
crates
that
we
use,
and
particularly
we
saw
the
the
division.
Operation
was
very,
very
expensive.
So
so
then
we
started
like
investigating,
and
fortunately
they
they
they
submit
a
patch
that
actually
changed
our
profile
into.
D
D
But
essentially
what
I
want
to
try
to
say
again
is
that
we
do
have
problems
in
in
parts
of
the
code
that
sometimes
we
don't
even
think.
That
would
be
an
issue
in
terms
of
both
the
result
that
it
has
to
be
like
what
we
expect,
but
also
the
performance
as
well.
Another
problem
that
we
we
face
is
that
we
need
to
somehow
model
parts
of
your
system
with
the
system
so
that
we
get
this
deterministic
behavior.
D
Why
is
that?
Because
we
need
to
be
able
to
to
guarantee
some
of
things
that
constitute
mention,
but
also
in
terms
of
like
nobody,
jumping
the
queue
or
having
weird
behavior,
but
also
because
we
need
to
be
able
to
to
go
back
in
time
in
case
something
breaks
or
also
in
order
to
be
able
to
audit.
So
one
of
the
tools
that
we
we
use
often
is
we
replay
the
system,
perhaps
offline,
in
order
to
be
able
to
to
get
to
a
certain
state.
D
I
know
that,
okay,
how
is
the
the
the
engine
looking
at
this
point?
What
are
the
accounts?
What
are
the
transactions?
What
actually
has
been
happening
and
connected
to
this?
We
need.
We
need
this
mechanism
to
be
actually
safe
and
fast,
because
we
do
this
very
often
at
times
and
and
also
this
is
a
mechanism
that
we
we
use
in
the
case
of
going
down,
so
whenever
we
need
to
actually
recover
from
this
event,
we
actually
need
to
happen.
D
Make
this
happen
as
fast
as
we
can
and
connected
to
high
availability.
It
is
the
problem
of
how
do
we
replicate
the
different
parts
of
our
system?
How
do
we
communicate
between
them?
D
How
do
we
ensure
that
there's
only
one
leader,
because
we
cannot
have
two
parts
of
the
system
in
certain
areas
talking
to
the
market,
because
then
we
duplicate,
let's
say
an
order
and
that's
not
what
we
want
so
that
that
actually
poses
a
restriction
on
us
in
certain
places
of
the
code
or
a
system
where
we
cannot
scale
horizontally,
but
only
vertically
and
the
and
actually
the
delay.
D
The
last
issue
that
that
we
do
have
I
mean
as
a
sort
of
a
common
denominator,
is,
is
io
latency
introduced
by
writing
to
the
disk
right
into
the
database
going
to
a
network.
So
we
do
need
to
think.
How
do
we
log?
How
do
we
persist?
Data?
Which
databases
do
we
use?
How
do
we
actually
go
to
the
database?
D
How
do
we
write
because
we
can
batch,
for
instance,
but
we
need
to
be
sure
that
when
we
batch,
the
data
is
actually
being
written
and
if
there
was
an
issue,
we
need
to
understand
where
it
broke
and
communicate
back
to
the
system
so
that
we
can
recover
properly.
So
why?
Why
do
we
actually
enjoy
using
rust
for
solving
all
these
problems?
D
For
us
testing
is
is
paramount.
We
we
sort
of
stand
in
every
day
on
top
of
our
tests.
They
are
the
ones
who
kind
of
give
us
the
guarantees
that
the
system
performs
the
way
we
we
expect
it
to
to
be,
and
both
we
we
find
rust.
Like
writing
integration
tests
unit
test
is
pretty
nice,
the
same
with
benchmarking.
D
Whenever
we
want
to
test
some
some
new
feature
or
for
regression,
we
we
find
that
the
crates
and
the
built-in
support
from
cargo
and
the
language
is
pretty
nice.
We
do
use
quite
a
lot.
Interoperability
from
systems
written
in
c
or
c,
plus,
plus
that's
also
pretty
nice,
because,
there's
a
ton
of
say,
safe
wrappers
that
work
really
well.
We
also
make
use
in
certain
cases
of
meta
programming,
particularly
procedural
macros,
and
I
mean
downstream
certainly
a
lot
it's
a
blessing,
and
I
think
something
else
we
we
make.
D
I
mean
good
use
of
is
the
fact
that
there's
a
lot
of
crypto
primitives
and
libraries
that
are
built
natively
from
like
directly
in
rust.
The
cases
for,
for
example,
blockchain
solana,
entirely
works
out
of
the
box
from
the
rust
client
a
bit.
D
The
the
ugly
part
is
that
particularly
for
the
the
disadvantages
that
we
we
do
have
is
that,
for
the
industry
in
which
we
are
competitors
and
sort
of
the
the
status
quo
is,
is
writing
everything
in
java
and
c,
plus,
plus
and
thereby
we
miss
a
lot
of
really
performant
and
ergonomic
libraries,
because
they
don't
have
necessarily
clients
written
in
ros.
There
are
some
community
available
options,
but
very
far
away
from
the
the
ones
that
are
mainly
supported
by
by
the
libraries
the
same
we
see
with
some
core
dependencies
that
we
actually
use.
D
They
do
have
low
maintenance,
because
sometimes
it's
just
somebody
did
it
as
a
hobby
and
then
we
take
it
and
we
need
to
maintain
it
ourselves
or
rewrite
it
from
scratch.
But
it's
not
necessarily
the
optimal,
especially
for
startup
and
the
last
thing
I
is
that
we
run
a
nightly,
and
sometimes
it
is
a
bit
more
painful
because
we
run
leading
edge,
which
gives
us
a
lot
of
features.
But
that
makes
our
builds
break
for
apparently
no
reason.
D
Of
course,
then
we
need
to
adjust
the
code,
but
it's
it's
been
quite
quite
fine,
all
in
all
yeah
and
that's
it.
Thank
you.
We
we're
looking
for
for
good
people
to
join
us.
So
if
anybody
wants
to
come
in
on
board,
please
go
to
collider
xyz.
A
A
Yes,
thank
you,
everyone
for
attending
today.
I
think
we
are
at
the
end
of
our
meet
up,
and
hopefully
we
want
to
see
you
next
month
and
have
a
great
time
and
again
as
a
reminder.
We
are
looking
for
speakers.
A
If
you
you
have
a
topic
or
a
project
to
show
off
here
would
be
happy
and
excited
to
hear
from
you.
I
haven't
seen
any
questions
on
the
chat
for
the
last
talk,
but
if
you
have
questions
before
we
close,
I
think
this
is
a
good
time
to
ask.