"Clojure running on Raspberry Pi" sounded so cool that I just had to give it a try.
- Download ARM JDK from Oracle and instlal on Raspberry Pi
- Change visudo to contain the following
| protobuf | |
| protobuf-2.6.0 | |
| protobuf-2.6.1 | |
| protobuf-master |
defprotocol: defines an interfacedeftype: create a bare-bones object which implements a protocoldefrecord: creates an immutable persistent map which implements a protocolTypically you'll use defrecord (or even a basic map);
unless you need some specific Java inter-op,
where by you'll want to use deftype instead.
Note:
defprotocolallows you to add new abstractions in a clean way Rather than (like OOP) having polymorphism on the class itself,
| {-# LANGUAGE DeriveGeneric #-} | |
| {-# LANGUAGE DataKinds #-} | |
| import Data.Int | |
| import Data.ProtocolBuffers | |
| import Data.Text | |
| import GHC.Generics (Generic) | |
| import GHC.TypeLits | |
| import Data.Serialize | |
| import Data.Monoid |
| (ns datatable.core | |
| (:require [reagent.core :as reagent] | |
| [cljsjs.fixed-data-table])) | |
| (def Table (reagent/adapt-react-class js/FixedDataTable.Table)) | |
| (def Column (reagent/adapt-react-class js/FixedDataTable.Column)) | |
| (defn gen-table | |
| "Generate `size` rows vector of 4 columns vectors to mock up the table." | |
| [size] |
| (ns vr-cljs.core) | |
| (enable-console-print!) | |
| (defn get-camera | |
| "Creates camera with desired aspect ratio." | |
| [] | |
| (doto (js/THREE.PerspectiveCamera. 75 (/ (.-innerWidth js/window) | |
| (.-innerHeight js/window)) | |
| 0.1 1000) |
| protobuf | |
| protobuf-2.6.0 | |
| protobuf-master |
The script in this gist will help you buid the Google Protobuf library for use with Mac OS X and iOS. Other methods (such as homebrew or direct compilation) have issues that prevent their use. The libraries built by this script are universal and support all iOS device architectures including the simulator.
This gist was adapted from the original at https://gist.github.com/BennettSmith/7150245, and updated to deal with Xcode 7 and iOS 9, and download protobuf version 3.0.0.
| module DigitalClock exposing (clock) | |
| import Html exposing (Html) | |
| import Html.Attributes as HA exposing (style) | |
| import Html.App as App | |
| import Svg exposing (..) | |
| import Svg.Attributes exposing (..) | |
| import Color exposing (rgb) | |
| import Date as D exposing (..) |
| ;; I think it would be a mistake to introduce temporal coupling to prevent typos. | |
| ;; The example program below lets you identify "missing" keys specs at | |
| ;; the time and place of your choosing, and then handle them as you | |
| ;; deem appropriate, without imposing those decisions on other | |
| ;; users of spec. | |
| (require '[clojure.spec.alpha :as s] | |
| '[clojure.set :as set]) |