4 ms·
I can give you example snippets I was able to write for Nyxt, that I find quite exciting, as premises of an integrated platform, bluring the lines between a web
by vindarel 5y ago
I can give you example snippets I was able to write for Nyxt, that I find quite exciting, as premises of an integrated platform, bluring the lines between a web browser and other applications. I don't agonize in not having them in other browsers, yet, but I still find the Nyxt capacities they illustrate exciting.
- first, there's a simple file manager in Nyxt (Webkit's), the open file command is bound to C-x C-f, just as in emacs, so it's at easy reach. We can open a directory view, an HTML file, a video in Nyxt. I wrote a snippet to dispatch to the right application depending on the extension. There was no such thing buit-in, but I could add it. Similarly, I added a command (M-x open-home-directory) to open the home directory. It's easy to write such simple commands.
- there's a built-in git cloner (I contributed it, uh). M-x git-clone and it asks for a directory. I can open a file or directory with emacsclient.
- we can write hooks: I have one to open reddits links in old.reddit.
- I have M-x download-video (built-in maybe?) that fires youtube-dl.
- I have M-x fip-radio-save-current-playing-song, that scrapes the song data on the radio's website and saves it in a text file. I can view them in HTML, I can M-x listen-saved-song, that searches it on youtube (it could find on a directory if I already have it).
=> they are little things that I usually do in a terminal that I now do in a browser. Nyxt gives me a nice fuzzy completion prompt for any list of strings, it gives me the possibility to print rich text, etc.
There's something I didn't manage to do yet but am wanting very much, is to be able to react to Webkit web events. Last time I checked they were not exposed on Nyxt, only on the C side. I would react to button clicks, I would add new buttons on the page and react to them. That'd be awesome.
All this is written in Common Lisp, that is strange at first (rest assured, you're normal), but it's a great language with a long history of industry use, so it's solid and it's good to have it on my toolbet. I am now lauching new services in CL rather than in Python, that is so slow, unstable and error prone.
my snippets: https://github.com/vindarel/next-init.lisp/ https://github.com/vindarel/next-init.lisp/ (outdated, I didn't follow the latest changes)
other great config: https://github.com/tviti/next-cfg/ https://github.com/tviti/next-cfg/ and https://github.com/tviti/next-notebook https://github.com/tviti/next-notebook (interface with Jupyter)
An honest comparison with Python, workflow and ecosystem: https://lisp-journey.gitlab.io/pythonvslisp/ https://lisp-journey.gitlab.io/pythonvslisp/ (mine)