Projects About AlBasmala
build status

Here are some of my latest thoughts on lisp…

📡 Subscribe via RSS


Articles on this page
  1. org-special-block-extras: demos that are tests, rather than docs
  2. org-special-block-extras: Org lists, drawn as Graphviz graphs
  3. Powering-up Special Blocks: EmacsConf 2020 slides
  4. Tooltips for Glossaries, Dictionaries, and Documentation
  5. Badge Links
  6. Permalinks ---Org's own =<>=, made visible---
  7. Editor Comments
  8.  :fire: HTML Export Styles ---=#+html_export_style: THEME=
  9. Colours
  10. org-special-block-extras: Make your own blocks and links
  11. org-special-block-extras: The block and link types
  12. org-special-block-extras: Write Once, Export Everywhere
  13. Holy Books: Quran & Bible look-ups in Org-mode
  14. AlBasmala:
    Blogging with Emacs & Org-mode (•̀ᴗ•́)و
  15. 💐 Repl Driven Development: /Editor Integrated REPLs for all languages/ 🔁
  16. 💐 Making VSCode itself a Java REPL 🔁
  17. Typed Lisp, A Primer

org-special-block-extras: demos that are tests, rather than docs

Article image


org-special-block-extras: Org lists, drawn as Graphviz graphs

Article image


Powering-up Special Blocks: EmacsConf 2020 slides

Article image


Tooltips for Glossaries, Dictionaries, and Documentation

Article image

Sometimes I want to use the same tooltip multiple times, so I write the tooltip content once in a documentation block and then reference it using the the doc link type.


Badge Links

Article image

Badges provide a quick and colourful summary of key features of a project, such as whether it's maintained, its license, and if it's documented.


Permalinks ---Org's own =<>=, made visible---

Article image

Sometimes we want to point explicitly at a particular location in an article, such as within a #+begin_details block. Org already has two kinds of target for this; we merely make the first one visible.


Editor Comments

Article image

“Editor Comments” are intended to be top-level first-class comments in an article that are inline with the surrounding text and are delimited in such a way that they are visible but drawing attention. I first learned about this idea from Wolfram Kahl —who introduced me to Emacs many years ago. We


 :fire: HTML Export Styles ---=#+html_export_style: THEME=

Article image

It's annoying to have to introduce HTML into your Org —especially when you don't know HTML and don't want to learn it just to have a pretty webpage.


Colours

Article image

Let's develop blocks for colouring text and link types for inline colouring; e.g., color and teal.


org-special-block-extras: Make your own blocks and links

Article image

Every block and link above is made with the very tools below, so a new one of our own is a defun away.


org-special-block-extras: The block and link types

Article image

It can be useful to draw attention to some important text by enclosing it in a box.


org-special-block-extras: Write Once, Export Everywhere

Article image

org-special-block-extras-badge.svg


Holy Books: Quran & Bible look-ups in Org-mode

Article image

Org-mode links like quran:1:1 and bible:John:3:16 fetch and inline their verses upon export, with tooltips in Emacs and Lisp look-ups to boot.


AlBasmala:
Blogging with Emacs & Org-mode (•̀ᴗ•́)و

Article image

How my blog is setup (•̀ᴗ•́)و

Here are some notable features of my blog.


💐 Repl Driven Development: /Editor Integrated REPLs for all languages/ 🔁

Article image

The MELPA package makes the philosophy of REPL Driven Development (RDD) accessible to any language that has a primitive CLI repl: The result is an Emacs interface for the language, where code of your choosing is evaluated, and results are echoed at your cursor in overlays.

That is, with Repl aided development, you make software by starting with an already working program (i.e., the repl) then incrementlly “teach it” to be the program you want, by defining & redefining things. Until satisfied, loop: Type/modify code in your editor, press some keys to evaluate what you wrote/modified in the currently running system, and explore/test the resulting runtime.

RDD is programming emphasising fast & rich feedback from a running system. RDD is fantastic for quickly teaching/exploring an idea; as such, the running example of this article will be on servers —no prior experience with servers is assumed. The main examples will be in JavaScript, Python, and Java. (Since JavaScript is just Lisp in C clothing, we will not discuss Lisp.) Since Java is verbose, the power of REPLs really pays off when exploring a new idea. We see how many imports and setup-code simply disappear in the RDD approach, letting you focus on the core idea you're exploring/teaching. For comparison, a traditional self-contained Java server program is ~30 lines long whereas the focused RDD approach is ~4 lines long.

tdlr: This library provides the Emacs built-in C-x C-e behaviour for arbitrary languages, provided they have a primitive cli REPL.


💐 Making VSCode itself a Java REPL 🔁

Article image

VSCode evaluates Java code wherever it sees it, by sending it to a JShell in the background, and echos the results in a friendly way!

This is achieved with a meta-extension for VSCode that makes VSCode into a living, breathing, JS interpreter: It can execute arbitrary JS that alters VSCode on-the-fly. (Inspired by using Emacs and Lisp!)

The relevant docs show how to make a similar REPL for Python, Ruby, Clojure, Common Lisp, JavaScript, Typescript, Haskell, and of-course Java.


Typed Lisp, A Primer

Article image

Let's explore Lisp's fine-grained type hierarchy!

We begin with a shallow comparison to Haskell, a rapid tour of type theory, try in vain to defend dynamic approaches, give a somewhat humorous account of history, note that you've been bamboozled —type's have always been there—, then go into technical details of some Lisp types, and finally conclude by showing how macros permit typing.

Goals for this article:

  1. Multiple examples of type constructions in Lisp.
  2. Comparing Lisp type systems with modern languages, such as Haskell.
  3. Show how algebraic polymorphic types like Pair and Maybe can be defined in Lisp. Including heterogeneously typed lists!
  4. Convey a passion for an elegant language.
  5. Augment Lisp with functional Haskell-like type declarations ;-)

Unless suggested otherwise, the phrase “Lisp” refers to Common Lisp as supported by Emacs Lisp. As such, the resulting discussion is applicable to a number of Lisp dialects —I'm ignoring editing types such as buffers and keymaps, for now.



Thanks for reading everything! 😁 Bye! 👋

Creative Commons License
Life & Computing Science by Musa Al-hassy is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License