Skip to content

Instantly share code, notes, and snippets.

@nanis
Created June 12, 2015 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nanis/03c606ca35c35b93bf1b to your computer and use it in GitHub Desktop.
Save nanis/03c606ca35c35b93bf1b to your computer and use it in GitHub Desktop.
See http://www.nu42.com/2015/06/quorum-creators-cannot-write-quorum.html This is the Quorum code in Stefik et al. 2011 and Stefik & Siebert 2013//
/*
http://www.nu42.com/2015/06/quorum-creators-cannot-write-quorum.html
Quorum is a programming language created by Stefik et al. In a 2011 paper, the authors infamously proclaimed:
Results showed that while Quorum users were afforded significantly
greater accuracy compared to those using Perl and Randomo, Perl users
were unable to write programs more accurately than those using a
language designed by chance.
When I try to run their reference Quorum code using their Quorum download, I get:
$ java -jar Quorum.jar t.quorum
Preparing to build t.quorum
Building files... done.
The code did not build correctly. Here is a list of errors:
1: t.quorum, Line 11, Column 8: d has already been defined.
1: t.quorum, Line 13, Column 6: A loop, conditional, class, or action statement is missing an 'end'.
1: t.quorum, Line 14, Column 8: e has already been defined.
1: t.quorum, Line 16, Column 6: Missing or invalid statement at 'i
*/
action Main
number x = z(1, 12, 3)
end
action z(integer a, integer b, integer c) returns number
number d = 0.0
number e = 0.0
integer i = a
repeat b - a times
if i mod c = 0 then
d = d + 1
end
else then
e = e + 1
end
i = i + 1
end
if d > e then
return d
end
else then
return e
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment