To run the Java version:
-
Download: https://dl.dropboxusercontent.com/u/18074905/blc-bench-final.jar
-
Run it from the command line:
time java -jar blc-bench-final.jar
To run the Clojure version:
| import os | |
| import sys | |
| import random | |
| import time | |
| import string | |
| import Queue | |
| import threading | |
| from urllib2 import Request, urlopen, URLError, HTTPError | |
| CHARS = string.letters + string.digits |
| # nanoshorten - a very tiny URL shortener Web application written in Bottle and sqlite | |
| # copyright (c) 2012 darkf | |
| # licensed under the WTFPL (WTF Public License) | |
| # see http://sam.zoy.org/wtfpl/ for details | |
| from bottle import get, request, run | |
| import sqlite3, random, string | |
| con = sqlite3.connect('short.db') | |
| c = con.cursor() |
| #!/usr/bin/env ruby | |
| class MRISC | |
| def run(code) | |
| tokens = code.gsub(/(\*.*?\*)|[^a-z0-9,-;@\._]/,'').split(';') | |
| @vars,stack,i = {:_pc=>-1,:_oc=>0},[],0 | |
| tokens.map!{|t| t.chars.first=='@' ? (@vars[t.to_sym]=i-1;nil) : (i+=1;t.split(',').map{|e|numeric?(e) ? e.to_i : e.to_sym})}.compact! | |
| while @vars[:_pc] < tokens.size-1 | |
| @vars[:_pc] += 1 | |
| @vars[:_oc] += 1 |
| stack = [] | |
| compileStacks = [] | |
| words = {} | |
| builtins = {} | |
| lambdaType = type(lambda x: x) #cannot compare against the function type directly for some reason | |
| def prn(o): | |
| print(o) | |
| def clr(l): |
To run the Java version:
Download: https://dl.dropboxusercontent.com/u/18074905/blc-bench-final.jar
Run it from the command line:
time java -jar blc-bench-final.jar
To run the Clojure version:
| Module Module1 | |
| Sub Main() | |
| mine("kNTny") | |
| Console.Read() | |
| End Sub | |
| Dim winning As String = "0000000" | |
| Sub mine(ByVal seed As String) | |
| Dim num As Integer = 0 |
| import socket | |
| import multiprocessing | |
| import string | |
| import random | |
| import json | |
| import hashlib | |
| import sys | |
| import time | |
| class BLCMiner: |
| hItuE25058127 | |
| 6uGdS64633551 | |
| iZ8Yg129410073 | |
| mn9Ni177063744 | |
| tvUy62899300 | |
| LlcJs181693848 | |
| rRNp274174151 | |
| UsiSz5027013 | |
| DH4Yd88472413 | |
| eEIN376415610 |
| __author__ = "Alec Nunn" | |
| from pysphere import VIServer, MORTypes | |
| #-------------------------------------------------------- | |
| # CONFIGURATION | |
| #-------------------------------------------------------- | |
| # IP OF SERVER | |
| hostIP = "" | |
| # USERNAME |
| __author__ = "Alec Nunn" | |
| from pysphere import VIServer | |
| from pysphere.resources import VimService_services as VI | |
| #-------------------------------------------------------- | |
| # CONFIGURATION | |
| #-------------------------------------------------------- | |
| hostIP = "" | |
| user = "" |