Basic unit type:
λ> replTy "()"
() :: ()
Basic functions:
shellPrompt <<= name(name => { state: State => | |
object devnull extends ProcessLogger { | |
def info(s: => String) {} | |
def error(s: => String) { } | |
def buffer[T](f: => T): T = f | |
} | |
val current = """\*\s+(\w+)""".r | |
def gitBranches = ("git branch --no-color" lines_! devnull mkString) | |
"%s:%s>" format ( | |
name, |
/* Start site links */ | |
a:before { | |
vertical-align:-2px; | |
margin-right:5px; | |
width: 16px; | |
height: 16px; | |
} | |
a[href^="http://twitter.com"]:before { |
{-# LANGUAGE Rank2Types | |
, RebindableSyntax | |
, ImplicitParams | |
, NoMonomorphismRestriction #-} | |
import Data.Maybe | |
import Data.Function | |
import Data.String | |
import Prelude (undefined, error, String, (++)) |
Hello scala, my old friend | |
I've come to take you home again | |
Because a feature slowly creeping | |
left me plagued with doubts and weeping | |
and the version that was tagged in the repo | |
just has to go | |
it lacks the signs of soundness | |
On sleepless nights I hacked alone | |
applying ant and other tools of stone |
user www-data; | |
worker_processes 4; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
Basic unit type:
λ> replTy "()"
() :: ()
Basic functions:
When connecting to a remote server via SSH it is often convenient to use SSH agent forwarding so that you don't need a separate keypair on that server for connecting to further servers.
This is enabled by adding the
ForwardAgent yes
option to any of your Host
entries in ~/.ssh/config
(or alternatively with the -A
option). Don't set this option in a wildcard Host *
section since any user on the remote server that can bypass file permissions can now als use keys loaded in your SSH agent. So only use this with hosts you trust.
Macro hygiene is the concept of macros that work in all contexts; they don't affect and aren't affected by anything around them. Ideally all macros would be fully hygienic, but there are lots of pitfalls and traps that make it all too easy to accidentally write unhygienic macros. This guide attempts to provide a comprehensive resource for writing the most hygienic macros.
First, a little aside on the details of Rust's module system, and specifically paths; it is