Skip to content

Instantly share code, notes, and snippets.

@jdan
jdan / y
Last active May 22, 2020 17:51
(λ (f)
((λ (x) (f (x x)))
(λ (x) (f (x x)))))
@codefromthecrypt
codefromthecrypt / opentracing-zipkin.md
Last active October 27, 2021 01:44
My ramble on OpenTracing (with a side of Zipkin)

I've had many people ask me questions about OpenTracing, often in relation to OpenZipkin. I've seen assertions about how it is vendor neutral and is the lock-in cure. This post is not a sanctioned, polished or otherwise muted view, rather what I personally think about what it is and is not, and what it helps and does not help with. Scroll to the very end if this is too long. Feel free to add a comment if I made any factual mistakes or you just want to add a comment.

So, what is OpenTracing?

OpenTracing is documentation and library interfaces for distributed tracing instrumentation. To be "OpenTracing" requires bundling its interfaces in your work, so that others can use it to time distributed operations with the same library.

So, who is it for?

OpenTracing interfaces are targeted to authors of instrumentation libraries, and those who want to collaborate with traces created by them. Ex something started a trace somewhere and I add a notable event to that trace. Structure logging was recently added to O

@arrdem
arrdem / rendering.clj
Last active January 1, 2017 00:59
Textual programs as views of ASTs.
;; I write
(ns foo)
(defn adds-one [x]
(+ x 1))
(def another-adds-one
(partial + 1))
;; SYMBOL TABLE (name -> UUID)
;; warm up: balancing
=> (s/def ::balanced
(s/* (s/cat :open #{'<} :children ::balanced :close #{'>})))
:user/balanced
=> (s/conform ::balanced '[< < > < > > < >])
[{:open <, :children [{:open <, :close >} {:open <, :close >}], :close >} {:open <, :close >}]
=> (s/conform ::balanced '[< < > < < > > > < >])
[{:open <, :children [{:open <, :close >} {:open <, :children [{:open <, :close >}], :close >}], :close >} {:open <, :close >}]
;; infix to prefix
#lang typed/racket/base
(require (for-syntax racket/base
racket/sequence
racket/syntax
syntax/parse
syntax/stx)
racket/match)
(begin-for-syntax
anonymous
anonymous / ampcontrol.py
Created November 7, 2015 21:27
#!/usr/bin/env python
TCP_IP = '10.0.0.7'
TCP_PORT = 50001
BUFFER_SIZE = 1024
import socket
import sys, time
def send(MESSAGE):

Simple Security Guidelines

Using an iDevice? (Best option)

  • Use an iPod or an iPad without a SIM card
  • Use an iPhone
  • Do not jailbreak
  • Always upgrade to new iOS versions
  • Use Brave browser

Need Secure chat?

@henrik
henrik / reimplementing_plug_router.exs
Created June 10, 2015 18:44
Wanted to understand what Plug.Router does to get a "conn" available, so reimplemented it (without peeking).
defmodule Toy.GetContext do
def send_resp(conn, code, text) do
IO.puts "Response! conn: #{conn}, code: #{code}, text: #{text}"
end
def conn do
"the conn"
end
end
@gigamonkey
gigamonkey / gist:03efdb275e487da37c59
Last active August 29, 2015 14:22
How to collaborate on technical problems

“[A] good problem description had to satisfy everyone. If two people saw a problem from a different point of view, both people’s points of view were merged into the problem description, making the problem more complicated, and making solutions sometimes harder to achieve. But this was essential to addressing porting problems, for example. One couldn’t just solve how a file system operation would work on one operating system unless the solution was going to work on other operating systems, too. On the other hand, the “proposal” field was very different. If two people disagreed on a proposal, they each wrote their own proposal so that proposals could be internally consistent and coherent. This meant that a single problem often had several proposed solutions with different costs and benefits, and the committee had to decide which was the stronger proposal.”

From http://www.nhplace.com/kent/Papers/cl-untold-story.html

(*
INTRODUCTION TO OCAML
Fredrik Dyrkell
@lexicallyscoped
www.lexicallyscoped.com