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
CREATE INDEX idxprcgiven ON practitioner USING gin ((resource#>>'{name,0,given}') gin_trgm_ops); | |
usnpi=# EXPLAIN ANALYZE SELECT id, resource FROM practitioner WHERE (deleted = FALSE AND resource#>>'{name,0,family}' ilike 'Fox%') ORDER BY resource#>>'{name,0,family}'; | |
QUERY PLAN | |
--------------------------------------------------------------------------------------------------------------------------------- | |
Sort (cost=426.35..427.32 rows=386 width=949) (actual time=533.607..534.258 rows=2848 loops=1) | |
Sort Key: ((resource #>> '{name,0,family}'::text[])) | |
Sort Method: quicksort Memory: 3793kB | |
-> Bitmap Heap Scan on practitioner (cost=16.00..409.77 rows=386 width=949) (actual time=3.016..529.767 rows=2848 loops=1) | |
Recheck Cond: ((resource #>> '{name,0,family}'::text[]) ~~* 'Fox%'::text) | |
Rows Removed by Index Recheck: 86 |
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
(defun parse-type (row) | |
(let* ((img (cl-ppcre:scan-to-strings "<img[^>]*>" row)) | |
(alt (cl-ppcre:scan-to-strings "alt=.*" img))) | |
(multiple-value-bind (_ v) (cl-ppcre:scan-to-strings "\"(.*)\"" alt) | |
(declare (ignore _)) | |
(when v | |
(aref v 0))))) | |
(defun parse-url (row) | |
(multiple-value-bind (_ v) (cl-ppcre:scan-to-strings "href=\"([^\"]*)\"" row) |
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
# git clone https://gitlab.com/embeddable-common-lisp/ecl.git | |
# ecl for android x86_64 | |
# build host ecl | |
./configure CFLAGS="-g -O2" LDFLAGS="-g -O2" --prefix=`pwd`/ecl-android-host --disable-c99complex && \ | |
make -j9 && \ | |
make install && \ | |
rm -r build && \ | |
export ECL_TO_RUN=`pwd`/ecl-android-host/bin/ecl |
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
(defparameter *screen-width* 640) | |
(defparameter *screen-height* 480) | |
(defun run-game () | |
(sdl2:with-init (:video) | |
(sdl2:with-window (window :title "SDL2 Window" | |
:w *screen-width* | |
:h *screen-height* | |
:flags '(:shown :opengl)) | |
(let ((screen-surface (sdl2:get-window-surface window))) |
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
(fn-1 [{:id 1 | |
:name "Foo" | |
:children [{:id 2 | |
:name "Bar" | |
:children [{:id 3 | |
:name "Baz"} | |
{:id 4 | |
:name "XXX"}]} | |
{:id 3 | |
:name "Baz"}]} |
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
Идея игры-головолоки: "Хронолабиринт" | |
Цель: Пройти через лабиринт, используя способность манипулирования временем. | |
Сюжет: Игрок попадает в древний храм, где каждая комната представляет собой лабиринт. Однако эти лабиринты имеют особенность: они изменяются в зависимости от времени суток. | |
Основные элементы игры: | |
Механизм времени: В игре присутствуют день и ночь. Игрок может быстро перематывать время вперед или назад для изменения состояния лабиринта. |
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
I. | |
1. https://gigamonkeys.com/book/ - Practical Common Lisp - книга об основах программирования на CL и метапрограммировании. | |
2. https://lispcookbook.github.io/cl-cookbook/ - сборник рецептов в разных областях CL. | |
3. https://www.lispworks.com/documentation/HyperSpec/Front/Contents.htm - Common Lisp Hyperspec - список функций и макросов с их описание и примерами использования, которые есть в стандарте. | |
4. https://swizard.info/articles/solitaire/article.html - пример разработки DSL на Common Lisp. | |
II. | |
1. `hunchentoot` - веб-сервер. | |
2. `parenscript` - транспайлер с подмножества (весьма ограниченного) CL в javascript. | |
3. `postmodern` - работа с Postgresql. |