- embedded
- personal interest
 
- functional
- perfect fit since we want the same thing to always happen, for some given input state
- can't be side-effect free, that doesn't make sense.
- message passing
 
- inbox - lump of memory per input?
  
    
      This file contains hidden or 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
    
  
  
    
  | let l1 = ref 7 | |
| let l2 = ref 0 | |
| let l3 = ref 0 | |
| let l4 = ref 1 | |
| (* multiplies location l3 by l2, adds l4ult to l2es *) | |
| let rec mult _ = | |
| match !l2 >= 1 with | |
| | true -> | |
| l4 := !l4 + !l3; | 
  
    
      This file contains hidden or 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
    
  
  
    
  | #!/bin/sh | |
| userresources=$HOME/.Xresources | |
| usermodmap=$HOME/.Xmodmap | |
| sysresources=/etc/X11/xinit/.Xresources | |
| sysmodmap=/etc/X11/xinit/.Xmodmap | |
| # merge in defaults and keymaps | |
| if [ -f $sysresources ]; then | 
  
    
      This file contains hidden or 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
    
  
  
    
  | ;===================================================== | |
| ; | |
| ; To learn more about how to configure Polybar | |
| ; go to https://github.com/jaagr/polybar | |
| ; | |
| ; The README contains alot of information | |
| ; | |
| ;===================================================== | |
| [colors] | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # For more information on configuration, see: | |
| # * Official English Documentation: http://nginx.org/en/docs/ | |
| # * Official Russian Documentation: http://nginx.org/ru/docs/ | |
| user nginx; | |
| worker_processes auto; | |
| error_log /var/log/nginx/error.log; | |
| pid /run/nginx.pid; | |
| # Load dynamic modules. See /usr/share/nginx/README.dynamic. | 
  
    
      This file contains hidden or 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
    
  
  
    
  | server { | |
| listen 80; | |
| server_name sonarr.ehobbs.it; | |
| return 301 https://$host$request_uri; | |
| } | |
| server { | |
| listen 443; | |
| server_name sonarr.ehobbs.it; | 
  
    
      This file contains hidden or 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
    
  
  
    
  | PORT := /dev/ttyUSB0 | |
| MODEL := atmega328p | |
| PROG := arduino | |
| RATE := 115200 | |
| OUT := compiled | |
| SOURCEDIR := . | |
| SRC_FILES := $(shell find $(SOURCEDIR) -name '*.c') | |
| OBJ_FILES=$(SRC_FILES:.c=.o) | 
  
    
      This file contains hidden or 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
    
  
  
    
  | apiWrapper.prototype.retry = (tries = 5, executor) => { | |
| --tries; | |
| return new Promise(executor) | |
| .catch(err => { | |
| if (tries >= 0) { | |
| apiWrapper.prototype.retry(tries, executor) | |
| } else { | |
| Promise.reject(err) | |
| } | |
| }) | 
  
    
      This file contains hidden or 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
    
  
  
    
  | test "do we get the correct value" do | |
| stub = AdventOfCodeHelper.GetInputs | |
| |> double | |
| |> allow(:get_value, fn(_y,_d,session) -> {:ok, session} end) | |
| {:ok, contents} = AdventOfCodeHelper.get_input(2015,1,stub) | |
| assert contents == Application.get_env(:advent_of_code, :session) | |
| assert_receive({:get_value, 2015, 1, nil}) | |
| end | 
  
    
      This file contains hidden or 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
    
  
  
    
  | defmodule AdventOfCodeHelper do | |
| alias AdventOfCodeHelper.GetInputs | |
| @moduledoc """ | |
| Provides an interface to get input values for Advent of Code puzzles | |
| """ | |
| def get_input(year, day \\ Date) | |
| @doc """ | |
| Returns input values | |
| ## Parameters | 
NewerOlder