Skip to content

Instantly share code, notes, and snippets.

View andiogenes's full-sized avatar

Anton Zavyalov andiogenes

View GitHub Profile
;; Enable Company in selected major modes
(let ((hooks '(java-mode-hook)))
(dolist (hook hooks)
(add-hook hook (lambda ()
(company-mode 1)))))
;;; Rebind 'GOTO beginning/end of buffer' to "C-M-v"
(defun edge-of-buffer ()
(interactive)
(if (and current-prefix-arg (eq current-prefix-arg '-))
(beginning-of-buffer) (end-of-buffer)))
(global-set-key (kbd "C-M-v") 'edge-of-buffer)
;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Saving-Emacs-Sessions.html
(desktop-save-mode 1)
;;; Display a list of existing buffers in current window
(global-set-key (kbd "C-x C-b") 'buffer-menu)
;; List buffers in other window using "C-x 4-" prefix
(global-set-key (kbd "C-x 4 C-x C-b") 'list-buffers)
;;; Show directories first in Dired
(setq dired-listing-switches "-al --group-directories-first")
(defun graphviz-on-buffer ()
(interactive)
(shell-command-on-region (point-min) (point-max) "dot -Txlib"))
;;; Relative line numbers
(setq display-line-numbers-type 'relative)
(global-display-line-numbers-mode)
;; Move toward logical lines when prefix arg (numeric, negative) is presented
(defun next-logical-line-if-prefix (&optional arg try-vscroll)
(interactive "^p\np")
(let ((line-move-visual (if current-prefix-arg nil line-move-visual)))
(with-no-warnings
(next-line arg try-vscroll))))

Приближенные алгоритмы

Определения

  • Задача
    • список всех ее параметров
    • формулировка свойств, которым должен удовлетворять ответ (решение) задачи
  • Индивидуальная задача
    • Задача, параметрам которой присвоили конкретные значения

Static type checking for the Algorithmic Language Scheme

Authors:

  • Nikita Medvedev
  • Anton Zavyalov

Prerequirements

  • Schasm - Scheme to WebAssembly compiler
    • Software Development Tech course, 2021
@andiogenes
andiogenes / with-env.clj
Last active May 16, 2022 08:45
Poor man's direnv
#!/usr/bin/env bb
(require '[clojure.java.shell :refer [sh]]
'[clojure.java.io :as io]
'[clojure.edn :as edn])
(def usage-line
"Usage: with-env [arg*]
\rExtends environment with variables obtained from 'env.edn' file,