$ ruby bench/lazy.rb
user system total real
using Range#lazy 0.330000 0.000000 0.330000 ( 0.330689)
using Enumerator#yield 0.170000 0.000000 0.170000 ( 0.177117)
using Fiber#yield 0.340000 0.120000 0.460000 ( 0.458015)
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
| node_modules |
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
| /* | |
| SP: currying this gives the type: (T => T) => T => T | |
| That looks an awful lot like Haskell's application ($) operator. :) | |
| There is a higher order abstraction here, sniff it out. | |
| */ | |
| type ChurchNumeral[T] = (T => T, T) => T | |
| def cn0[T](f:T=>T, x:T):T = x | |
| def cn1[T](f:T=>T, x:T):T = f(x) | |
| def cn2[T](f:T=>T, x:T):T = f(f(x)) |
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
| -- module of natural number properties ... and stuff | |
| module Naturally where | |
| import Prelude hiding (even, odd) | |
| -- recursive data structure | |
| data Nat = Zero -- base case is "zero" | |
| | Succ Nat -- successor of another Nat is the "recursive" case data constructor | |
| deriving (Eq) |
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
| # Abstract | |
| { mkService, serviceArtifact, privateIfc, lbSource, authService, dataService, logService, logPath, secretsPath }: | |
| mkService { | |
| name = "service-name"; | |
| version = "0.1.2"; | |
| artifacts = [ serviceArtifact ]; | |
| listens = [ { type = "tcp"; port = 9999; interface = privateIfc; } ]; | |
| accepts = [ lbSource ]; # traffic sources to accept traffic from. | |
| talks = [ authService dataService logService ]; # this allows auto configuration given the service definitions of those in the specific environment. | |
| writes = [ logPath ]; |
- Are you a legal US resident and/or taxpayer?
- Do you wish to ensure individual freedoms are not compromised in the name of sweeping unchecked law enforcement rule changes?
Here are some links on the upcoming changes to Rule 41:
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
| !! Things to include in your ~/.Xdefaults | |
| ! Ensure font-size is included in your URxvt.perl-ext comma separated list of extensions, like below | |
| URxvt.perl-ext: default,matcher,fullscreen,font-size,url-select,selection-to-clipboard | |
| ! specify the step font-size for incrementing and decrementing | |
| URxvt.font-size.step: 1 | |
| ! Bind Ctrl+Up and Ctrl+Down to font increment and decrement respectively | |
| URxvt.keysym.C-Up: perl:font-size:incglobal | |
| URxvt.keysym.C-Down: perl:font-size:decglobal |
[nix-shell:~/src]$ cat x.rb y.rb crap.rb
# x.rb
load 'crap.rb'
load 'crap.rb'
# y.rb
require 'crap.rb'
require 'crap.rb'
# crap.rb
puts 'hi'
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
| --recipient GPG64BITKEYID |