Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
| Lisp interpreter in 90 lines of C++ | |
| I've enjoyed reading Peter Norvig's recent articles on Lisp. He implements a Scheme interpreter in 90 lines of Python in the first, and develops it further in the second. | |
| Just for fun I wondered if I could write one in C++. My goals would be | |
| 1. A Lisp interpreter that would complete Peter's Lis.py test cases correctly... | |
| 2. ...in no more than 90 lines of C++. | |
| Although I've been thinking about this for a few weeks, as I write this I have not written a line of the code. I'm pretty sure I will achieve 1, and 2 will be... a piece of cake! |
| // NOTE: For an actively-maintained version of this script, see https://github.com/mminer/consolation. | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| /// <summary> | |
| /// A console to display Unity's debug logs in-game. | |
| /// </summary> | |
| public class Console : MonoBehaviour | |
| { |
| # File Transfer for Pythonista | |
| # ============================ | |
| # This script allows you to transfer Python files from | |
| # and to Pythonista via local Wifi. | |
| # It starts a basic HTTP server that you can access | |
| # as a web page from your browser. | |
| # When you upload a file that already exists, it is | |
| # renamed automatically. | |
| # From Pythonista's settings, you can add this script | |
| # to the actions menu of the editor for quick access. |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
| using System; | |
| using System.IO; | |
| using System.Net; | |
| using System.Text; | |
| using System.Collections.Generic; | |
| public class SSEvent { | |
| public string Name { get; set; } | |
| public string Data { get; set; } |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| /*/ | |
| C++ Garbage Collection Library | |
| ============================== | |
| This is a library to manage memory in C++ programs using a garbage | |
| collector. It uses a mark and sweep algorithm. | |
| All objects that are to be managed by the collector should be derived | |
| from GCObject: |
| sudo rm -rf /Library/Frameworks/GHC.framework | |
| sudo rm -rf /Library/Frameworks/HaskellPlatform.framework | |
| sudo rm -rf /Library/Haskell | |
| rm -rf .cabal | |
| rm -rf .ghc | |
| rm -rf ~/Library/Haskell | |
| find /usr/bin /usr/local/bin -type l | \ | |
| xargs -If sh -c '/bin/echo -n f /; readlink f' | \ | |
| egrep '//Library/(Haskell|Frameworks/(GHC|HaskellPlatform).framework)' | \ | |
| cut -f 1 -d ' ' > /tmp/hs-bin-links |
| Shader "StandardDoubleSide" | |
| { | |
| Properties | |
| { | |
| _Color("Color", Color) = (1,1,1,1) | |
| _MainTex("Albedo", 2D) = "white" {} | |
| _Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 | |
| _Glossiness("Smoothness", Range(0.0, 1.0)) = 0.5 |