you
You
through i yeah
Somewhere here, and yes, what is going to poke?
So the project has,
you can say that it has many components on the way you count it.
But in a simple way, you can say,
okay, it's a leap poke which has
the incremental compiler for the poke programming language.
By incremental, you can add stuff,
redefine things, redefine types,
redefine variables over the time.
And it also had the other part is the PVM,
poke virtual machine which is powered by
Ganujiter project by Luca Sayu.
And yeah, it's a virtual machine generator,
which is fun but no time for talking about that.
Sorry, Luca.
And the other part is the IOS space,
which is the abstraction to make things you
know you can address bits from the IOS devices.
So these are the main components of the leap poke.
The other component we have in the Ganujiter project is
the poke the CLI application,
which is based on user leap poke,
and you can read line,
you can write to this in and then it gives you
error and output on the set out.
But the third thing is we have is the poke D,
poke demon, you know demon in the term of server or
in the program that exists,
we don't see it but it's doing something.
So it's a demon for me.
But some people believe that okay,
demon is only system things but I don't think so.
So I like to call it poke D.
So a very brief looking at the components
inside the leap poke.
So if you go to the leap poke dot leap poke dot H file,
you will see three opaque types.
The PK compiler, which presents the interaction
with the compiler, the PVM, which is PK Val.
It is the values from the poke virtual machine
and you have the peak IOS,
which is the abstraction over different devices
like we have network block device,
we have zero device, we have sub device,
file, stream, like it's in the set out there.
And process, which is you can poke other processes,
you attach using the PID or memory,
which is a in process memory for doing temporary things.
And we have also a foreign dev,
which you can introduce a new device.
Like you have, like as an example,
I have, I can show that,
but like reading from packets and writing to memory.
And then in poke, you can poke the packets,
no network packets given from like a network
or for example, at my job,
I have to work with Bluetooth things.
So we verify the data formats, we read them,
and then we verify with the poke that we are,
we get what we expect to.
So ended language.
The language is procedural, of course,
statically type, of course, interpreted
because of no PVM stuff.
And it's interactive DSL for binary data.
It is designed to specifically be expressed,
enough powerful to express binary formats.
And yeah, so we can have variables,
var a equals something.
We can have a weird integers like I have here
and int 32 literal, which I'm casting to you int 13.
We have strings which are not terminated.
There is no non-null terminated string in poke.
If you want to use, you can use arrays.
These, this is the offset.
So in size and offsets in the poke are magnitude,
which is an integer and a unit, which you can define.
The basic unit is bit, but you can define your own unit
like let me, no, let me not.
Yeah, here we have a repel, which is poke repel.
So I can say, okay, I have unit foo equals three.
And then I can define one foo,
which is here in the, this is the output,
you know, the output of the results, which is one, three.
An offset, one magnet, one thing of this foo things,
which is three bits, white.
13 here, it's the bits of this integer.
It's an integer of size 13.
Yeah, I'm casting to that from 32.
And yeah, this is syntax for array.
So for literals, for unsigned byte things,
you have to specify the UB.
So this is an array of, I can copy actually
var E equals 01 UB.
And then E, which you can see here that 01, so it's an array.
So units, like you can define, if you go to the,
is it the pk in our repo, it's there, you know.
B uppercase, B is eight, kb and kilobyte,
the stuff we haven't managed.
So you can also define types, like you have an structure,
which is consist of a three bits bit integer,
followed by an offset and signed int 40 bits number,
50 bits number, which represents offsets in unit bytes,
and we call it J, and then we have three strings,
you know, not terminated strings.
And functions, you can use the syntax fun,
my function equals, this is the input signature,
output column, and then you can do the,
this thing here is for attributes of this value,
like the length, is it mapped or not or stuff like that.
So the application, the poke, it's a repel,
you can, you know, declare stuff, like what you see here,
but it's not the poke application, it is something else.
So, and it provides a bunch of utilities.
So here I switch the, I'm opening a new terminal here,
I open the poke, the program, the CLI,
so we have here something like dot command,
start with dots, so dot help,
you see here that we have a bunch of, you know, things here.
Or look, for example, dot set, if you set,
okay, you can do print printing,
or here you can define variables,
like you can change the set, output base to 10, okay,
this kind of thing is also possible here.
So you can do anything, and you can redefine A again
to be hello, and it will be hello, and yeah.
So the next thing is, okay, I can run these things,
which I ran so I don't go over there.
So if we want to know how poke, the CLI works,
a very simply, oversimplified view is that it's,
uses these two leap poke functions,
PK compile buffer and compile the statement.
The trick in poke application is,
if the input starts with these keywords,
like vary unit type, find immutable,
if you compile and run the thing using this dysfunction,
which expects, you know, arbitrary poke code.
But otherwise it uses a statement,
which assumes that you are passing in a statement
in the raffle.
And despite the name, both of them compile
and run the poke program, so yeah.
And this is an example of, because this thing
started with var, so you can add more than one statement
to it, here is an statement,
because there is no var immutable form,
and this is also a syntax error in the poke raffle.
I can show you, yeah, there is error,
because it expects a statement, not arbitrary code.
So you see that there are some limitations.
So what is this thing called, let me, yeah.
Yeah, so we read from terminal, it gives a structure
called input somehow.
The first var, we compare it with these things,
if it's that, compile buffer, this check macro,
this is also pseudocode, it's not real code.
So checks for first the output of this
compile buffer function, which is compile time error,
and also the exception during the execution of this program.
And if it's not, okay, it checks things,
and then, you know, in the compile statement,
you get the value back, and besides this exception.
So, but what is poke t?
So, here in the poke application,
we have this layer of std in, std out,
and std error over the lip poke.
So what about, you know, generalizing this abstraction
to Unix sockets, instead of getting information
from the input, we can get information from Unix socket.
Is a demon, acts like a broker,
so it listens on this socket,
and it has a concept of channels,
like you have input channels and output channels,
and are completely independent,
and then a client, we call them pokelets,
connects to this poke t,
it should tell the poke t that what is its role.
So the role is an 8-bit thing,
which is integral struct, you know, the syntax,
this is different from normal structs,
but yeah, should I explain that?
No, I don't know, no.
So the most significant bit is a direction
followed by seven-bit of channel,
which is limited, we reserve them for future upgrades.
So when you connect to this socket,
you have to write this byte to the poke t,
then he knows that, okay, your input,
so expect something from you,
or it's an output channel,
then when some user code write to this channel,
you will get the data, and it's distributed to all,
and there is no addressing thing,
it's a broadcast thing.
So if you want to know how these things work,
there is a pickle, I can show why not.
If we go to the GNU poke poke program, okay,
here in the, oh, I have to, sorry,
I have to enable the syntax highlighter,
so yeah, then pickles, pdap.
So all this communication poke the application protocol,
you can see here, you can see the description here,
okay, this rolls, what is the outcome stage,
what is the, all of them are there,
so if you are curious, you can go there and study.
So, but we'll now go to the more detail.
So here is the poke the oversimplified view.
So here we have reading from input channels,
and we have a concept of iteration,
you know, when you start sending something,
because, you know, you can have different print of statements,
so it should, you know, it's, you know,
partially send data in chunks,
so we have to somehow notify our user, okay,
here you're starting a new iteration of compiling
or something, and so if it's from input channel,
which is channel number one, it's simpler, I think,
it gives to the PK compile buffer,
and if it's from command input,
which is input channel number two,
it will give it to the statement,
and here we have this check publish instead of print,
it publishes to all the subscriber,
all the clients are, said that, okay,
we are interested in getting data from this output channel.
So, any question regarding these things,
poke the poke, poke the CLI, pickles, nothing, great,
nobody is following, so that's great.
So, let's talk about Pac-Me, so, question?
Where?
No, if you, I'll open the questions.
What?
Okay.
I'm trying to my best to answer questions, so.
Okay, so now let's talk about Pac-Me,
which is the title of this talk,
so it's an ACME-inspired, you know, poke interface,
it's not ACME, let me explain it.
The reason is because text rocks and anything else,
like the graphical interface, it sucks really, seriously,
I'm not, this is in the line of code of conduct,
of custom or not, I don't know.
You talk bad about graphics.
Anything else sucks, yeah, good, thank you for the support.
So, examples of good interfaces, in my opinion,
are list machines, small talk environments,
Oberon, which is a desktop computer system written scratch
from Nikolaus Wirth, the creator of the Pascal,
for the students, but it's a very interesting
text-oriented interface, and the ACME,
which is the editor of a great operating system
called Plan 9 from Bell Labs, written by Rob Pike,
the co-inventor of co-programmed language,
which is also inspired by Oberon.
The good thing is text is the main thing there,
so you can select text and execute text,
so it is very interactive, but also you have the text,
so you can compose things and then, okay,
put them in a function, and these kind of things,
you know, it's much powerful than, you know,
this DOM button, you have to click on that, you know,
you cannot even change it, you know,
if it's not useful for you.
So, the reason is, okay, easy to compose,
automation-friendly, you can have, explore,
it's very useful for binary data,
you are exploring, you know, different things,
and then over the time, you have a script,
so copy, paste it in a function,
and then call it later, why not?
And it's extensible, you know, you need something more,
which we don't know, you develop your own program,
which is, you know, a very simple thing, you can do that,
and for your information, I'm not against graphics,
graphics is awesome, the way that we currently use,
you know, graphical interfaces is bad,
like I have a button, I cannot change the function
attached to it, I cannot, you know, remove this button,
put two buttons, which is more useful to my case,
so yeah, I love graphics like formulas, visualization,
because the best pattern matcher we already have
and planned, there's our brain, so why not?
Visualization is cool, so, but this, yeah, never mind.
Yeah, it's getting out of contact, so, kind of talk.
So, okay, Pac-V is pokelets plus T-box.
So the idea is, okay, okay, this terminal thing
is not the best thing we have, it's from 60s,
but yes, it's by far the best thing we have today, so.
Let's live there, so, the option is,
one option is to implement everything from scratch,
which is, I'm too lazy to do that,
so we have already programmed like T-box and screen,
which you can do interesting stuff with them,
like let me, if you don't know about it, let me,
okay, this is a normal, external thing,
and I say like, let me use one specific configuration
for that thing, so here I'm opening this thing,
so I can like, I have, there is a prefix,
so you want to say that, okay, please do this thing,
or like resizing things, running commands,
you can do many cool things here.
I'm not, this is good, we have this kind of thing,
so we can use this infrastructure,
and with the power of little programs,
the pokelets, which talk with the poke over the socket,
we can create a user interface, which is dynamic,
not the best, but yeah, we can improve it,
it's more interactive, and also, because of this,
there is no limit, here pack me, I'm talking about terminals,
but you can run on Emacs, which is we have,
these things can coexist together,
you have pack me here, Emacs here,
and even I have an implementation in WebSocket,
but it's still in Python, so I'm not allowed to publish it,
unless I have some C implementation for it,
yeah, I'm not looking at you, yeah,
and in future, we will have support for screen,
I chose T-Max because I use it on a daily basis,
so why not, and okay, so I showed the T-Max for you,
so let me show you the pack me,
if you like pack me, it's here,
so home user bin pack me, da-da, this is it,
so it's called the T-Max on a specific unique socket,
which is a T-Max thing, not important for us,
with this specifically, so pack me,
this T-Max configuration file,
so let's look at what is it,
so here, share, pack me, yeah, here,
so here, like we are, you know, the default,
because when you want to do something to instruct the T-Max,
you have to send the key combination,
okay, now I'm talking to you T-Max,
so by default, it's control B here,
you're unbinding it, and here, I chose control G,
you can choose whatever you want,
and my favorite one is control O,
because it doesn't conflict with anything,
anything else, B, A, G are conflicting
with the GNU read line, which I hate,
but this is for you people, so you can change it,
and so we are, like we can have control O,
so if I press control G and uppercase O,
I automatically split the window,
send these literal things, like peel it out, enter,
this is, you know, but you see here,
and then select, you know, go back to my cursor
to my current pane, which is this one, the upper one,
so you can, now if I go to the, okay,
I can new one, peel it, echo, print,
it's better to be quoted, hello, fuss them,
and I guess with this one, I have a very little program
which reads from, is it in, and writes to the poke D,
so you see here, this 73 is the iteration number,
and that's the result of the execution, it's there,
so if I rerun it again, a new thing,
so here in this patch, peel it out,
I decided to use this, but you can use anything
you are interested in, and just for the record,
this slide thing, it's a poke led too,
and I can show the code to you, like user bin,
peel it, slides, it's like peel it out,
channel number 60, don't put the length,
so it's not important, and this is the terminal
code, escape code for clearing this thing,
so it just, instead of writing this slash slash the number,
it just clears this, so I have these slides here,
so the other thing I can show you,
so let me finish this thing, so now key bindings,
normal key bindings, like I have this power here
to like, let me, this is also cool, let's out,
okay, here in my thing, I think let's define a variable,
echo var a equals 100, and send it to the poke,
okay, so we know that it has, but with the power of Tmax,
I can go and select this a, and I'm telling the,
this is the key binding, okay, execute it,
the e, upper e, this key binding, so pipe and cancel,
put a semicolon at the end, and give it to the
pokelet in channel two, which is for the command,
so if I press shift e, 100 you have c,
so it executes this a, it's like that you've written
the a on the command line, in the ripple, so very simple
thing, so I have also, because I love users,
so I provided predefined layouts for you,
so you can hear, control GF1, like it's opened your
editor here, which is hell, yeah, this is using
this editor thing, so you can just use your favorite
editor, you have here the pickle, which I write a,
you see, the logic is in the poke t, so when you can
connect, disconnect, everything is there, and another
layout is f2, yeah, it worked, so let's show,
let me show you something, maybe a little bit more
interesting, yeah, yeah, yeah, var, let's open the file,
which I have somewhere, now this is error, I, okay, home,
caldron, I don't remember that, caldron, yeah, test 0, 1,
elf, okay, it's an elf file, you see here the number 0,
this is the handle to this IO thing, this file, so I can
load elf module, and okay, and I know that it's a
risk file elf, so let's load this risk v module, we
call module pickles, if you wonder why, ask him, and so
var file equals elf, it's an elf 6, I know that it's
an elf 3rd, oh, I can like do the view, here you get
a dump, and you can, the fun thing is you can add as
many as viewer you want, so it's the same thing, you
can have a viewer in web, so here you instruct your
thing, and in the web you get your things, highlighting
stuff, anything you want, yeah, and so let's do elf 64
file, add this IO space at offset 0, so I'm telling
that, okay, go to this IO space, number 0, go to
that offset, and give me the elf file there, there's
no elf file there, and it's, okay, oh, and if I
hear, oh, oh, oh, oh, yeah, in the, I can zoom in, so
here you see that, you get all the elf stuff here,
like e-edit, no type, machine, section header, and
others, so let's get the text section of this
thing, elf 32, no, we have the file, get sections
by name, that text, I know that this elf file only
has one, so it gives all the sections, so I have
one, so sub zero, if I write text, so at the end
you see, you get this section header with the
offset and size, right, so this is the address
where the code, the actual execution code resides
in the binary, so, but you know, you can say, okay,
give me the bytes, give me how much bytes, text
SH size bytes is an, here, this is an offset, I'm
telling that, okay, I need bytes of this size, at
this ispace, and at this offset, you know, go to
this offset, SH offset, so you get all the bytes
here, I can VM set output base to 16 and do it
again, so in more interesting things, so, but
it is bytes, what else can we do, you can say, okay,
I know that these are risks, risks 532 I
instructions, you know, this subset, you know, this
basic base component of this risk machine, so
give me that amount of elements of instructions
at this offset, so here, if we go to the end, so
you get all these instructions, risk 5 instructions,
which be written in poke, the description of this
instruction, that's the extensible thing, so for
example, here we have an instruction of format I,
which immediate of this value, RS1, functionality 0,
or the this one, and opcode stuff, I can show you the,
I think I'm done, you know, I don't have any time, so
let me just show this one and then to Radare, so
poke, what was, yeah, pickles, what, yeah, yeah, yeah,
hey, I didn't pay for them, you can, it's free from
my point of view, you have to handle him, so this
is risk 5, you see, we define the opcodes, different
instructions, like this is the instruction type B,
it's an integral structure, so you can read about this,
so we can have very complex things, we have pretty
printers, nice thing is we have, also I want to show
this, this is from, okay, I can put it into
incense variable, incense 0, which is, let me close
this view, dumb view, yeah, yeah, here we have the
thing, so you can give the, this is the actual
number, which is there, in the memory it is stored
in the little indian, so 1380, something like that,
and one, what, what, yeah, as, as, so we have a
method, you call this method, you don't need to
print, if there is no argument, so it gives you
a real valid instruction for the assembler, so this
is part of the whole story, so you can add more
pokelets, next year I will come back with more
interesting things, no GUI, but the right way, and
yeah, thank you, thank you, if there is any
more, thank you, thank you, thank you, thank you.