This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.zentrope { | |
import scala.actors.Actor | |
import scala.actors.TIMEOUT | |
import scala.concurrent.Lock | |
import scala.concurrent.ops.spawn | |
import scala.util.Random | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
base_dir = Dir.pwd | |
build_dir = "#{base_dir}/build" | |
src_dir = "#{base_dir}/src" | |
lib_dir = "#{base_dir}/lib" | |
def classpath(location) | |
places = File.join(location, "*.jar") | |
return Dir.glob(places).join(":") | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
import urllib2 | |
import base64 | |
import cgi | |
from xml.etree.ElementTree import XML | |
class Cws: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from google.appengine.ext import webapp | |
from google.appengine.ext.webapp import util | |
from google.appengine.ext.webapp import template | |
from google.appengine.ext.webapp import WSGIApplication | |
from google.appengine.api import memcache | |
from google.appengine.ext import db |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(par). | |
-compile(export_all). | |
%% Just some experiments in parallel processing. | |
test_job() -> | |
Parent = self(), | |
spawn(fun() -> | |
do_job(Parent, {job, make_ref()}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package zentrope.hornet { | |
// This is a small app to see what it's like to work with | |
// HornetQ messaging in a Scala context. The main things I'm | |
// interested in are making working with HornetQ itself as a | |
// resource easier, and making confience methods, classes, data | |
// structures easier for anyone using this code. | |
import scala.actors._ | |
import scala.concurrent.ops.spawn | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package zentrope.hornet { | |
import scala.actors._ | |
import org.hornetq.api.core._ | |
import org.hornetq.api.core.client._ | |
// ---------------------------------------------------------------------- | |
private object Util { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package zentrope.sql { | |
import java.sql.SQLException | |
class Settings ( | |
val url : String, | |
val user: String, | |
val pass: String, | |
val driver: String | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A small chat server in order to work out the details of a | |
// socket server using Actors. And maybe just a little attempt | |
// to wrap TCP itself inside an Actor, kinda like Erlang does | |
// it. The whole idea is to try and make things seem simpler, | |
// ultimately, and to remove any shared state. | |
package zentrope.chat { | |
import java.net.Socket | |
import java.net.ServerSocket |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A small chat server in order to work out the details of a | |
// socket server using Actors. And maybe just a little attempt | |
// to wrap TCP itself inside an Actor, kinda like Erlang does | |
// it. The whole idea is to try and make things seem simpler, | |
// ultimately, and to remove any shared state. | |
package zentrope.chat { | |
import java.net.Socket | |
import java.net.ServerSocket |
OlderNewer