Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

[ Create a new account ]

adamy (78406)

adamy
  (email not shown publicly)
http://www.scyld.com/
Yahoo! ID: admiyo (Add User, Send Message)

Was an Army officer, am now a programmer. I play Sax and Piano, and I Rock Climb. These activities do not naturally go together. USMA 1993

Journal of adamy (78406)

Definition of programming

Tuesday December 16 2003, @02:04PM
User Journal

Here is my definition of programming:

Computer programming is the act of iteratively decreasing the delta between what you want a computer to do and what you tell a computer to do.

Webpage refactorings

Monday September 29 2003, @06:40PM
User Journal
This is a first set of thoughts on something about which I've been thinking. How does one refactor a web page. The /. front page story about Tidy for conversion to XHTML is a candidtate: replace HTML with XHTML. Other thoughts:
  • Convert non validating html to validating html
  • Introduce template engine
  • Replace table with divs
  • Replace monolithic table with single-row-per-tables (more of a hack, but effective)
  • Replace inline style with style sheet.
  • Replace spacer.gif with divs.
  • Replace javascript with backend processing
  • Replace backend processing with javascript
  • Consolidate javascript
  • Consolidate stylesheets
  • Introduce objects to javascript

I'd love comments on this. As we identify them, we can also try to come up with a step by step. Maybe eventually automate some of them...

See MIPS Run

Thursday July 31 2003, @03:05PM
User Journal

At some point I'm going to have to write a review of See MIPS Run, but until I do....

This is the book to learn MIPS at the Metal. I've spent the past couple of days getting my mind around the machine instructions for setting up and controlling the Cache, or translation lookaside buffer. THe book does apretty decnet job of explaining how to transform a 4G address space into a significantly smaller amount of ram, and how to keep a 4k chunck of that in cache. Why, because MIPS is a RISC chip, and stuff that other chips do in hardware here get to be done in software.

Get to be? Huh. Yep, seems that differeent types of systems need different types of setups. MIPS allows you to do alot of stuff in software and to customize it for an end applications. Not only can you switch the endianess of the CPU (A discussion in itself) you can control the page size, and the algorithm to swap pages from cache and main memory.

Aside from a good review on operating system principles, getting into MIPS has been a great refresher in Assembly, something I haven't had to deal with on any processor but the x86 in a long time.

Another intersting thing about MIPS is that certain instructions take so long that you can't use the result of them in the next instruction. Fetching from memory takes long enough that if you want to use the result of that fetch immediately, you have to place a nop (no operation) instruction immediately following it. A cool thing is that you can put several loads in a row. Each fills the delay of the previous.Branch instrcutions work the same way. Seems most compilers are smart enough to optimize for this.

More Kernel Stuff

Friday July 25 2003, @06:16PM
User Journal

Specifically...MIPS 4Kc.

So I can set the various LEDs using a simple C (I almost said script) program. Some interesting things about it:

It needs a function called int __start() or it won't load. This is run first, not int main(). I am fairly sure this has something to do with the loader script.

If I try anything that references memory opertations I get an error basciaclly saying I violated the Memory Table. Basically, I think I need to initialize the memory mangement elements of the CPU before I can do anything.

The problem that I am having is that to do so, I need to write in assmebler, and I haven't been able to Assmeble my Assembly files. Ah toolchains.

Kernel Hacking

[ #39768 ]
Friday July 18 2003, @02:12AM
Linux

I am finally trying to hack the linux kernel...sort of.
A friend got his hands on a MIPS board and we are trying to Port Linux to it. First step...to build the toolchain. I am currrently following the steps in the OReilly Embedded Linux book .
I should rephrase what so many people have had to find out for themselves:
    The toolchain has to be build in order.
    There are patches specific to the board/chip/archiceture.
    You have to have the right versions of GCC etc.