Skip to content

Instantly share code, notes, and snippets.

type 'a why_is_this_ok = {
f: 'b. ('a -> 'b) -> 'b
}
type 'a but_this_is_not = 'b. ('a -> 'b) -> 'b
use libc::c_int;
use std::cell::Cell;
pub enum CInterp {}
pub struct Interp {
ptr: Cell<*mut CInterp>,
}
impl Interp {
I lived briefly at Orchard near Rivington. The neighborhood has moved on, but
some of my old haunts are still open.
Two Boots, various locations. Cajun/Creole pizza.
Rai Rai Ken, E 10th St. Ramen.
Mamoun's, Washington Sq Park or St Mark's Pl. Lamb shawarma.
Tea & Sympathy, Greenwich Ave. British.
Katz's Deli, E Houston St. Old-school deli.
Paul's, 2nd Ave. Best burgers.
/* analogtv, Copyright (c) 2003, 2004 Trevor Blackwell <tlb@tlb.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation. No representations are made about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*/
@zobar
zobar / def.shard.rb
Created August 30, 2015 23:54
Nested function definitions are a bad idea in Ruby.
#!/usr/bin/env ruby -w
def defit
def ohai
puts "hello from #{self.class.inspect} #{self.inspect}"
end
puts "called defit in #{self.class.inspect} #{self.inspect}"
end
Sleep:
I know this -> Welcome Apartments: Welcome.is (This is where we stayed both
times in the city center)
People I talked to stayed here -> City Center Hotel (very popular)
I've all the monies in the world -> Hotel Borg
Swim or Soak:
Laugardalslaug Geothermal Pools (Locals in the 101 swim here)
Blue Lagoon (Beautiful but requires like a good half-day: it's 45 minutes from
Reykjavik, takes 20 minutes to get in, and at least an in the water hour to
@zobar
zobar / encapsulation.clj
Created July 27, 2015 16:43
Encapsulation without objects
(ns functor
(:refer-clojure :exclude [map]))
(defprotocol Functor
"Defines functor/Functor"
(map [functor f]))
(defn each
[functor f]
(map functor f)
Within an easy walk of the hotel:
1. Just south of you is Millennium Park
<http://www.cityofchicago.org/city/en/depts/dca/supp_info/millennium_park_-artarchitecture.html>.
Worth going to. You have to go and take a picture of yourself reflected in the
Bean
<http://www.cityofchicago.org/content/dam/city/depts/dca/Millennium%20Park/cloudgate800.jpg>.
And you can admire the Pritzker Pavilion. Probably not the Buckingham
Fountain in March, though... But maybe the "fountain
<http://www.cityofchicago.org/content/dam/city/depts/dca/Millennium%20Park/crownfountain800.jpg>"
@zobar
zobar / postage.rates
Last active August 29, 2015 14:13
Sample program from Applesoft BASIC Programmer's Reference Manual
10 REM POSTAGE RATES
20 :
30 REM DETERMINES POSTAGE FEES
40 REM FOR EXPRESS, FIRST CLASS,
50 REM AND PRIORITY MAIL
60 REM V29/01/82
70 REM BY JOHN SCRIBBLEMONGER
100 REM MENU OF POSTAGE CLASSES
110 HOME
$ ghci
GHCi, version 7.8.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> show
<interactive>:2:1:
No instance for (Show (a0 -> String)) arising from a use of ‘print’
In a stmt of an interactive GHCi command: print it