(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/bin/bash | |
| # Create the directory structure | |
| mkdir -p features/step_definitions | |
| mkdir -p features/support | |
| # Create a placeholder for the step_definitions folder | |
| touch features/step_definitions/"$(basename `pwd`)_steps.rb" | |
| # Create the environment file |
| -- http://stackoverflow.com/questions/1124603/grouped-limit-in-postgresql-show-the-first-n-rows-for-each-group | |
| -- http://www.postgresql.jp/document/9.2/html/tutorial-window.html | |
| CREATE TABLE empsalary ( | |
| depname varchar(10) not null | |
| , empno integer not null | |
| , salary integer not null | |
| ); | |
| INSERT INTO empsalary (depname, empno, salary) VALUES ('develop', 11, 5200); |
| package main | |
| import ( | |
| "log" | |
| "myserver" | |
| "net/http" | |
| ) | |
| const addr = "localhost:12345" |
| (ns create-draw.opencv | |
| (:import | |
| org.opencv.core.Core | |
| org.opencv.core.Mat | |
| org.opencv.core.MatOfRect | |
| org.opencv.core.Point | |
| org.opencv.core.Rect | |
| org.opencv.core.Scalar | |
| org.opencv.highgui.Highgui | |
| org.opencv.objdetect.CascadeClassifier)) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| # Install tmux on Centos release 6.5 | |
| # install deps | |
| yum install gcc kernel-devel make ncurses-devel | |
| # DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
| curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
| tar -xvzf libevent-2.0.21-stable.tar.gz | |
| cd libevent-2.0.21-stable | |
| ./configure --prefix=/usr/local |
Lennart Augustsson, Oct 25, 2007
In a recent paper, Simply Easy! (An Implementation of a Dependently Typed Lambda Calculus), the authors argue that type checking a dependently typed language is easy. I agree whole-heartedly, it doesn't have to be difficult at all. But I don't think the paper presents the easiest way to do it. So here is my take on how to write a simple dependent type checker. (There's nothing new here, and the authors of the paper are undoubtedly familiar with all of it.)
I'll start by implementing the untyped lambda calculus. It's a very simple language with just three constructs: variables, applications, and lambda expressions, i.e.,
Lennart Augustsson, Oct 25, 2007
In a recent paper, Simply Easy! (An Implementation of a Dependently Typed Lambda Calculus), the authors argue that type checking a dependently typed language is easy. I agree whole-heartedly, it doesn't have to be difficult at all. But I don't think the paper presents the easiest way to do it. So here is my take on how to write a simple dependent type checker. (There's nothing new here, and the authors of the paper are undoubtedly familiar with all of it.)
I'll start by implementing the untyped lambda calculus. It's a very simple language with just three constructs: variables, applications, and lambda expressions, i.e.,
Get Git log in JSON format
git log --pretty=format:'{%n "commit": "%H",%n "abbreviated_commit": "%h",%n "tree": "%T",%n "abbreviated_tree": "%t",%n "parent": "%P",%n "abbreviated_parent": "%p",%n "refs": "%D",%n "encoding": "%e",%n "subject": "%s",%n "sanitized_subject_line": "%f",%n "body": "%b",%n "commit_notes": "%N",%n "verification_flag": "%G?",%n "signer": "%GS",%n "signer_key": "%GK",%n "author": {%n "name": "%aN",%n "email": "%aE",%n "date": "%aD"%n },%n "commiter": {%n "name": "%cN",%n "email": "%cE",%n "date": "%cD"%n }%n},'The only information that aren't fetched are:
%B: raw body (unwrapped subject and body)%GG: raw verification message from GPG for a signed commit| module Main where | |
| import LLVM.AST | |
| import qualified LLVM.AST as AST | |
| import LLVM.AST.AddrSpace | |
| import qualified LLVM.AST.CallingConvention as CC | |
| import qualified LLVM.AST.Constant as C | |
| import LLVM.AST.Global | |
| import LLVM.AST.Linkage | |
| import LLVM.Context |