James' Blog
The Lives I Lead

<< January 2018 >>
Sun Mon Tue Wed Thu Fri Sat
 01 02 03 04 05 06
07 08 09 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31


Website: Binary-Craft.
E-mail: Programmer_Zero.

About Myself

Name: James Brannan

Age: 14

Location: St Louis, Missouri

Hobbies: Programming

Number of innocent goats I've raped:

Web Counter
Osco Pharmacy

If you want to be updated on this weblog Enter your email here:

21.2.04 : @ 11:08:31 pm by James, Master Programmer / Make a comment
The recorded confessions of a timekeeper

And so the trial begins, as we stand laughing in all manners at the fellow trying in vain to balance amongst the beaks of birds. Sleep deprivation might have its long-term effects, but these forthcoming symptoms have appeared rather quickly--two and a half days after the trial started.

Things started quite smoothly. Minutes, hours, millenias progressed over time and seemed to slow to a grinding sluggish pace before my eyes. After a period of 24 hours, the raven of plastic shadows was to dawn and we should probably laugh through the eyes of the round-edged people as such. As my body grew accustomed to the lack of energy, actions were harder to complete. General movement became a task; though to go without such exercise I should daresay have resulted in my sleeping. Much like a slow-motion camera, the view through my eyes became sluggish also. For every 10 frames of measurable distance, I could safely say my mind processed two. Also mentionable was the afterimage that seemed almost superimposed over my eyes; that is to say when someone moved, they traced themselves over and over, shifting positions after each iteration.

Third day approaches, and so too does the grim mocking smile of that lady in the corner, so unattractive and silent that for what she’s worth, a mildly interesting rodent of sorts could have replaced her in that room on the hill. Said afterimages had thusly transformed into something of a mind-wrenching illusion. When the eyes of mine unfocused themselves, those movements and discrete quivers began to exaggerate and swell, swiftly pushing themselves further into the corner of my vision. These midnight monsters held their place in my mind as time pressed onward.

Was what I saw in that night of dreary nightmares the truth behind what so many people try to conceal, only to find it peeking through every leaking hole of their person? The very threaded material shredded by and by, and winking flocks of beasts ran in a manner not unlike that of a worn business man—rushed for rewards, spread just too thin for comfort among the restless and drowning. Drowning? Echoes like this reverberate in this blocked, isolated room. And as the minutes dragged on still, I was to float up to reality; that this room was not what I had expected or even imagined, but instead my mind of sorts.

Swimming feathers dipped themselves into that shallow pool littered carelessly over that mountain range over in the distance. I couldn’t believe it myself, being careful to follow the tracks laid down before me. How could anyone be so careless as to drop something so sentimentally meaningful like this? Because barking is a crime punishable by death, and the association of which is even greater a sin. Let’s imagine for a second that those night creatures had in fact revolved around the carefully placed imagination, and were not just a part of this threaded reality. People could look reasonably thoughtful looking at me with disgust, but as it presently stands, I see no reason to misguide my feelings in a way that dissolves my insides.

Things grow cold, the seasons are colliding and switching, then shuffling themselves and with them goes the rambling of past occurances. What a time this must be, such winged emotions may fly into the air as forgettable messes. Ladies and gentlemen, you think me insane? Would it too be a crime if I were? Such emotions aren't alone in the passing days

Finally, as body grew weary, mind numb, and eyes swollen, I was to give in to the temptation that had become something of an unmentionable subject. This breakdown of will was not to happen before the inevitable cracking of the vital functions of my brain however, and as things split and split once more, visions slid from view and folded neatly into what could only be described as a paper star from the third grade years… so long ago it was. With nothing but a convulsing outlook, I drifted into the sleep I was to live in forever after. So lovely are the birds this winter.

8.2.04 : @ 12:38:15 pm by James, Master Programmer / Make a comment
Successive Failures

After many, many hours of messing, tweaking, and bashing, I've finally created something that works! My original intent was to create an interface for plug-ins in an application I'm writing. The idea is to pass a structure containing various members that can be changed, and then return it back to the application when done.

First problem? I wrote the sample plug-in in C++, and it looked fine. Upon closer inspection, with the help of the dependancy walker, I realized that I hadn't declared the export layout, and it had by default exported the function with C++ naming conventions. This wouldn't be such a bad thing, except that it mangles the function names and makes them unusable. So, after adding a _declspec statement, it looked fine.

Then the sneaky logic error snuck in and bit me where I least expected it :O! I couldn't figure out why the parameters were being fed in one way, and being received backwards. Ten minutes and a cup of coffee revealed that I hadn't told the plug-in function to use the __stdcall naming convention. Without it, parameters are fed left to right and stack management differs. Okay, so far so good.

Well, the application is written in C#, and the .NET framework is very strict when it comes to memory management. I tried writing the function very simply - an extern function taking a struct and returning one. Because this caused NULL to be returned (in retrospect, I realized this may have been because I hadn't allocated memory for the structure in the DLL,) I tried a different approach. I read through MSDN and looked at the different Interop features. Combinations of in and out directives weren't working, and I was receiving errors because the function could not marshal a structure being returned. Like I said, .NET doesn't like unmanaged code.

Finally, the result of hours and hours of work finally paid off. I switched the function to pass a structure by reference and the DLL function to except a pointer of a struct. Bam! Success. So for the geeks of the world, take a gander at this.

DLL Function
#include <windows.h>
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
        return 1;

struct map {
        int GRA, GRB, GRG, GRD;
        int LMR, RMR;
        int LCR, RCR;
        int LIR, RIR;
        char *LSR, *RSR;

extern "C" __declspec(dllexport) __stdcall void Add(map *a) {
        a->LSR = "James";
        a->RSR = "Rocks";

Main Application
public struct memmap {
        public int GRA, GRB, GRG, GRD;
        public int LMR, RMR;
        public int LCR, RCR;
        public int LIR, RIR;
        public string LSR, RSR;

public static extern void Add(ref memmap r);

3.2.04 : @ 1:48:26 pm by James, Master Programmer / Make a comment
Jump Clouds

#include <stdio.h>
extern "C" int _stdcall fact(int q) {
        asm {
                MOV EAX, q
                DEC q
                MOV ECX, q
                MOV EDX, 0

                MUL EAX, ECX
                DEC ECX
                CMP ECX, 1
                JNZ BGN

void main() {
        printf("Result: %d\n",fact(8));

Today: [ Music:  Papa Roach - Infest Mood: Axcited ]  

8.1.04 : @ 6:57:46 pm by James, Master Programmer / Make a comment
How far will you go?

Finally, something I can listen to.

Something of a geek post this evening... programming is going well. I've had nothing to write lately, but turned back to my esoteric languages and decided to continue work on my lexical parser for the first of my languages to implement full keywords and variables. Kind of a intercal mix, it uses commands and requests, as well as alternative procedures for identifiers depending on the sleep state of the program.

Writing it in C#, and it's coming along quite nicely. Problem is, I currently do not have access to my beloved IDE, and so I have a question for all willing to listen (understanding is kind of a prerequisite however).

My question is this. As part of my language, I have an enumeration of valid data types (integers, strings, lists, and list slices, etc.) of which one type is assigned to each token when it is parsed. The tokens themselves are data structures (structs). I want to create a constructor for this struct. I want to know, is there an ambiguity between a static and nonstatic constructor, if both are implemented? I think not, because one would be called from the base class and the other from an instance of the class.

If I can get to Visual Studio soon I'll let you know, otherwise any feedback would be appreciated.

The first prototype of the language worked great until complications arose over the data type declarations. The lists were also indirectly recursing through eachother and locked up my system everytime I debugged, so I'm starting from scratch. Other than that though, variables worked, lists were parsed properly and even list splices worked like a charm. Hopefully I'll have these problems worked out soon.

In the mean time, I'll catch everyone later.
Today: [ Music:  Element Eighty - Parachute Mood: [insert mood here] ]  

5.1.04 : @ 6:05:17 pm by James, Master Programmer / Make a comment
Post office thoughts

Aha, this sucks. School tomorrow - atleast I didn't have to go today unlike to many other unlucky students in the area (teacher work day!). Yesterday my sister left us to go back to Prague and chill with her friends, heh. She missed the flight coming here and of course she wasn't to be out-done leaving. With any luck she'll be home by now.

Meanwhile, I slept. It's been particularly boring around the house lately, as more and more time is spent lying around with nothing to do. It's too bad all my plans to do during the break were used up in about the first week. As a consolation, school is just around the bed (about 12 hours from now, gar). I'm sad to see the break leave because with it goes too all those things we love to do and take for granted; mainly, sleeping late. On the other hand, I'm quite glad it's here so that I won't waste away all day.

After you realize how easy it is, school is like nothing. You just have to attend class, talk to friends, and do your work! I don't like to sound big headed, but the work is extremely easy, and I very rarely leave school with homework for the night.

Anyway, I've been playing Need for Speed Underground these past couple days. Despite the nasty BSOD's I get every now and then, it plays well on my laptop. I also have a sweet car which doesn't ride great, but is fast as balls... if only I could upgrade my N2O output.
Today: [ Music:  Puddle of Mudd - Away from Me Mood: Depressed ]  

3.1.04 : @ 4:50:27 am by James, Master Programmer / Make a comment
New Year Tidings

Closure has come, and with a year passed so comes the memories too that have crept up in the back of my mind as of late. The last day of 2003 started for myself promptly at 3 o'clock, when Jamey and Chris knocked on my window. My parents, being strict believers in routine, had left previously with my sister who is leaving this Sunday I believe. Being that there was naught but my dogs to answer the door, my window was the next best thing. I got up, dressed, and went out to meet them.

Now, I see Jamey all the time, but coupled with Chris, things were _crazy_. We started off by running down do Jamey's house, grabbing a couple bb-guns and shooting the poo out of eachother in his basement. Of course this ended pretty quick when his mom came home, and we had quite a time sneaking them out of his window. Anyway, his brother came home (partially drunk) and the four of us fit into his pickup, designed for three max.

With the gear stick up Jameys back side, and Chris periodically rubbing my leg, we made our way down the road a couple miles. Let me note here that the bass in this truck was BANGING! It was so great, the words to the song (an old-skool hip hop selection) were not audible, and my ear drums literally bounced around. T'was fun.

Finally, off a ramp and turning, we arrived at a dead end, leading right into the trees of the wild! Mwahaha, bb-gun wars galore! All in all it was okay - about three rounds before it got dark, and I got shot twice; once in the leg (the mark of which that was left behind still standing) and once in the ear, which hurt like holy hell for a couple days. I can't say I shot anyone, because I'm not quite sure if I did or not, heh.

So we drove home when light left us, and we hung around at Jamey's shortly until we decided to go to this church lock-in business. Seeing as I had never gone to one, I asked what it was about. After affirming that it was nothing too religious (athiest here) I decided I would go, parents permitting. Of course, the route from point A to point B is always longer than it should be, and my parents said no. More precisely, my mom said no. Not quite sure, and she didn't provide anything in the way of reasons. Finally after a few minutes we comprised and I was to stay until 1 o'clock (it went from 7 PM to 7 AM).

To make a long story short, we got there, went in about 6, and got the party started. Bands were playing all night, and I can safely say most sucked. Disregarding those that didn't play anything original, the rest were either tone deaf or just were not... musically inclined. I'm not the one to speak however, heh. There was free food, nerf-gun wars... more food... games, games, games, and finally an assembly bit at midnight. Not one of my favorite things.

Jamey said this was to be the only religious thing the whole time. So I endured; only barely though mind you. These guys! Sorry people, but I don't agree with you. Maybe it's only this church, but this guy was preaching to all our content listeners, ready to suck up whatever you could through at them without validation, that anyone who did not believe was bad... or sinful or whatever else he had to say. Again, let me state my view on the matter - I don't mind religion, but I do mind when people try to impose it upon me. Don't try to convert me or you'll get a knife through your toes, buddy!

Enough of that, I'll save the ranting for another day. I figures this long post was long since due, since my posting has been anything but regular lately. Here it is ladies and gentlemen, enjoy!

29.12.03 : @ 5:45:38 pm by James, Master Programmer / Make a comment
Together again, what was it like?

Finally got Linux running on my laptop!

After screwing up the partition table a couple times, and reinstalling Windows from scratch, I finally used Partition Magic (cracked download, but no worries, I have since deleted it) to split the partition into 30 / 10 GB. The 10 is for my brand-spanking-new distro of Mandrake 9.2. Well, not brand-new, but it looks it ;) I now have the best text editor in the world on my laptop (Kate). So I'm happy, at least.

Today has been somewhat strange. I spent the majority of last night / this morning watching Fargo, which was a really stupid movie which I though I would like but didn't. The only relatively cool part was when some dude killed another with an axe, then fed him in the wood chipper. Hah, cool stuff. So I woke up at about 3 PM today, to find my parents unsually still. The whole house was quiet, which was a change from the constant banging my dad makes in the earlier hours. As an afterthought, I won't go into the details as to why, but just know it was strange.

Here I am now, bored out of my mind. Frustrated that I can't get my internal WLAN card to work in Linux, but other than that I'm just dandy. I wish I had something to do. I'll probably round off the day playing Grand Theft Auto before I have to shovel down the worst food in the world, *pork chops*, for dinner. Ugh. So I'll let everyone get back to what they were doing. Later.
Today: [ Music:  Pulsedriver - Backyard Mood: Unknown ]  

26.12.03 : @ 12:41:16 am by James, Master Programmer / Make a comment
Christmas Time

A merry Christmas to all. I woke up this morning to the constant, regular knocking on my door at 11 o'clock or so by my sister, of all people. I groggily got myself out and into the family room, where my present was presented to me. My gift this year? A Compaq Presario 2195US laptop. :D It's great. Fourty gigabytes, almost 2GHz AMD processor. Best feature is the built-in 802.11g adapter, meaning I can connect to the wireless network in the house without consuming one of my PCMCIA slots. Nice stuff, indeed. So I've spent the day installing software; namely, Adobe Acrobat and MS Word for writing my documents, Microsoft Visual Studio 2003 .NET for writing programs, and Perl just because. It was a tiring but okay day! My mom got a robe.. thing, which, when adorned, magically transforms its wearer into a blob of neon pink. My dad got a nose hair trimmer from my mom (aren't implications wonderful?) and my sister got me a book, which has turned out to be pretty cool so far. I spent the remainder of the day being bored.

Oh! My most wonderful present of all this year though was one given to me by Jenna, the definitive source of awesomeness. What was it you ask? A tin of beans! No worries, it's an inside joke. Nonetheless, I laughed so hysterically my mom thought I should rather be in a mental asylum than closeted in my room all day, as it were. So anyway. My Christmas went well, my gifts were well recieved, and all-in-all, I think the general consensus was a thumbs-up for Santa!

And so I depart once more to fiddle and tinker with this laptop, and to continue my ever-onward battle with binary code in the underworld. Later all.
Today: [ Music:  Enya - China Roses Mood: Delighted ]  

24.12.03 : @ 12:35:38 am by James, Master Programmer / Make a comment

My brother is annoying, is a sneak, a snoop, a thief, and always will be. Don't contradict yourself in privacy issues when you constantly go against everything you say. Okay, even if I talk about you, why take it personally? And so what I don't have a good karma or whatever you want to call it? That may make me a bad person in your book, but I've had enough of you as well. And this conversation is closed.

Next time when you need to do something, you had better ask me, and had better do just that, and not go through my conversations, logs, or whatever else you may come across. Trust? Yeah, right.

15.12.03 : @ 7:52:00 pm by James, Master Programmer / Make a comment
Emaciated faces, uneasiness!

I am so tired. I woke up this morning and stood up, and I became so dizzy I fell down. It was kind of weird, but not in comparison to the dream I had had. Apparently, "a * a * e = xD1" but don't worry, I've already checked the hexadecimal translation and it doesn't work. Maybe it has another meaning? Ah well.

School was normal. Stupid people think I'm in a bad mood when I'm just trying to get my work done so I don't have it for homework. After school my mom, brother and myself went down to the mall to go Christmas shopping for my dad and sister and boyfriend. My mom wasn't thinking so straight today however, and wore two different contact lenses. The only reason we went today was so she could get her eyes checked along the way. So we ended up coming home again and we're going tomorrow. It's all good.

I'm kind of short for time here, but tomorrow or next time I post I'll tell you about this new esoteric language I'm creating. It's pretty nice, and uses actual keywords, hehe.
Today: [ Music:  Murphy Lee - Red Hot Riplets Mood: Tired ]  

Next Page