Last active
January 4, 2016 10:39
-
-
Save obriencj/8609890 to your computer and use it in GitHub Desktop.
This is how I roll on a Friday night, getting crazy up in here.
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
maybe:python-spexy siege$ PYTHONPATH=./ python | |
Python 2.7.6 (default, Nov 18 2013, 15:12:51) | |
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from spexy import repl | |
>>> from datetime import datetime | |
>>> repl(globals()) | |
>>>> (let ((who "siege") (date 1999)) | |
(letrec ((fmt "Hello %s, party like it is %i!") | |
(msg (% fmt (make-tuple who date)))) | |
(println msg))) | |
--> ((lambda who, date: ((lambda fmt, msg: (fmt.__setitem__(0, "Hello %s, party like it is %i!"), msg.__setitem__(0, (fmt[0] % (who[0], date[0],))), __import__('sys').stdout.writelines(map(str, (msg[0], '\n'))),)[-1])([None], [None])))(["siege"], [1999])) | |
Hello siege, party like it is 1999! | |
>>>> (println "But..." "it isn't" 1999 "anymore, it's" (. (datetime.now) year)) | |
--> __import__('sys').stdout.writelines(map(str, ("But...", " ", "it isn't", " ", 1999, " ", "anymore, it's", " ", datetime.now().year, '\n'))) | |
But... it isn't 1999 anymore, it's 2014 | |
>>>> (quit) | |
>>> quit() | |
maybe:python-spexy siege$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment