Skip to content

Instantly share code, notes, and snippets.

View JMC-design's full-sized avatar

Johannes Martinez Calzada JMC-design

View GitHub Profile
@digikar99
digikar99 / lispy-numerical-computing-library-features.org
Last active August 19, 2024 02:35
A comparison and wish-list of features for a Common Lispy approach to a (better) Numpy

Features of a Common Lispy approach to (better) Numpy

Numpy is great, in fact it’s one of the things that pulls people to Python. But can it be better?

Common Lisp is great, in fact it’s one of the things that pulls people to Common Lisp. But can it be better? Indeed Python can’t be better than Common Lisp without it becoming another Lisp. The closest we have is Julia. And while it gets some things right, Julia lacks certain features that limit the goodness of a numerical computing library.

All combined, below I will highlight some of the features that I wish a numerical computing library or ecosystem had. I also want to request the readers for their own inputs about how things can be even better. The goal amidst this is solely to keep things numpy-like. I do not intend to - nor have the background to - make a DSL like April or Petalisp.

While I take some interest in performance and numerical computing, I have m

@death
death / history-class.lisp
Created March 9, 2021 17:28
history class
(defpackage #:snippets/history-class
(:use #:cl #:closer-mop)
(:shadowing-import-from
#:closer-mop
#:standard-generic-function
#:defgeneric
#:defmethod)
(:import-from
#:fset)
(:export
@chuckxD
chuckxD / __HEY.md
Last active August 24, 2024 03:48
ffz/bttv known API end-points quick list
(defun em-spacing-predicates (endp delimiter)
(not (or (and (eql ?\( delimiter)
(eql ?\@ (char-before (point))))
(and (eql ?\" delimiter)
(eql ?\p (char-before (point)))
(eql ?\# (char-before (1- (point))))))))
(setq paredit-space-for-delimiter-predicates '(em-spacing-predicates))
@WetHat
WetHat / CL-PrettyPrintTableData.ipynb
Last active August 1, 2024 16:36
Pretty Print Table Data in Common Lisp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@no-defun-allowed
no-defun-allowed / parse.lisp
Created January 4, 2019 08:04
lisp parsing lisp
(defun read-list (stream)
(if (char= (peek-char t stream) #\))
(progn
(read-char stream)
nil)
(cons (read-sexp stream)
(read-list stream))))
(defun read-atom (stream &optional (collected nil))
(let ((char (peek-char (null collected) stream nil :eof)))
@TeMPOraL
TeMPOraL / clx.lisp
Created September 11, 2017 18:30
Example of a X window that properly handles closing events from the WM.
(defpackage #:scratch/clx-test
(:use #:cl)
(:export #:run))
(in-package #:scratch/clx-test)
;;; A minimum test case for properly handling window close events from the window manager.
(defun delete-window-event-p (display type data)
(and (eq type :wm_protocols)
@wiseman
wiseman / bresenham-3d.lisp
Created August 8, 2017 09:15
3D Bresenham lines
;; Make multiple-value-bind a little more convenient.
(defmacro mv-let* ((&rest bdgs) &body body)
(if (null bdgs)
`(progn ,@body)
`(multiple-value-bind ,(butlast (car bdgs))
,@(last (car bdgs))
(mv-let* ,(cdr bdgs)
,@body))))
@chsh
chsh / Flat UI Colors.clr
Last active April 8, 2025 18:55
Some color pallets with Apple Color List (.clr) format
@burtonsamograd
burtonsamograd / save-lisp-tree-shake-and-die.lisp
Last active February 10, 2025 22:32
A quick and dirty tree shaker for SBCL, giving about a 40% reduction in dump size.
;; -*- mode: lisp -*-
;;
;; A quick and dirty tree shaker for SBCL. Basically, it destroys the
;; package system and does a gc before saving the lisp image. Gives
;; about a 40% reduction in image size on a basic hello world test.
;; Would like to hear how it works on larger projects.
;;
;; Original idea from: https://groups.google.com/d/msg/comp.lang.lisp/6zpZsWFFW18/WMy4PyA9B4kJ
;;
;; Burton Samograd