Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

fuck Ruby

Name: Anonymous 2011-11-05 15:21

Any language that allows shit like this should be outlawed.

find_match([H|T], L, LastVal, D, Free, Out) ->
    case dict:find([H|L], D) of
    {ok, Val} ->
        find_match(T, [H|L], Val, D, Free, Out);
    error ->
        D1 = dict:store([H|L], Free, D),
        encode([H|T], D1, Free+1, [LastVal|Out])
    end;
find_match([], _, LastVal, _, _, Out) ->
    reverse([LastVal|Out]).

Name: Anonymous 2011-11-05 15:56

>>11
>>> import sys
>>> from StringIO import StringIO
>>> stdout = sys.stdout
>>> out = StringIO()
>>> a = [1,2,"Qwe",None,2.345,False]
>>> a
[1, 2, 'Qwe', None, 2.3450000000000002, False]
>>> sys.stdout = out
>>> print a
>>> sys.stdout = stdout
>>> out.seek(0)
>>> s = out.read()
>>> print s
[1, 2, 'Qwe', None, 2.3450000000000002, False]

>>> b = eval(s)
>>> print b
[1, 2, 'Qwe', None, 2.3450000000000002, False]


Yes.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List