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
(defpackage #:petalisp.lite-backend | |
(:use #:common-lisp | |
#:petalisp.core) | |
(:import-from #:petalisp.native-backend | |
#:denv | |
#:make-denv | |
#:cenv | |
#:make-cenv | |
#:allocations | |
#:schedule |
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
(define-command-global describe-all () | |
"Prompt for a symbol in any Nyxt-accessible package and describe it in the best way Nyxt can." | |
(let* ((all-symbols | |
(delete-duplicates | |
(apply #'append (loop for package in (remove (find-package "KEYWORD") (list-all-packages)) | |
collect (loop for sym being the external-symbols in package | |
collect sym))))) | |
;; All copied from /nyxt/source/help.lisp with `describe-any' as a reference. | |
(classes (remove-if (lambda (sym) | |
(not (and (find-class sym nil) |
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 |