2010-01-27
JZBot now supports BZFlag
This is about a week late, but JZBot can now connect to BZFlag servers. If you're a bzflag server owner and want a bot at your server for some random reason, you can download JZBot at http://jzbot.googlecode.com. Or join irc.freenode.net #jzbot and ask for help.
2010-01-23
Geeky to the Max
From MrDudle's blog:
<C0BALT> I also use OCR from MSPaint when I’m really getting serious about coding.
<Limp_Trizkit> oh, when i’m really serious, i pull out my screwdriver and some magnets
<Limp_Trizkit> and take apart the hard drive with my code
<Limp_Trizkit> then use the magnets to flip the bits by hand
<Limp_Trizkit> then reassemble the drive and compile
<C0BALT> I never thought of that!
<C0BALT> I also use OCR from MSPaint when I’m really getting serious about coding.
<Limp_Trizkit> oh, when i’m really serious, i pull out my screwdriver and some magnets
<Limp_Trizkit> and take apart the hard drive with my code
<Limp_Trizkit> then use the magnets to flip the bits by hand
<Limp_Trizkit> then reassemble the drive and compile
<C0BALT> I never thought of that!
2010-01-15
You know you're a geek when...
I'm working on a list of "You know you're a geek when..." phrases here. I'll be adding to it periodically, so keep checking it!
2010-01-06
Fact interpreter in Python
On request of another guy involved in JZBot, I ported JZBot's Fact interpreter to Python. It's available in the JZBot Subversion repository at http://jwutils.googlecode.com/svn/trunk/projects/jzbot2-python/fact-parser/. src/test.py under that directory is a Python script demonstrating how to use the interpreter.
2010-01-01
libusbJava.so
For some reason, libusbJava did not want to compile on my linux system. It consistently issued warnings that some "libusbpp.so" (which I still have yet to figure out what the heck it is) was missing. I did some googling, and eventually managed to compile it by hand using this command:
g++ -shared -Wl,-soname,libusbJava.so -I/usr/lib -I/usr/lib/jvm/java-6-sun-1.6.0.16/include -I/usr/lib/jvm/java-6-sun-1.6.0.16/include/linux -shared LibusbJava.cpp -olibusbJava.so.0.2.4 /usr/lib/libusb.a
Note that the /usr/lib/jvm/java-6-sun-1.6.0.16 paths are specific to whatever version of java you're using.
Anyway, with that taking upwards of an hour to do, I figured I'd post a pre-built binary for anyone that's looking for one. This was built on Ubuntu 9.04 against libusb-0.1-4 (Synaptic reports its version number to be 2:0.1.12-13; I'm not knowledgable enough to know the difference between the two), so I won't make any guarantees as to whether it will work properly on your system. You can download the binary here.
g++ -shared -Wl,-soname,libusbJava.so -I/usr/lib -I/usr/lib/jvm/java-6-sun-1.6.0.16/include -I/usr/lib/jvm/java-6-sun-1.6.0.16/include/linux -shared LibusbJava.cpp -olibusbJava.so.0.2.4 /usr/lib/libusb.a
Note that the /usr/lib/jvm/java-6-sun-1.6.0.16 paths are specific to whatever version of java you're using.
Anyway, with that taking upwards of an hour to do, I figured I'd post a pre-built binary for anyone that's looking for one. This was built on Ubuntu 9.04 against libusb-0.1-4 (Synaptic reports its version number to be 2:0.1.12-13; I'm not knowledgable enough to know the difference between the two), so I won't make any guarantees as to whether it will work properly on your system. You can download the binary here.
2009-11-28
SuperTunnel
Due to some problems I encountered while using GNU HttpTunnel (namely that HttpTunnel would get packets in the wrong order when I was trying to forward ports over SSH over HttpTunnel and cause SSH to disconnect with a failed MAC error), I decided to write an alternative. My dad's work firewalls all outbound traffic besides HTTP and HTTPS, which greatly inconvienences me when I go to work with him as I can't upload new versions of Evaluation Portal or JZBot to my web server.
Anyway, the alternative is called SuperTunnel. There are three main differences between SuperTunnel and HttpTunnel:
Anyway, the alternative is called SuperTunnel. There are three main differences between SuperTunnel and HttpTunnel:
- HttpTunnel has a tendency to get packets out of order when processing high-volume traffic. This caused SSH to repeatedly crash when I would use it to forward ports over HttpTunnel. SuperTunnel does not do this; I've verified that it works when both downloading and uploading data as fast as SuperTunnel will send and receive it.
- HttpTunnel only allows one socket connection to be active at a time. SuperTunnel allows up to 200 concurrent connections, and in the future that limit will be specified by a configuration file.
- HttpTunnel uses requests that are long-lived in the sense that a single request will be opened and data streamed down through it as data is received by the server. Since this causes problems with buffering proxies, SuperTunnel instead follows an approach where a single connection will only be used once to receive data. Once even a single byte is received, the connection ends and a new one is made. SuperTunnel waits one second between receive connections so that an excessive number of connections aren't made with each one holding only a couple of bytes.
2009-11-07
Wave Othello Gadget
A few days ago, I spent a day and wrote a Google Wave Othello gadget. The gadget's URL is http://trivergia.com/wavyothello/gadget/jw.othello.client.OthelloGadget.gadget.xml. Add it to a wave, play a game with a friend, and add a comment to this post and let me know how it went or if there are any new features you'd like.
2009-10-17
Single-file IRC server
Those of you that know what IRC is are probably already thinking I'm off my rocker, given the title of this post. And I probably am. I decided to try my hand at writing an IRC server in a single Java file. I've got it to the point that people can connect to it, join channels, set the channel topic, send messages (and receive them) at channels, send private messages, and change nicks, so I figured I'd blog about it and include a link to it if anyone wants to use it. It's not intended to become a production IRC server; I'm mostly writing it so that I can test out an IRC bot that I'm writing when I don't have an internet connection.
Anyway, here's the source code for the server. Download it, compile it with "javac Connection.java", and then run it with "java Connection <hostname>", replacing <hostname> with your computer's hostname. If you're not sure what your computer's hostname is, just use localhost as the hostname. Then, open your favorite IRC client, connect to "127.0.0.1:6667", and join any channel you want. You can switch nicks, set the channel's topic (even though you're not a channel op), and other users can connect, join channels, and chat with you. Sending messages directly between users also works. Modes do not, however (channels always act as if they are mode +nt, no matter what you set their mode to be, but anyone can change the topic even though the channels have +t present). I'm hoping to add more functionality to this server soon.
Anyway, here's the source code for the server. Download it, compile it with "javac Connection.java", and then run it with "java Connection <hostname>", replacing <hostname> with your computer's hostname. If you're not sure what your computer's hostname is, just use localhost as the hostname. Then, open your favorite IRC client, connect to "127.0.0.1:6667", and join any channel you want. You can switch nicks, set the channel's topic (even though you're not a channel op), and other users can connect, join channels, and chat with you. Sending messages directly between users also works. Modes do not, however (channels always act as if they are mode +nt, no matter what you set their mode to be, but anyone can change the topic even though the channels have +t present). I'm hoping to add more functionality to this server soon.
Subscribe to:
Posts (Atom)