Skip to content

Instantly share code, notes, and snippets.

reborg reborg

Block or report user

Report or block reborg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@reborg
reborg / clojure-survey-2019-highlights.md
Last active Feb 4, 2019
A selection of the most insightful (my opinion) comments to the 2019 Clojure survey
View clojure-survey-2019-highlights.md

1/8/2019 11:30 AM Clojure was my language of choice for quite a long time, but all the recent developments in the community[1] and lack of clear publicly available vision of the language's future alienates me greatly and makes me feel as an unwanted member of the community. Because of this I'm not considering Clojure anymore for any new development and don't really want to help growing the community by releasing new libraries/supporting existing ones, mentoring new Clojure engineers, speaking at meetups, or just simply recommending Clojure to people I know :( [1] Drift to being dogmatic and hostlie to any alternative thoughts community (or better say cult?), which started long time ago, reached unbearable level last year and I'm not interested in participating in any community even resembling a totalitarian one, even if the language itself is perfect (which Clojure is not). Disclaimer: my feelings are obviously mine alone and I don't claim it's the universal truth and "Clojure is dead", it's just my perso

@reborg
reborg / conference-radar.md
Last active Jan 28, 2019
Conference Radar
View conference-radar.md
@reborg
reborg / deps.edn
Last active Aug 1, 2018
core.async master/worker pattern with throttling timeout
View deps.edn
;; Install Clojure deps and try with:
;; clojure -Sdeps
;; '{:deps {user {:git/url "https://gist.github.com/reborg/ba05335edb09d50e1bd9f0fc5d6593f1"
;; :sha "435181444970c1fa2091283285830c63076fda4b"}}}' -e '(process [1 2 3])'
{:paths ["."]
:deps {org.clojure/core.async {:mvn/version "0.4.474"}}}
@reborg
reborg / astar.clj
Last active Aug 17, 2018
Clojure implementation of the A* path finding algorithm
View astar.clj
;; This is the Wikipedia entry example encoded graph.
(def graph {:orig [{:a 1.5 :d 2} 0]
:a [{:orig 1.5 :b 2} 4]
:b [{:a 2 :c 3} 2]
:c [{:b 3 :dest 4} 4]
:dest [{:c 4 :e 2} 0]
:e [{:dest 2 :d 3} 2]
:d [{:orig 2 :e 3} 4.5]})
(defn a* [graph orig dest]
View clojure-survey-2018-highlights.md

State of Clojure Survey 2018 - Open comment question

This is a selection of the most articulated critique found in the open comments section Q25 at the bottom of the survey. Recurring themes are:

  1. Elitism, ivory tower, "not smart enough to get it" attitude of frequent speaker or early adopters.
  2. Poor basic documentation, error messages, beginner friendly resources.
  3. Fear of contribution (with reasons like a. community-built tools open to attack and replacement by core team b. hostile contribution environment c. closed development process)
  • The community has to grow to create more opportunities. Many organizations don't want to even consider using it because they fear not being able to find Clojure developers. Unless you have a mentor or are extremely motivated, Clojure scares away most imperative developers. My suggestions is to team up with a university and get a Clojure course on Coursera or a similar platform. This is the only way I got in
@reborg
reborg / runningdiff.clj
Last active Feb 7, 2018
Different ways of producing the same running diff with lazy-seqs, core.async or transducers.
View runningdiff.clj
;; different ways of producing the same running diff with lazy-seqs, core.async or transducers.
;; the running diff injects a :diff key to each of the maps in the list. The :diff is the difference
;; between the current :value and the :value of the previously seen entry with the same :id.
;; it can be easily changed to process id-related items in a different way.
(def entries [{:id 1 :value 88}
{:id 2 :value 99}
{:id 1 :value 98}
{:id 3 :value 5}
{:id 2 :value 100}
@reborg
reborg / split-by.clj
Created Dec 15, 2017
split-by transducer
View split-by.clj
; Stats by burst with the split-by transducer.
; The input for this example is a (potentially large) collection of events.
; A simplified list of tab separated events would appear like the following:
; 2017-05-04T13:08:57Z\tmsg1
; 2017-05-04T13:10:52Z\tmsg2
; 2017-05-04T13:13:33Z\tmsg3
; 2017-05-04T23:14:10Z\tmsg4
; 2017-05-04T23:16:23Z\tmsg5
@reborg
reborg / count-enterprise-ed.clj
Created Nov 16, 2017
Investigations on fast counting
View count-enterprise-ed.clj
(require '[criterium.core :refer [quick-bench]])
(require '[clojure.core.reducers :as r])
(import 'java.util.concurrent.atomic.AtomicInteger)
(set! *warn-on-reflection* true)
(def data
(into []
(map hash-map
(repeat :samplevalue)
(concat
@reborg
reborg / frequencies-rf-xform.clj
Last active Nov 19, 2017
Explorations around frequencies as a reducing function for transducers, sequential or parallel.
View frequencies-rf-xform.clj
(require '[criterium.core :refer [quick-bench]])
(require '[clojure.core.reducers :as r])
(import '[java.util HashMap Collections Map]
'java.util.concurrent.atomic.AtomicInteger
'java.util.concurrent.ConcurrentHashMap)
(set! *warn-on-reflection* true)
;; 500k maps with the same key. value are overlapping 1/5 of the time.
(def data
(into []
View vars.clj
;; (defn full-name ...) is equivalent to:
;; (def full-name (fn []...)) which defines a Var
;; object called full-name pointing at a compiled function
;; returning the static string "Oliv"
(defn full-name [] "Oliv")
;; greetings is a function taking two args.
;; it returns a function of no argument
;; invoking the second argument (f) with no arguments
;; and combining a string with it.
You can’t perform that action at this time.