{"action":"created","comment":{"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/comments/48105817","id":48105817,"diff_hunk":"@@ -4,860 +4,199 @@ use strict;\n use warnings;\n use Test::More;\n use DDG::Test::Goodie;\n-use DDG::Goodie::Calculator;    # For function subtests.\n use utf8;\n \n-zci answer_type => 'calc';\n+zci answer_type => 'calculation';\n zci is_cached   => 1;\n \n+sub build_result {\n+    my ($result, $formatted_input) = @_;\n+    $formatted_input = '' unless $formatted_input;\n+    return $result, structured_answer => {\n+        id => 'calculator',\n+        name => 'Answer',\n+        data => {\n+            title => $result,\n+            subtitle => \"Calculate: $formatted_input\",\n+        },\n+        templates => {\n+            group => 'text',\n+            moreAt => 0,\n+        }\n+    };\n+}\n+\n+sub build_test {\n+    my ($expected_result, $expected_input_format) = @_;\n+    return test_zci(build_result($expected_result, $expected_input_format));\n+}\n+\n ddg_goodie_test(\n     [qw( DDG::Goodie::Calculator )],\n-    'what is 2-2' => test_zci(\n-        \"2 - 2 = 0\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['2 - 2'],\n-            operation => 'Calculate',\n-            result    => qr/>0</\n-        }\n-    ),\n-    'solve 2+2' => test_zci(\n-        \"2 + 2 = 4\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['2 + 2'],\n-            operation => 'Calculate',\n-            result    => qr/>4</\n-        }\n-    ),\n-    '2^8' => test_zci(\n-        \"2 ^ 8 = 256\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['2 ^ 8'],\n-            operation => 'Calculate',\n-            result    => qr/>256</\n-        }\n-    ),\n-    '2 *7' => test_zci(\n-        \"2 * 7 = 14\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['2 * 7'],\n-            operation => 'Calculate',\n-            result    => qr/>14</\n-        }\n-    ),\n-    '4 ∙ 5' => test_zci(\n-        \"4 * 5 = 20\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['4 * 5'],\n-            operation => 'Calculate',\n-            result    => qr/>20</\n-        }\n-    ),\n-    '6 ⋅ 7' => test_zci(\n-        \"6 * 7 = 42\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['6 * 7'],\n-            operation => 'Calculate',\n-            result    => qr/>42</\n-        }\n-    ),\n-    '3 × dozen' => test_zci(\n-        \"3 * dozen = 36\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['3 * dozen'],\n-            operation => 'Calculate',\n-            result    => qr/>36</\n-        }\n-    ),\n-    'dozen ÷ 4' => test_zci(\n-        \"dozen / 4 = 3\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['dozen / 4'],\n-            operation => 'Calculate',\n-            result    => qr/>3</\n-        }\n-    ),\n-    '1 dozen * 2' => test_zci(\n-        \"1 dozen * 2 = 24\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['1 dozen * 2'],\n-            operation => 'Calculate',\n-            result    => qr/>24</\n-        }\n-    ),\n-    'dozen + dozen' => test_zci(\n-        \"dozen + dozen = 24\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['dozen + dozen'],\n-            operation => 'Calculate',\n-            result    => qr/>24</\n-        }\n-    ),\n-    '2divided by 4' => test_zci(\n-        \"2 divided by 4 = 0.5\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['2 divided by 4'],\n-            operation => 'Calculate',\n-            result    => qr/>0.5</\n-        }\n-    ),\n-    '2^2' => test_zci(\n-        \"2 ^ 2 = 4\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['2 ^ 2'],\n-            operation => 'Calculate',\n-            result    => qr/>4</\n-        }\n-    ),\n-    '2^0.2' => test_zci(\n-        \"2 ^ 0.2 = 1.14869835499704\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['2 ^ 0.2'],\n-            operation => 'Calculate',\n-            result    => qr/>1\\.14869835499704</\n-        }\n-    ),\n-    'cos(0)' => test_zci(\n-        \"cos(0) = 1\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['cos(0)'],\n-            operation => 'Calculate',\n-            result    => qr/>1</\n-        }\n-    ),\n-    'tan(1)' => test_zci(\n-        \"tan(1) = 1.5574077246549\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['tan(1)'],\n-            operation => 'Calculate',\n-            result    => qr/>1\\.5574077246549</\n-        }\n-    ),\n-    'tanh(1)' => test_zci(\n-        \"tanh(1) = 0.761594155955765\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['tanh(1)'],\n-            operation => 'Calculate',\n-            result    => qr/>0\\.761594155955765</\n-        }\n-    ),\n-    'cotan(1)' => test_zci(\n-        \"cotan(1) = 0.642092615934331\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['cotan(1)'],\n-            operation => 'Calculate',\n-            result    => qr/>0\\.642092615934331</\n-        }\n-    ),\n-    'sin(1)' => test_zci(\n-        \"sin(1) = 0.841470984807897\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['sin(1)'],\n-            operation => 'Calculate',\n-            result    => qr/>0\\.841470984807897</\n-        }\n-    ),\n-    'csc(1)' => test_zci(\n-        \"csc(1) = 1.18839510577812\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['csc(1)'],\n-            operation => 'Calculate',\n-            result    => qr/>1\\.18839510577812</\n-        }\n-    ),\n-    'sec(1)' => test_zci(\n-        \"sec(1) = 1.85081571768093\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['sec(1)'],\n-            operation => 'Calculate',\n-            result    => qr/>1\\.85081571768093</\n-        }\n-    ),\n-    'log(3)' => test_zci(\n-        \"log(3) = 1.09861228866811\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['log(3)'],\n-            operation => 'Calculate',\n-            result    => qr/>1\\.09861228866811</\n-        }\n-    ),\n-    'ln(3)' => test_zci(\n-        \"log(3) = 1.09861228866811\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['log(3)'],\n-            operation => 'Calculate',\n-            result    => qr/>1\\.09861228866811</\n-        }\n-    ),\n-    'log10(100.00)' => test_zci(\n-        \"log10(100.00) = 2\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['log10(100.00)'],\n-            operation => 'Calculate',\n-            result    => qr/>2</\n-        }\n-    ),\n-    'log_10(100.00)' => test_zci(\n-        \"log_10(100.00) = 2\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['log_10(100.00)'],\n-            operation => 'Calculate',\n-            result    => qr/>2</\n-        }\n-    ),\n-    'log_2(16)' => test_zci(\n-        \"log_2(16) = 4\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['log_2(16)'],\n-            operation => 'Calculate',\n-            result    => qr/>4</\n-        }\n-    ),\n-    'log_23(25)' => test_zci(\n-        \"log_23(25) = 1.0265928122321\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['log_23(25)'],\n-            operation => 'Calculate',\n-            result    => qr/>1\\.0265928122321</\n-        }\n-    ),\n-    'log23(25)' => test_zci(\n-        \"log23(25) = 1.0265928122321\",\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['log23(25)'],\n-            operation => 'Calculate',\n-            result    => qr/>1\\.0265928122321</\n-        }\n-    ),\n-    '$3.43+$34.45' => test_zci(\n-        '$3.43 + $34.45 = $37.88',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['$3.43 + $34.45'],\n-            operation => 'Calculate',\n-            result    => qr/>\\$37\\.88</\n-        }\n-    ),\n-    '$3.45+$34.45' => test_zci(\n-        '$3.45 + $34.45 = $37.90',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['$3.45 + $34.45'],\n-            operation => 'Calculate',\n-            result    => qr/>\\$37\\.90</\n-        }\n-    ),\n-    '$3+$34' => test_zci(\n-        '$3 + $34 = $37.00',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['$3 + $34'],\n-            operation => 'Calculate',\n-            result    => qr/>\\$37\\.00</\n-        }\n-    ),\n-    '$3,4+$34,4' => test_zci(\n-        '$3,4 + $34,4 = $37,80',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['$3,4 + $34,4'],\n-            operation => 'Calculate',\n-            result    => qr/>\\$37,80</\n-        }\n-    ),\n-    '64*343' => test_zci(\n-        '64 * 343 = 21,952',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['64 * 343'],\n-            operation => 'Calculate',\n-            result    => qr/>21,952</\n-        }\n-    ),\n-    '1E2 + 1' => test_zci(\n-        '(1  *  10 ^ 2) + 1 = 101',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['(1  *  10 ^ 2) + 1'],\n-            operation => 'Calculate',\n-            result    => qr/>101</\n-        }\n-    ),\n-    '1 + 1E2' => test_zci(\n-        '1 + (1  *  10 ^ 2) = 101',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['1 + (1  *  10 ^ 2)'],\n-            operation => 'Calculate',\n-            result    => qr/>101</\n-        }\n-    ),\n-    '2 * 3 + 1E2' => test_zci(\n-        '2 * 3 + (1  *  10 ^ 2) = 106',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['2 * 3 + (1  *  10 ^ 2)'],\n-            operation => 'Calculate',\n-            result    => qr/>106</\n-        }\n-    ),\n-    '1E2 + 2 * 3' => test_zci(\n-        '(1  *  10 ^ 2) + 2 * 3 = 106',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['(1  *  10 ^ 2) + 2 * 3'],\n-            operation => 'Calculate',\n-            result    => qr/>106</\n-        }\n-    ),\n-    '1E2 / 2' => test_zci(\n-        '(1  *  10 ^ 2) / 2 = 50',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['(1  *  10 ^ 2) / 2'],\n-            operation => 'Calculate',\n-            result    => qr/>50</\n-        }\n-    ),\n-    '2 / 1E2' => test_zci(\n-        '2 / (1  *  10 ^ 2) = 0.02',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['2 / (1  *  10 ^ 2)'],\n-            operation => 'Calculate',\n-            result    => qr/>0\\.02</\n-        }\n-    ),\n-    '424334+2253828' => test_zci(\n-        '424334 + 2253828 = 2,678,162',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['424334 + 2253828'],\n-            operation => 'Calculate',\n-            result    => qr/>2,678,162</\n-        }\n-    ),\n-    '4.243,34+22.538,28' => test_zci(\n-        '4.243,34 + 22.538,28 = 26.781,62',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['4.243,34 + 22.538,28'],\n-            operation => 'Calculate',\n-            result    => qr/>26\\.781,62</\n-        }\n-    ),\n-    'sin(1,0) + 1,05' => test_zci(\n-        'sin(1,0) + 1,05 = 1,8914709848079',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['sin(1,0) + 1,05'],\n-            operation => 'Calculate',\n-            result    => qr/>1,8914709848079</\n-        }\n-    ),\n-    '21 + 15 x 0 + 5' => test_zci(\n-        '21 + 15 * 0 + 5 = 26',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['21 + 15 * 0 + 5'],\n-            operation => 'Calculate',\n-            result    => qr/>26</\n-        }\n-    ),\n-    '0.8158 - 0.8157' => test_zci(\n-        '0.8158 - 0.8157 = 0.0001',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['0.8158 - 0.8157'],\n-            operation => 'Calculate',\n-            result    => qr/>0\\.0001</\n-        }\n-    ),\n-    '2,90 + 4,6' => test_zci(\n-        '2,90 + 4,6 = 7,50',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['2,90 + 4,6'],\n-            operation => 'Calculate',\n-            result    => qr/>7,50</\n-        }\n-    ),\n-    '2,90 + sec(4,6)' => test_zci(\n-        '2,90 + sec(4,6) = -6,01642861135959',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['2,90 + sec(4,6)'],\n-            operation => 'Calculate',\n-            result    => qr/>-6,01642861135959</\n-        }\n-    ),\n-    '100 - 96.54' => test_zci(\n-        '100 - 96.54 = 3.46',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['100 - 96.54'],\n-            operation => 'Calculate',\n-            result    => qr/>3\\.46</\n-        }\n-    ),\n-    '1. + 1.' => test_zci(\n-        '1. + 1. = 2',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['1. + 1.'],\n-            operation => 'Calculate',\n-            result    => qr/>2</\n-        }\n-    ),\n-    '1 + sin(pi)' => test_zci(\n-        '1 + sin(pi) = 1',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['1 + sin(pi)'],\n-            operation => 'Calculate',\n-            result    => qr/>1</\n-        }\n-    ),\n-    '1 - 1' => test_zci(\n-        '1 - 1 = 0',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['1 - 1'],\n-            operation => 'Calculate',\n-            result    => qr/>0</\n-        }\n-    ),\n-    'sin(pi/2)' => test_zci(\n-        'sin(pi / 2) = 1',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['sin(pi / 2)'],\n-            operation => 'Calculate',\n-            result    => qr/>1</\n-        }\n-    ),\n-    'sin(pi)' => test_zci(\n-        'sin(pi) = 0',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['sin(pi)'],\n-            operation => 'Calculate',\n-            result    => qr/>0</\n-        }\n-    ),\n-    'cos(2pi)' => test_zci(\n-        'cos(2 pi) = 1',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['cos(2 pi)'],\n-            operation => 'Calculate',\n-            result    => qr/>1</\n-        }\n-    ),\n-    '5 squared' => test_zci(\n-        '5 ^ 2 = 25',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['5 ^ 2'],\n-            operation => 'Calculate',\n-            result    => qr/>25</\n-        }\n-    ),\n-    'sqrt(4)' => test_zci(\n-        'sqrt(4) = 2',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['sqrt(4)'],\n-            operation => 'Calculate',\n-            result    => qr/>2</\n-        }\n-    ),\n-    '1.0 + 5 squared' => test_zci(\n-        '1.0 + 5 ^ 2 = 26',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['1.0 + 5 ^ 2'],\n-            operation => 'Calculate',\n-            result    => qr/>26</\n-        }\n-    ),\n-    '3 squared + 4 squared' => test_zci(\n-        '3 ^ 2 + 4 ^ 2 = 25',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['3 ^ 2 + 4 ^ 2'],\n-            operation => 'Calculate',\n-            result    => qr/>25</\n-        }\n-    ),\n-    '2,2 squared' => test_zci(\n-        '2,2 ^ 2 = 4,84',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['2,2 ^ 2'],\n-            operation => 'Calculate',\n-            result    => qr/>4,84</\n-        }\n-    ),\n-    '0.8^2 + 0.6^2' => test_zci(\n-        '0.8 ^ 2 + 0.6 ^ 2 = 1',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['0.8 ^ 2 + 0.6 ^ 2'],\n-            operation => 'Calculate',\n-            result    => qr/>1</,\n-        }\n-    ),\n-    '2 squared ^ 3' => test_zci(\n-        '2 ^ 2 ^ 3 = 256',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['2 ^ 2 ^ 3'],\n-            operation => 'Calculate',\n-            result    => qr/>256</\n-        }\n-    ),\n-    '2 squared ^ 3.06' => test_zci(\n-        '2 ^ 2 ^ 3.06 = 323.972172143725',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['2 ^ 2 ^ 3.06'],\n-            operation => 'Calculate',\n-            result    => qr/>323\\.972172143725</\n-        }\n-    ),\n-    '2^3 squared' => test_zci(\n-        '2 ^ 3 ^ 2 = 512',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['2 ^ 3 ^ 2'],\n-            operation => 'Calculate',\n-            result    => qr/>512</\n-        }\n-    ),\n-    'sqrt(2)' => test_zci(\n-        'sqrt(2) = 1.4142135623731',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['sqrt(2)'],\n-            operation => 'Calculate',\n-            result    => qr/>1\\.4142135623731</\n-        }\n-    ),\n-    'sqrt(3 pi / 4 + 1) + 1' => test_zci(\n-        'sqrt(3 pi / 4 + 1) + 1 = 2.83199194599549',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['sqrt(3 pi / 4 + 1) + 1'],\n-            operation => 'Calculate',\n-            result    => qr/>2\\.83199194599549</\n-        }\n-    ),\n-    '4 score + 7' => test_zci(\n-        '4 score + 7 = 87',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['4 score + 7'],\n-            operation => 'Calculate',\n-            result    => qr/>87</\n-        }\n-    ),\n-    '418.1 / 2' => test_zci(\n-        '418.1 / 2 = 209.05',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['418.1 / 2'],\n-            operation => 'Calculate',\n-            result    => qr/>209\\.05</\n-        }\n-    ),\n-    '418.005 / 8' => test_zci(\n-        '418.005 / 8 = 52.250625',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['418.005 / 8'],\n-            operation => 'Calculate',\n-            result    => qr/>52\\.250625</\n-        }\n-    ),\n-    '(pi^4+pi^5)^(1/6)' => test_zci(\n-        '(pi ^ 4 + pi ^ 5) ^ (1 / 6) = 2.71828180861191',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['(pi ^ 4 + pi ^ 5) ^ (1 / 6)'],\n-            operation => 'Calculate',\n-            result    => qr/>2\\.71828180861191</\n-        }\n-    ),\n-    '(pi^4+pi^5)^(1/6)+1' => test_zci(\n-        '(pi ^ 4 + pi ^ 5) ^ (1 / 6) + 1 = 3.71828180861191',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['(pi ^ 4 + pi ^ 5) ^ (1 / 6) + 1'],\n-            operation => 'Calculate',\n-            result    => qr/>3\\.71828180861191</\n-        }\n-    ),\n-    '5^4^(3-2)^1' => test_zci(\n-        '5 ^ 4 ^ (3 - 2) ^ 1 = 625',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['5 ^ 4 ^ (3 - 2) ^ 1'],\n-            operation => 'Calculate',\n-            result    => qr/>625</\n-        }\n-    ),\n-    '(5-4)^(3-2)^1' => test_zci(\n-        '(5 - 4) ^ (3 - 2) ^ 1 = 1',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['(5 - 4) ^ (3 - 2) ^ 1'],\n-            operation => 'Calculate',\n-            result    => qr/>1</\n-        }\n-    ),\n-    '(5+4-3)^(2-1)' => test_zci(\n-        '(5 + 4 - 3) ^ (2 - 1) = 6',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['(5 + 4 - 3) ^ (2 - 1)'],\n-            operation => 'Calculate',\n-            result    => qr/>6</\n-        }\n-    ),\n-    '5^((4-3)*(2+1))+6' => test_zci(\n-        '5 ^ ((4 - 3) * (2 + 1)) + 6 = 131',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['5 ^ ((4 - 3) * (2 + 1)) + 6'],\n-            operation => 'Calculate',\n-            result    => qr/>131</\n-        }\n-    ),\n-    '20x07' => test_zci(\n-        '20 * 07 = 140',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['20 * 07'],\n-            operation => 'Calculate',\n-            result    => qr/>140</\n-        }\n-    ),\n-    '83.166.167.160/33' => test_zci(\n-        '83.166.167.160 / 33 = 2.520.186.883,63636',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['83.166.167.160 / 33'],\n-            operation => 'Calculate',\n-            result    => qr/>2\\.520\\.186\\.883,63636</\n-        }\n-    ),\n-    '123.123.123.123/255.255.255.256' => test_zci(\n-        '123.123.123.123 / 255.255.255.256 = 0,482352941174581',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['123.123.123.123 / 255.255.255.256'],\n-            operation => 'Calculate',\n-            result    => qr/>0,482352941174581</\n-        }\n-    ),\n-    '4E5 +1 ' => test_zci(\n-        '(4  *  10 ^ 5) + 1 = 400,001',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['(4  *  10 ^ 5) + 1'],\n-            operation => 'Calculate',\n-            result    => qr/>400,001</\n-        }\n-    ),\n-    '4e5 +1 ' => test_zci(\n-        '(4  *  10 ^ 5) + 1 = 400,001',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['(4  *  10 ^ 5) + 1'],\n-            operation => 'Calculate',\n-            result    => qr/>400,001</\n-        }\n-    ),\n-    '3e-2* 9 ' => test_zci(\n-        '(3  *  10 ^- 2) * 9 = 0.27',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['(3  *  10 ^- 2) * 9'],\n-            operation => 'Calculate',\n-            result    => qr/>0.27</\n-        }\n-    ),\n-    '7e-4 *8' => test_zci(\n-        '(7  *  10 ^- 4) * 8 = 0.0056',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['(7  *  10 ^- 4) * 8'],\n-            operation => 'Calculate',\n-            result    => qr/>0.0056</\n-        }\n-    ),\n-    '6 * 2e-11' => test_zci(\n-        '6 * (2  *  10 ^- 11) = 1.2 * 10^-10',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['6 * (2  *  10 ^- 11)'],\n-            operation => 'Calculate',\n-            result    => qr/>1\\.2 \\* 10<sup>-10<\\/sup></\n-        }\n-    ),\n-    '7 + 7e-7' => test_zci(\n-        '7 + (7  *  10 ^- 7) = 7.0000007',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['7 + (7  *  10 ^- 7)'],\n-            operation => 'Calculate',\n-            result    => qr/>7.0000007</\n-        }\n-    ),\n-    '1 * 7 + e-7' => test_zci(\n-        '1 * 7 + e - 7 = 2.71828182845905',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['1 * 7 + e - 7'],\n-            operation => 'Calculate',\n-            result    => qr/>2.71828182845905</\n-        }\n-    ),\n-    '7 * e- 5' => test_zci(\n-        '7 * e - 5 = 14.0279727992134',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['7 * e - 5'],\n-            operation => 'Calculate',\n-            result    => qr/>14.0279727992134</\n-        }\n-    ),\n-    'pi/1e9' => test_zci(\n-        'pi / (1  *  10 ^ 9) = 3.14159265358979 * 10^-9',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['pi / (1  *  10 ^ 9)'],\n-            operation => 'Calculate',\n-            result    => qr/>3\\.14159265358979 \\* 10<sup>-9<\\/sup></\n-        }\n-    ),\n-    'pi*1e9' => test_zci(\n-        'pi * (1  *  10 ^ 9) = 3,141,592,653.58979',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['pi * (1  *  10 ^ 9)'],\n-            operation => 'Calculate',\n-            result    => qr/>3,141,592,653\\.58979</\n-        }\n-    ),\n-    '1 234 + 5 432' => test_zci(\n-        '1234 + 5432 = 6,666',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['1234 + 5432'],\n-            operation => 'Calculate',\n-            result    => qr/6,666/\n-        }\n-    ),\n-    '1_234 + 5_432' => test_zci(\n-        '1234 + 5432 = 6,666',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['1234 + 5432'],\n-            operation => 'Calculate',\n-            result    => qr/6,666/\n-        }\n-    ),\n-    '(0.4e^(0))*cos(0)' => test_zci(\n-        '(0.4e ^ (0)) * cos(0) = 0.4',\n-        heading => 'Calculator',\n-        structured_answer => {\n-            input => ['(0.4e ^ (0)) * cos(0)'],\n-            operation => 'Calculate',\n-            result => qr'0.4'\n-        }\n-    ),\n-    '2pi' => test_zci(\n-        '2 pi = 6.28318530717958',\n-        heading => 'Calculator',\n-        structured_answer => {\n-            input => ['2 pi'],\n-            operation => 'Calculate',\n-            result => qr\"6.28318530717958\"\n-        }\n-    ),\n-    'fact(3)' => test_zci(\n-        'fact(3) = 6',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['fact(3)'],\n-            operation => 'Calculate',\n-            result    => qr/>6</\n-        }\n-    ),\n-    'factorial(3)' => test_zci(\n-        'fact(3) = 6',\n-        heading           => 'Calculator',\n-        structured_answer => {\n-            input     => ['fact(3)'],\n-            operation => 'Calculate',\n-            result    => qr/>6</\n-        }\n-    ),\n+    # Trigger\n+    'what is 2-2'   => build_test('0', '2 - 2'),\n+    'solve 2+2'     => build_test('4', '2 + 2'),\n+    # Named constants\n+    'dozen ÷ 4'     => build_test('3', 'dozen / 4'),\n+    '1 dozen * 2'   => build_test('24', '1 dozen * 2'),\n+    'dozen + dozen' => build_test('24', 'dozen + dozen'),\n+    '4 score + 7'   => build_test('87', '4 score + 7'),\n+    '2pi'           => build_test('6.28318530718', '2 pi'),\n+    '(pi^4+pi^5)^(1/6)'   => build_test('2.718281808612', '(pi ^ 4 + pi ^ 5) ^ (1 / 6)'),\n+    '(pi^4+pi^5)^(1/6)+1' => build_test('3.718281808612', '(pi ^ 4 + pi ^ 5) ^ (1 / 6) + 1'),\n+    # Misc\n+    '64*343'              => build_test('21,952', '64 * 343'),\n+    '2 *7'                => build_test('14', '2 * 7'),\n+    '418.1 / 2'           => build_test('4,181/20', '418.1 / 2'),\n+    '418.005 / 8'         => build_test('83,601/1,600', '418.005 / 8'),\n+    '0.8158 - 0.8157'     => build_test('1/10,000', '0.8158 - 0.8157'),\n+    '424334+2253828'      => build_test('2,678,162', '424,334 + 2,253,828'),\n+    '1 + 7'               => build_test('8', '1 + 7'),\n+    '8 / 4',              => build_test('2', '8 / 4'),\n+    # Powers\n+    '10 ^ 5'            => build_test('100,000', '10 ^ 5'),\n+    '2 ** 10'           => build_test('1,024', '2 ^ 10'),\n+    '2 ** -9'           => build_test('1/512', '2 ^ -9'),\n+    '9 ** (1/2)'        => build_test('3', '9 ^ (1 / 2)'),\n+    '9 ** (-1/2)'       => build_test('1/3', '9 ^ (-1 / 2)'),\n+    '16 ** 0.25'        => build_test('2', '16 ^ 0.25'),\n+    '25 ** -0.5'        => build_test('1/5', '25 ^ -0.5'),\n+    '2^2'               => build_test('4', '2 ^ 2'),\n+    '2^0.2'             => build_test('1.148698354997', '2 ^ 0.2'),\n+    '2^8'               => build_test('256', '2 ^ 8'),\n+    '0.8^2 + 0.6^2'     => build_test('1', '0.8 ^ 2 + 0.6 ^ 2'),\n+    '5^4^(3-2)^1'       => build_test('625', '5 ^ 4 ^ (3 - 2) ^ 1'),\n+    '5^((4-3)*(2+1))+6' => build_test('131', '5 ^ ((4 - 3) * (2 + 1)) + 6'),\n+    '(5-4)^(3-2)^1'     => build_test('1', '(5 - 4) ^ (3 - 2) ^ 1'),\n+    '(5+4-3)^(2-1)'     => build_test('6', '(5 + 4 - 3) ^ (2 - 1)'),\n+    # Logarithms\n+    'log(3)'         => build_test('1.098612288668', 'ln(3)'),\n+    'ln(3)'          => build_test('1.098612288668', 'ln(3)'),\n+    'log10(100.00)'  => build_test('2', 'log10(100.00)'),\n+    'log_10(100.00)' => build_test('2', 'log10(100.00)'),\n+    'log_2(16)'      => build_test('4', 'log2(16)'),\n+    'log_23(25)'     => build_test('1.026592812232', 'log23(25)'),\n+    'log23(25)'      => build_test('1.026592812232', 'log23(25)'),\n+    # Currency\n+    '$3.43+$34.45' => build_test('$37.88', '$3.43 + $34.45'),\n+    '$3.45+$34.45' => build_test('$37.90', '$3.45 + $34.45'),\n+    '$3+$34'       => build_test('$37.00', '$3.00 + $34.00'),\n+    '$3,4+$34,4'   => build_test('$37,80', '$3,40 + $34,40'),\n+    '$2 + $7'      => build_test('$9.00',  '$2.00 + $7.00'),\n+    '$5'           => undef,\n+    'solve $50'    => undef,\n+    # Exponential notation\n+    '1E2 + 1'         => build_test('101', '1e2 + 1'),\n+    '1 + 1E2'         => build_test('101', '1 + 1e2'),\n+    '2 * 3 + 1E2'     => build_test('106', '2 * 3 + 1e2'),\n+    '1E2 + 2 * 3'     => build_test('106', '1e2 + 2 * 3'),\n+    '1E2 / 2'         => build_test('50', '1e2 / 2'),\n+    '2 / 1E2'         => build_test('1/50', '2 / 1e2'),\n+    '4E5 +1 '         => build_test('400,001', '4e5 + 1'),\n+    '4e5 +1 '         => build_test('400,001', '4e5 + 1'),\n+    '3e-2* 9 '        => build_test('0.27', '3e-2 * 9'),\n+    '7e-4 *8'         => build_test('0.0056', '7e-4 * 8'),\n+    '6 * 2e-11'       => build_test('1.2 * 10^-10', '6 * 2e-11'),\n+    '7 + 7e-7'        => build_test('7.0000007', '7 + 7e-7'),\n+    '1 * 7 + e-7'     => build_test('2.718281828459', '1 * 7 + e - 7'),\n+    '7 * e- 5'        => build_test('14.02797279921', '7 * e - 5'),\n+    '21 + 15 x 0 + 5' => build_test('26', '21 + 15 * 0 + 5'),\n+    # NOTE: Changed from 7,50\n+    '2,90 + 4,6'  => build_test('15/2', '2,90 + 4,6'),\n+    '100 - 96.54' => build_test('173/50', '100 - 96.54'),\n+    '1. + 1.'     => build_test('2', '1. + 1.'),\n+    '1 - 1'       => build_test('0', '1 - 1'),\n+    # Trigonometric functions\n+    '1 + sin(pi)'          => build_test('1', '1 + sin(pi)'),\n+    '1 + (3 / cos(pi))'    => build_test('-2', '1 + (3 / cos(pi))'),\n+    'sin(pi/2)'            => build_test('1', 'sin(pi / 2)'),\n+    'sin(pi)'              => build_test('0', 'sin(pi)'),\n+    'sin(1,0) + 1,05'      => build_test('1,891470984808', 'sin(1,0) + 1,05'),\n+    'cos(2pi)'             => build_test('1', 'cos(2 pi)'),\n+    'cos(0)'               => build_test('1', 'cos(0)'),\n+    'tan(1)'               => build_test('1.557407724655', 'tan(1)'),\n+    'sin(800)'             => build_test('0.893969648197', 'sin(800)'),\n+    'sin(1.0) + 1,05'      => undef,\n+    # 'tanh(1)'            => build_test('0.761594155955765', 'tanh(1)'),\n+    'cotan(1)'             => build_test('0.6420926159343', 'cotan(1)'),\n+    '2.6 + (1 / cos(4.6))' => build_test('-6.31642861136', '2.6 + (1 / cos(4.6))'),\n+    'sin(1)'               => build_test('0.8414709848079', 'sin(1)'),\n+    'csc(1)'               => build_test('1.188395105778', 'csc(1)'),\n+    'sec(1)'               => build_test('1.850815717681', 'sec(1)'),\n+    '(0.4e^(0))*cos(0)'    => build_test('1', '(0.4 e ^ (0)) * cos(0)'),\n+    '2,90 + sec(4,6)'      => build_test('-6,01642861136', '2,90 + sec(4,6)'),\n+\n+    # Word functions\n+    '5 squared'             => build_test('25', '5 squared'),\n+    '3 squared + 4 squared' => build_test('25', '3 squared + 4 squared'),\n+    '2,2 squared'           => build_test('121/25', '2,2 squared'),\n+    '2 squared ^ 3'         => build_test('64', '2 squared ^ 3'),\n+    '2 squared ^ 3.06'      => build_test('69.55103120167', '2 squared ^ 3.06'),\n+    '2^3 squared'           => build_test('512', '2 ^ 3 squared'),\n+    '1.0 + 5 squared'       => build_test('26', '1.0 + 5 squared'),\n+    '2divided by 4'         => build_test('1/2', '2 / 4'),\n+    '60 divided by 15'      => build_test('4', '60 / 15'),\n+\n+    # Misc functions\n+    'sqrt(4)'                => build_test('2', 'sqrt(4)'),\n+    'sqrt(2)'                => build_test('1.414213562373', 'sqrt(2)'),\n+    'sqrt(3 pi / 4 + 1) + 1' => build_test('2.831991945996', 'sqrt(3 pi / 4 + 1) + 1'),\n+    # Alternate Symbols\n+    '20x07'                           => build_test('140', '20 * 07'),\n+    '4 ∙ 5'                           => build_test('20', '4 * 5'),\n+    '6 ⋅ 7'                           => build_test('42', '6 * 7'),\n+    '3 × dozen'                       => build_test('36', '3 * dozen'),\n+    '83.166.167.160/33'               => build_test('27.722.055.720/11', '83.166.167.160 / 33'),\n+    '123.123.123.123/255.255.255.256' => build_test('0,4823529411746', '123.123.123.123 / 255.255.255.256'),\n+    'pi/1e9'                          => build_test('3.14159265359 * 10^-9', 'pi / 1e9'),\n+    'pi*1e9'                          => build_test('3,141,592,653.59', 'pi * 1e9'),\n+    # Nationalization\n+    '1 234 + 5 432'      => build_test('6,666', '1,234 + 5,432'),\n+    '1_234 + 5_432'      => build_test('6,666', '1,234 + 5,432'),\n+    '4.243,34+22.538,28' => build_test('1.339.081/50', '4.243,34 + 22.538,28'),\n+    # Factorial\n+    'fact(3)'                         => build_test('6', 'factorial(3)'),\n+    'factorial(3)'                    => build_test('6', 'factorial(3)'),","path":"t/Calculator.t","position":977,"original_position":977,"commit_id":"8eaebbcfbbfb46d8679cf32c522bde3fb44a19a6","original_commit_id":"8eaebbcfbbfb46d8679cf32c522bde3fb44a19a6","user":{"login":"mintsoft","id":978048,"avatar_url":"https://avatars.githubusercontent.com/u/978048?v=3","gravatar_id":"","url":"https://api.github.com/users/mintsoft","html_url":"https://github.com/mintsoft","followers_url":"https://api.github.com/users/mintsoft/followers","following_url":"https://api.github.com/users/mintsoft/following{/other_user}","gists_url":"https://api.github.com/users/mintsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mintsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mintsoft/subscriptions","organizations_url":"https://api.github.com/users/mintsoft/orgs","repos_url":"https://api.github.com/users/mintsoft/repos","events_url":"https://api.github.com/users/mintsoft/events{/privacy}","received_events_url":"https://api.github.com/users/mintsoft/received_events","type":"User","site_admin":false},"body":"Is `3!` notation supported?","created_at":"2015-12-20T17:23:54Z","updated_at":"2015-12-20T17:23:54Z","html_url":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1927#discussion_r48105817","pull_request_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1927","_links":{"self":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/comments/48105817"},"html":{"href":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1927#discussion_r48105817"},"pull_request":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1927"}}},"pull_request":{"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1927","id":54186650,"html_url":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1927","diff_url":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1927.diff","patch_url":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1927.patch","issue_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/1927","number":1927,"state":"open","locked":false,"title":"Issue #1880 - Re-write calculator","user":{"login":"GuiltyDolphin","id":8598426,"avatar_url":"https://avatars.githubusercontent.com/u/8598426?v=3","gravatar_id":"","url":"https://api.github.com/users/GuiltyDolphin","html_url":"https://github.com/GuiltyDolphin","followers_url":"https://api.github.com/users/GuiltyDolphin/followers","following_url":"https://api.github.com/users/GuiltyDolphin/following{/other_user}","gists_url":"https://api.github.com/users/GuiltyDolphin/gists{/gist_id}","starred_url":"https://api.github.com/users/GuiltyDolphin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuiltyDolphin/subscriptions","organizations_url":"https://api.github.com/users/GuiltyDolphin/orgs","repos_url":"https://api.github.com/users/GuiltyDolphin/repos","events_url":"https://api.github.com/users/GuiltyDolphin/events{/privacy}","received_events_url":"https://api.github.com/users/GuiltyDolphin/received_events","type":"User","site_admin":false},"body":"This regards issue #1880 (and is still very much a work in progress).\r\n\r\nI'll update this with more information soon - and I'll be refactoring my commits and commit history to make it more legible.\r\n\r\n\r\n## Main design changes\r\n\r\nThe old calculator relied on Regular expressions in order to ensure correct triggering as well as parse the user input. The calculator would then use `eval` (on a timer) to generate the result. Additionally, the old Goodie made heavy use of substitutions to format the user's input and answer.\r\n\r\nThe new Goodie uses much fewer regular expressions  - instead I've used the parsing library `Marpa::R2`, along with a grammar, to generate a parse tree from the user's input.\r\n\r\nBecause the parse tree is guaranteed to be well-formed, the triggers can be much looser, as the Goodie will not accept inputs that do not entirely conform to the grammar.\r\n\r\nI then use a set of functions for generating the formatted input and the result from the parse tree.\r\n\r\n### Answer format\r\n\r\n*The Old*\r\n\r\n![screenshot from 2015-12-20 14 26 30](https://cloud.githubusercontent.com/assets/8598426/11918362/c3bf5a64-a725-11e5-9801-6959e15e2315.png)\r\n\r\n*The New*\r\n\r\n![screenshot from 2015-12-20 14 26 46](https://cloud.githubusercontent.com/assets/8598426/11918364/cebf05ae-a725-11e5-96ff-6bec28d5fb25.png)\r\n\r\nAs you can see I've opted for a more fraction-based approach to the answer format. Floating-point errors are annoying and will likely just annoy some people.\r\n\r\n*\"But wait!\"* I hear you cry. *\"I just love those floating-point errors!\"*\r\nNo worries, just re-query with the simplified fraction!\r\n\r\n![screenshot from 2015-12-20 14 42 48](https://cloud.githubusercontent.com/assets/8598426/11918410/fc899952-a727-11e5-81e9-c1667afa708f.png)\r\n\r\n**See the To-do section below, under 'Functionality' for an improvement upon this.**\r\n\r\n\r\n\r\n\r\n\r\n### Adding new functionality\r\n\r\nAdding new features to the old calculator was a pain! Even trying to fix a teensy little parsing bug was a nightmare because of the mass of regular expressions.\r\n\r\nIn the new calculator, adding simple functionality like new functions is a breeze.\r\n\r\nFirstly, add the relevant line to the grammar in `share/goodie/calculator/grammar.txt`;\r\n![screenshot from 2015-12-20 09 11 23](https://cloud.githubusercontent.com/assets/8598426/11917309/11eac7b8-a6fa-11e5-9004-f9c490c664a3.png)\r\n(this allows the user to use `exp(x)` to action the `exponential` function)\r\n\r\nThen add the definition to `lib/DDG/Goodie/Calculator.pm`;\r\n![screenshot from 2015-12-20 09 11 56](https://cloud.githubusercontent.com/assets/8598426/11917314/339ffe0a-a6fa-11e5-97aa-fe7f78feb2e7.png)\r\n\r\nDon't forget to add tests!\r\n\r\nI'm thinking of automagically generating the function grammar from the definitions in `Calculator.pm`, so maybe only one line will be needed for simple functions soon!\r\n\r\n## To-do\r\n\r\n### Source-related\r\n\r\n- [ ] Provide auto-magical generation of the grammar so developers don't have to worry about it.\r\n  - [ ] Unary functions\r\n  - [ ] Binary operations\r\n  - [ ] Constants\r\n\r\n### Functionality\r\n\r\n- [ ] Add support for binary functions.\r\n\r\n    I've spoken with @mintsoft about this one - there are some issues with the argument delimiter as commas will be a big issue due to the way numbers are handled (nationalization). @mintsoft suggested using semi-colons (so instead of `F(1, 2)` you would write `F(1; 2)`) - let me know what you think!\r\n\r\n- [ ] Add hyperbolic functions (`sinh`, `tanh` etc..)\r\n\r\n- [ ] Display recurring decimal notation where possible.\r\n\r\nI want your feedback on this one - I should be able to implement it fairly easily for short cycles (e.g., `1/3 = 0.333333...`) but I'll have to see about longer ones.\r\n\r\nIn terms of notation, using ASCII characters is going to be best. (the Wikipedia)[https://en.wikipedia.org/wiki/Repeating_decimal#Notation] article mentions the parenthesis notation - wherein the recurring part is surrounded in parentheses (thus `1/3` becomes `0.(3)`). I've also seen notation using square brackets (`0.[3]`). Let me know what you think!\r\n\r\n- [ ] Provide support for recurring decimals as input.\r\n\r\nSimilar to the previous point, but instead allow the user to enter queries like `0.(3)` and have the calculator recognize it as a third.","created_at":"2015-12-19T21:08:42Z","updated_at":"2015-12-20T17:23:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f69b88c871315f504572e89436eb8c59f3c33424","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1927/commits","review_comments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1927/comments","review_comment_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/comments{/number}","comments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/1927/comments","statuses_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/statuses/8eaebbcfbbfb46d8679cf32c522bde3fb44a19a6","head":{"label":"GuiltyDolphin:rewrite-calculator","ref":"rewrite-calculator","sha":"8eaebbcfbbfb46d8679cf32c522bde3fb44a19a6","user":{"login":"GuiltyDolphin","id":8598426,"avatar_url":"https://avatars.githubusercontent.com/u/8598426?v=3","gravatar_id":"","url":"https://api.github.com/users/GuiltyDolphin","html_url":"https://github.com/GuiltyDolphin","followers_url":"https://api.github.com/users/GuiltyDolphin/followers","following_url":"https://api.github.com/users/GuiltyDolphin/following{/other_user}","gists_url":"https://api.github.com/users/GuiltyDolphin/gists{/gist_id}","starred_url":"https://api.github.com/users/GuiltyDolphin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuiltyDolphin/subscriptions","organizations_url":"https://api.github.com/users/GuiltyDolphin/orgs","repos_url":"https://api.github.com/users/GuiltyDolphin/repos","events_url":"https://api.github.com/users/GuiltyDolphin/events{/privacy}","received_events_url":"https://api.github.com/users/GuiltyDolphin/received_events","type":"User","site_admin":false},"repo":{"id":47498140,"name":"zeroclickinfo-goodies","full_name":"GuiltyDolphin/zeroclickinfo-goodies","owner":{"login":"GuiltyDolphin","id":8598426,"avatar_url":"https://avatars.githubusercontent.com/u/8598426?v=3","gravatar_id":"","url":"https://api.github.com/users/GuiltyDolphin","html_url":"https://github.com/GuiltyDolphin","followers_url":"https://api.github.com/users/GuiltyDolphin/followers","following_url":"https://api.github.com/users/GuiltyDolphin/following{/other_user}","gists_url":"https://api.github.com/users/GuiltyDolphin/gists{/gist_id}","starred_url":"https://api.github.com/users/GuiltyDolphin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuiltyDolphin/subscriptions","organizations_url":"https://api.github.com/users/GuiltyDolphin/orgs","repos_url":"https://api.github.com/users/GuiltyDolphin/repos","events_url":"https://api.github.com/users/GuiltyDolphin/events{/privacy}","received_events_url":"https://api.github.com/users/GuiltyDolphin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GuiltyDolphin/zeroclickinfo-goodies","description":"DuckDuckGo instant answer plugins based on Perl functions","fork":true,"url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies","forks_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/forks","keys_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/teams","hooks_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/hooks","issue_events_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/issues/events{/number}","events_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/events","assignees_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/assignees{/user}","branches_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/branches{/branch}","tags_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/tags","blobs_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/git/refs{/sha}","trees_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/statuses/{sha}","languages_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/languages","stargazers_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/stargazers","contributors_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/contributors","subscribers_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/subscribers","subscription_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/subscription","commits_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/commits{/sha}","git_commits_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/git/commits{/sha}","comments_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/comments{/number}","issue_comment_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/issues/comments{/number}","contents_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/contents/{+path}","compare_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/merges","archive_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/downloads","issues_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/issues{/number}","pulls_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/pulls{/number}","milestones_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/milestones{/number}","notifications_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/labels{/name}","releases_url":"https://api.github.com/repos/GuiltyDolphin/zeroclickinfo-goodies/releases{/id}","created_at":"2015-12-06T13:39:42Z","updated_at":"2015-12-06T13:39:46Z","pushed_at":"2015-12-20T14:07:38Z","git_url":"git://github.com/GuiltyDolphin/zeroclickinfo-goodies.git","ssh_url":"git@github.com:GuiltyDolphin/zeroclickinfo-goodies.git","clone_url":"https://github.com/GuiltyDolphin/zeroclickinfo-goodies.git","svn_url":"https://github.com/GuiltyDolphin/zeroclickinfo-goodies","homepage":"http://duckduckhack.com/","size":11876,"stargazers_count":0,"watchers_count":0,"language":"Perl","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"duckduckgo:master","ref":"master","sha":"0196cc964005e0056628ac228351ed19426c4fea","user":{"login":"duckduckgo","id":342708,"avatar_url":"https://avatars.githubusercontent.com/u/342708?v=3","gravatar_id":"","url":"https://api.github.com/users/duckduckgo","html_url":"https://github.com/duckduckgo","followers_url":"https://api.github.com/users/duckduckgo/followers","following_url":"https://api.github.com/users/duckduckgo/following{/other_user}","gists_url":"https://api.github.com/users/duckduckgo/gists{/gist_id}","starred_url":"https://api.github.com/users/duckduckgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckduckgo/subscriptions","organizations_url":"https://api.github.com/users/duckduckgo/orgs","repos_url":"https://api.github.com/users/duckduckgo/repos","events_url":"https://api.github.com/users/duckduckgo/events{/privacy}","received_events_url":"https://api.github.com/users/duckduckgo/received_events","type":"Organization","site_admin":false},"repo":{"id":2164979,"name":"zeroclickinfo-goodies","full_name":"duckduckgo/zeroclickinfo-goodies","owner":{"login":"duckduckgo","id":342708,"avatar_url":"https://avatars.githubusercontent.com/u/342708?v=3","gravatar_id":"","url":"https://api.github.com/users/duckduckgo","html_url":"https://github.com/duckduckgo","followers_url":"https://api.github.com/users/duckduckgo/followers","following_url":"https://api.github.com/users/duckduckgo/following{/other_user}","gists_url":"https://api.github.com/users/duckduckgo/gists{/gist_id}","starred_url":"https://api.github.com/users/duckduckgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckduckgo/subscriptions","organizations_url":"https://api.github.com/users/duckduckgo/orgs","repos_url":"https://api.github.com/users/duckduckgo/repos","events_url":"https://api.github.com/users/duckduckgo/events{/privacy}","received_events_url":"https://api.github.com/users/duckduckgo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/duckduckgo/zeroclickinfo-goodies","description":"DuckDuckGo instant answer plugins based on Perl functions","fork":false,"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies","forks_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/forks","keys_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/keys{/key_id}","collaborators_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/teams","hooks_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/hooks","issue_events_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/events{/number}","events_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/events","assignees_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/assignees{/user}","branches_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/branches{/branch}","tags_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/tags","blobs_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/git/refs{/sha}","trees_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/git/trees{/sha}","statuses_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/statuses/{sha}","languages_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/languages","stargazers_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/stargazers","contributors_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/contributors","subscribers_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/subscribers","subscription_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/subscription","commits_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/commits{/sha}","git_commits_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/git/commits{/sha}","comments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/comments{/number}","issue_comment_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/comments{/number}","contents_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/contents/{+path}","compare_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/compare/{base}...{head}","merges_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/merges","archive_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/downloads","issues_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues{/number}","pulls_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls{/number}","milestones_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/milestones{/number}","notifications_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/labels{/name}","releases_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/releases{/id}","created_at":"2011-08-06T13:26:05Z","updated_at":"2015-12-18T11:35:14Z","pushed_at":"2015-12-20T14:07:39Z","git_url":"git://github.com/duckduckgo/zeroclickinfo-goodies.git","ssh_url":"git@github.com:duckduckgo/zeroclickinfo-goodies.git","clone_url":"https://github.com/duckduckgo/zeroclickinfo-goodies.git","svn_url":"https://github.com/duckduckgo/zeroclickinfo-goodies","homepage":"http://duckduckhack.com/","size":19771,"stargazers_count":360,"watchers_count":360,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1286,"mirror_url":null,"open_issues_count":174,"forks":1286,"open_issues":174,"watchers":360,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1927"},"html":{"href":"https://github.com/duckduckgo/zeroclickinfo-goodies/pull/1927"},"issue":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/1927"},"comments":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/1927/comments"},"review_comments":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1927/comments"},"review_comment":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/pulls/1927/commits"},"statuses":{"href":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/statuses/8eaebbcfbbfb46d8679cf32c522bde3fb44a19a6"}}}}