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
@svetlyak40wt
svetlyak40wt / gh-enable-all-inactivity-disabled-workflows.sh
Last active February 11, 2025 14:04 — forked from jemc/gh-enable-all-inactivity-disabled-workflows.fish
Use GitHub CLI to enable all workflows that were disabled due to repository inactivity - either for all repos in a given org that you manage, or (by default) your personal repos.
function gh-enable-all-inactivity-disabled-workflows-for-org () {
org=$1
gh repo list --no-archived --limit 1000 $org | cut -f 1 | xargs -I REPO sh -c 'gh workflow list --all -R REPO | grep disabled_inactivity | cut -f 3 | xargs -I WORKFLOW sh -xc "gh workflow enable WORKFLOW -R REPO"'
}
function gh-enable-all-inactivity-disabled-workflows () {
# for user
gh-enable-all-inactivity-disabled-workflows-for-org
# for his organizations
@svetlyak40wt
svetlyak40wt / baseline.txt
Created January 29, 2025 20:22
Sento benchmark results
SENTO/BENCH> (run-all)
Results for benchmark: (:DISPATCHER :PINNED :WITH-REPLY-P NIL :ASYNC-ASK-P NIL
:NUM-SHARED-WORKERS 8 :QUEUE-SIZE NIL
:WAIT-IF-QUEUE-LARGER-THAN 10000 :TIME-OUT NIL)
┌─────────────────────┬──────────────┬────────────┬─────────────┬─────────────┬─────────────┬────────────┐
│ - │ TOTAL │ MINIMUM │ MAXIMUM │ MEDIAN │ AVERAGE │ DEVIATION │
├─────────────────────┼──────────────┼────────────┼─────────────┼─────────────┼─────────────┼────────────┤
│ MESSAGES-PER-SECOND │ 61679256.0 │ 880182.8 │ 1087739.3 │ 1036553.25 │ 1027987.6 │ 47512.734 │
├─────────────────────┼──────────────┼────────────┼─────────────┼─────────────┼─────────────┼────────────┤
@svetlyak40wt
svetlyak40wt / reblocks-simple-form.lisp
Created July 7, 2024 08:48
Reblocks Simple Form Demo
(uiop:define-package #:reblocks-examples/simple-form
(:use #:cl)
(:import-from #:reblocks/app
#:defapp)
(:import-from #:reblocks/server)
(:import-from #:reblocks/html
#:with-html)
(:import-from #:reblocks/widget
#:update
#:defwidget)
@svetlyak40wt
svetlyak40wt / README.md
Created December 13, 2023 19:13
A fix for quicklisp-client making it work well with package-inferred-asdf systems

This patch fixes two problems:

  • Is that quicklisp is unable to load primary system's dependencies, which are subsystems of other primary system not mentioned in the quicklisp distribution's metadata. Issue quicklisp/quicklisp-client#139
  • When asdf system is known to ASDF, quicklisp client ignores it's dependencies and again, if the system depends on a subsystem of other primary system, ASDF can't load it and quicklisp client too.

How to reproduce the problem

For example, I have reblocks-ui-docs ASDF system. One of it's subsystems depends on reblocks/doc/example subsystem of other package-inferred system available from Quicklisp.

Checkout this repository somewhere:

curl -v http://dist.ultralisp.org
* Trying 172.67.169.20...
* TCP_NODELAY set
* Connected to dist.ultralisp.org (172.67.169.20) port 80 (#0)
> GET / HTTP/1.1
> Host: dist.ultralisp.org
> User-Agent: curl/7.64.1
> Accept: */*
>
< HTTP/1.1 200 OK
@svetlyak40wt
svetlyak40wt / replies.md
Last active July 16, 2023 22:25
Some advices about Common Lisp in reply to the https://www.youtube.com/watch?v=jLkqYVTqM38&lc=UgxECAkwcplTdFWvwit4AaABAg comment

...saw all your videos until this day. Thanks so much, cleared up alot of questions! Best tutorials out there for getting a overview on workflows! Still struggling with a couple of things

  1. QLOT vs (push "./" asdf:central-registry) workflow often you (push "./" asdf:central-registry) in the repl. Here you use qlot and it does that automatically as I understand Then you start $qlot exec ros emacs

So my questions are

  • what is the right flow or do I need both often ?
(defun save-me (core-file)
"This function closes all threads and dumps image of SBCL into the core file."
(flet ((saver ()
(loop for thread in (sb-thread:list-all-threads)
unless (eql thread
sb-thread:*current-thread*)
do (sb-thread:terminate-thread thread)
finally (save-lisp-and-die core-file))))
(loop for thread in (sb-thread:list-all-threads)
when (string-equal (sb-thread:thread-name thread)
@svetlyak40wt
svetlyak40wt / README.md
Created June 16, 2023 15:19
A small test checking Tungsten Postgres Driver in fetching random records from WebframeworkBenchmars' database

Database hello_world contains table world with 10000 records and two columns id, randomnumber. Here we are fetching 5 records in a loop. Using Tungsten 100 loops took about 22 on my VPS, whereas similar code using CL-POSTGRES runs 100000 loops in 40 second on the same machine.

CL-POSTGRES code uses get-a-random-record defined like this:

(defun get-a-random-record (id)
  (declare (fixnum id))
@svetlyak40wt
svetlyak40wt / packages-finder.lisp
Created April 12, 2023 17:42
This code collects all packages, created by ASDF-SYSTEM and it's dependencies
;; This code collects all packages, created by ASDF-SYSTEM and it's dependencies
(let* ((asdf-system :cl-telegram-bot)
(packages-before (list-all-packages))
(packages-after (progn (ql:quickload asdf-system)
(list-all-packages))))
(sort (set-difference packages-after packages-before
:key #'package-name
:test #'string=)
#'string<
:key #'package-name))
(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)))))))