The only cross-platform browser that fits in a Gist!
One line install. Works on Linux, MacOSX and Windows.
$> npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
#lang typed/racket | |
;; We get exhaustive pattern matching | |
(: f ((U String Integer) -> Boolean)) | |
(define (f x) | |
(cond | |
[(string? x) (string=? x "hi")] ; covers string needs | |
[(exact-nonnegative-integer? x) (= x 7)] ; covers positive integers | |
[(even? x) (= x -8)] ; we can actually cover a subset of negative integers |
# Want to show hidden files and folders in your TextMate project drawer? Simple, just modify the file and folder patterns in TextMate's preferences. | |
# Instructions: | |
# Go to TextMate > Preferences... | |
# Click Advanced | |
# Select Folder References | |
# Replace the following: | |
# File Pattern |
/* | |
* Copyright 2015 Thomas Broyer | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
import scala.util.{Try, Success, Failure} | |
def f(s: String): Try[Int] = Try { s.toInt } | |
def g(i: Int): Try[Int] = Try { i * 2 } | |
def unit[T](v: T): Try[T] = Success(v) | |
//val v = "1" | |
val v = "bad" | |
val m = Success(v) |
(def classbytes (atom {})) | |
(defn bytes-of-forms [form] | |
(push-thread-bindings | |
{clojure.lang.Compiler/LOADER | |
(proxy [clojure.lang.DynamicClassLoader] [@clojure.lang.Compiler/LOADER] | |
(defineClass | |
([name bytes src] | |
(swap! classbytes assoc name bytes) |
# Redirect STDOUT/STDERR into syslog | |
exec > >(logger -p user.info) 2> >(logger -p user.warn) |
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.
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.
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
#lang racket/gui | |
(require framework) | |
(require ffi/unsafe) | |
(require ffi/unsafe/objc) | |
(ffi-lib "/System/Library/Frameworks/WebKit.framework/WebKit") | |
(import-class WebView) | |
(import-class NSURLRequest) | |
(import-class NSURL) | |
(import-class NSString) |
(ns blog.errors.core | |
(:require-macros | |
[cljs.core.async.macros :refer [go]] | |
[blog.utils.macros :refer [<?]]) | |
(:require | |
[cljs.core.async :refer [>! <! chan close!]])) | |
;; convert Node.js async function into a something | |
;; that returns a value or error on a channel | |
(defn run-task [f & args] |