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 / debugging common lisp - slime interactivity.md
Last active December 23, 2023 08:55
Awesome example on Common Lisp's interactive debugger (Slime) advanced interactivity

Awesome comment: https://www.reddit.com/r/programming/comments/65ct5j/a_pythonist_finds_a_new_home_at_clojure_land/dg9p8rk/

That's not an interpreter. A REPL is not the same as a Lisp interpreter. REPL means read eval print loop. EVAL can be implemented by a compiler or an interpreter. Common Lisp has both and mixed implementations with both compiler and interpreter.

A Lisp interpreter is executing Lisp code directly. Clojure does not have an Interpreter.

https://clojure.org/reference/evaluation

Clojure has no interpreter.
@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.

@vindarel
vindarel / common-lisp-VS-clojure.md
Last active April 17, 2024 22:01
Notes on Common Lisp VS Clojure

Testimonies

CL's compiler

The thing in CL I miss most doing Clojure as my day job? CL's compiler. I like having a compiler tell me at compile time about the mistakes I've made. Bogus arguments. Unreachable code because of unhandled exceptions, and so on. CL saves me round after round of bugs that in clojure aren't found until you run the code. If you test well, it's found when testing, if you don't it's found in production. "Clojure compiler" almost demands air quotes.

CL's optional but oh-so-useful model of type declarations is also infinitely more useful (to me) than Clojure's use of "spec", and instrumentation that happens only at test time because of the cost. Depending on the OPTIMIZE declarations, other type defs are a floor wax and dessert topping. Want checks for argument types? Lower optimizations. Want most efficient machine code? High optimizations.

/u/Decweb, March 2023 https://www.reddit.com/r/lisp/comments/11ttnxk/the_rise_fall_of_lisp_too_good_for_the_rest_of/jczpysp/

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 / Common Lisp VS Racket - testimonies.md
Last active April 20, 2024 03:18
Common Lisp VS Racket. Feedback from (common) lispers.

Developer experience, libraries, performance… (2021/11)

I'll preface this with three things. 1. I prefer schemes over Common Lisps, and I prefer Racket of the Schemes. 2. There is more to it than the points I raise here. 3. I assume you have no previous experience with Lisp, and don't have a preference for Schemes over Common Lisp. With all that out of the way... I would say Common Lisp/SBCL. Let me explain

  1. SBCL Is by far the most common of the CL implementations in 2021. It will be the easiest to find help for, easiest to find videos about, and many major open source CL projects are written using SBCL
  2. Download a binary directly from the website http://www.sbcl.org/platform-table.html (even for M1 macs) to get up and running (easy to get started)
  3. Great video for setting up Emacs + Slime + Quick Lisp https://www.youtube.com/watch?v=VnWVu8VVDbI

Now as to why Common Lisp over Scheme

@vindarel
vindarel / python-pip-fails.md
Last active June 30, 2022 19:51
Python and pip fails

pip can break anytime, even dependencies of your dependencies can break if they were not pinned correctly (by their maintainers, not you).

Upgraded to pip 20? Too bad!

cannot import name SourceDistribution

You are now unable to install anythnig, nor to downgrade or upgrade pip itself (to 20.0.1 or 19).