start new:
tmux
start new with session name:
tmux new -s myname
;; Inspired by George Jahad's version: http://georgejahad.com/clojure/debug-repl.html | |
(defmacro local-bindings | |
"Produces a map of the names of local bindings to their values." | |
[] | |
(let [symbols (map key @clojure.lang.Compiler/LOCAL_ENV)] | |
(zipmap (map (fn [sym] `(quote ~sym)) symbols) symbols))) | |
(declare *locals*) | |
(defn eval-with-locals |
#!/usr/local/Gambit-C/bin/gsi | |
; Copyright (C) 2004 by Marc Feeley, All Rights Reserved. | |
; This is the "90 minute Scheme to C compiler" presented at the | |
; Montreal Scheme/Lisp User Group on October 20, 2004. | |
; Usage with Gambit-C 4.0: | |
; | |
; % ./90-min-scc.scm test.scm |
(defroutes app | |
(GET "/" [] "<h1>Index route</h1>") | |
(route/not-found "<h1>Page not found</h1>")) | |
(defn fake-request [routes uri method & params] | |
(let [localhost "127.0.0.1"] | |
(routes {:server-port 80 | |
:server-name localhost | |
:remote-addr localhost | |
:uri uri |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<script> | |
// coolshell api | |
function xss_ajax(url, callback) { | |
var script_id = null; | |
var script = document.createElement('script'); |
-- warning: this is hacky. run at your own risk. | |
-- | |
-- before you run this, put sum_list.asm in a dynamic library. | |
-- | |
-- on OSX that means | |
-- $ nasm -f macho64 sum_list.asm | |
-- $ libtool -dynamic sum_list.o -o libsum_list.dylib | |
-- | |
-- on Linux it means | |
-- $ nasm -f elf64 sum_list.asm |
// FileVersion.h: interface for the CFileVersion class. | |
// by Manuel Laflamme | |
////////////////////////////////////////////////////////////////////// | |
#ifndef __FILEVERSION_H_ | |
#define __FILEVERSION_H_ | |
#if _MSC_VER >= 1000 | |
#pragma once | |
#endif // _MSC_VER >= 1000 | |
class CFileVersion { | |
// Construction |
This is my submission to Google Code Jam 2014 Qualification Round, using Rust programming language. The full description of problems is available at Google.
I've solved all 4 problems over the course of 5 1/2 hours (2014-04-13T05:10+09:00 through T10:40+09:00), which were longer than I've expected (possibly because I was sleepy at that time), but I've got the full credit (90 out of 90) anyway, so I guess it was not so bad move.
I tried to write the idiomatic Rust as much as possible, but not always mostly due to the time constraints. In particular, all program shares same boilerplates for the general structure and I/O which I really don't like.
Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv
instead. If you are looking for the previous version of this document, see the revision history.
$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10
$ pyenv install 2.6.9