Convert energy into Hartree energy in emacs

There is a neat program in emacs which is called (GNU Emacs Calc Manual). Up to now in order to do energy conversion I always wrote small scripts in whatever language to do this. Now I discovered that you do these conversions also in emacs, you can do M-x calc, insert an algebraic form typing ' followed by 1.5 ev, which inputs 1.5 electron volt into the stack of the calculator....

May 18, 2023 · 1 min · 173 words · Alejandro Gallo

Editing linear s-expressions

I have been wanting to edit some s-expressions on single lines, like for instance to edit org-mode macros. This is a very short blog post but I just wanted to share this function that allows to edit a linearised s-expression quite trivially. For instance in a certain buffer I have a local variable like this # Local Variables: # eval: (add-hook 'after-save-hook (let ((name (buffer-name (current-buffer)))) (lambda () (message "Automatically committing %s" buffer-name) (ale/scratchpad/stage-and-commit))) nil t) # End: and of course this is extremely annoying to edit....

November 28, 2022 · 3 min · 493 words · Alejandro Gallo

Using p5js with org-mode in emacs

This week I wanted to do some tests with the cool project p5js and I wanted to use it from org-mode. Regrettably, there is no package I could find that allows to use p5js in an org-mode document. What’s worse however is that apparently you can’t have two sketches in a single html file. Of course, to be fair, maybe this is my assessment of the library. As far as I can tell p5js can only deal with a single...

October 14, 2022 · 4 min · 744 words · Alejandro Gallo

WLAN QRcode generator

How it works Many people often ask me how I generated the QRCode for my Wireless network, so I decided to write this for them. Nowadays it is quite often that the routers come with the QRcode already baked in or they provide ways of generating the QRcode through their admin webiste. However not everyone is able to easily access to the router admin page or maybe some other websites on the internet are full of ads or are simply too slow....

October 9, 2022 · 1 min · 187 words · Alejandro Gallo

Install maxima to use in common lisp

One of the nice things of common lisp is that it allows you to use very high quality libraries like maxima. It might not be clear for everyone how to install maxima in an easy way to use from common lisp maybe through quicklisp. This short post shows just a way of doing it. In principle you can just clone the maxima repository and compile it like an autotools project, provided you pass to the configure script the lisp implementation that you are going to use....

September 3, 2022 · 2 min · 384 words · Alejandro Gallo

A simple youtube bookmark player with raku, mpv and dmenu

Introduction This document explains in a pedagogical way how to write a simple music/video bookmark player with the programming language raku. I often find myself discovering nice music on youtube and wanting to recover or replay it later. Of course I could use a bookmark manager but I want an easy fuzzy searching and storing the links in an org-mode file. Instead of writing quickly the script and adding it to my script collections, I thought this time I can show how convenient and fun raku can be in scripting these kind of small applications....

February 11, 2021 · 6 min · 1200 words · Alejandro Gallo

Getting paper references with papis

Today I would like to talk about how I normally download references of papers using the tool Papis. I will be writing in the future more posts about this tool and about how it makes my life easier. Usually when I am researching a topic and I read a paper about it, I want to check out some references cited in the paper. However, I find it very tiresome to copy the reference or the link (if any is available in the pdf), paste it in the browser and download it with papis....

December 6, 2020 · 4 min · 718 words · Alejandro Gallo

Building a split keyboard with recycled switches

So, the other day doing dumpster diving I found an interesting piece of history, here are some crappy shots I took At first while in the dumpster I thought they switches where some kind of KPT switches I saw once online, to my surprise after desoldering the switches I found out they were actually Tec switches and the only information I could find online was in deskthority. Here is a show of the bare board without the keycps...

November 29, 2020 · 3 min · 486 words · Alejandro Gallo