Saturday, November 21, 2009

0.2 Release

Unlike my 0.1 which was very late, I’m going to go against my way of being, which is submitting things only when I think they are 100% working or good enough to show. I found out today that Edward Sin submitted a function called HashMap (I didn’t even know he was in the class still.).

That so happens to be the same function I posted about on Nov. 12, 2009 on my blog. It’s great that he’s done, I was just ticked off I wasted time on it (I’ll get over it). On a go forward basis, we should check peoples blogs to see what functions they are going to work on for their next release or come up with another structure to avoid this if blogging/lighthouse isn’t enough.

The functions I will take credit for on my 0.2 release are:

0.2 Deliverables

reverse()

saveStrings()

loadStrings()  -Still need to get it working with URL and local storage address, Null is what 
                      it keeps finding. (should find hack by sunday.)

deleteStrings() – Can’t be 100% sure it works until loadStrings works 100% to confirm the deleted address.

Functions I could not get done because they are 3D related              (pushed to 0.3), or I needed more time are:

saveBytes() –Setting Sunday as goal

loadBytes() –Setting Sunday as goal

deleteBytes() –Setting Sunday as goal

For 0.3

modelX()

screen()

screenX()

mouseX() / mouseY()

Other:

By Sunday I also plan to have all the corrections F1lt3r gave me on reviewing my functions for 0.1

They will also be pushed on git back for final review to officially put into processing.js.

Friday, November 20, 2009

Back to processing ^^

I spoke with Andor and he showed me why it's in my best interest to save doing 3d functions for 0.3.
After going over the Mozilla Wiki Tasklist, I started freaking out

"OMG all the easy functions to work on are gone... Noooo!!" *mashing face on keyboard*

Then I got a bit positive and seen functions like:
saveBytes()
saveStrings()
loadBytes()
loadStrings()

None of the above functions were implemented into processing except loadStrings().
I looked in processing.js and found that loadStrings() was somewhat started because it accepted a URL, but it didn't have the JUICY part which is loading strings from a file.
       As most of you processing peeps know, you can't read/write to a file with JavaScript alone. So me being the brilliant computer science student I am, I started scheming,  trying to find a diabolically clever way to get around this (I don't know why my brain has to go against the grain. It screws me over in a lot of things.)

*I'm guessing this is about the point visitors lose interest  //posting picture*

*so are you refocused ;)  *

I started looking into PHP. I figured I can make javascript redirect to a .php page using the post method. Then in that post request I can stuff in a whole whack of data that I can then make .php store to a file.
To get the info back, I would repeat the process having the .php file send me the strings back using post.

I was so happy, I thought I had all the angles covered so I went to go speak to Dave  <- click it once

(thats when Chris Tyler helped me connect to the Mac. Thanks so much.)

I told em my idea all excited, thinking he would be like *wow... ya thats amazing, can't wait to see it.*
2.7 seconds later, Dave says "No no no, forget the php."






(he's not actually that mean)
Instead look into something called localStorage that is new in html5. Dave also directed me to another link and with that, I was off like a kid with A.D.D. in a Toy's-R-Us.
After randomly skimming pages with superfluous explanations, or so many dead ends, I stumbled on this amazing page.

*keep you engaged  Picture 2*















Now I started working on the saveStrings() and loadStrings() and I know I'm going to have to add a deleteString()
// to remove all/any of the items  accumulated into localStorage.removeItem('what ever');


I hope F1Lt3r doesn't hate the idea of using localStorage :(

ZOMG finally connected to a Mac from Windows 7 using VNC.


I know this is out of left field for everyone except me, but I like doing little side endeavors to spice things up. For a lot of people this probably seems like a no brainer, and if it is, then you can stop reading because this is just me patting myself on the back.


To the rest of you who think it would be pretty cool to connect to a Mac computer using windows, the following is a small guide for other Seneca students who have access to this same hardware as I do. (Although the concept is what matters.)

You will need the following:

-Putty (ssh clicent)

-VNC viewer   (<- I used realVNC on a windows 32bit system)  other OS’s use their download page.

-a Mac computer you have access to with a vnc server installed.

Steps:

-Open putty.

-Under Session(on left) find HostName and enter the server you want. In my case it was the canada server. 142.204.133.7




-Under +SSH (in left panel) open the menu and click tunnels

-In destination enter 127.0.0.1:5900

-In Source port enter 5900

-click Add





-Click Open             *you will have a black login screen.*





-If you logged in successfully   then that means you have started your tunneling into the remote computer over port 5900.   *pretty cool eh?*

-Just leave this window open until you are done with the remote computer.

Now to connect so you can see the desktop:


-Open realVNC      




-Under VNC Server enter the following: localhost:5900

-Click Connect

-enter your account password for the account you have on the remote machine.

-BAM!!! you should see a new window open :)  VUALA!  *Halo3 music starts playing*


-Note When you log into the mac from the screen above, you may be disconnected because while logging in, the monitors resolution changed. To fix this, just reconnect and you will be on the Macs desktop.

Tuesday, November 17, 2009

Starting 0.2 with reverse()

So far this reverse function is as easy as it sounds. Take an array and flip it around so that the first element becomes the last and vice versa. For the most part it’s done, but I get bothered by little things. For example on the processing page, reverse displays the array but with no comma (,) separator EX:

String sa[] = { "OH ", "NY ", "MA ", "CA "};
sa = reverse(sa);
print(sa);  // Prints "CA MA NY OH "

In my java script output it looks similar but with “,” that keep being put in  Ex:







The output should be: BMWVolvoSaab   :(

So far I’m trying to use a regExp to search for “,”  and replace with “” but I’m getting an error.

This post is also just to get into the habbit of blogging because I havn’t been doing it enough in this course and I don’t usually think this kind of stuff is a blog worthy post.

Friday, November 13, 2009

Corrections on 0.1

nfp() is now working exactly as the java version works. Check it out.


Link to my text file showing source code has been fixed. I want to make a patch like Andor has but for now F1lt3r check it out.

Thursday, November 12, 2009

0.2 Release functions

- reverse()

- Hash Map

- screen

- screenX()

- mouseX & mouseY  are under the bug section of the wiki task list so I want to talk to teacher before I commit to doing this one.

- modelX()  I want to discuss with teacher before I commit to doing this one.

 

I also need to correct to correct nfp() when 3 parameters are used.

Wednesday, November 11, 2009

Very late 0.1 Release

 

0.1 Deliverables

  • I wrote this blog
  • I updated my wiki page 
  • I created a patch
  • I wrote basic tests for Concat(), Hex(), Join(), Unbinary()
  • nfp() still not wroking exactly how I want when 3 parameters are used.
  • Andor contributed to my project  by showing me a more efficient way to do tests for my 0.2 release. He also indirectly helped because I learned a lot from his demo and implemented one of his effects in my join description page.

For 0.2

I have not signed up yet for the functions I will work on. I want to set the bar to have 1 method ranked easy and 4 ranked medium. I take the ranking from the mozilla wiki tasklist because in 0.1 I used that as my reference for picking all easy methods.

I should have another post tomorrow will my final decision on what functions I have chosen from that list.

I feel that for 0.2 I should stick with the same amount of functions because 5 seemed so easy at first in 0.1, but there were so many unforeseen things that I was stuck on. [dam you hex()]*raises fist into air*

As a result though I can honestly say I have learned a lot by getting past what I was once stuck at in 0.1.

Tuesday, September 29, 2009

Compile Fire Fox

SUCCESS!!! MineField Booyah!


Disregard any problems or request I had in this blog:
I just put up a new blog that is a step by step guide for compiling fire fox (MineField) on windows xp home.

I am now going to update my processing.js blog with how I finally figured out(a lot of irc help) how to start the processing.js project, and with the help of
andors blog I should have my post of a concat() function done by this weekend.

************************************ OLD Disregard *****************************
I'm just keeping this so when I look back I can see how big a scrub I was ^^

Well I'm now focused on getting Fire Fox to compile on Windows. My plan is to have compiled Fire Fox on every major platform, Mac, Linux, Windows. So far I set up visual studio properly and have it patched with SP1 (what a pain in the @#$). I also ran the Mozillabuild 1.4 package with the instructions from mozilla.org and I'm happy to say there does not appear to be any errors with the prerequisites.

I have the shnazzy little shell window (feels so strange to see it on Win7) open, and mozillabuilder appears to have put all the files locally. I am now at what I think is my next step ... to create a make file. I will update my status once I get around this stage, for now this is my screen.



Any insight is welcome. Remember folks... sharing is caring :)

Updated/added Friday Oct. 2nd ***********************************************(below)

Continuing from my last post where I got up to the console window above.
I continued to follow the instructions on the bottom portion of the mozilla page.

When I typed the command below it got all the files off the mozilla server with this one command:
hg clone http://hg.mozilla.org/mozilla-central/

It took a few minutes for it to do it's thing. Then I changed directory to mozilla-central
with the following command:

cd mozilla-central
The following commands I do not fully understand yet. I think they redirect
everything or add everything to mozconfig. Using echo allowed me to type it in one
line at a time:

echo '. $topsrcdir/browser/config/mozconfig' > mozconfig
echo 'mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-ff-release' >> mozconfig
echo 'mk_add_options MOZ_MAKE_FLAGS="-j4"' >> mozconfig

Then the last command I wrote was:

make -f client.mk

(note: this took a few min to execute)

The console window showed I got these 2 errors:

Initial project plan

My project for OSD600 is processing.js

It is named that because the purpose of this project is to convert all the function calls that exist in something called processing.org which is a Java base project that has an entire library of java methods into a Java-Script library.

I have chosen this project because it embodies everything I feel open source is about. I will be learning java script and java whilst figuring things out with the power of the internet to research and get in touch with people. By the end of this project I will have been a contribution at some level to a person(s) who will use processing commands in JavaScript which will intern contribute to Mozilla.

Plan for 0.1, 0.2, and 0.3 releases
For 0.1 I plan on converting 7 methods that are rated "easy" difficulty. I'm guessing that way I will gain some momentum and confidence. The exact 7 methods I'm not sure, but I wrote my name on the task list beside 13 methods. I will choose among those 13 when I start looking over the code.

My progress can be followed on a table located on mozilla Wiki that is containing all the function calls our group of students will rewrite. In that table my name will go beside the methods I choose to translate, I will then update their status.


I expect to start producing results as soon as I get fire fox compiled properly and figure out the process for translating my first method. Once I get the first one completed successfully it should just be as simple as rinse and repeat. I will also be adding to this blog at least once per week with updates.

The only barriers I see standing in my way is myself and any negativity/procrastination I do. This way of doing things is so foreign to me I will have to grow in programming style and in the way I overcome obstacles, because I am not used to programming at such an impersonal level where a lot of my feedback will be from people on IRC or email. I like having a partner to bounce ideas off of.

Thursday, September 24, 2009

Tyrant911 starts Processing.js

It seems like just last week I started my first blog (hurray)... unfortunately I don't think that's good enough for my teacher so here goes my 2nd blog. This is what I will use to post progress regarding my project I joined for OSD600. As you may have already observed my project is processing.js

I created an account and modified the Mozilla wiki page so that our group members can help co-ordinate which methods we will be focused on. The idea is that we write our names at the side of the task list table showing all the methods we have to choose from

ex:



New insights about the mysterious glass rooms in the Tel. Building at S@Y. I found out that the computers there are always on even though they seem off. The cubicles that are usually empty, actually are empty but it's because all these open source people are connecting to them remotely. I also got the chance to set up accounts on most of these computers.

There is a cool side note Dave updated me on. It is called WEAVE and lets us transfer our browsers settings easily to other Mozilla browsers on other computers we login to.