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
# https://github.com/rocker-org/rocker/tree/master/r-ubuntu | |
FROM rocker/r-ubuntu:18.04 | |
RUN apt update && \ | |
apt install -y \ | |
make build-essential libssl-dev zlib1g-dev libbz2-dev \ | |
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ | |
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git | |
RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash && \ |
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
require 'net/http' | |
require 'uri' | |
require 'nokogiri' | |
URL = 'http://www.fos.kuis.kyoto-u.ac.jp/~igarashi/CoPL/index.cgi' | |
DEFAULT_FORM_DATA = { | |
command: 'answer', | |
no: 0 | |
} |
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
/.env |
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
## Scheme Interpreter in R | |
## (more R-ish implementation of "lisp.R") | |
addGlobals <- function(env) { | |
procs <- list("+" = sum, | |
"*" = prod, | |
"-" = function(...) Reduce(`-`, list(...)), | |
"/" = function(...) Reduce(`/`, list(...)), | |
"=" = `==`, | |
"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
# -*- coding: utf-8 -*- | |
# Scheme Interpreter in Ruby | |
# (a Ruby port of the Peter Norvig's "lis.py") | |
class Env < Hash | |
def initialize(parms = [], args = [], outer = nil) | |
@outer = outer | |
update(Hash[parms.zip(args)]) | |
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
## Scheme Interpreter in R | |
## (an R port of the Peter Norvig's "lis.py") | |
Env <- setRefClass('Env', | |
fields = c(".outer", ".dict"), | |
methods = list( | |
initialize = function(outer=NULL) { | |
.outer <<- outer | |
.dict <<- list() | |
}, |