Skip to content

Instantly share code, notes, and snippets.

Daniel Barlow telent

Block or report user

Report or block telent

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
@levand
levand / data-modeling.md
Last active Jul 18, 2019
Advice about data modeling in Clojure
View data-modeling.md

Since it has come up a few times, I thought I’d write up some of the basic ideas around domain modeling in Clojure, and how they relate to keyword names and Specs. Firmly grasping these concepts will help us all write code that is simpler, cleaner, and easier to understand.

Clojure is a data-oriented language: we’re all familiar with maps, vectors, sets, keywords, etc. However, while data is good, not all data is equally good. It’s still possible to write “bad” data in Clojure.

“Good” data is well defined and easy to read; there is never any ambiguity about what a given data structure represents. Messy data has inconsistent structure, and overloaded keys that can mean different things in different contexts. Good data represents domain entities and a logical model; bad data represents whatever was convenient for the programmer at a given moment. Good data stands on its own, and can be reasoned about without any other knowledge of the codebase; bad data is deeply and tightly coupled to specific generating and

View hydra.md

Just some notes from my attempt at setting up Hydra.

Setting up on NixOS

No need for manual database creation and all that; just ensure that your PostgreSQL service is running (services.postgresql.enable = true;), and then enable the Hydra service (services.hydra.enable). The Hydra service will need a few more options to be set up, below is my configuration for it:

    services.hydra = {
        enable = true;
        port = 3333;
@tlrobinson
tlrobinson / pump.rb
Created May 12, 2011
Ruby code for pumping data between multiple pairs of IO streams
View pump.rb
#!/usr/bin/env ruby
require 'pty'
require 'socket'
# pump([[reader, writer], ...])
#
# Description:
# pump() takes an array of arrays, with the first element of each being the read stream and the
# second being the write stream. pump() itself is synchronous but it uses select() to
You can’t perform that action at this time.