Obfuscated Erlang Results

Mats Cronqvist mats.cronqvist@REDACTED
Thu Dec 8 11:51:03 CET 2005



Marc van Woerkom wrote:
>> http://www.erlang-consulting.com/obfuscatederlang_fs.html
>
> [...]
> 
>> And finally, the judges were forced to add a third prize, the Judge’s 
>> prize, as they were unexpectedly confronted with a breathtaking 
>> submission that had been used in a live system. Mats, don't show this 
>> to your QA people ;-)
> 
> 
> Really mind gobbling. It was really generated manually? :)
> 
> Regards,
> Marc

   does this means i passed the reverse Turing test?

   mats

p.s. there's actually a man page for my submission. for the oneliner, please 
replace rdbg:rdbg(...) with Rdbg(...)


NAME
   rdbg - restricted debugging utility

SYNOPSIS
   rdbg:rdbg(Time,Msgs,Proc,Trc).

DESCRIPTION
   An interface to the trace mechanism, safer (hopefully) than
   dbg. Disallows some of the more dangerous traces and exits if it
   gets flooded by trace messages. It runs in the background,
   collecting trace messages, until it reaches one of it's termination
   criteria (number of messages or maximum time). Prints the resulting
   trace messages like this;
[{Process, Timestamp, Data}...]
   Process is the registered name, if any, or else the initital call {M,F,A}.
   Timestamp is {Hour, Minute, Second, Microsecond}

   Proc can be; the atom 'all', a registered name, a pid, or the tuple
   {pid,I1,I2} (which specifies the pid <0.I1.I2>).
   Trc can be; the atom 'send', the atom 'receive', or a list of restricted
   trace patterns (RTP).
   An RTP is a tuple {Module, Function, RMSs, LocalGlobal}
   where LocalGlobal is one of the atoms 'local' or 'global'. 'global' means
   that only fully qualified function
   calls (i.e. M:F()) are traced. Defaults to 'global'.
   RMSs is a list of restricted match specs (RMS). It defaults to [].
   An RMS can be; the atom 'stack', the atom 'return', or a description of the
   argument list. E.g. the list;
[1,'_',x]
   would match is the arity of the called function is 3, the first argument is
   1 and the third argument is 'x'.

EXAMPLES

rdbg:rdbg(3000,3,prfSys,'receive').
** rdbg, 1 msgs **
[{'receive',{12,18,22,9867},{timeout,#Ref<0.0.2.57760>,tick}}]

rdbg:rdbg(3000,3,all,{erlang,now}).
** rdbg, 2 msgs **
[{prfSys,{12,19,0,21791},{erlang,now,[]}},
  {prfSys,{12,19,2,42},{erlang,now,[]}}]

rdbg:rdbg(3000,3,all,{erlang,now,[return]}).
** rdbg, 2 msgs **
[{prfSys,{12,19,48,10871},{erlang,now,[]}},
  {return,{erlang,now,0},{1098,699588,10873}}]

rdbg:rdbg(3000,3,all,{erlang,now,[return,stack]}).
(erl@REDACTED)1> erlang:now().
{1098,699830,908663}
** rdbg, 2 msgs **
[{{erlang,apply,2},
   {12,23,50,908660},
   {{stack,['shell:eval_loop/2 ']},
    {erlang,now,[]}}},
  {return,{erlang,now,0},{1098,699830,908663}}]

rdbg:rdbg(3000,3,all,{ets,tab2list,[{inet_db}]}).
(erl@REDACTED)1> ets:tab2list(inet_db).
(erl@REDACTED)2> ets:tab2list(ac_tab).
** rdbg, 1 msgs **
[{{erlang,apply,2},{14,52,1,357496},{ets,tab2list,[inet_db]}}]



More information about the erlang-questions mailing list