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 April 20, 2025 16:44
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)))
@jpgreth
jpgreth / two-part-mold-generator.scad
Created June 11, 2018 08:10
Two-part mold generating script for OpenSCAD
/*************************************************
Parametric two-part mold generator
Author: Jason Webb
Website: http://cs.unk.edu/~webb
Last update: 10/1/2012
A parametric two-part mold generator that constructs two-
part molds with registration marks based on STL files.
USAGE:
@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 May 14, 2025 09:38
Some color pallets with Apple Color List (.clr) format