Skip to content

Instantly share code, notes, and snippets.

View svetlyak40wt's full-sized avatar
💭
Making Ultralisp.org

Alexander Artemenko svetlyak40wt

💭
Making Ultralisp.org
View GitHub Profile
;; Example of Lisp-2 behaviour of the Common Lisp
(flet ((plus (item)
(list item :flet)))
(let ((plus (lambda (item)
(list item
:lambda))))
(values
(mapcar plus
(list 1 2 3))
(mapcar #'plus
@svetlyak40wt
svetlyak40wt / ultralisp.local.el
Last active December 17, 2018 06:23
An Emacs config I use to make SLY's tramp contrib work with Ultralisp docker containers.
(require 'sly)
(defun sly-ultralisp-init ()
(defun sly-make-tramp-file-name (username remote-host lisp-filename)
"Old (with multi-hops) tramp compatability function"
(message "Makining tramp filename for %s %s and %s" username remote-host lisp-filename)
(tramp-make-tramp-file-name "docker"
username
nil
remote-host
names = ['bobuk', 'umputun', 'ksusha', 'gray']
scores = [100500, 42, 777, 41]
list(map(print, names, scores))
# так надо лямбда будет каждый раз последним аргументом,
# что наверняка неудобно в реализации
map(tuple, names, scores)
@svetlyak40wt
svetlyak40wt / test.md
Last active October 1, 2018 21:47
Markdown test

Text before:

  • This is a first line.

  • Second line is multiline.

  • And third contains few paragraphs.

    Second paragraph.

All the world's a stage, and all the men and women merely players: they have their exits and their entrances; and one man in his time plays many parts, his acts being seven ages.

@svetlyak40wt
svetlyak40wt / load-spinneret.log
Created September 20, 2018 17:20
Error during spinneret loading
Loading "spinneret".
Unhandled SIMPLE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
{1001E68083}>:
overwriting old FUN-INFO
#<SB-C::FUN-INFO
:ATTRIBUTES (FOLDABLE FLUSHABLE UNSAFELY-FLUSHABLE MOVABLE)
:TEMPLATES (#<SB-C::VOP-INFO :NAME NUMERIC-CHAR=
:ARG-TYPES ((:CONSTANT . CHARACTER)
(:OR #<PRIMITIVE-TYPE :NAME CHARACTER>))
:RESULT-TYPES ((:OR
@svetlyak40wt
svetlyak40wt / sample-ql-and-asdf-output.txt
Created September 6, 2018 20:16
sample-ql-and-asdf-output
CL-USER> (asdf:load-system :mito-email-auth/models :force t)
;Compiler warnings for "home:common-lisp;mito-email-auth;src;models.lisp.newest" :
; In MITO-EMAIL-AUTH/MODELS::AUTHENTICATE: Undefined function MITO-EMAIL-AUTH/MODELS::GET-USER-BY-EMAIL
; In MITO-EMAIL-AUTH/MODELS::SEND-CODE: Undefined function MITO-EMAIL-AUTH/MODELS::MAKE-URI
T
CL-USER> (ql:quickload :mito-email-auth/models)
To load "mito-email-auth/models":
Load 1 ASDF system:
mito-email-auth/models
; Loading "mito-email-auth/models"
@svetlyak40wt
svetlyak40wt / cl-interpol-reader-error.txt
Created April 1, 2018 16:15
An error happening when I hit C-c C-c in emacs, to compile a function containing #?"some ${var} value"
Reader error on #<BASIC-FILE-CHARACTER-INPUT-STREAM ("/private/var/tmp/tmp.7.yw6QC7"/9 UTF-8) #x302006D9B0FD>, near position 124, within "pi-call #?\"/v2/issue":
Undefined character #\? in a #\# dispatch macro.
[Condition of type CCL::SIMPLE-READER-ERROR]
Restarts:
0: [RETRY-COMPILE-FILE] Retry compiling #P"/var/tmp/tmp.7.yw6QC7"
1: [SKIP-COMPILE-FILE] Skip compiling and loading #P"/var/tmp/tmp.7.yw6QC7"
2: [ABORT] Abort compilation.
3: [*ABORT] Return to SLY's top level.
4: [ABORT-BREAK] Reset this thread
@svetlyak40wt
svetlyak40wt / get-lisp-dependencies.lisp
Last active April 30, 2024 01:08
A helper to gather all lisp system's dependencies
(ql:quickload :fset)
(defun get-dependencies (system)
"Returns a set with all dependencies of a given system.
System should be loaded first."
(labels ((normalize (name)
(etypecase name
(string (string-downcase name))
(symbol (normalize (symbol-name name)))
(list
@svetlyak40wt
svetlyak40wt / pretty_num.py
Created February 12, 2018 11:28
Pretty numbificator
def is_pretty_num(n):
if len(n) > 4:
i = n[0]
for l in n[1:]:
if l != i:
i = 0
break
if i != 0:
return 1
i = int(n[0])
@svetlyak40wt
svetlyak40wt / start-next.sh
Last active January 13, 2018 14:38
Starting nExt browser
# install Roswell: https://github.com/roswell/roswell
# and Qlot: https://github.com/fukamachi/qlot
# they are "must have" tools if you are Common Lisp professional :)
git clone git@github.com:nEXT-Browser/nEXT.git
cd nEXT
echo 'ql :all :latest' > qlfile
qlot install
ros use ccl-bin