I think it's still going up.
All right. I think we should be live now.
So hi, everyone. And hi,
Michael. How are you doing?
Hi. Hello, EmacsConf. I'm pretty excited to
be live at this year's EmacsConf and getting
a chance to talk about my favorite program or
our favorite program. Well,
yeah, I'm doing pretty fine,
and I'm excited. Well,
so are we. So without further ado,
the floor is yours. Present for as much as
you want. We've already discussed the timings
so I'll let you on your own.
Okay so let's get started.
The topic of the talk is the browser in a
buffer or Poltus, a periodic web weaver.
Poltus is a kind of spider and the name of
the project I'm going to show you.
But first let's set the stage for this
project. Here we have Emacs I'm presenting
from and here we have Firefox.
I'm inside and there's a video.
Okay, let's do this. Don't do the inception.
Put it over there somewhere.
Okay. So here's Firefox.
It's not, it's, It's in a buffer,
but it's pretty disconnected from Emacs.
It's in an XWM buffer.
So you can use it from inside Emacs,
but they don't talk. Emacs doesn't talk to
the browser and the browser doesn't talk
back. And I'm going to show you something
that changes this. But first,
I think for many of you,
it's the same, like there's Emacs and the
other important program is the browser.
So how do you do something?
Let's continue with the stage.
We have some research session.
We have this EmacsConf we found this year and
there are a lot of talks.
This is the 1 we're watching right now and
let's have a look. What else is interesting?
Ah, this was yesterday.
So have a look at today.
There is a world of possibilities.
That sounds great. Oh,
that is right now. So greetings to you.
Yes, the browser and the buffer and other
stuff. So now we have a lot of talks,
tabs open and we're going to go back to
Emacs. I can't switch buffers in a dedicated
window. So apparently I can't do that.
Here's Emacs again. Now I'm in Emacs and I
want to have something from my browser,
maybe like the open tabs or I want to
annotate them. I'm in org mode right now,
so I would like to do it from Org Mode maybe.
How do I get the tab? Okay,
let's tap back. I want to annotate this page.
Let's get the link, put it here.
Oh, that wasn't a link.
That was something totally different.
So let's use the mouse.
There's the link. Now we could put a title
and so on. What I'm showing you here is it is
pretty, no it's not too difficult,
but it could be easier interacting with the
browser. And there are helpers to do
something like this. I had,
for example, I used for a long time this
extension. It's called export tabs URLs and
you got a list of your tabs and you can just
copy them to clipboard.
So now we have the tabs,
copy them to clipboard and there they are.
So now we can do something with the tabs,
rearrange them, take notes and so on.
Okay. And there's even other stuff for while
researching for this talk on this extension,
I found this tab session manager where you
can have a look at your tabs it does
snapshots it exports it in Brazilian
different formats and yeah that's even more
luxurious no better but it's still not an
emacs okay so how could we get it into Emacs?
Maybe this thing called Pultus could help.
The theme is from a browser extension and a
manual workflow. As I showed you right now,
we want to go to an interactive Emacs
interface. How to deal with the browser and
its tabs from inside Emacs.
And we're gonna do just that right now.
So we had this research session over there.
So now it's demo time.
We had this research session.
Let's open it again. Here is it.
And now we want to do it from inside Emacs.
We say please Emacs insert this or please
Poltis insert this. And now we have the
browser session inside Emacs.
It's a little bit roomy so you can see it
over the internet. And we learned that
BigBooplotten doesn't set a title or has a
new line in it. I'm not actually sure what
happened here. So let's have this browser
session and what can we do with it?
For once you can just copy stuff here,
you can take notes and it updates with the
browser. If you change something in the
browser, maybe switch these tabs,
they switch over there.
Or you say, okay, I don't want to have
HyperDrive in here. And I don't need the
instructions for speakers because I'm not a
speaker so I have a live sync to Emacs from
the browser in this Org Mode interface and we
can do more stuff with it,
for example we could I already showed you how
to rearrange stuff. We can open new tabs.
We can have a look at let's say emacs-conf
again and they're just updating and now it
says a new tab, add another 1,
okay. So I think you get the gist.
Now let's take a note on this.
This conference sounds interesting.
Have a look. Maybe thumbs up.
Okay I can do this. So now there's a link,
not a link, a note. If I close it and reopen
it, There's the note again.
So we have persistent notes for browser tabs
or not actually browser tabs,
it's actually URLs. Use the browser tab.
I'm gonna open another URL.
Now it's not without a node.
Going back, the node is back there.
That's how far I can show you Politis because
the interface isn't finished otherwise.
But the backend is pretty cool and I'm gonna
tell you more about that.
The interface is right now just browser
interaction 1 way from the browser into org
mode, an org mode interface and it has nodes.
But it's not too difficult to imagine,
for example, adding tags or...
I just remembered Or I just remembered
something. Okay. So for example,
adding texts or scheduling information or
what else, all the stuff you do with org
mode. Or go the other way around and sync
from the org mode buffer to the browser.
So I could delete this heading or rename it
or stuff like that. So it's reflected in the
browser. I'm not going to do it right now
because it's not implemented.
But just to give you an outlook of the
possibilities. Good. So let's leave this
browser session here. Browser session below.
Okay. Change the outline structure or stuff
like this. So get the browser back,
debugging. Yep, this talks,
I could change something here,
go back to the talks page and still working.
Now I showed you what it does and what can
you use it for or What is it intended to be
used for if it's finished,
because it isn't finished as I said.
Manage your open tabs.
So for example my use case is I do something,
have a big collection of tabs open And then I
need RAM. This PC here has just 4 GB of it,
so sometimes I need to close the browser too.
I don't have to close the PC.
And in this case I'd like to save the
session. So far I just copied this clipboard
thing I showed you earlier in an org mode and
Captured it away and this should be the
future for this workflow You just capture the
browser session rearrange it.
However, you like it and then you make make
it offline. So this is the thing I didn't
show you. You can, if you were looking here
you can you see that this heading is open in
tab 37, window 1. So if you would remove
this, it's offline. And you keep just the org
structure. It's a simple text file then.
And the plan future feature is to go back to
the online state. So you have a session,
maybe a browser window,
you save it to Org Mode,
close the window and some days later or weeks
later you return to this research session,
maybe something about Emacs or whatever
spikes your interest, and you can just reopen
it from the browser, from Org Mode.
So Org Mode becomes the controller of the
browser. And it's not,
it doesn't have to be Org Mode,
but for the demo purpose,
Org Mode was the most easy interface.
That easy. I don't know if you're doing more
complex interactive stuff in Org Mode,
but there's some tricky edge cases.
I just finished this demo half an hour ago,
maybe an hour ago, and I'm really lucky that
it worked in the end. Org mode,
pretty great. So maybe you could do another
interface, does not matter.
Easy access to more info from inside Emacs.
Yeah, Of course, you can imagine like we have
just the title URL here,
but you could even get at the text of the
buffer. I'd show you in the,
in the, how is it done section,
manage and research session,
tab groups. I already showed you this and
browse all your links.
I also showed you. So let's go over to how is
it done. How is it done then?
It should be quite apparent that somehow the
browser has to sync its state to Emacs and
Emacs has to know about the browser and
there's like a bidirectional state
synchronization going on here.
And there's a browser side and an Emacs side.
The browser side is a add-on,
a web extension add-on.
I first tried to use WebDriver by DIY.
I don't know if you know it,
you open a web socket and then you can talk
to the browser, but It was so frustrating to
actually get it to do what I wanted to do
that I changed to the web extension and this
wasn't that much better,
but I finally had all the features I needed
because WebDriver is like all in flux and you
have to look at the Firefox bug tracker.
Do they have implemented this already?
And no, most often they don't.
So now it's a web extension add-on and it
just tells Emacs little facts about the
browser. And for you to make,
to, that this facts make more sense for you,
I think I have to explain how the Emacs side
of this works. So the Emacs side,
at first I thought I make it quite simple and
then I over engineered it.
And now it's great, but also not finished.
So the Emacs site is a database.
It's a triple store or RDF database.
It stores all information in triples.
So you have a subject,
subject, predicate, and an object.
And you can query this database.
For those of you who watched last year's talk
of Andrew Hyatt about SQL in Emacs.
He presented such a database if you want to
have a closer look. And sorry,
Andrew, I didn't use yours.
I had to make my own. I'm not sure it's
better, but it was fun.
And it has some different design decisions.
For those of you who don't know what's up
with a database like this,
maybe you know web apps like all this new Org
Mode clones. How are they called?
Obsidian, Roam, and so on and so on.
All of these are possible because,
I don't know if Obsidian too,
but stuff like Roam is possible because they
have a triple store in the browser and use
this to power their knowledge base.
And if you have had a look at Org Rome,
you know it's uses a database too,
because if this knowledge gets bigger,
database is better to handle.
And now here's a triplet store or a database
to manage your browser session inside Emacs,
but it's not limited to browser session.
You could do nodes and stuff.
I don't have a project for this,
but you can look at this project from Andrew
Hyatt. Has a pretty interesting notes
project. So here is it in Emacs.
There's the link. You can have a look.
Okay. So now we have this database in Emacs.
It's possible to do something like this in
Emacs now because the database has Emacs
SQLite integrated And the browser logs inside
into this database via Emacs.
It sends Emacs, it connects to Emacs via
WebSocket. Emacs is a WebSocket server and
then it sends little snippets like this
window shows these tabs or this tab shows
this URL And Emacs has triggers in this
database. It can install Elisp triggers and
the trigger powered the org mode frontend.
Okay, so that's how it's done.
It's not finished, but it does something.
Now I want to do some closing remarks and
maybe some more remarks.
First off, an interesting concept I thought
up while implementing this is cheesy garbage
collect. For all you fans of dynamic
languages, you know what garbage collect is.
And Emacs users probably know it.
Cleans up after you. You are using this Emacs
and you are making lots of little objects and
after some time Emacs says,
okay, I'm doing some cleanup for you.
That's garbage collect.
And I thought why not have garbage collect
for the browser? You're doing this browsing
and opening all these tabs and after some
time there are lots of tabs and someone has
to close them. So there's the C programmers,
they do all the closing themselves and
they're really meticulous,
but it takes some time.
And there's like my style,
I just let it collect stuff and after some
time I close the browser and start a new 1.
And now there's the garbage collect that
says, let it collect the browser,
let the browser collect and then garbage
collect. Let's say every morning the browser
closes, Emacs closes all the browser tabs,
but it keeps the information And it keeps
text. Maybe you said like a tag yesterday
like reading. I want to read this.
And next time and then after that it's in the
reading list. So garbage collector
compaction. However you want to know this.
1 thing I thought of while doing this is
also, oh my time's up,
so we're almost at Q&A.
1 last thing, this whole project or program
works via the Emacs event loop.
So there's a server listening for the
browser, waiting for infos from it.
It works quite fine. I wasn't sure how much
performance it will cost the browser,
Emacs, but it works fine.
But I wonder what's the limits of Emacs event
loop. Like, can I go on forever adding server
stuff? How big a server can Emacs get?
I don't know. So that's some open questions
to ponder. With that, thank you for listening
and for your interest.
I'd be pretty delighted to take some
questions now. Great! Well,
thank you so much, Michael.
Thanks for the talk. And also thanks for
going a little more in depth at the end.
Is that what the extra stuff that you wanted
to mention? Is it what you've done just now?
Sorry, I didn't understand your last,
your question. When we were preparing for
your presentation with Sliv,
you told me that you wanted to go perhaps a
little more in-depth into the garbage
collection. Is it what you wanted to do or do
you still have some more to tell us about?
I could tell more in-depth.
Yes, garbage collection is just an idea.
It's maybe... I don't know.
Are there questions? There are questions,
that's why. We have about 13 minutes to
answer as many questions as possible.
By the way, Sorry for the people who were
watching the presentation.
There's been a little bit of manipulation
trying to get all the screens in order,
but it's because I've got a very shitty ping
to the streaming server that we use
currently. So everything is like composite
everything, But don't worry,
Michael, everything will be very clean once
we publish it afterwards.
So what I'm going to do...
Sorry, could you repeat?
So it was not at my end because my internet
connection is not the best 1 either.
No, absolutely not. Oh,
by the way, this reminds me as I am
compositing the windows,
you might remember in the talk by Bob earlier
today, I said, oh, there's a phone vibrating.
I thought it was coming from the big blue
button, like the room in which we are right
now. And I wasn't hallucinating just to be
clear. It's just that 1 of the co-organizers
behind on mumble had their phone vibrating
and I was very confused.
Anyway that's for the Okay,
so everything is set up now.
So what I'm gonna do, Michael,
I'm gonna... If you're okay with this,
Can I read you the question from the pad and
can you answer them? Yes,
of course. I would love to.
Okay, lovely. I'm going to try my best to
display the questions on the stream.
Give me just a second and in the meantime
I'll read you the first 1.
So, have you seen the next browser?
It is the Emacs of web browsers and would
probably be easier to work with as it matches
a lot closer to Emacs.
I think you can tag your browser tabs for
example. I saw it, I never tried it.
I think you can do all the stuff and I think
it's pretty good idea to use it if you want
because have a look at this.
This lovely thing is JavaScript and it's the
browser side. It was quite tricky to get
working so maybe it's easier if you use Nixt
but I like to use Firefox and yeah there has
to be a solution for Firefox too,
I think. So next question,
please. Lovely. All right,
so nice ideas. Needs a better name though,
to attract people to it.
What about Browsys or Webnote?
Browsys spelled B-R-O-W-S-Y-S or Webnote?
Clearer this 1. Webnote and Browsys?
With a Y, yes. So instead of an IAY.
Ah, okay. Yes, why not?
I take note. The name is maybe a little bit
confusing. It's the name of a spider.
It's like a spider that does an orb web.
I found it via Wikipedia.
I just wanted to have like something with the
web because it's weaving something and
there's also the web involved.
I'm not set on the name.
I'm not even set on the project yet how it
will turn out. So what you're seeing now is
something else than what I imagined when I
was planning this talk.
Yeah. That's right. Keep an open mind.
Next question. You know what I'm going to say
about the marketing of project names?
You know, they're not,
they don't make sense and they're not popular
until they actually are.
Like what would have predestined maggots to
work as a name? Perhaps nothing.
I mean it felt close to magic or maggots
depending on the people you ask.
So you know maybe your name Pultis will be a
household name give or take 6 months or a
year? Yes, maybe. Because- All right,
moving on to the next question.
Oh, unless you wanna add something.
To expand a little bit on this name,
I'm not sure where it stops.
Like, is it really, it's just about the
browser, What I just built is something more?
So I'm not sure if I should limit the name
here. Okay, now let's go on.
You know what? You know what they say about
programming, there's only 1 fundamental
problem, no sorry, 2 fundamental problems,
garbage collection and naming things.
So you're stuck in the second 1 and you
mentioned the first 1 as well.
Alright, moving on to the next question.
Can you use browser extensions with this,
for example uBlock, SponsorBlock or
Darkreader? Yes, of course.
I think someone was maybe a little bit
confused that the browser is inside Emacs.
This is something totally normal for us ex-WM
users. It's like every program for me is
inside Emacs. This is just a normal Firefox.
It just doesn't have like the window
decoration. So there's of course there's,
no, This is the ad blocker.
I don't know why it's not working here.
But you can have all you have in Firefox.
OK. OK, lovely. Are you ready to move on to
the next question? Or do you want to add
something else? Yes, next question please.
All right. So are there any inherent security
issues with this, like bidirectional
synchronization? Sounds like a possible
issue. How are they solved?
Can a malicious website impact Emacs or the
host system? No, the website has no intro.
It can do little stuff.
There's this, it's a web extension,
it's a browser extension inside the browser
and it has like a limited interface.
It uses a web extension API,
there's a tabs API, you can listen on tabs,
here you can tabs, browser tabs,
Please notify me if there's 1 created,
updated, moved, detached,
attached, removed. So the people I think
working at Google Chrome put some thought
into it and at least this part seems quite
well designed. Okay, next question,
please. All right. So when do you think
you'll make a first release?
I hate needing browser extensions and would
love to control my tabs in Emacs.
Yes, I don't know. I would like to do it
soon, but I have stuff to do.
This is not the simplest project.
What I can tell you, I will put the code
online in the next days,
maybe even next week, because it's not
pretty, but it's also not bad and there's a
lot of stuff there already.
And For those who don't mind looking at
unfinished things for inspiration or maybe
their own work, I want to put it online.
And if it's released, I will do some bigger
announcement. And if it's getting released,
can you write it back in Emacs console or
conf, of course? Well,
no pressure. Next year you need to have it
released and you'll need to give us a GitHub
page. Alright, moving on to the next
question. What happened to the Sway
compositor you showed last year?
Yeah, that's like, this is the perfect
question for like after the last 1.
It's also not finished.
And it's also not finished Because while I
did a tech demo like I did this time,
I'm sorry it's not finished,
but I don't have that big a need for it and
it's a lot of work to get it finished.
Because it's a similar architecture,
like this different server clients
architecture stuff and Emacs is still in the
callback hell time as you call it.
So it's not that easy to get it working and I
don't have that much need for a valent window
manager because the other 1 still works and
there's more interesting stuff to do.
But also I know it has a lot of potential if
it works and if it is released And I know a
lot of people are waiting for it,
so I have it in the back of my mind.
And if someone else feels compelled,
please take a look at the code and do
something. Yeah, whoever asked the question,
this is your task now.
All right, moving on to the last question.
We have about 4 minutes left,
so it looks like we are...
By the way, Michael was worried that he
wouldn't have many questions to answer,
and I am very proud to say and to prove you
wrong. All right, next question.
Does the browser have to be Firefox for
syncing or is there a choice there?
I think it's not. There's a choice.
You can use any browser who supports web
extensions. I think it's like a standardized
interface. You can use any browser who does
it. Chrome does it. But they're moving to a
new web extension API to block ad blockers.
I don't know if that does any turmoil for my
extension and I frankly don't care that much.
All right, fair answer.
I don't see anyone who's joined us on BBB,
by the way, we're going to move on with the
stream to the next talk.
But if you've got any questions for Michael,
Feel free to join on BBB and ask your
questions. I've said before that people tend
to be shy and only join when the stream goes
to a next talk. But I like to remind those
people, eventually those talks are going to
be published. Obviously,
we'll make sure that nothing private was
divulged during these discussions.
But, you know, it's, if you can muster up the
courage to go on the scene,
it's always nice to have people join and ask
questions. Michael, we have about 3 minutes
left. Do you have any last words on perhaps
anything to add on what you've presented
today? Yeah, I just thought about maybe I
show something. But there's this portals.
Another thing, if someone has some more
names, I would be quite interested because
naming stuff is difficult.
And this defines the database.
There's the database definition.
I call the database thingy,
it's called Sponti. So I don't know what
you're thinking about this name.
So I think I want to have a database,
it's called, it's this database.
And then I define the database and I define
the subject predicate object.
So I have a browser session,
browser session has tabs,
a tab has, it comes from another tab maybe,
or it shows an URL. A window,
a session can also have a window,
a window shows tabs. And then you can
annotate stuff. You can say,
okay, I have a node or a URL and I can tag it
with a title, date, tag,
or with another node or with body text.
And I have an environment that's like a
machine, the PC that's running on or Emacs
itself. And then you have stuff about the
machine and you have a client,
this is the process session actually.
So maybe I should change this.
Okay. And 1 last thing.
I have something I wanted to show you,
but it didn't finish in time.
Okay, Michael, just to be clear,
you've got only 1 minute left.
Yes, it's not that difficult.
I wanted to integrate highlight.
You just go to a web page,
highlight stuff, do a right click and then it
says save to Emacs. And you saved it to Emacs
and it's there inside the node.
But no, this 1 is not finished yet.
You could do it live but there's no time
left. So thank you for watching.
Yes, and thank you so much,
Michael, for taking the time to present and
to answer the questions.
The stream is going to move to the next talk
in about 45 seconds. It's a talk by Wasem
Masa, which I'm very excited about.
And other than that, Michael,
I'm looking forward to seeing you again next
year with new GitHub repositories to share
with us. Right? No pressure.
And on that note, I wish you a very good day
and I'll see you next time,
I suppose. Yes, of course.
I would like to do it next time again.
It's a lot of fun. All right.
Okay. Bye-bye, Michael.
Bye-bye and thanks. All right.
I think, yes. Okay. We finished.
So, thank you so much,
Michael. I need to get ready for the next
talk. So I'll see you later.
I'll see you later, sorry.
Yes, see you. Bye-bye.
You are currently the only person in this
conference.