►
From YouTube: Rust Linz, June 2021 - JT - A new path for your shell
Description
JT takes a look at Nushell, a shell/language written in Rust leveraging Rust's strengths to build a modern way for working with your system, data, and more.
Rust Linz at https://rust-linz.at
Twitter: https://twitter.com/rustlinz
JT: https://twitter.com/jntrnr
Speak at Rust Linz: https://sessionize.com/rust-linz
A
Thanks
thanks
for
everyone
tuning
in
especially
at
this
late
hour,
much
appreciated
in
this
talk
I'll
be
talking
about
new
shell.
A
Before
I
talk
about
what
new
shell
is,
let
me
just
give
a
tiny
bit
of
backstory,
so
yehuda
cats
who
folks
coming
from
different
areas,
may
have
heard
that
name
a
few
different
ways
which
is
kind
of
fun.
A
How
can
we
take
some
of
these
ideas
and
you
know
continue
to
grow
them,
but
maybe
grow
them
in
a
way
that
makes
sense
from
a
rust
perspective,
so
he
started
this
project
on
his
birthday
called
that
object
shell
and
we
I
was
like
cool.
Let's,
let's
go,
let's
see
where
this
thing
goes,
I
had
actually
unbeknownst
to
him
started
my
own
shell
project.
Around
the
same
time
had
different
ideas.
A
I
wanted
to
take
some
of
the
ergonomics
and
usability
that
I
wanted
to
see
in
the
show,
and
so
we
were
talking
right
after
he
started
his
projects,
and
I
said,
oh
that's
a
good
idea.
Can
we
merge
he's
like
absolutely
so?
We
merged
our
projects
together,
renamed
it
new
shell
and
then
I
contribute
skip
and
where
and
we'll
see
what
those
are
here
in
a
second.
A
So
this
is
starting
yeah
around
may
of
2019,
and
it's
the
the
ideas.
I
guess
you
could
say
are
almost
in
reaction
to
power
shell,
if
that
might
be
fair
to
say.
So,
if
you
look
at
powershell,
it's
very
much
created
from
the
perspective
of
someone
working
in
dot
net
working
in
c
sharp
and
wanting
to
expose
that
functionality
to
the
world.
So
it's
very
object
oriented.
A
It
has
different
object,
types
that
represent
different
types
of
things,
so
files
and
services
and
whatnot
all
these
different
objects
in
the
system,
uses
methods
and
the
variables
that
use
are
mutable.
So
everything
just
kind
of
follows
and
flows
from
how
you
might
design
a
shell
coming
from
c
sharp
with
yehuda,
and
I
both
being
kind
of
rust
converts.
I
guess
you
could
say
at
this
point:
we'd
both
been
using
rust
for
years,
so
we
like
tim,
was
saying,
as
you
become
more
idiomatic
and
rust,
you
begin
to
use
things
like
iterators.
A
All
the
time
data
becomes
separate
from
the
commands
and
you
use
kind
of
a
compositional
style,
a
functional
compositional
style.
So
we
we
wanted
to
kind
of
have
that
in
a
structured
shell
perspective
and
also
because
rust
is
immutable
by
default.
We
wanted
new
shell
to
also
take
this
on,
so
that
as
you're
working,
it
would
be
easier
down
the
road
as
we
added
you
know,
parallelism
and
parallel
data
processing
that
all
of
it
just
works.
You
don't
have
to
be
thinking
about,
what's
mutable
what's
safe
and
this
kind
of
thing.
A
A
One
of
the
inspirations
for
early
on
is
the
surday
project,
and
I
think
tim
even
mentioned
sir
day
in
in
his
talk
so
sure,
being
the
serialization
deserialization
system,
that's
quite
quite
widespread
use
and
rust
has
inside
of
it
a
kind
of
universal
data
structure,
a
universal
value
type,
and
if
we
can,
you
know,
take
a
bunch
of
different
data
sources
and
create
this
universal
value
type.
Then
we
can
create
a
bunch
of
commands
that
can
filter
it
and
a
bunch
of
other
commands
that
can
manipulate
and
use
those.
A
This
data
present
this
data,
so
we
are
really
inspired
by
surday's
universal
data
type
and
said
why
can't
we
just
introduce
into
a
shell
structured
value
type
that
you
can?
You
can
build
up
and
I'm
going
to
show
examples
here
in
a
minute,
but
this
is
kind
of
the
the
real
foundation
for
where
we
started
to
come
to
the
design
of
new
shell
is
looking
at
sure
and
saying:
can
we
apply
these
to
a
structured
shell?
It's
ergonomic.
My
background
is
in
developer
tools.
A
So,
like
we
were
talking
about,
I
worked
on
typescript.
I
work
on
rust,
error
messages.
I
really
care
a
lot
about
if
you
do
something
wrong,
that
we
hurt
as
little
as
possible.
So
we
present
you
a
very
attractive
error.
We
present
the
system
and
its
data
in
a
very
attractive
way,
so
it
feels
fun
like
you
want
to
use
it.
You
want
to
pick
that
up
over.
You
know
other
tools,
because
it
really
engages
with
you.
A
A
Multiple
unix
commands
into
a
much
more
complex
command,
but
each
one
has
to
handle
stream
like
text
data
rather
than
structured
data
going
between
the
different
commands,
and
we
wanted
to
flip
that
we
wanted,
by
default
everything
to
be
structured
data
in,
as
the
commands
compose
I'll,
show
a
little
bit
of
how
that
works
here
in
a
minute,
I
I
saw
this
tweet
the
other
day,
and
I
said
that
is
a
great
that
is
a
great
quote,
feels
like
having
a
jupiter
notebook
cell
embedded
in
the
terminal
like
it
I'll
just
let
that
speak
for
itself,
we'll
see
if
you
think
that
that's
the
case
when
I
actually
show
the
demo.
A
So
this
is
new
shell,
as
you
can
see,
it
looks
like
a
normal
shell
looks
like
bash
or
fish
or
any
of
these
other
shells.
It's
got
a
prompt
and
I
can
type
commands
so
the
first
one
I'm
going
to
type
is
just
ls.
So
when
I
type
ls
you
can
see
that
it's
a
table,
it's
got
some
columns
at
the
top,
and
each
of
these
columns
is,
you
know,
a
column
of
data.
You
know
for
an
ls,
I
get.
A
You
know
a
set
of
file
names,
a
set
of
types
size
and
modify
if
I
do
a
different
command,
so
I
might
do
ps
and
that's
my
list
of
processes
for
people
that
want
to
know
what's
running
on
my
system
and
you
can
see
it's
the
same
kind
of
idea.
We
have
tabulated
data,
they
have
different
columns
and
different
values
in
the
different
columns.
A
If
I
want
to,
for
example,
now
use
this
this
data,
it's
not
just
that
I'm
printing
out
a
table
like
that
would
be
neat
that
would
be
attractive
to
just
print
the
table,
but
this
data
itself
has
structure
to
it.
So
if
I
want
to
say
where
size
is
greater
than
like
10
kilobytes,
I
can
take
the
structured
data
coming
out
of
ls
pass
it
into
this
filter
this,
where
command
and
by
saying
where
I
actually
down,
select
or
filter
down
to
just
what
matches
this
and
you
can
see.
A
This,
where
command
is
working
on
this
universal
data
value
type.
So
if
I
said
ps
and
we'll
we'll
bring
ps
up,
if
I
want
to
say
ps
where
let's
see
what
our
column
names
are
here
at
the
top
and
let's
say
where
mim
is
greater
than
some
certain
size,
we
could
say
ps
where
mem
is
greater
than
let's
say:
10
megabytes.
A
Oh
here's
an
example
of
me
mistyping
something
so
it
says:
hey
you
created
a
string
here,
and
this
is
a
file
size,
so
10
mv
it
gets
turned
into
a
string
because
it's
not
it's
not
a
value,
but
that
is
so.
If
I
say
10
megabytes,
then
I'm
actually
filtering
down
the
processes
to
those
that
are
larger
than
10
megabytes
in
size.
A
That's
all
you
know
nice
and
flat
columns.
Here
we
have
data
structured
inside
of
other
data,
so
this
is
how
we
handle
something.
That's
more
like
a
tree
or
more
like
a
more
complex
data
structure,
and
then
I
can
of
course
do
the
same
thing
like
if
I
wanted
to
run
a
command
over
top
of
the
structured
data.
A
Maybe
I
want
to
get
out
bin
and
see
all
the
binaries
that
new
ships
with,
and
so
here
we
go
so
it
ships
with
a
bunch
of
plugins
and
then
I
can
continue
to
manipulate
it
notice
like
as
I'm
building
it
up.
I
have
a
set
of
commands
that
are
generating
the
data
that
I'm
working
with
a
set
of
commands
that
are
filtering
that
data
and
as
a
user.
I
just
have
to
learn
what
you
might
say
like
m,
plus
in
like
m
number
of
commands.
A
I
can
generate
in
commands
that
can
filter
and,
as
I
build
my
my
vocabulary,
I
can
reuse
it
everywhere
because
we're
just
using
one
value
type
one
under
underneath
it's
like
an
iterator
of
this
value
type.
Then
I
can
just
use
the
same.
The
same
set
of
commands,
regardless
of
where
this
data
is
coming
from
all
right.
So
let's
see
I'm
kind
of
sucking
through
my
notes.
Oh
yeah-
and
this
is
this-
is
something
that
I
kind
of
mentioned
in
the
early
slides.
A
A
A
A
Right
so,
if
I
say
largest,
three
I'll
get,
the
top
three,
if
I
say
largest,
five
I'll
get
the
top
five
and
so
on
this.
This
definition
now
is,
has
contributed
a
new
command
into
the
system,
and
now
it
interacts
with
everything
else.
So
if
I
say
largest
five,
I
notice
hey,
there's
some
directories
in
here,
so
I
can
say
well
where
type
is
not
directory
and
then
I
can
filter
it
more.
So
it's
not
that
at
any
point
we're
printing
out
the
table.
A
So
this
is
the
largest
we
get
the
values
out.
Oh
one.
Other
thing
I
want
to
show
here
as
well
is
that
you
know
coming
from
typescript
and
coming
from
gradually
type
systems
like
typescript
being
able
to
put
in
type
information.
A
A
This,
you
know
kind
of
light
type
checking
and
how
you
can
build
up
commands
then
allows
you
to
more
easily
scale
this
up
to
writing
full
scripts,
and
there
are
people
that
have
taken
new
shell
and
used
it
for
doing
much
larger
data
processing
systems
or
I'd,
say
large.
I
mean
large
for
a
project
that
is
still
very
much
in
its
infancy.
A
Okay,
so
we
can
do
optional
types.
I
did
show
error
messages.
I
think
one
of
the
ways
to
think
about
new
shell
is
that
it's
an
ide
in
the
terminal
in
some
ways,
so
we've
got
completion.
So
if
I
start
typing
largest,
I
can
get
a
completion
for
that.
If
I
say
new
dot,
new
is
a
dot.
A
dollar
sign
new
is
the
built-in
variable
that
gives
you
access
to
some
things
like
your
like
your
history
path
and
you
can
see
okay,
this
is
where
my
history
is
being
stored.
A
I
made
this
note.
I
I
made
this
as
a
tweet
the
other
day
that
you
can
say
what
shark
equals
five
and
then
you
can
echo
shark
and
get
five
out.
So
the
the
parser
is
very
it's
very
powerful,
it's
very
flexible
and
then
actually
I
want
to
take
one
second
to
explain
some
of
the
stuff
that's
going
on
behind
the
scenes
and
I'll
leave,
maybe
some
for
questions
or
chatting
on
the
discord.
A
If
you
look
back
at
the
top,
it
says
it
almost
seems
like.
If
you
implemented
this
as
on
day
one,
you
might
take
three
parameters
to
where
and
then
just
kind
of
make
it
work,
but
what's
actually
happening
in
new
shell
is
that
it
sees
a
single
parameter.
It
sees
that
the
type
is
condition
and
then,
as
the
parser
parses
it
configures
itself.
It
says
I
expect
a
condition
in
this
position,
so
these
three
size,
greater
than
10
kilobytes,
become
a
single
thing
that
the
parser
then
gets
configured
to
look
for.
A
A
Where
I'll
do
the
full
thing
where
it,
then
it
got
size
greater
than
10
kilobytes
right.
It
kind
of
looks
like
this.
It
expands
that
smaller
expression
that's
easier
to
read
easier
to
write,
but
it
expands
it
into
a
full
expression,
and
here
we
can
see
some
of
the
the
bars
that
tim
was
talking
about.
So
you
can
see
ross
shining
through
in
certain
places,
but
here
we
have
a
block.
It
has
a
single
parameter
called
it
and
it
is
the
name
of
each
of
the
rows.
You
can
think
it
as
iteration.
A
A
A
A
A
I'm
going
to
load
this
123
csv
file
and
it
takes
you
know
a
couple
of
seconds
and
can
load
it
up
and
then
from
here
the
same
kinds
of
things
that
you
can
do
with
different
data
sources
we
can
do
here,
but
using
data
frames
and
if
you're
not
familiar
with
pandas
or
data
frames.
This
idea
that
these
columns
of
data
can
be
stored
in
really
efficient
ways,
so
we
can
do
operations
on
this
really
efficiently.
So
what
I'm
going
to
do
is
I'm
going
to
make
a
variable.
A
All
right
so
we'll
let
that
load
and
it'll
do
the
little
group
eye
for
us,
and
now
we
can
start
to
process
this.
So
if
we
wanted
to
say
data
frame,
aggregate
and
the
max
of
each
year,
let's
see
once
it's
loaded,
I'm
processing
5
million
records
in
aggregate
like
in
a
blink
of
an
eye.
So
this
is
using
some
really
powerful,
really
new
technology
called
apache
arrow
and
a
crate
called
polars,
and
I'm
really
excited
to
see
this
work
become
part
of
new
shell.
A
Become
part
of
you
know
right
now,
everything
you
have
to
say
data
frame
and
then
something
else,
but
we're
looking
at
integrating
this
more
into
new
shell
itself,
so
that
I
can,
if
I'm
just
opening
a
csv
file
and
then
I'm
just
doing
where
over
different
data
sources,
underneath
we're
using
the
fastest
strongest
architecture
and
engine
to
process
that
data
for
you.
So
you
it
almost
opens
up
doors
that
you're
not
used
to
having
open
in
a
shell
anymore.
A
A
All
right
wrong:
one:
there
we
go
so
that
was
kind
of
a
demo,
a
little
taste.
Incidentally,
I
tried
to
open
that
same
file
in
libra
office.
A
A
If
you
have
ideas
or
if
you
want
to
try
it
out
and
just
share
your
experience,
we'd
love
to
hear
about
it
and
discord
is
a
really
great
place
to
reach
out
and
talk
to
us
another
one
that
I
wanted
to
mention
michael's
actually
in
the
discord
right
now
as
daschle.
A
He
can
kind
of
talk
more
about
the
experience
there,
but
it's
been
really
great
working
with
them
and
seeing
new
shell
used
from
different
points
of
view
and
from
different
areas
to
really
help
stretch
it
and
grow
it
in
a
way
that
it
kind
of
solves
more
solutions
than
the
initial
ones.
So
yeah,
that's
a
lot
of
fun
to
see
that
take
off
and
yeah
any.