Skip to content

Instantly share code, notes, and snippets.

View achikin's full-sized avatar

Anton Chikin achikin

  • Russia, Voronezh
View GitHub Profile
@shilder
shilder / repl.pitfalls.clj
Created August 15, 2018 15:49
clojure fn caching and deftype issues
(ns repl.pitfalls
(:require [clojure.core.async :as async])
(:import (java.util.concurrent DelayQueue Delayed TimeUnit)))
; some interesting repl behaviour
; this are not bugs, but just some counterintuitive behaviour
; all of the described issues are caused by some state (thread/queue/defonce)
; fn-caching
(defn foo [a]
@reborg
reborg / rich-already-answered-that.md
Last active May 5, 2024 04:45
A curated collection of answers that Rich gave throughout the history of Clojure

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.

How to use:

  • The link in the table of content jumps at the copy of the answer on this page.
  • The link on the answer itself points back at the original post.

Table of Content

@pesterhazy
pesterhazy / error_boundary.cljs
Last active October 12, 2021 00:19
Reagent error boundary for recovering from exceptions
(ns error-boundary.error-boundary
(:require [reagent.core :as r]
[reagent.impl.component :as comp]
[reagent.impl.util :as util]
[goog.object :as gobj]))
;; (c) 2016 Paulus Esterhazy
;;
;; License: MIT
@ivar
ivar / spacemacs global search and replace.md
Last active August 1, 2022 00:04
spacemacs - global search and replace

There's a couple of ways, one way is

  • Get search results
    • Do SPC / and type in your search string
    • or SPC x S and search string - where x is your scope indicator (p for project, d for directory, etc..)
  • Once you have the occurences you want, hit C-c C-e inside the helm buffer to put all your match occurences and puts them into a special buffer called the edit buffer or something like that
  • in that buffer you can use any commands you'd normally use on a buffer
  • the C-c C-c to commit your changes.