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 / test-macro-optimization.lisp
Created May 8, 2025 10:41
Testing if it will be slower to make a macro calling a separate function or SBCL will optimize
(uiop:define-package #:test-macro-optimization
(:use #:cl)
(:documentation "Checking if lambda function will be optimized away depending on optimization settings."))
(in-package #:test-macro-optimization)
;; (declaim (optimize (debug 0) (safety 0) (speed 3)))
;; (declaim (optimize (debug 3) (safety 1) (speed 1)))
;; (declaim (optimize (debug 3) (safety 3) (speed 1)))
@svetlyak40wt
svetlyak40wt / deep-seek-response.md
Last active March 14, 2025 11:51
ВСхничСскиС срСдства для AI-callΡ†Π΅Π½Ρ‚Ρ€Π°

Для Ρ€Π΅Π°Π»ΠΈΠ·Π°Ρ†ΠΈΠΈ автоматичСского ΠΊΠΎΠ»Π»-Ρ†Π΅Π½Ρ‚Ρ€Π° Π½Π° Π±Π°Π·Π΅ искусствСнного ΠΈΠ½Ρ‚Π΅Π»Π»Π΅ΠΊΡ‚Π° потрСбуСтся комплСкс тСхничСских срСдств ΠΈ инструмСнтов. Π’ΠΎΡ‚ ΠΊΠ»ΡŽΡ‡Π΅Π²Ρ‹Π΅ ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ‚Ρ‹:


1. Π˜Π½Ρ„Ρ€Π°ΡΡ‚Ρ€ΡƒΠΊΡ‚ΡƒΡ€Π° связи

  • VoIP-ΠΏΠ»Π°Ρ‚Ρ„ΠΎΡ€ΠΌΠ°: ΠžΠ±Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° голосовых Π²Ρ‹Π·ΠΎΠ²ΠΎΠ² (входящих/исходящих).
    ΠŸΡ€ΠΈΠΌΠ΅Ρ€Ρ‹: Twilio, Amazon Connect, Asterisk, Plivo.
  • SIP-сСрвСры: Для ΠΌΠ°Ρ€ΡˆΡ€ΡƒΡ‚ΠΈΠ·Π°Ρ†ΠΈΠΈ Π·Π²ΠΎΠ½ΠΊΠΎΠ² (Π½Π°ΠΏΡ€ΠΈΠΌΠ΅Ρ€, Kamailio, FreeSWITCH).
  • ΠžΠ±Π»Π°Ρ‡Π½Ρ‹Π΅ сСрвисы: ΠœΠ°ΡΡˆΡ‚Π°Π±ΠΈΡ€ΡƒΠ΅ΠΌΠΎΡΡ‚ΡŒ ΠΈ ΠΎΡ‚ΠΊΠ°Π·ΠΎΡƒΡΡ‚ΠΎΠΉΡ‡ΠΈΠ²ΠΎΡΡ‚ΡŒ (AWS, Google Cloud, Azure).
@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))