Skip to content

Instantly share code, notes, and snippets.

View ccidral's full-sized avatar

Célio Cidral Jr ccidral

View GitHub Profile
@ccidral
ccidral / dfs.clj
Last active January 5, 2023 01:53
DFS in Clojure: persistent vs transient
(ns dfs
(:require [clojure.java.io :as io]
[clojure.string :as str]))
;; the dfs fns below are adapted from https://gist.github.com/xfthhxk/3810ecfaae8f066e2162ab02108ccadb
(defn load-graph [filepath]
(with-open [rdr (io/reader filepath)]
(let [[_vertices _edges & lines] (line-seq rdr)]
(reduce (fn [g line]
@ccidral
ccidral / richhickey.md
Created August 5, 2017 14:13 — forked from prakhar1989/richhickey.md
richhickey.md

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

@ccidral
ccidral / basic-mocha-phantom-test.coffee
Last active December 14, 2015 04:09
Basic test with mocha + phantomjs
phantom = require 'phantom'
assert = require 'assert'
{WebServer} = require '../webserver'
class EmptySystem
listSomething: -> [1, 2, 3]
class Browser
go: (uri, callback) ->
phantom.create (browser) =>