To make all future files world-readable by default, add this line to ~/.bashrc
:
umask 022
Then, to make everything under ~/foo
world-readable:
source ~/.bashrc
To make all future files world-readable by default, add this line to ~/.bashrc
:
umask 022
Then, to make everything under ~/foo
world-readable:
source ~/.bashrc
abstract class Maybe<A> { | |
Maybe() { } | |
abstract A toNullableReference(); | |
} | |
final class Just<A> extends Maybe<A> { | |
private final A value; |
import com.typesafe.config.ConfigParseOptions; | |
import com.typesafe.config.ConfigResolveOptions; | |
public class ConfigFactoryParameters | |
{ | |
public static ConfigFactoryParameters defaultConfigFactoryParameters() | |
{ | |
return new ConfigFactoryParameters( | |
Thread.currentThread().getContextClassLoader(), | |
ConfigParseOptions.defaults(), |
final class EqualsEquivalence<A> | |
implements Equivalence<A> | |
{ | |
@Override | |
public boolean equals(A a, A b) | |
{ | |
return a.equals(b); | |
} | |
@Override |
chris@esteban:~$ ping t-square.gatech.edu | |
PING t-square.gatech.edu (74.125.21.138) 56(84) bytes of data. | |
64 bytes from clients6.google.com (74.125.21.138): icmp_req=1 ttl=44 time=74.2 ms | |
64 bytes from clients6.google.com (74.125.21.138): icmp_req=2 ttl=44 time=77.1 ms | |
64 bytes from clients6.google.com (74.125.21.138): icmp_req=3 ttl=44 time=75.6 ms | |
64 bytes from clients6.google.com (74.125.21.138): icmp_req=4 ttl=44 time=144 ms | |
^C | |
--- t-square.gatech.edu ping statistics --- | |
4 packets transmitted, 4 received, 0% packet loss, time 3004ms | |
rtt min/avg/max/mdev = 74.261/92.864/144.420/29.783 ms |
trait Correctness { | |
// Let's talk about programs. | |
type P | |
// A specification is a predicate on a program. | |
trait S { def apply (p: P): Boolean } | |
// We say "p implements s" when a program meets a specification. | |
def `p implements s` (p: P, s: S) = s (p) |
With a new language, a new syntax comes along. Personally, i find the syntax often harder to learn then methodology. Now, i know syntax is to large extend a matter of taste, about which you cannot really discuss. But it is possible to ask (preferably the language designer) why certain choices were made, and if not alternatives would be better. So here i go, (in random order):
Warning: This is very half-assed. It gives filenames where a TODO has been added, and also when one has been removed (without specifying which).
Put this on your bin path:
And add this to ~/.gitconfig
:
[alias]
There is a program we ask of Java programmers in interviews sometimes, just as an initial sanity check to make sure the candidate really knows the language:
“Write a method that accepts a List
and returns a copy of the list with duplicate elements removed.”
It’s mostly just a test of whether they know how to use a hash set. Ignoring order, all we’re looking for is: