This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ElmHelloWorld exposing (main) | |
import Html exposing (Html) | |
import Json.Decode as Decode exposing (Value) | |
import WebComponent | |
type alias Flags = | |
{ name : Maybe String } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
// the .mjs extension is important | |
// run this inside the directory containing the `elm.json` file | |
// (if it's not executable, run `chmod +x elm-build-cache.mjs`) | |
// with VERBOSE=1 env var it will show you results of the exec commands | |
import fs from 'fs/promises'; | |
import {exec} from 'child_process'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Expects `apl` on the $PATH (GNU APL) | |
# Usage: echo '{(+/W)%NmW},N1+?5 5S2' | tapl | |
import sys | |
import subprocess | |
from itertools import groupby | |
replacements = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Grid.Zipper exposing | |
( Zipper | |
, current | |
, currentFocus | |
, currentOrDefault | |
, doNTimes | |
, doUntil | |
, doWhile | |
, duplicate | |
, extend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main : Program Decode.Value Model_ Msg | |
main = | |
Browser.application | |
{ init = init_ | |
, update = update_ | |
, view = view_ | |
, subscriptions = subscriptions | |
, onUrlRequest = UrlRequested | |
, onUrlChange = UrlChanged | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ConfigChild exposing (Config, Msg, view) | |
import Html exposing (Html) | |
import Html.Events | |
type Msg | |
= LaunchTheNukes | |
type alias Config msg = | |
{ msg : Msg -> msg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- The answer is always traverse | |
-- https://impurepics.com/posts/2020-10-03-always-traverse.html | |
Task.maybe : (a -> Task x b) -> Maybe a -> Task x (Maybe b) | |
Task.maybe toTask maybe = | |
case maybe of | |
Nothing -> | |
Task.succeed Nothing | |
Just input -> | |
toTask input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ElmHelloWorld exposing (main) | |
import Html exposing (Html) | |
import Json.Decode as Decode exposing (Value) | |
import WebComponent | |
type alias Flags = | |
{ name : Maybe String } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Genetic exposing (Config, Goal(..), run) | |
import List.Extra as List | |
import Random exposing (Generator) | |
import Random.Extra as Random | |
import Random.List | |
type alias Config solution = | |
{ newSolution : Generator solution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# elm-format-wrapper 1.0.0 | |
# | |
# Usage: | |
# elm-format-wrapper [--help] [--action=ACTION] PATH... | |
# | |
# Description: | |
# Format paths like elm-format, but allow ignoring blocks of code: | |
# |