Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry session
Debugger
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class DecisionTree : IEnumerable<DecisionTree>, IEnumerable | |
{ | |
public int Height { get; private set; } | |
public int Value { get; private set; } | |
public DecisionTree Left { get; set; } |
Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry sessionDebugger
appendlist([], X, X). | |
appendlist([T|H], X, [T|L]) :- appendlist(H, X, L). | |
permutation([], []). | |
permutation([X], [X]) :-!. | |
permutation([T|H], X) :- permutation(H, H1), appendlist(L1, L2, H1), appendlist(L1, [T], X1), appendlist(X1, L2, X). |
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! |