This blog post series has moved here.
You might also be interested in the 2016 version.
/** | |
* Examples of writing mixed unit/property-based (ScalaCheck) tests. | |
* | |
* Includes tables and generators as well as 'traditional' tests. | |
* | |
* @see http://www.scalatest.org/user_guide/selecting_a_style | |
* @see http://www.scalatest.org/user_guide/property_based_testing | |
*/ | |
import org.scalatest._ |
instance (Arbitrary a) => Arbitrary (Matrix a) where | |
-- NB: for square matrices | |
arbitrary = sized (\n -> do xs <- vectorOf (n*n) arbitrary | |
return $ matrix n n (\(i, j) -> xs !! ((i-1)*n + (j-1)))) |
This blog post series has moved here.
You might also be interested in the 2016 version.
# Hello, and welcome to makefile basics. | |
# | |
# You will learn why `make` is so great, and why, despite its "weird" syntax, | |
# it is actually a highly expressive, efficient, and powerful way to build | |
# programs. | |
# | |
# Once you're done here, go to | |
# http://www.gnu.org/software/make/manual/make.html | |
# to learn SOOOO much more. |
Want to use Nix for development but you're not sure how? Concerned about the
fluidity of nixpkgs
channels or not being able to easily install arbitrary
package versions?
When I first heard about Nix it seemed like the perfect tool for a developer. When I tried to actually use it for developing and deploying web apps, though, the pieces just didn't seem to add up.
Want to use Nix for development but you're not sure how? Concerned about the
fluidity of nixpkgs
channels or not being able to easily install arbitrary
package versions?
When I first heard about Nix it seemed like the perfect tool for a developer. When I tried to actually use it for developing and deploying web apps, though, the pieces just didn't seem to add up.
#!/usr/bin/env bash | |
PADDING='Padding' | |
main() { | |
local xterm_start=0 \ | |
xterm_width=8 \ | |
xterm_height=2 | |
local cube_start=$((xterm_start + xterm_width * xterm_height)) \ |