Skip to content

Instantly share code, notes, and snippets.

gitGraph
    commit id: "Set builder theory"
    
    checkout main
    branch Early-languages
    commit id: "NPL, set comprenhensions" tag: "1977"
    commit id: "Id, array comprenhensions" tag: "1978"
    commit id: "KRC, list comprenhensions" tag: "1982"

Repo: https://github.com/rtfeldman/elm-spa-example

Clean build

noah@Noahs-MacBook-Pro ~/d/elm-spa-example> time elm-make src/Main.elm --output /dev/null
Success! Compiled 93 modules.
Successfully generated /dev/null
        8.44 real        15.88 user        16.76 sys
Name: elm-make
Version: 0.18
Synopsis:
A build tool for Elm projects
Description:
A nice way to build projects that is aware of both elm-compile and
elm-package, so it can make the build process very smooth.
Homepage:

BASELINE: elm-make 0.18

 Performance counter stats for '/home/noah/.npm-global/bin/elm-make':

       7381,240502      task-clock (msec)         #    2,143 CPUs utilized          
            70 192      context-switches          #    0,010 M/sec                  
               249      cpu-migrations            #    0,034 K/sec                  
            19 198      page-faults               #    0,003 M/sec                  
    18 252 940 905      cycles                    #    2,473 GHz                    
import xml
import xml.etree.ElementTree as ET
from collections import defaultdict
PREFIX = defaultdict(lambda: "Svg.Attributes")
#PREFIX['href'] = 'Html.Attributes'
def open_file(filename):
with open(filename) as f:
port module Main exposing (..)
import Random
import Html exposing (Html)
import Html.Events exposing (onClick)
import Html.App
type alias Model = { faceValue : Int }
type Msg = RollDice | SetDiceValue Int
module Component.Accordion exposing (view)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
view :
(entry -> Html msg)
-> (entry -> Html msg)
let initialState = {
one: 'two',
three: 'four'
}
function update1 (state = initialState, action) {
switch (action.type) {
case SOMETHING: {
return state.one = 'changed'
@eeue56
eeue56 / Base64.elm
Last active February 22, 2016 23:21 — forked from Janiczek/Base64.elm
elm native js
module Base64 (..) where
import Json.Decode
import Task exposing (Task)
import Native.Base64
dimensions : Json.Decode.Value -> Task x { width : Int, height : Int, dataUrl : Json.Decode.Value }
dimensions =
Native.Base64.dimensions
package main
import "net/http"
import "encoding/json"
import "fmt"
const URL = "https://api.github.com/users/JEG2/repos"
const AMOUNT = 10
const CPUS = 4