This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(in-package :prompter) | |
(defun score-suggestion-string (input suggestion-string) | |
(let ((i 0) | |
(score 0.0)) | |
(declare (optimize (speed 3) (safety 0)) | |
(type single-float score) (type fixnum i) | |
(type (simple-array character) input suggestion-string)) | |
(loop for c across input do | |
(let ((next (position c suggestion-string :start i :test 'eq))) | |
(if next |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Copyright (c) 2020 Mark Polyakov | |
;; Released under the WTFPL (Do What The Fuck You Want To Public License) | |
(defvar *html-void-tags* '(:area :base :br :col :embed :hr :img :input :link | |
:meta :param :source :track :wbr) | |
"String designators for self-closing/void tags. | |
https://html.spec.whatwg.org/multipage/syntax.html#void-elements") | |
(defvar *html-escapes* | |
'(#\> ">" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Simple sound playback using ALSA API and libasound. | |
* | |
* Compile: | |
* $ cc -o play sound_playback.c -lasound | |
* | |
* Usage: | |
* $ ./play <sample_rate> <channels> <seconds> < <file> | |
* | |
* Examples: |