Skip to content

Instantly share code, notes, and snippets.

sb-simd: Multiplying a 4x4 matrix with a 4-length vector (AVX)

(require 'sb-simd)
(defpackage :simd-pack-user
  (:use :sb-simd-avx :cl))
(in-package :simd-pack-user)

I'm assuming you are referring to the following operation:

@Niquarl
Niquarl / gist:5f8bd756a51b55ccc1785444e64c416e
Created September 30, 2018 23:10
Radio France | Adresses des flux Live mp3 Octobre 2016
Radio France | Adresses des flux Live mp3 Octobre 2016
Ces adresses sont fournies pour des usages privés uniquement. Pour tout autre usage, merci de contacter distribution@radiofrance.com.
Sont listés ici les flux de qualité "FM". En as de problème de coupures récurrentes dûes à une bande passante disponible trop faible, reportez-vous à la liste des flux «bas débit» en fin de document.
France Inter
http://direct.franceinter.fr/live/franceinter-midfi.mp3
franceinfo
http://direct.franceinfo.fr/live/franceinfo-midfi.mp3
#!/usr/bin/env python
import math
import sys
from moviepy.editor import AudioClip, VideoFileClip, concatenate_videoclips
# Get average RGB of part of a frame. Frame is H * W * 3 (rgb)
# Assumes x1 < x2, y1 < y2
(defun print-dependency-graph (system-name &key (level 0))
(loop repeat level
do (format t " "))
(format t "~A~%" system-name)
(typecase system-name
((or string symbol)
(let ((system (asdf/system:find-system system-name)))
(loop for dep in (asdf/system:system-depends-on system)
do (print-dependency-graph dep :level (1+ level)))))))
@WetHat
WetHat / CL-Queues.ipynb
Last active February 23, 2023 06:21
Implementing the QUEUE abstract data type while exploring Common Lisp generic functions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bergantine
bergantine / gist:1171682
Last active July 11, 2023 01:42
Python Image Encoding in Data URI Scheme Base 64. #python #base64
data_uri = open("sample.png", "rb").read().encode("base64").replace("\n", "")
# HTML Image Element
img_tag = '<img alt="" src="data:image/png;base64,{0}">'.format(data_uri)
print img_tag
# CSS Background Image
css = 'background-image: url(data:image/png;base64,{0});'.format(data_uri)
print css
@WetHat
WetHat / CL-PrettyPrintTrees.ipynb
Last active September 29, 2023 00:53
Pretty Print Tree Data Structures in Common Lisp
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@digikar99
digikar99 / lisp-resources-digikar-2020.md
Last active November 9, 2023 04:35
If programming is more than just a means of getting things done for you, then Common Lisp is for you!
@vindarel
vindarel / rlwrap-for-sbcl.md
Last active November 13, 2023 15:07
RLWRAP settings for SBCL

The ReadLine Wrapper (rlwrap) utility is actually a must have when you want to run SBCL from the command line, because by default, SBCL in the terminal:

  • doesn't offer symbol completion
  • doesn't offer a history of commands
  • doesn't even understand the arrow keys, left and right (they input [[[A instead), nor any default readline keybindings, the ones we find in bash et all: C-e, C-a, C-u, C-k, Alt-b, Alt-f etc.

We can actually fix this with rlwrap options.

@digikar99
digikar99 / lispy-numerical-computing-library-features.org
Last active December 12, 2023 01:37
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