Running Extraordinarily-Dull.samovar through search-based solvers added to samovar 0.5
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
# encoding: UTF-8 | |
bind '"\e[A":history-search-backward' | |
bind '"\e[B":history-search-forward' | |
export PATH="$HOME/.cabal/bin:$HOME/.local/bin:$PATH" | |
export EDITOR=nano | |
alias unpyc="find . -name '*.pyc' -exec rm -f {} \;" | |
alias rsyncavd="rsync --archive --verbose --delete" | |
alias git-savepatch='git diff >' | |
alias chintzy-httpd='python2 -m SimpleHTTPServer' |
This code has moved into The Dipple:
This code has moved into The Dipple:
This article has moved into the SixtyPical repository.
Just a little survey of what code to create an anonymous function and immediately call it looks like in a handful of high-level languages. All of these expressions should evaluate to 10.
Language | Code |
---|---|
Python | (lambda x: x+1)(9) |
Ruby | (lambda {|x| x+1}).call(9) |
Lua | (function(x) return x+1 end)(9) |
Erlang | (fun(X) -> X+1 end)(9) |
Haskell | (\x -> x+1)(9) |
This article has moved to the Specs-on-Spec repository.
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
(define reduce | |
(lambda (subject complete-rules rules generation-id) | |
(if (null? rules) | |
subject | |
(let* ((rule-pair (car rules)) | |
(rest-of-rules (cdr rules)) | |
(pattern (car rule-pair)) | |
(replacements (cdr rule-pair)) | |
(new-gen-id (+ generation-id 1)) | |
(new-subject (apply-rule subject pattern replacements generation-id))) |
This document has moved to the Wagon distribution.
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
-- implementation of https://esolangs.org/wiki/An_Odd_Rewriting_System | |
-- I, Chris Pressey, hereby place this source code into the public domain. | |
import Data.Char | |
-- A program in An Odd Rewriting System consists an alphabet of symbols, | |
-- each of which belongs to one of two categories (an odd symbol or an even symbol), | |
-- except for a special halt symbol that appears in neither category; | |
-- two definitions for each symbol (an odd definition and an even definition); | |
-- and an initial string. Both the initial string, and each definition, is simply a |
NewerOlder