Skip to content

Instantly share code, notes, and snippets.

@vindarel
vindarel / discover-yafolding
Created November 17, 2014 11:45
Discover yafolding commands
;; Goal: have a magit-like menu to discover yafolding commands.
;; we use Mickey's version https://github.com/mickeynp/discover.el
;; We get a shorcut (M-f) which displays a list of actions associated with a hot key:
;; h will be for `yafolding-hide-element`, H to hide all, s to show the element, etc.
;; evil-mode users will need:
(evil-set-initial-state 'makey-key-mode 'emacs)
@vindarel
vindarel / get-lisp-dependencies.lisp
Created March 8, 2018 22:42 — forked from svetlyak40wt/get-lisp-dependencies.lisp
A helper to gather all lisp system's dependencies
(ql:quickload :fset)
(defun get-dependencies (system)
"Returns a set with all dependencies of a given system.
System should be loaded first."
(labels ((normalize (name)
(etypecase name
(string (string-downcase name))
(symbol (normalize (symbol-name name)))
(list
@vindarel
vindarel / ql-gitify.lisp
Created April 2, 2018 13:32 — forked from death/ql-gitify.lisp
Facilitate creating Git repositories for third-party Quicklisp projects.
(defpackage #:snippets/ql-gitify
(:documentation
"Facilitate creating Git repositories for third-party Quicklisp
projects.")
(:use #:cl)
(:import-from #:constantia #:out #:print-table)
(:import-from #:split-sequence #:split-sequence)
(:import-from #:alexandria #:starts-with-subseq #:hash-table-plist)
(:import-from #:ql #:qmerge)
(:export
@vindarel
vindarel / fukamachi-reader-macros-asdf.md
Last active August 23, 2018 20:47
8arrow-reader-macros-asdf

From E. Fukamachi's blog: http://blog.8arrow.org/entry/2018/06/24/214706

Enable reader macros throughout the project

Recently the landing page of our new service "Pocket Change Pay" has been released.

https://pay.pocket-change.jp/

Pocketpay is a platform that can make original electronic money . There is Pokethe like the mechanism that can also exchange money in the platform.

Keybase proof

I hereby claim:

  • I am vindarel on github.
  • I am vindarel (https://keybase.io/vindarel) on keybase.
  • I have a public key ASDpKpR9c87ijqWD_TFNYyqYo6uB33rJQmesBpa1j4Vk9wo

To claim this, I am signing this object:

@vindarel
vindarel / OCaml sucks.html
Last active February 12, 2020 13:18
OCaml sucks (and some comparison to Lisp)
<body>
<html>
<a href="http://www.podval.org/~sds/ocaml-sucks.html"> original url</a>
<a href="https://web.archive.org/web/20080203114732/http://www.podval.org/~sds/ocaml-sucks.html"> Wayback machine</a>
<a href="https://www.reddit.com/r/lisp/comments/5wk7e0/ocaml_sucks_and_some_comparison_to_lisp/"> /r/lisp comments</a>
<a href="https://www.reddit.com/r/programming/comments/cy0wh/ocaml_sucks_still_relevant/"> Is this article (still) relevant?</a>
@vindarel
vindarel / ccl-cocoa.md
Created April 23, 2021 09:19
How to build native Cocoa GUIs with Common Lisp (Clozure)

Historically, Clozure CL Objective-C bridge has been the best tool for this. On macOS CCL comes with a set of interfaces to Cocoa and some other OS frameworks that allow one to write native Cocoa applications in Common Lisp, with all the attendant advantages that provides. The Objective-C bridge is even pretty good at catching ObjC errors and turning them into Lisp errors, so one can have an iterative REPL-based development cycle for a macOS GUI application. Furthermore, the ObjC bridge can take Lisp representations of ObjC objects in a saved image and revive those objects--CCL provides tools to use his feature to build deployable GUI applications.

The problem is that the Objective-C bridge and the associated Cocoa interfaces have bit-rotted and no longer work portably on recent versions of macOS. A Lisp image saved using an older version of CCL used to reliably work on newer macOS versions. But now the images only seem to work reliably on the exact same macOS version, and often break even on minor revisions

@vindarel
vindarel / Example Common Lisp web applications.md
Created August 24, 2021 11:27
Example Common Lisp web applications
  • screenshotbot-oss - a Screenshot Testing service. This code powers https://screenshotbot.io.
    • uses Bknr.datastore as the datastore. Heavy use of their markup library (JSX-like).
    • Closures as URLs (nibble, not yet a standalone library). "Essentially, it allows me to create "anonymous" HTTP endpoints that evaluate a lambda. We integrate it with markup to make it pleasant to write multi-page web forms and flows. e.g. Here's a flow that lets you delete an API key, but before deleting it it asks you for a confirmation."
    • user auth and sessions.

Smaller demos:

  • cl-trello-clone - a Trello clone demo app in Common Lisp. Built with HTMX and HyperScript. Caveman an
;; Possible Portacle elisp configuration.
;;
;; this is to be saved under <your Portacle directory>/config/user.el
;; Disable paredit-mode, automatically adding parenthesis and other pair delimiters.
(remove-hook 'slime-repl-mode-hook 'enable-paredit-mode) ; disable paredit-mode for the REPL
(remove-hook 'lisp-mode-hook 'enable-paredit-mode) ; disable paredit-mode for lisp files
@vindarel
vindarel / Elixir VS Common Lisp.md
Last active March 30, 2022 13:36
Elixir VS Common Lisp - preliminary remarks

I am still only lurking into Elixir. My friends love it. I want to evaluate the developer experience and compare it with Common Lisp.

Alchemist mode for Emacs doesn't seem to have much of the interactive capabilities of Slime (and that would be understandable, given it's the most one can do).

often alchemist has to boot an Erlang VM to evaluate a single expression. Running tests boots a VM, looking up a function’s source doc boots a VM, each prefix autocompletion boots a VM. This is slow, and if you want the VM to load the code you’re actively developing you better not have any compile-time errors.

http://jtmoulia.pocketknife.io/blog/2015/03/11/elixir-and-distel/

We will want to try Distel, even if it doesn't look much maintained (at all).