Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - cooliojazz

Pages: 1 [2] 3
16
Computer Projects and Ideas / Random Java Libs
« on: July 23, 2011, 02:52:04 pm »
I just finished converting the back end of my IRC bot into an IRC library, JIRC. It's a fairly easy way to add IRC stuff to anything. I only did the javadoc for the main class, so... =P The attached zip has the jar, javadoc, and source. Here's an example of how to use it (This is a simple command line IRC client, basically) Freel free to comment on things it needs or things you find odd =)
Spoiler For Example Below:
Code: [Select]
//Sorry about the lack of comments, I'm a lazy documenter... =\
//Modified to add a few more comments =P
import java.io.*;
import java.util.*;
import java.util.regex.*;

public class Test {
   
    static PrintStream sout = System.out;
    static BufferedReader sin = new BufferedReader(new InputStreamReader(System.in));
   
    public static void main(String args[]) {
        JIRC jirc = new JIRC("withg.us.to", "JIRC_Test", "JIRC Test Bot") {
            //I just used a nameless class (whatever the correct term is, idk), you probably would want to create a seperate extending class for code neatness, but this is small, so...
            //All the methods that need to be implemented are the event handlers.  I tried to make the event names pretty obvious, but...
            protected void onConnect() { //When JIRC connects to IRC (Or reconnects, it auto reconnects on disconnect)
                sout.println("Connected!");
                joinChannel("test");
            }

            protected void onPingged(String server) { //When you are pinged
                sout.println("Ping? Pong!");
            }

            protected void onServerMessage(String message) { //When the server sends you a message
                Date now = new Date();
                sout.println("-[" + now.toGMTString() + "]- " + message);
            }

            protected void onChannelMessageReceive(String channel, String nick, String message) { //When you receive a message directed at a channel you are in
                sout.println("[" + now.toGMTString() + "] #" + channel + ": <" + nick + "> " + message);
            }

            protected void onPrivateMessageReceive(String nick, String message) { //When you receive a private message directed at you
                sout.println("[" + now.toGMTString() + "] <" + nick + "> " + message);
            }

            protected void onChannelMemberPart(String channel, String nick) { //When someone leaves a channel you are in
                sout.println(channel + ": " + nick + " has left");
            }

            protected void onChannelMemberJoin(String channel, String nick) { //When someone joins a channel you are in
                sout.println(channel + ": " + nick + " has joined");
            }

            protected void onChannelMemberQuit(String nick, String message) { //When someone who is in one or more channels with you quits
                sout.println(nick + " has quit (" + message + ")");
            }
        };
        jirc.start(); //Start JIRC
Pattern JoinCommand = Pattern.compile("/(?:join|j) (.+)", Pattern.CASE_INSENSITIVE);
Pattern PartCommand = Pattern.compile("/(?:part|p)", Pattern.CASE_INSENSITIVE);
Pattern CACCommand = Pattern.compile("/cac (.+)", Pattern.CASE_INSENSITIVE);
Pattern NickCommand = Pattern.compile("/(?:nick|n) (.+)", Pattern.CASE_INSENSITIVE);
Pattern OpCommand = Pattern.compile("/op (.+)", Pattern.CASE_INSENSITIVE);
Pattern DeOpCommand = Pattern.compile("/deop (.+)", Pattern.CASE_INSENSITIVE);
Pattern RawCommand = Pattern.compile("/raw (.+)", Pattern.CASE_INSENSITIVE);
Pattern ListCommand = Pattern.compile("/(?:list|l) #(.+)", Pattern.CASE_INSENSITIVE);
Pattern ExitCommand = Pattern.compile("/(?:exit|e)", Pattern.CASE_INSENSITIVE); //Because I'm lazy, so I used regex to detect commands etc
        String ActiveIRCChannel = ""; //To keep track of the channel you are currently talking in
        try {
            while (true) { //Loop for console input
                while (sin.ready()) {
                    String msg = sin.readLine();
                    if (msg != null) {
                        Matcher m;
                        if ((m = JoinCommand.matcher(msg)).find(0)) {
                            jirc.joinChannel(m.group(1).replace("#", ""));
                        } else if ((m = PartCommand.matcher(msg)).find(0)) {
                            jirc.partChannel(ActiveIRCChannel);
                        } else if ((m = NickCommand.matcher(msg)).find(0)) {
                            jirc.changeNick(m.group(1));
                        } else if ((m = OpCommand.matcher(msg)).find(0)) {
                            jirc.opChannelMember(ActiveIRCChannel, m.group(1));
                        } else if ((m = DeOpCommand.matcher(msg)).find(0)) {
                            jirc.deOpChannelMember(ActiveIRCChannel, m.group(1));
                        } else if ((m = CACCommand.matcher(msg)).find(0)) {
                            ActiveIRCChannel = m.group(1).replace("#", "");
                            sout.println("Changed the active channel to " + ActiveIRCChannel);
                        } else if ((m = ListCommand.matcher(msg)).find(0)) {
                            Channel curchan = jirc.getChannelList().get(JIRC.inChannelList(jirc.getChannelList(), m.group(1)));
                            Person[] People = curchan.getAllMembers();
                            for (int x = 0; x < People.length; x++) {
                                sout.println(People[x].getName() + " (" + People[x].getModes() + ") Active: " + People[x].isActive());
                            }
                        } else if ((m = RawCommand.matcher(msg)).find(0)) {
                            jirc.sendRawMessage(m.group(1));
                        } else if ((m = ExitCommand.matcher(msg)).find(0)) {
                            sout.close();
                            sin.close();
                            System.exit(0);
                        } else if (msg.startsWith("/")) {

                        } else {
                            jirc.sendMessage(ActiveIRCChannel, msg);
                            sout.println("#" + ActiveIRCChannel + ": <" + jirc.getNick() + "> " + msg);
                        }
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Additionally, notice the "s" in "Java Libs".  That's because I also plan on converting the backend of TFE into a general purpose TI File lib, and maybe some others if I feel like it.  This is it atm though =)

17
TI Z80 / TFE - The TI File Editor
« on: June 07, 2011, 03:27:07 am »
Scroll down for the latest version...

Third time is a charm, eh?  If this one ends up failing, and by that I mean no one wants or uses it, I don't mean because it sucks and I stop developing it like the other two, then TFE is over =\ But w/e, I could spend so many paragraphs saying how this version is better, and how I built it correctly, etc, but you don't care, you just want to see the project.  In fact, I'll bet most of the people reading this haven't even seen the original two.  If you haven't, here's a tip: DO NOT LOOK THEM UP OR EVER THINK ABOUT THEM AGAIN.  Okay, am I done talking pointlessly?  Yeah, I think I am, here we go... Ignore all that, I write too much.



TFE (AKA TI File Editor)
TFE is an IDE for programming 83/84 calculators on your PC.  It's about 50-60% of what I would like the final product to be. I plan on supporting all TI-83/84 file types eventually, but for now it allows editing and creation of programs and pictures.


Program Editor Features:
-Sytax highlighting
-Axe differentiation
-Custom token definitions - Do things like redifine → as -> if you dont like using quick key etc.
Code: [Select]
Custom token definitions:
Look for the $home/.tfe/ directory on your computer.  This is where TFE looks for token sets.  There should be a file called config.txt.  This is a list of all the custom token sets it should load.  The syntax is as follows:

(config.txt)
[file name] [token set name]
test.tokens "Just for kicks"

The token set declaration is a bit more complicated.  It basically consists of finding which tokens you don't like being as they are by default and redefining them.
There are two ways to currently do this, replacing based on existing token, and replacing based on number.  Which is easier just depends on the token.

(xxx.tokens)
(If the first line is "AXE", the highlighter will use axe highlighting with this token set)
AXE
(Number replacement) 0:[first byte]|[second byte]|[new token]
0:4|0|->
(Name replacement) 1:[original token]|[new token]
1:→|->

Except loading new token sets, any other change will be reflected if you switch tokens without restarting the program.
-Label finder - Ctrl-Click a goto or a sub in axe to go to the matching label
-"Quick Keys" - basically shortcuts for common TI Symbols.  Here's the current list:
Code: [Select]
Ctl-Shift-S - →
Ctl-Shift-T - θ
Ctl-Shift-P - π
Ctl-Shift-L - ˪
Ctl-Shift-E - ℯ
Ctl-Shift-X - ᴇ
Ctl-Shift-R - ʳ
Ctl-Shift-Left - ◄
Ctl-Shift-Right - ►
Ctl-Shift-< - ≤
Ctl-Shift-> - ≥
Ctl-Shift-= - ≠
Ctl-Shift-- - ­(negative)
Ctl-Shift-(1-0) - (₁-₀)
UnrealHelper - A very simple code hints tool, which may be improved over time, Ctrl-H to toggle

Picture Editor Features:
-Toggleable grid (Ctrl-G)
-Resizable brush (Scroll or -= keys)
-Selections for cut/copy/pasting (Press s for selection mode, p for drawing mode)
-Moving selections
-Filling
-Edit history

Other Features:
-Data converter - Dump the raw data from files on your computer into .8xv files.

Yeah, doesn't look like much, huh?  I do plan on adding a lot of picture editing tools eventually, but it works and that is enough for now :P
As this is the first release, I expect a lot of bugs. I mean, I've only had like 2-3 people test it so far.  Please tell any you find to me!!!! Things I expect, so I don't need so be informed of, are tokens not showing up correctly.  Honestly, this is mostly a release to find a lot of the bugs and get feedback about what's missing or what needs to be added in general.  There are still some menial tasks that i've been doing just a little at a time which aren't finished, fixing all the tokens being one of them.  That's basically what I'll be doing till the next version, plus fixing bugs =\  Anyways, enough talking, try it! go for it! DOITNAO! =P Oh, did I mention it's in java, not .NET this time? :D OKAYOKAYI'MSORRYFORMYLONGPOSTS /me runs

18
TI-BASIC / Basic Subroutines
« on: April 14, 2011, 11:32:41 am »
I was writing a program, and I decided it would be easier to write with subroutines, so I came up with
Code: [Select]
.Sub call to 0
1→N
While N
If Ans:Goto 0
0→N
End

Lbl 0
.Sub Code
0:End

But the sub call being still like 3 lines when it's "compressed" onto one line is almost as long as the code I wanted to put in the subroutine.  Can anyone think of a smaller way to create a subroutine call in basic?

19
Computer Projects and Ideas / 5TD
« on: January 23, 2011, 01:22:34 am »
Well... Itsa game.  Written in java.  It's 4D, with a 3D engine.  You can swap the Y and W dimension.  Me and my friend are attempting to finish it for a competition in a few weeks.  Itsa puzzle game of sorts.  I'll fix a couple things, then post a version people can play around with if they wish.  I really didn't know what to say, as should be evident... Oh!  This is what has been consuming 95% of my free time for the last monthish.  It doesn't look near far enough for that though... =P

20
Music Showcase / DJ CJ
« on: January 23, 2011, 01:16:15 am »
This is a list of links for the few songs I've made.

21
As far as I remember, I never made a topic to intruduce myself, just randomly started posting one day, or if I did, I'm sure it was very antiinformative. =D  So, I figured now that hopefully I'll be able to actually do things in the community this semester, with all the newer people around since I used to post an average amount, I might as well take advantage of this opportunity to say "HAI!!!!!!!!!". (Wow, I am so cunfussing... How about, I'm an older member who's been inactive for a while and wanted to take the opportunity of being more active to say a lot more about himself.  Yeah, that makes a bit more sense. =P)

So hi, I'm CoolioJazz, also CoolioJazzines or CoolioJazzSkills, because some sites don't like just "CoolioJazz". D= My name is Ricky Talbot, and live somewhere between Netham45 and SirCmpwn (Theoretically, it's right by TsukasaZX, but if anyone ever gets a definitive location on him... Well, I haven't =P)  I came here around spring two years ago after seeing on TICalc.org that there was some sort of contest going on and I wanted to pit my skills (Hah! What a joke XD) against people here.  Yeah, let's just say after hovering a while, I decided I best wait this one out.  But, the competition did it's job of recruiting, and I stuck around after the fact, seeing how nice the people were.  I wasn't, of course, this being my first online sortie, but that was fixed after a couple day ban that summer. Mebe... =\ Anyways, I was made staff here sometime toward the end of summer, I think, and that lasted only till that Januray, I think.  The spontaneity of my posting, and a couple other things, just didn't fit the bill.  Oh well, what can you say, I'm an irresponsible teenager. XD Most of the last year, though, the only places you can find me is idling on IRC.  Wow, ok, I think this is getting longer than I intended... Umm... Moving on...  Overall, I've always been one just to post around and not boast many projects.  My main one I've ever had (TFE) never gained much attention, and for now is discontinued. (Tokens by now is much better anyways =D)  I made a nice little tibasic Go program, which only an outdated version found itself onto ticalc.  I should probably update that someday just for the heck of it. =PI did a couple random things of no importance, a simple axe shell, html viewer, and falldown type game, but all my larger projects have never completed. D= D= D=  I would list them here... but some of them are things people actually might find interesting, and I wouldn't want to give out some false hopes. =(  Yeah, for now, if you start seeing me around a bit more, I won't have anything new in towprobably.  Ooh, languages!!! I know TI-Basic and Axe pretty well, I tried asm... yeah, I'm another one of "those" failures.  Maybe someday... x.x  I've known VB for a while, but I've recently picked up java, which is a lot of fun.  C?... Umm, no.  EOL. Period.  Ok, let's see... Is there anything else...?  Oh yes, it may be less known then Netham45 being a lobster or Iambian being a cherry-flavored dragon, but... supposedly I'm apparently a squirrel.  Though it beats me where people get these crazy ideas. =P  Yeah, this was a lot longer than it needed to be... Oh well, I had fun writing it!  BUT WAIT!  THERE'S MORE!  I accidentally got myself addicted to Minecraft because it is a really awesome game!  And webcomics are awesome!! Especially Homestuck, it's really awesome!  Did you know, there was once an incentive to start an Omnimaga webcomic?  I keep trying to reive the topic, but it seems no one else wants to... Sigh...  This is never going to end, is it?  I'm just going to cut myself off I guess.  I can always sneak more into replies later =D  And I did NOT wrote this at 1:30 on the Sunday before school starts when I should be sleeping, you people are crazy!!!!!!!!!!!!! XD Ok, yeah, I'm definately stopping now.  Maybe...  No, I can't bring myself to do it!  Come on, just move the mouse, there you go, closing in on that post button, and *Cli-

EDIT: I'm gonna write some sort of summary later.  Because I've heard that walls of text can be intimidatating XD

22
Humour and Jokes / Hmm...
« on: October 24, 2010, 07:24:32 pm »
Hmms..........

23
Art / Need... Sprites...
« on: August 26, 2010, 02:05:32 am »
Anyone want to try to make sprites of characters of this game? http://www.popcap.com/games/pvz They would need to be 3 color, and 16x16...  Help would be much appreciated! =D

24
Humour and Jokes / Ever Wanted to Screw With IntelliSense? Here's How.
« on: August 06, 2010, 03:21:19 am »
Two lines which create an array of arrays and set the first element of that to the parent array.  Intellisense doesn't really know when to stop...
Code: [Select]
Dim Arr(0) As Array
Arr(0) = {Arr}
;D

25
General Calculator Help / Masking
« on: June 01, 2010, 10:38:02 pm »
I have a quick question; how can I do sprite masking without AND logic?

26
TI Z80 / TFE - Resurrection (TI-File Editor)
« on: May 20, 2010, 12:07:22 am »
After umpteen-months, I finally finished a semi-functional version of TI-File Editor.  Right now, it can finally open and save programs.  I finally found my error after such a long time of searching (it was very stupid :P) But anyways, i do not have most mdi things working, so just be alert...  Oh, and yes, I know there's no easy way to write things like -> yet... ill work on that next... For now, just copy from an existing file... or wait, did I fix those? idk, oh well... :P  Oh, and encounter any errors? Please tell me :D

27
Music Showcase / The Everlasting Night
« on: May 16, 2010, 07:15:32 pm »
I made a song. It's called "The Everlasting Night". What more is there to say? =P

28
Music Showcase / Rain Drops
« on: February 26, 2010, 03:08:47 am »
A song i made in MTVMG:


29
TI Z80 / RUUUUNNNNNN!!!!
« on: February 01, 2010, 11:57:07 pm »
OK, so that seemingly random matrix question about matrix shifting was for this game I've been working on, generically dubbed, RUN!  The goal is to go fast enough around the screen as to avoid getting squished to the lefty hand side of the screen by the shifting blocks.  Sometimes, though, you're route is blocked.  That's when the jumps come in handy, allowing you to jump over one block in any direction by pressing [2ND] then the direction you want to go.  The jumps respawn over time ( I think I have a bug, not sure, I think sometimes you randomly gain 3 or 4 extra for no apparent reason, haven't really payed attention to that). There really is not much point to the game as of yet, and the matrix shift STILL takes to long (look at the obvious movement delay) and the [2ND] key takes forever to trigger for some reason (you have to keep holding it till the jump # decrements, really) but there ya go.  And I *think* this is the first game I've actually released...
NOTE: I DO plan on improving this.  Just maybe not right now.
Oh yeah, almost forgot.  It needs XLib.  Which can probably be deduced from the screenshot, but you never know. :P

30
TI-BASIC / Matrix Help
« on: January 29, 2010, 10:39:27 pm »
OK, say I wanted to take a matrix
[1,2,3]
[4,7,3]
[9,5,6]
and take off the first row so it was
[2,3]
[7,3]
[5,6]
how could i do this?  The only way I've been able to do this would be using Matrix to list, but that takes a lot of space and is slow, so...

Pages: 1 [2] 3