Menu

Home

Jack Andrews

qik

how fast is your code?

how small is your code?

how good are your tools?
Leaderboard - freestyle   
phoebe             850
chandler           740
rachel             721
monica             612  
ross               525
BASE               500
joey               450
          [500 + 100 points for every standard deviation from BASE]

qik provides some small tasks to challenge programming skills and any language implementation. Contributors may provide programs and a performance report by running a program, ./qik.

qik is similar to the Computer Language Benchmarks Game (or CLBG) because it encourages competition between languages and language users. The difference with the CLBG is that the contributed programs can use any algorithm as long as the result is acheived; the CLBG requires that the programs all use the same algorithm.

qik is like a long term programming competition but it is different to competition sites because it allows programs to be written in any language*. qik accomplishes that by allowing anyone to run ./qik on their own machine and post a report on any programs written in any language. A user can contribute a report and other people who would like to reinforce results for the programs can also run ./qik.

qik provides analysis from the whole data set of reports - ranking languages and programmers and finding insights.

*top competition/benchmark sites

https://www.codechef.com/wiki/list-compilers
https://www.hackerrank.com/environment
http://codeforces.com/blog/entry/79
https://www.topcoder.com/community/competitive%20programming/
http://benchmarksgame.alioth.debian.org/

core tasks

  • [sort] - sort a file interpreted in 6 ways: as an array of byte8, short16, int32, long64, float32 and double64.
    • float32 and double64 formats are defined in IEEE 754
    • treat the integer types as though they were encoded in native endian.
    • sort will be tested with bytes
    • output is 6 files (sorted-[0-5]) with the sorted results of each interpretation of the file
    • any output file (sorted-[0-5].i) may contain the indices defining the permutation of the input that is a sort
  • [dist] - find the distribution of words in the input.
    • dist will be tested with
      • artificial text containing few words with high frequency and with many words with low frequency
      • and [commonly available text]
    • output is either a file with lines,
      • starting with a word, a space and a count
      • starting with an index into input file (pointing to a word), a space, and a count
        (https://www.gutenberg.org/wiki/Gutenberg:Information_About_Robot_Access_to_our_Pages)
  • [mandelbrot] - produce a Mandelbrot set image in pbm format for the range [-1.5-i, 0.5+i]
    • a+bi maps to the (x,y) discrete image coordinates:
      • b is zero at y=n
      • a is zero at x=1.5'*n
      • adjacent pixels are separated by 1/n (or 1/n i)

how does qik work?

the qik files

Download or checkout qik. The root directory is qik and qik/base contains baseline programs for the core tasks

-qik
   README
   qik
  +base

add programs

Programs are added by creating a directory under qik named with a username, optionally followed by a hyphen and more text:

 -qik
    README
    qik
   +base
   -gates-bas
      d
      sort.bas
      mandelbrot.bas

d: the driver

A driver must be provided when programs are added. The driver's name is d - an executable that supports four commands: ls, make, cmd, get.

. d ls - list the programs that can be run.
   eg.  $gates-bas/d ls
        mandelbrot
        fannkuch

. d make <program> - run any compilation or ahead of time processing
   eg.  $gates-bas/d make mandelbrot

. d cmd <program> - give the first part of the command line to run the program
   eg.  $gates-bas/d cmd mandelbrot
        /usr/bin/msbasic mandelbrot.bas

. d get <program> - outputs the packages needed by <program>
   eg.  $gates-bas/d get mandelbrot
        msbasic

run programs

The ./qik program starts some monitoring tools then makes and runs the programs in a directory. ./qik then builds and runs the programs in qik/base and dumps a report to qik.out. eg:

qik$ ./qik gates-bas
**  gates-bas/d ls
**  gates-bas/d build sort
**  gates-bas/d build mandelbrot
**  gates-bas/d cmd sort`       -i/tmp/15i.bin -o/tmp/28f.out
** `gates-bas/d cmd mandelbrot` -o/tmp/24m.pbm -n100
**  base/d build sort
**  base/d build dist
**  base/d build mandelbrot
** `base/d cmd mandelbrot`    -o/tmp/44m.pbm -n100
** `base/d cmd dist`          -i/tmp/14r.bin -o/tmp/65f.out
** `base/d cmd sort`          -i/tmp/15i.bin -o/tmp/28f.out

post results

qik post posts results to qik.sf.net with

qik$ ./qik post gates-bas
** curl --user gates --digest -X POST qik.sf.net/post --data @gates-bas/qik.out

program parameters

name meaning
n a size eg. mandelbrot -n500 means produce a 500x500 pbm image
i,o input or output file
p the allowed number of processes/threads. eg. -p3 allows for a main process plus two threads or sub-processes
x,y,z other parameters eg. produce random words using x as seed and y as rand() function


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.