I hereby claim:
- I am divarvel on github.
- I am clementd (https://keybase.io/clementd) on keybase.
- I have a public key whose fingerprint is 78D3 430C 4600 7020 9F7A B0A2 6BFE 863C 2684 AD09
To claim this, I am signing this object:
CREATE TABLE availability ( | |
dates tstzrange NOT NULL | |
); | |
CREATE TABLE reservation ( | |
dates tstzrange NOT NULL | |
); | |
COPY availability (dates) FROM stdin; | |
["2014-01-01 00:00:00+01","2014-01-10 00:00:00+01"] |
I hereby claim:
To claim this, I am signing this object:
Gist does not let me put directories names in file names, so make sure to put:
assets-Gruntfile.js
in assets/Gruntfile.js
assets-package.json
in assets/package.json
project-Grunt.scala
in project/Grunt.scala
project-JavaScriptBuild.scala
in project/JavaSCriptBuild.scala
The goal is to let grunt handle everything in the assets directory.
Tikhon Jelvis, consistency is all I ask | |
Votes by Jed Wesley-Smith, Scott Danzig, Gregory Popovitch, Toby Thain, and 111 more. | |
Most modern and well-featured? Hah! It's hard to tell it wasn't design 30 years ago. Go completely ignores most recent advances in programming languages in order to seem more similar to C. Charming. | |
Yes, there are drawbacks you're not seeing. But, more importantly, there are better alternatives you're ignoring. While some of the problems with Go are certainly actively detrimental, the bigger story is opportunity cost: you're missing out on some more capable, more expressive and safer languages. | |
So lets take your question in two parts: Go's drawbacks and then better alternatives. | |
Drawbacks |
scala> Some("yolo").fold(Nil)(List(_)) | |
<console>:8: error: type mismatch; | |
found : List[String] | |
required: scala.collection.immutable.Nil.type | |
Some("yolo").fold(Nil)(List(_)) | |
^ | |
scala> Some("yolo").map(List(_)).getOrElse(Nil) | |
res1: List[String] = List(yolo) |
myWorkspaces = zipWith (++) | |
(map show [1..12]) $ | |
map (":"++) | |
[ "Web" | |
, "Code" | |
, "SSH" | |
, "Social" | |
, "Email" | |
, "Music" | |
, "Video" |
def method(a: Any): String = a match { | |
case i: Int => "Int" | |
case s: String => "String" | |
case _ => "Other" | |
} |
@(elements: helper.FieldElements) | |
@************************************************** | |
* Generate input according twitter bootsrap rules * | |
**************************************************@ | |
<div class="control-group@if(elements.hasErrors) {" errors"}"> | |
<label for="@elements.id" class="control-label">@elements.label</label> | |
<div class="controls"> | |
@elements.input | |
<span class="help-inline">@((elements.errors ++ elements.infos).mkString(", "))</span> |
function flatten(list) { | |
return _.reduce(list, function(acc, item) { | |
return acc.concat(item); | |
}, []); | |
} | |
function flatMap(list, func, context) { | |
return flatten(_.map(list, func, context)); | |
} |
scala> MongoDBObject("foo" -> None).getAs[String]("foo") | |
res0: Option[String] = Some(None) | |
scala> MongoDBObject("foo" -> null).getAs[String]("foo") | |
res0: Option[String] = None |