Archive for the ‘dev/tech’ Category

Enter the matrix!

Saturday, November 20th, 2004

Last year, my history teacher was “way to the right”, and he taught as such. Now, this year, my history teacher is “way to the left”, and he teaches as such. He can’t go five minutes without belittling bush, or bringing up Iraq. He even brought up the nuclear thing once. Is it too much to ask to just be taught without having views forced upon you? Being in that class gives me a headache; I just can’t stand to listen to all the hollow arguments, and feeble attempts at converting us all, though perhaps they aren’t so feeble. He probably has most of the class going! ugh!

So, we did matricies in school this week! More interestingly, we went over hill block ciphers. Penis gave me the idea to write a program to do them… So, I did. I made a matrix class in php, it is about 200 lines, including classes multiplication, addition and subtraction which extend matrix. ( I haven’t gotten around to inverse :( ). The arithmetic functions all work very well, but something seems to be going wrong in the cipher algorithm. Whenever I give it an enciphered string and the inverse matrix, it doesn’t completely decode it…. But I will get to that. It probably has something to do with how I am using the php chr() and ord() functions ( they deal with ASCII characters ).

Once again, a POW in geometry. They have all been pretty easy so far, and it is rather annoying me. Mr. Horne seemed kind of disappointed and shocked when I asked him if my answer was correct, before leaving school on friday. What, does he expect me to spend my whole week on it??? Is that why they call them Problems of the week? I always seem to mock that , and turn them into problems of the day! We should have one everyday, that would mean less time doing nothing.

Fsck!

Tuesday, November 2nd, 2004

Hehe. I spontaineously decided to wipe my root partition and start from scratch today… I don’t know why. Perhaps I really needed something to do or something. My home directory is fine, but now I have alot of packages to reinstall. I suppose it is all for the better though, I had alot of crap in there that I have wanted to get rid of for a long time.

Election day today… I sat home and did next to nothing. Now I sit here at TSA wondering when all the losers who are expected will show up. There are two of us here. Kyle and I. Worse more, for reasons stated above, I cannot get any work done on anything I have going on at home :(. Now while everyone else is at home watching election results, I have no idea what the hell is going on. Infact, I feel so disconnected from everything else in the world that I wouldn’t even be hurt if the LAN went down right now. I think I will just of some random program to write now. I need something to do that will at least feel like less of a waste of time than wasing time.

GLAT # 17.

Monday, October 25th, 2004

While I do lack 7/3 of a life, I have enough of a life to know that trying to find a formula to solve this one is not worth it (although, In my combinatorial studies next year I will… [<–written next year]), so I just used another brute force program….

Consider a function for which f(n) returns the number of ones required to count from 1 to n. f(13)=6, notice that f(1)=1. Find the Next largest number that satisfies f(n)=n.

The program is comprised of a loop that iterates until it finds something, then it exits.

199981
Query took 7.47828507423 seconds.

The php source can be found here.

Solve With Force!

Sunday, October 24th, 2004

I finally got around to completing #1 on the GLAT today. The google folks really need to be more specific about what they want. Number one basically says: Solve this cryptic equation, noting however, that values for m and e are interchangeable. The equation is: WWWDOT-GOOGLE=DOTCOM It does not specify weather or not a number can appear more than once..(i.e..can T=O?). If you were to try solving this by hand, you would have to make such conjectures as: If two numbers are subtracrted to form a third number comprised of the same number of digits as the original two numbers, then 1st Digit in the second number subtracted from the 1st digit in the first number will equal the 1st digit in the third number. This however, is not nesessarily true, but one can solve this in this manner. #1 also states that no leading zeros are allowed. This means that W can not be 0, D can not be 0, G cannot be 0, and logically, O cannot be 0. Solving this by hand using the method I stated above would lead you to things such as: w=2*O, T=O….and equal values for e and m also mean they are interchangable….so T=2*M, w=4*M…then M is 1 or 2, and w is 4 or 8, respectively. Now, If google did specify that no digit could be repeated, then the only sane way to solve this would be via a computer program, which I also did. I made the brute-force program in php (ran it from command line) and it gave me 144 permutations…2 of which had unique digits…the only difference being interchanged valued for m and e. here they are:
777589-188103=589486
777589-188106=589483

That is probably what google is looking for, but they really should specify. The Brute Force Program took only 126 seconds to run, all the possible answers it generated can be found here.

2.6.9

Saturday, October 23rd, 2004

mmm! Time for another fresh compiled kernel just like Mom used to make! On the 18th, Kernel 2.6.9 was released. I am currently running Kernel 2.6.8. Rather than downloading a patch file, I for some reason, would rather just download the whole thing and be forced to repeat the config. Hey, I’m weird… If you haven’t ever configured a linux Kernel, It is kind of boring, though not so bad when you use one of the Graphical Config Tools. I was running Mandrake 10.0 before I compiled 2.6.8. Traces of Mandrake still remain, but most I have since replaced most of my software packages with distro-neutral things. Now, if all goes well, my next post will be from a fresh 2.6.9 kernel :). I need to try and compile KDE now. Last time I attempted, I had some Freak compile Error with Library qt-mt :(…But I am determined to Rid my system of every last bit of mandrake, not that I have anything against it…

Handrigan!

Wednesday, July 21st, 2004

Shortly after the last post, I learned how to to a page break in HTML. (like anyone would ever want that…) It is simple CSS (ok, so it isn’t HTML…). The mail merge program works without flaw now!. I added comment code to this template finally. Due to stupitity, it took me a while. I had the </Blogger> Tag in the wrong Place.

I ate at elite today with my grandmother, and I saw Handrigan there… It gets worse… Shortly after I noticed Handrigan, Jeremy appeared on the scene and they both left together. I can’t believe no one told me that they work there. John and I had a big glaring thing, which was pretty freaky. I leave for Yawgoog on sunday. Part of me doesn’t want to go. I have beent there so many times that I could write a script of the whole week and it would be pretty accurate. Going to Yawgoog is sooo sad in a way, because we go at the end of July and it makes me realize that there are only 5 more weeks left of summer Vacation. On a closing note: I hate spongebob. He should die.