Skip to content

Instantly share code, notes, and snippets.

View jroesch's full-sized avatar

Jared Roesch jroesch

View GitHub Profile
@jroesch
jroesch / pizza.hs
Created October 13, 2012 01:12 — forked from andrewberls/pizza.rb
ACM Micro-Challenge 1
-- JRo
nPizza p s t = ceiling $ (/ s) $ if t `elem` [11..23] then p * 2 else p
-- dumb tests runTests will tell you weather you pass or fail all tests, could do a fold and keep the state of which failed.
between12am11am = 2 == (nPizza 10 5 0) && 1 == nPizza 10 10 1 && 1 == nPizza 7 12 10
between11am11pm = 4 == (nPizza 20 10 11) && 2 == (nPizza 7 12 15)
after11pm = 1 == nPizza 5 10 23
@jroesch
jroesch / scala-jobs
Last active December 12, 2015 04:08 — forked from ymasory/bay-scala-jobs
Companies hiring Scala developers in the Bay Area.
- CloudPhysics
- Wordnik
- 10Gen
- Audax Health
- Bizo
- Box
- Coraid
- Ephox
@jroesch
jroesch / gist:5516565
Last active December 16, 2015 23:49 — forked from anonymous/gist:5516563
abstract class Foo(x: Int)
class Bar(x: Int) extends Foo(x)
class Baz(x: Int) extends Foo(x)
object Foo {
import scala.reflect.runtime.{ universe => ru }
def create[Nothing >: A <: Foo](x: Int)(implicit tt: ru.TypeTag[A]): A = {
val mirror = ru.runtimeMirror(getClass.getClassLoader)
config.vm.provider :vmware_fusion do |vm|
vdiskmanager = '/Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager'
dir = "#{ENV['HOME']}/vagrant-additional-disk"
unless File.directory?( dir )
Dir.mkdir dir
end
#include <iostream>
#include "util/numerics/mpz.h"
#include "library/vm/vm_io.h"
#include "library/vm/vm.h"
#include "init/init.h"
namespace lean {
lean::vm_obj put_nat(lean::vm_obj const &, lean::vm_obj const &);
}
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#