<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-36152295</id><updated>2011-10-10T16:19:58.646+10:00</updated><category term='pedigree'/><category term='ATAPI'/><category term='wiki'/><category term='rofl'/><category term='pedigree pedigree-apps posix'/><category term='funny'/><category term='descriptor tables'/><category term='debugging'/><category term='comedy'/><category term='C'/><category term='development'/><category term='loopback'/><category term='delete this'/><category term='memory pools'/><category term='seagate'/><category term='api'/><category term='open source'/><category term='chrome'/><category term='C++'/><category term='not working'/><category term='subsystem'/><category term='wikiforall'/><category term='windows windows-server folder redirection registry drive map'/><category term='python'/><category term='zombie'/><category term='installer'/><category term='partitoner'/><category term='code'/><category term='humor'/><category term='directx'/><category term='buffers'/><category term='operating systems'/><category term='pong'/><category term='lol'/><category term='file locking'/><category term='programming'/><category term='3com'/><category term='freeagent'/><category term='humour'/><category term='GDT'/><category term='laughs'/><category term='osdev'/><category term='network stack'/><category term='game'/><category term='package-management'/><category term='posix'/><category term='filesystem'/><category term='mattise'/><category term='desktop'/><category term='NIC'/><category term='IDT'/><category term='failure'/><category term='OS'/><category term='google'/><title type='text'>The Pedigree Project Dev Blog: Matthew Iselin</title><subtitle type='html'>The Pedigree Project (http://pedigree-project.org) is an open source hobby operating system. This blog covers the project from the perspective of one of the core developers, Matthew Iselin (also known as pcmattman). Specifically, this blog shows insights into the design and rationale behind different components of the operating system.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>34</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-36152295.post-6049781027745008868</id><published>2011-10-10T16:19:00.003+10:00</published><updated>2011-10-10T16:19:58.833+10:00</updated><title type='text'>Pedigree's 'pup' package manager</title><content type='html'>Recently there's been a lot of activity in the project repositories related to the 'pup' package manager.&lt;br /&gt;&lt;br /&gt;I've been working at getting our binaries and other ported application-related files out of each repository and move towards only having the specific binaries we need for building Pedigree from scratch, and the remainder being source code and tools.&lt;br /&gt;&lt;br /&gt;So now a checkout of Pedigree and an Easy Build run will leave you with quite a bare build of Pedigree - you'll get bash, coreutils, and not too much else. This allows you to choose what goes into your build of Pedigree; if you just want Python and Lynx for web browsing, that's totally alright with us.&lt;br /&gt;&lt;br /&gt;'pup' is written in Python and will be available to run in Pedigree as well as on the build machine. At the moment however our Python build is a little broken as we are working on bringing proper shared library support to our userspace ports.&lt;br /&gt;&lt;br /&gt;In my opinion there's no reason for everybody to download over 250 MB just to get a simple checkout of Pedigree. That's what 'pup' integration is all about.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-6049781027745008868?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/6049781027745008868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=6049781027745008868' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/6049781027745008868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/6049781027745008868'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2011/10/pedigrees-pup-package-manager.html' title='Pedigree&apos;s &apos;pup&apos; package manager'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-5879790846181448246</id><published>2011-10-10T16:11:00.003+10:00</published><updated>2011-10-10T16:12:01.192+10:00</updated><title type='text'>Minecraft: Fix for Error (4): null</title><content type='html'>Been having this issue on and off for a while now, but finally nailed the source of the problem today.&amp;nbsp;I run Minecraft behind a Squid 2.7 proxy, which appears to have trouble handling ETags properly.&lt;br /&gt;&lt;br /&gt;In particular, it seems to have to do with the If-Match-None header.&lt;br /&gt;&lt;br /&gt;Upgraded to Squid 3.0 and I'm able to update Minecraft without using a browser - awesome! :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-5879790846181448246?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/5879790846181448246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=5879790846181448246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/5879790846181448246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/5879790846181448246'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2011/10/minecraft-fix-for-error-4-null.html' title='Minecraft: Fix for Error (4): null'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-1173206328241195463</id><published>2011-06-01T10:25:00.000+10:00</published><updated>2011-06-01T10:25:08.911+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows windows-server folder redirection registry drive map'/><title type='text'>And now for something COMPLETELY different!</title><content type='html'>I know this is technically a Pedigree devblog, but I also do sysadmin work and this might be handy for someone else out there.&lt;br /&gt;&lt;br /&gt;In a Windows network environment, folder redirection comes in handy for things such as server-side My Documents and such. We use folder redirection for the Desktop and Start Menu as well, to provide a set of icons to each user that we can manage centrally.&lt;br /&gt;&lt;br /&gt;However, it turns out Folder Redirection can't always redirect to a mapped network drive (ie, M:). The order of GPO processing means the drive mapping takes place later on, after the folder redirection takes place. So if you've mapped a bunch of network drives for the user and want to redirect to one, without using a UNC path, it won't work. This doesn't work for us as we map some drives to different locations based on the computer's organisational unit.&lt;br /&gt;&lt;br /&gt;So the fix comes from Group Policy Preferences: all that "Folder Redirection" does is set a few registry keys. Group Policy Preferences lets us set those registry keys manually, with the added bonus of the extremely powerful granular targeting (Item-Level targeting). The targeting lets us apply different registry keys to Admin users instead of Teachers, for example.&lt;br /&gt;&lt;br /&gt;The relevant keys for the Desktop and Start Menu are:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;All Users&lt;/b&gt;&amp;nbsp;- common across every user logged into the machine&lt;br /&gt;HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders&lt;br /&gt;&lt;br /&gt;Keys: Common Programs ("All Programs"), Common Start Menu (Icons outside of "All Programs"), Common Startup ("Startup" folder), Common Desktop (the desktop).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Individual Users&lt;/b&gt;&lt;br /&gt;HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders&lt;br /&gt;&lt;br /&gt;Keys: Desktop, Start Menu, Startup, Programs - all the same purpose as above.&lt;br /&gt;&lt;br /&gt;So, by setting a combination of these keys, we were able to get the desktop and start menu completely redirected to a network share that's unique per organisational unit. This means modifying the icons for a room involves a simple copy &amp;amp; paste on the file share rather than rebooting a computer for the startup script to take effect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-1173206328241195463?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/1173206328241195463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=1173206328241195463' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/1173206328241195463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/1173206328241195463'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2011/06/and-now-for-something-completely.html' title='And now for something COMPLETELY different!'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-4511620935513969113</id><published>2011-05-15T19:07:00.000+10:00</published><updated>2011-05-15T19:07:28.615+10:00</updated><title type='text'>Live Streaming some code!</title><content type='html'>I've set up a &lt;a href="http://www.justin.tv/pcmattman"&gt;Justin.tv channel&lt;/a&gt; to which I can stream live coding and debugging of issues in Pedigree and other projects.&amp;nbsp;I gave it a go this afternoon with about an hour's worth of playing around with Pedigree's memset, and I hope to regularly stream new stuff - there's certainly enough to do, after all!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-4511620935513969113?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/4511620935513969113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=4511620935513969113' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/4511620935513969113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/4511620935513969113'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2011/05/live-streaming-some-code.html' title='Live Streaming some code!'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-2648919705847060784</id><published>2011-02-03T17:16:00.001+10:00</published><updated>2011-02-09T22:26:02.014+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='package-management'/><title type='text'>Package Management &amp; Workflow</title><content type='html'>For those who don't know, one of my "mini-projects" (of which there are many!) on the Pedigree project is the 'pup' package manager. The idea behind pup is to create a Python-oriented package manager that works great on Pedigree but can also be used for any other operating system that happens to have Python ported. Essentially all of the backend is just standard HTTP GET requests, the packages are just .tar.gz files, and building a package is dead simple (assuming the environment is okay).&lt;br /&gt;&lt;br /&gt;The problem with 'pup' is that it current works out of a git repository which holds every package that will be in a master repository. This is great for editing the build scripts and versioning the pup source code, but when it comes to any form of management it's a nightmare.&amp;nbsp;The solution for this is to write a web-based user interface for managing a package repository.&lt;br /&gt;&lt;br /&gt;That's where it gets exciting.&lt;br /&gt;&lt;br /&gt;Actually managing packages in their built state is very, very easy. You simply modify the SQLite database containing package information where necessary, and move the package files around. The difficulty comes from building and &lt;i&gt;creating&lt;/i&gt;&amp;nbsp;packages. The easiest way to convince users to port more software to Pedigree is to make it extremely easy to - this is the goal of pup and the build scripts in our Pedigree-Apps repository.&amp;nbsp;So any web interface for management has to handle both managing existing packages (update/remove/rename/edit attributes) as well as handle bringing new packages into the system.&lt;br /&gt;&lt;br /&gt;The workflow I came up with in my head for this is as follows:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;User creates a build.sh and related scripts to build the relevant port. This is hopefully tested by the user and works on that system. &lt;a href="http://pedigree-project.org/projects/pedigree-apps/wiki"&gt;Creating these scripts is already documented&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;These scripts are uploaded to the web interface&lt;/li&gt;&lt;li&gt;The permissions of the user are checked; depending on these the package will be automatically built on the server straight away, or added to a queue for moderation (we'll assume it was permitted to be built here).&lt;/li&gt;&lt;li&gt;As the build continues, its status is made available to the user.&lt;/li&gt;&lt;li&gt;Once the build completes, the user is notified of the status of the build. Most likely an IRC bot is also present to notify developers/interested parties of the build status.&lt;/li&gt;&lt;li&gt;The package is added to the system and mirrored from the master repository to various other mirrors, ready for users to download the update/new package via pup on their Pedigree installation.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Here's the problem - as far as I can tell nothing like this exists.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So I'm looking at writing this myself, most likely in Python. It should be a fun project for when all the other projects are hitting dead ends, and has the added bonus of reducing my workload on Pedigree when done!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As an aside, notable changes since the last blog post:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://pedigree-project.org/projects/pedigree/wiki/Foster_Milestone_1"&gt;We released a feature-test release&lt;/a&gt; - Foster Milestone #1.&lt;/li&gt;&lt;li&gt;SSE in the kernel, oh my! memset takes this very well, memcpy not so much due to floating point state issues. These are being resolved at the moment.&lt;/li&gt;&lt;li&gt;A variety of changes across the POSIX subsystem and within the network stack for improved stability.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Also, We're looking for anyone who's got a few year's worth of OS development under their belt to come on board and work on the project - if you feel like something new and a C++ kernel doesn't worry you, find us in #pedigree on Freenode IRC.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-2648919705847060784?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/2648919705847060784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=2648919705847060784' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/2648919705847060784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/2648919705847060784'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2011/02/package-management-workflow.html' title='Package Management &amp; Workflow'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-6944631369709367807</id><published>2010-11-25T08:58:00.000+10:00</published><updated>2010-11-25T08:58:28.442+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pedigree pedigree-apps posix'/><title type='text'>Updates! Pedigree-Apps and POSIX stuff.</title><content type='html'>Over the past couple of months I've been working less on Pedigree as a whole and working on less intensive projects, such as playing video games, or writing small userspace applications. There is nothing that sorts out early burnout symptoms faster than taking a short break - and that means getting away from low-level programming &lt;i&gt;completely&lt;/i&gt;! So progress is definitely slowing down, but that doesn't mean things aren't getting done.&lt;br /&gt;&lt;br /&gt;As for the "Pedigree Team." Eduard (eddyb) has now started high school and so has a lot less time to contribute to Pedigree. He's still got a fair few ideas flying through his mind though and that's always a good thing. Can't deny it - since he first showed up in our IRC channel his behaviour (not to mention his English) has improved significantly. Just have to hope that doesn't go to his head ;-).&lt;br /&gt;&lt;br /&gt;I still consider Pedigree a unique project: proof of what can happen when a group of mostly like-minded individuals come together and use their combined skillset to make something really significant. It's a shame people like &lt;a href="http://jamesmolloy.co.uk/"&gt;James&lt;/a&gt; and Joerg have left us, but this is just the way things work. I don't know about Joerg, but James has certainly used Pedigree as a springboard into some pretty amazing work with his &lt;a href="http://www.quokforge.org/projects/horizon"&gt;Horizon project&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Enough talk about logistics and teamwork though! Let's talk about code.&lt;br /&gt;&lt;br /&gt;The first and foremost thing I really want to talk about is the "Pedigree-Apps" repository. This was set up a while back as a place for all of our ported packages to sit, and as a staging point for a master package repository for whichever package manager we ended up using.&lt;br /&gt;&lt;br /&gt;History lesson time! We initially started using "pacman", Arch Linux's package manager. It's a nice piece of software, and does the job very well. The dependencies it asks for are not quite as nice (especially libdownload, which is essentially impossible to find) however. It also doesn't lend itself well necessarily to cross-compiling packages.&lt;br /&gt;&lt;br /&gt;So recently I put together a new piece of software called "pup" - "Package Updater for Pedigree." It takes a path to a directory containing a Pedigree-style tree of directories that it tarballs and compresses and adds to a package repository somewhere. The databases used on both the server (for synchronising local "available package" lists) and on the client side ("installed packages") are nice and simple sqlite databases that Python has modules to read out of the box. Oh yes, that's right - pup is completely written in Python.&amp;nbsp;Why write pup in Python? The answer is simple: Python is already a Pedigree build dependency. You have to have Python to build Pedigree.&lt;br /&gt;&lt;br /&gt;In the future the main Pedigree repository will ship with a copy of pup ready to run, and instead of distributing hundreds of megabytes worth of binary files for a hard disk image, anyone who builds Pedigree will be allowed to choose which packages to add to their hard disk image. This will hopefully improve the size of source snapshots and shallow clones, and also make it easier to customise a hard disk image to a specific testcase.&lt;br /&gt;&lt;br /&gt;As for Pedigree-Apps itself, it now has a shiny build system that caters directly to both cross-compiling and automated builds. Package maintainers just provide patches and a set of scripts (for each phase of the build - prebuild, configuration, build, install, and for packages which provide libraries that future package builds might depend on, a script to set up library links for the cross-compiler) and the rest falls into place. Compared to the old system, this is much easier for package maintainers and also significantly reduces the total size of the repository, which is fantastic for those with slower internet connections.&lt;br /&gt;&lt;br /&gt;Now that all that is aside, I have a quick few things to add about a few changes that have gone through the POSIX subsystem. And by quick, I mean bullet points! Yay!&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Brand new pthread locks&lt;/li&gt;&lt;ul&gt;&lt;li&gt;I got fairly sick of having every pthread lock function call into the kernel, and it seriously hammered performance. So I spent a few hours rewriting both the spinlock and mutex functions to use atomic operations all the way out in userspace, only calling into the kernel to put a thread to sleep or wake a thread up. The resulting performance boost is significant: a few mutex tests that I ran as a benchmark averaged a completion time very close to that of Linux. Obviously it's hard to truly benchmark such an OS-specific thing, but I think that if a VM is hitting speeds close to that of Linux for a similar construct, I've done pretty well.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Rework of statfs/statvfs&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Only one of these functions is actually standardised - statvfs. The other is not. So I've removed statfs completely and stuck with statvfs, and so far nothing has complained. I'm yet to actually implement either of these functions, but I finally have a method of enumerating mounted filesystems in the VFS making an implementation of these functions fairly simple.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Condition variables&lt;/li&gt;&lt;ul&gt;&lt;li&gt;I'm hesitant to put this here because I really don't like the implementation I wrote, but I'll do it anyway. Condition variables of the pthread variety are now implemented. Badly. There is very little in the way of atomicity, and they end up being two mutexes tied together that are locked and unlocked unatomically. It's pretty nasty all up. Eventually I'll just rewrite these functions to use their own specific implementation without building upon the existing mutex implementation, but that will probably only really come when this implementation causes a bug.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;All up there's a lot still going on with Pedigree. Most tasks are now becoming longer subprojects - this is just a part of building such a massive piece of software and is to be expected.&lt;br /&gt;&lt;br /&gt;We're looking at possibly doing a "milestone" release in a month or two just to get our current code out into the wild (which does well for finding both bugs and feature requests). Stay tuned!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-6944631369709367807?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/6944631369709367807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=6944631369709367807' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/6944631369709367807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/6944631369709367807'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2010/11/updates-pedigree-apps-and-posix-stuff.html' title='Updates! Pedigree-Apps and POSIX stuff.'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-5753115473110523392</id><published>2010-05-09T11:20:00.000+10:00</published><updated>2010-05-09T11:20:21.231+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='buffers'/><category scheme='http://www.blogger.com/atom/ns#' term='zombie'/><category scheme='http://www.blogger.com/atom/ns#' term='memory pools'/><category scheme='http://www.blogger.com/atom/ns#' term='delete this'/><title type='text'>New Core Features</title><content type='html'>It's been a long time since I posted anything here. Moving to a new city has slowed my development down significantly, but things are getting back to normal again.&lt;br /&gt;&lt;br /&gt;Recently there has been a fair bit of activity, and I'll summarise what's been going on in this post. There's a couple new features, some changes to Pedigree itself, and some bug fixes. In-depth discussion of each, where necessary, follows the list.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;ZombieQueue&lt;/b&gt;&amp;nbsp;(commit d5314bf7)&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #484848; font-family: 'Lucida Grande', verdana, arial, helvetica, sans-serif; font-size: 11px;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Using &amp;gt; 4 GB of RAM now works, with the x86_64 port&amp;nbsp;&lt;/b&gt;(commit&amp;nbsp;bb6b954b)&lt;/li&gt;&lt;li&gt;&lt;b&gt;MemoryPool &lt;/b&gt;(commit 64454975)&lt;/li&gt;&lt;li&gt;&lt;b&gt;UdpLogger (versatile log callbacks) &lt;/b&gt;(commit ff5fddba)&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;i&gt;ZombieQueue&lt;/i&gt;&lt;/div&gt;&lt;div&gt;ZombieQueue solves a problem that has been lying around for quite some time. Things such as signals require that a Process object is deleted as part of it being killed, so it is no longer schedulable. However, this was dealt with originally by a "delete this;" line. Any form of "delete this" can be dangerous when the next line is not a return statement. Even when the next line &lt;i&gt;is&amp;nbsp;&lt;/i&gt;a return statement, a reschedule out of the current context and into another, which allocates memory, &lt;i&gt;may&lt;/i&gt;&amp;nbsp;overwrite the existing object... making "this" invalid.&amp;nbsp;That said, it did suffice for quite some time.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The idea of ZombieQueue is that you queue these deletions, allowing the thread to be rescheduled (or the call that needs deletion to return) and the object to be deleted at a later time, when it's safe to do so. Eventually ZombieQueue might also have a "delay" parameter, which ensures that it never deletes an object until after a specific time period has passed. This could easily be used for things such as TIME_WAIT handling in the TCP stack.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ZombieQueue has already been implemented into Process, Pipe, and Socket, all of which needed to delete themselves somehow. Now they call into ZombieQueue, which is able to safely delete the object.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;x86_64 port using &amp;gt; 4 GB of RAM&lt;/i&gt;&lt;/div&gt;&lt;div&gt;A TODO all through the physical memory manager for quite some time has been to handle regions above 4 GB in the x86_64 port. Until this change was made, no ranges of memory above 4 GB were actually accessible. In fact, using the x86_64 port on a system with over 4 GB of memory actually caused anything from a panic to a triple fault and reboot.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This has been rectified now. I'm still not sure it'll handle a full 64-bit physical address space yet, but it will handle a massive amount of memory nonetheless.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;MemoryPool&lt;/i&gt;&lt;/div&gt;&lt;div&gt;This one is something I'm surprised hasn't been implemented yet. The idea of MemoryPool is to take buffer allocation out of the kernel heap, where it consumes far too much memory - and sometimes even consumed the full size of the heap.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;MemoryPool takes a block of memory, outside of the heap, and splits it up into buffers of a specified size. These buffers are distributed to modules and applications where necessary, and returned to the pool when they are no longer needed. Buffers in, for example, the network stack, are around 2048 bytes (rounded up to the next power of 2 from 1500). Rather than have &lt;i&gt;every incoming packet &lt;/i&gt;cause an allocation on the kernel heap&lt;i&gt;&amp;nbsp;&lt;/i&gt;of, on average, 800 bytes, this moves the processing into a pool of memory dedicated to the job.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A key feature to MemoryPool is its blocking nature. If an allocation cannot be satisfied by the current pool of memory (ie, all buffers are allocated out), it will &lt;i&gt;block&amp;nbsp;&lt;/i&gt;until a buffer becomes available. Compared to the heap, this means a constant memory usage is enforced. Effectively, the pool provides a strict contract on its memory consumption: a pool will &lt;i&gt;never&lt;/i&gt;&amp;nbsp;resize to fit a new allocation.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This does bring up a minor problem: some code can't block - an interrupt handler for example. For this situation, a non-blocking allocation method is available, which merely returns NULL if no buffers are available.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;UdpLogger&lt;/i&gt;&lt;/div&gt;&lt;div&gt;It has long been possible to install custom Log callbacks which take log entries and write them to a destination. Callbacks that already exist include the Serial logger, and a callback is used for the loading screen log dump.&amp;nbsp;For testing on real machines, however, neither of these suffice. None of my test machines have a serial port, for example. They are all networked via Ethernet, however.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;UdpLogger is able to be installed after the route table is installed, so it's only really useful for debugging if you can actually boot to a shell on the test machine. It dumps all log entries to a given IP address and port. A test machine can then dump all its debugging output to a development machine running netcat.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here it is, in action:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://wikiforall.net/pedigree_udp_log.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="193" src="http://wikiforall.net/pedigree_udp_log.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Log::installCallback has now also been updated to dump all the &lt;i&gt;old&lt;/i&gt;&amp;nbsp;log entries to the new callback, so every logging destination should have the same data once they are all installed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;These are just a couple of exciting new features and fixes that have happened in the past couple of weeks. At this stage we have not planned a second release - we're still working through the bugs from Foster and finally getting around to fixing all those TODOs scattered in the code.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;At the moment git master is being kept "stable" - that is, it builds and runs to the bash shell (apart from x86_64) - so feel free to grab the latest code and have a play!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-5753115473110523392?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/5753115473110523392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=5753115473110523392' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/5753115473110523392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/5753115473110523392'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2010/05/new-core-features.html' title='New Core Features'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-3043868656082420267</id><published>2009-09-02T12:39:00.011+10:00</published><updated>2010-05-09T11:24:20.065+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='filesystem'/><category scheme='http://www.blogger.com/atom/ns#' term='pedigree'/><category scheme='http://www.blogger.com/atom/ns#' term='loopback'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='partitoner'/><title type='text'>Pedigree's "Services" Feature</title><content type='html'>&lt;div&gt;Well, the Pedigree team is currently in bug fixing mode as we prepare for our first release, codenamed "Foster" and as such, there's not been a lot to talk about innovation-wise in the kernel. So I've decided instead to chat about a feature of the kernel, which was implemented recently.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For our "live CDs" we realised we would need a read/write file system, in memory, with a set of applications and files to allow people to try Pedigree out without making changes to their computers. This meant that we needed a way to mount a disk image as a usable disk, which is a feature we lacked at that stage in Pedigree. So I spent a couple of hours whipping up a module to support such a feature. However, this module required a couple of tricky design decisions: Cache, and write support.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cache is a must-have in such a module, as without it each read from the disk image ends up in a read to its parent hardware - not so great if a slow CD drive needs to seek! However, the cache must also be big enough to hold at least one sector of disk data (preferably more). I eventually settled upon a 4096-byte buffer cache, which holds two full CD sectors, and eight hard disk sectors. Initial reads will miss the cache and read straight from the hardware into the cache. Further reads come from that buffer in cache. For an image formatted as FAT, for example, this improves read times from the file allocation table and root directory (high-use areas) significantly.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Writing to the virtual disk makes things slightly more complicated. I decided upon an implementation, which gave the option for the virtual disk to be write-through, or totally in RAM. These options need a bit of explanation. A write-through virtual disk will place writes into cache, and write to the real disk image itself. This is an ideal setup for something like Linux-style loopback disks. However, consider the "live CD" situation: we can't write back to a CD! So the second option writes only into the cache without affecting the original file. This means all changes are kept as long as the system is running, and do not persist. Implementing these two write options generalised the module - a massive bonus.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;However, all is not well at this stage. A module to provide a disk is one part of the battle. At this stage, all we have is an abstraction of a disk - no partitions, no file systems - it's useless for normal usage. At the time of implementation, Pedigree had no way to dynamically detect and mount such disks. This simply cannot do for a modern operating system where storage devices are hardly static - USB mass storage devices come and go, hot-pluggable hard disks exist, and so on.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I didn't want to have my loopback disk module talk directly to the partition driver though. Exposing the internals of the partitioner to other modules makes changing the partitioner’s interface awfully complicated, and creates an explicit dependency on a specific module.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I decided instead to implement what I call Pedigree’s service manager. This kernel feature sits between different parts of the operating system and provides a standardised interface to other modules. Each service provides the following types of functionality (at the time of writing):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Write:&lt;/b&gt; Send data to the module&lt;/li&gt;&lt;li&gt;&lt;b&gt;Read:&lt;/b&gt; Read data from the module&lt;/li&gt;&lt;li&gt;&lt;b&gt;Touch:&lt;/b&gt; Inform the module of new state&lt;/li&gt;&lt;li&gt;&lt;b&gt;Probe:&lt;/b&gt; Probe the module for a specific state or piece of information&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Each service decides which features it provides, so it is possible for a service to provide only read as a function. The service manager takes these potential features and provides a generic interface for drivers and modules to talk to named services. In effect, this idea of services is a method of inter-process communication using named destinations. Therefore, with this new service manager, I was able to modify the partitioner to add support for the touch service. There is no need for a partitioner to support read, write, or probe, as the only notification to be sent to the partitioner is to inform it of a new disk.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;With a quick modification to the loopback disk code, I was able to inform the partitioner of the presence of the new disk with error handling and no direct partitioner-specific functionality used:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="border: 1px solid black; margin-left: auto; margin-right: auto; margin-top: 5px; overflow: scroll; padding: 2px; white-space: nowrap; width: 95%;"&gt;&lt;pre style="font-family: Courier New; margin: 0px; padding: 0px;"&gt;// Chat to the partition service and let it pick up that we're around now&lt;br /&gt;ServiceFeatures *pFeatures = ServiceManager::instance().enumerateOperations(String("partition"));&lt;br /&gt;Service         *pService  = ServiceManager::instance().getService(String("partition"));&lt;br /&gt;NOTICE("Asking if the partition provider supports touch");&lt;br /&gt;if(pFeatures-&amp;gt;provides(ServiceFeatures::touch))&lt;br /&gt;{&lt;br /&gt;NOTICE("It does, attempting to inform the partitioner of our presence...");&lt;br /&gt;if(pService)&lt;br /&gt;{&lt;br /&gt;if(pService-&amp;gt;serve(ServiceFeatures::touch, reinterpret_cast&lt;void*&gt;(this), sizeof(FileDisk)))&lt;/void*&gt;&lt;br /&gt;NOTICE("Successful.");&lt;br /&gt;else&lt;br /&gt;ERROR("Failed.");&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;ERROR("FileDisk: Couldn't tell the partition service about the new disk presence");&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;ERROR("FileDisk: Partition service doesn't appear to support touch");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This feature has already been added to other areas of the kernel (mainly talking to the partitioner), but has the potential to even be expanded to call applications that the user runs. This means it would be theoretically possible to replace the partitioner at runtime, or replace a component of the network stack to provide a different level of service. That means that Pedigree can be modular and flexible, even though it uses the conventionally rigid “monolithic kernel” design. Now that’s something to write home about!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;NOTE: Blogger simply will not let that code sample work without wrapping it (it looks right in the preview and text editor). You should be able to get the idea that I'm trying to convey though.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-3043868656082420267?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/3043868656082420267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=3043868656082420267' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/3043868656082420267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/3043868656082420267'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2009/09/pedigrees-services-feature.html' title='Pedigree&apos;s &quot;Services&quot; Feature'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-2375034648708284018</id><published>2009-06-13T12:17:00.004+10:00</published><updated>2009-06-13T15:29:25.367+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='posix'/><category scheme='http://www.blogger.com/atom/ns#' term='subsystem'/><category scheme='http://www.blogger.com/atom/ns#' term='file locking'/><category scheme='http://www.blogger.com/atom/ns#' term='pedigree'/><title type='text'>Pedigree Progress</title><content type='html'>When I last posted I chatted a bit about CDs and the Pedigree installer. Since then, I have successfully written a driver, and that means Pedigree now installs off a CD without a hitch. Naturally, there's still bugs and minor things that need fixing (such as creating a default user!), but it's at least mostly complete.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Since then though, we've been refactoring the POSIX subsystem a fair bit. Rather than have a lot of POSIX-specific functionality at the kernel level, I've developed a Subsystem abstraction that sits between the kernel and the individual subsystems (POSIX, native, DOS, etc...). As a result of this new abstraction the POSIX subsystem has been significantly changed - it's now far neater, and a lot of sneaky bugs have been fixed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The biggest test of Pedigree itself so far has been our brand new Apache port. Through attempting to run Apache (over and over again) I've found some pretty big bugs, as well as a fair few incorrectly implemented functions. At the moment I'm working on file locking in order to allow Apache to actually serve a document.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This file locking concept introduces some serious design choices. One of the biggest is whether to implement it generically, and have it available to the kernel, or implement it specifically for the POSIX subsystem. Both have their pros and cons.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;Generic Kernel-Wide Interface&lt;/i&gt;&lt;/div&gt;&lt;div&gt;Pros:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Global - can be accessed and used anywhere in the kernel&lt;/li&gt;&lt;li&gt;Cleaner - no subsystem-specific code, #defines, or functions makes the final interface cleaner&lt;/li&gt;&lt;li&gt;Can wrap around already-existing objects&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Cons:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Potentially very slow - locks on ranges of bytes need to be checked on &lt;b&gt;every file operation&lt;/b&gt;, as the subsystem doesn't control the lock (subsystems would be able to decide better which file operations to lock)&lt;/li&gt;&lt;li&gt;May end up biased towards one subsystem rather than being truly generic&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;Subsystem-Specific Interface&lt;/i&gt;&lt;/div&gt;&lt;div&gt;Pros:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Keeps a complicated, and potentially very subsystem-specific, interface out of the kernel&lt;/li&gt;&lt;li&gt;Faster as it can use the subsystem's structures and functions when needed&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Cons:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;A real pain to implement - requires changing every file-based operation in the subsystem to use the proper locking mechanism, rather than just replacing the file object&lt;/li&gt;&lt;li&gt;Code duplication for locking in other subsystems&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Two very plausible interfaces - each with equally valid pros and cons. However, the final decision is made based on the point &lt;i&gt;Code duplication for locking in other subsystems&lt;/i&gt;. Why should such a generic concept as file locking be duplicated based on a different subsystem?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is a compromise to be made here though. Note that I have mentioned the generic interface has a serious problem: "Potentially very slow - locks on ranges of bytes need to be checked on &lt;b&gt;every file operation&lt;/b&gt;". This means that on every read, every write, the range of bytes being affected must be checked against every lock that the file has active. In the case of multiple shared locks, this is an O(n) search.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A simple solution exists. Whereas it is a definite deviation from the POSIX definition of a file lock, removing the ability to lock individual ranges of bytes and instead lock the entire file allows housekeeping in the kernel to be kept to a minimum - the lock can be kept as a simple Mutex rather than a list of locked ranges - and only slightly affects runtime speed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I consider this an appropriate compromise to make, as I believe it is ineffective to lock small regions of files (and I expect that the majority of file locks in POSIX applications are made for the entire file). I also feel that implementing the ranges of bytes properly is merely an introduction of more POSIX functionality into the kernel, which is something we're trying to avoid.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;EDIT:&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;The use of a generic interface means it's also possible to distinguish advisory and mandatory locking in the same object without requiring major changes. For instance, adding advisory locking with the generic interface to the POSIX subsystem was a 10 minute job, as it only involved editing the FileDescriptor object and (naturally) fcntl. In this implementation, mandatory locking is just an additional function call in file I/O functions, rather than multiple calls and checks per function.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-2375034648708284018?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/2375034648708284018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=2375034648708284018' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/2375034648708284018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/2375034648708284018'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2009/06/pedigree-progress.html' title='Pedigree Progress'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-7521063082383077913</id><published>2009-05-11T18:50:00.004+10:00</published><updated>2009-05-11T18:58:36.785+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pedigree'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='ATAPI'/><category scheme='http://www.blogger.com/atom/ns#' term='installer'/><title type='text'>The Plot Thickens (and the trail lengthens)</title><content type='html'>I started work on the Pedigree installer scripts recently, and whilst now I have an extremely powerful Python + ncurses installer script (copies files from a to b with installer pages and destination selection, with MD5 verification of installed files) I have realised that Pedigree isn't quite ready for it yet.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You see, for all of our testing we've been booting the kernel off a floppy disk with an initrd and using the hard disk to store all of our files (applications, config, etc). However, that approach doesn't quite work so well when we don't actually have a Pedigree-ready system state.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So I sat down and whipped up some ISO generation scripts, which means we now have Pedigree installer CDs. However, we don't have any method to read CD disks in Pedigree yet. What started as a simple concept (Python installer) has now developed into developing drivers for the CD drive and the on-disk filesystem format.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There's nothing wrong with that, of course, but it is slightly frustrating to not be able to jump straight into testing my installation scripts on Pedigree. If you're really interested, you can &lt;a href="http://github.com/jmolloy/pedigree/tree/pcmattman-installer"&gt;check out the progress&lt;/a&gt; of the installation side of Pedigree.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For all those excited about the concept of a Python + ncurses installer (highly customisable too :) ), you can see the most up-to-date scripts &lt;a href="http://github.com/jmolloy/pedigree/tree/bac3b27126140e64582dd5880573744b47f1cf37/scripts/installer"&gt;here&lt;/a&gt;. Keep in mind Pedigree has some unique requirements, and I haven't documented anything at the time of posting, so you're totally on your own if you do try them out.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-7521063082383077913?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/7521063082383077913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=7521063082383077913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/7521063082383077913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/7521063082383077913'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2009/05/plot-thickens-the-trail-lengthens.html' title='The Plot Thickens (and the trail lengthens)'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-5933310259978172831</id><published>2009-05-07T15:45:00.002+10:00</published><updated>2009-05-07T15:50:39.837+10:00</updated><title type='text'>More Updates!</title><content type='html'>My 3C90X emulation for QEMU works - and by works I mean I tried multiple guest operating systems and they all connected to the internet correctly via my emulation.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can patch your QEMU 0.10.3 source tree with the patches at &lt;a href="http://lists.gnu.org/archive/html/qemu-devel/2009-05/msg00205.html"&gt;http://lists.gnu.org/archive/html/qemu-devel/2009-05/msg00205.html&lt;/a&gt; to enable the emulation.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And in Pedigree-related news, I've started work on a basic installer system which uses Python to copy the files to the disk. This will let me create a quick and easy install method which is highly customisable.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The installer will be under Pedigree's license and should be portable enough to apply in numerous other environments.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-5933310259978172831?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/5933310259978172831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=5933310259978172831' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/5933310259978172831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/5933310259978172831'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2009/05/more-updates.html' title='More Updates!'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-5980739737111947381</id><published>2009-05-01T00:14:00.003+10:00</published><updated>2009-05-01T00:22:25.717+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NIC'/><category scheme='http://www.blogger.com/atom/ns#' term='pedigree'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='3com'/><category scheme='http://www.blogger.com/atom/ns#' term='network stack'/><title type='text'>Something Unusual...</title><content type='html'>A lot has happened since I last posted here. I've dropped Mattise and rejoined the Pedigree project (http://code.google.com/p/pedigree).&lt;br /&gt;&lt;br /&gt;The Pedigree project has allowed me to do some pretty crazy things - writing all sorts of code including a fully functional TCP/IP implementation.&lt;br /&gt;&lt;br /&gt;And that's what's brought me back here.&lt;br /&gt;&lt;br /&gt;I've got a few 3Com 3C90x NICs lying around the place here, and I thought it'd be nice to write a driver for them so I could test out Pedigree on some of the boxes I have around the house. However, I struck a problem very quickly - no emulator for x86 has a 3Com card emulated!&lt;br /&gt;&lt;br /&gt;A quick Google search showed me that PearPC had an emulation of one, but because it's a PPC emulator it wasn't useful to me (our PPC port is still a bit behind, unfortunately). PearPC's emulation is licensed under the GPLv2, as is QEMU's (our emulator of choice). So I thought it'd be fun to port it across.&lt;br /&gt;&lt;br /&gt;The first hurdle was that PearPC was in C++ and QEMU in C, and their entire interface to the virtual state was different. After an hour or two I'd fixed that up. However, I ran into a slight problem - the emulation was incomplete. So for the past day and a half I've been reading the specification for the card and updating my emulation code, while also updating my own driver.&lt;br /&gt;&lt;br /&gt;So I've been working on a driver for (and an emulation of) this NIC, which has been a huge challenge and all up, a &lt;span style="font-weight: bold;"&gt;lot&lt;/span&gt; of fun!&lt;br /&gt;&lt;br /&gt;It's an amazing feeling when you successfully create and close your first TCP connection. You can imagine how much more incredible it is when you watch "lynx" (the text-based browser) running through your NIC driver, controlling your emulated NIC, do a full request &lt;span style="font-style: italic;"&gt;and&lt;/span&gt; print the page.&lt;br /&gt;&lt;br /&gt;I will be submitting the 3C90x emulation as soon as it's more complete, cleaned up a bit, and most importantly - tested!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-5980739737111947381?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/5980739737111947381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=5980739737111947381' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/5980739737111947381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/5980739737111947381'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2009/05/something-unusual.html' title='Something Unusual...'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-7904879769654534831</id><published>2008-10-15T14:49:00.001+10:00</published><updated>2008-10-15T14:49:48.452+10:00</updated><title type='text'>The iPhone</title><content type='html'>&lt;div dir="ltr"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; "&gt;I&amp;#39;m writing this from my brand new iPhone. So far the experience has been totally positive. Setup was seamless and it&amp;#39;s quite easy to use.&lt;br&gt; &lt;br&gt;If you have the cash I highly recommend it - it&amp;#39;s definitely worth the money.&lt;/span&gt;&lt;br&gt;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-7904879769654534831?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/7904879769654534831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=7904879769654534831' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/7904879769654534831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/7904879769654534831'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2008/10/iphone.html' title='The iPhone'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-432141930968286212</id><published>2008-09-07T20:20:00.005+10:00</published><updated>2008-09-07T20:26:36.573+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><title type='text'>Google Chrome</title><content type='html'>Google entered the fray with nothing more than a simple search engine - but it revolutionised the way we think of the internet. Since then, the company has grown exponentially. With the onset of Gmail - a revolution in online email - Picassa, Google Earth, Google Maps, among many other products, Google is a household name.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;One of the biggest advantages to Google's products is that every single one is free - their advertising schemes provide enough revenue to allow them to release everything for free.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And so, the newest entry in the world of Google betas is their browser - Google Chrome. You can check out the Google blog entry &lt;a href="http://googleblog.blogspot.com/2008/09/fresh-take-on-browser.html"&gt;here&lt;/a&gt;, and if you just can't wait you can grab it &lt;a href="http://www.google.com/chrome"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I could bore you all with all the technological workings, but I won't - just know that it's fast, secure, and so far I haven't been able to fault it. It's far better than Firefox or IE (or &lt;your&gt;) in my opinion. It's even open source - so the entire development open source community has free access to it as a base for future projcts.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Check it out if you haven't already.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-432141930968286212?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/432141930968286212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=432141930968286212' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/432141930968286212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/432141930968286212'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2008/09/google-chrome.html' title='Google Chrome'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-3223713003809878750</id><published>2008-06-09T14:09:00.002+10:00</published><updated>2008-06-09T14:20:14.569+10:00</updated><title type='text'>Foot Photos Continued!</title><content type='html'>Yes, that's right. I'm keeping the tradition with yet another photo of my feet at an unusual place. I went ice skating on Saturday, and so I figured I'd get another foot photo in:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.theiselins.net/matt/blog/uploaded_images/IMGP0598-scaled-793025.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://www.theiselins.net/matt/blog/uploaded_images/IMGP0598-scaled-791453.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This could be an interesting idea to look back on in 10 years time...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-3223713003809878750?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/3223713003809878750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=3223713003809878750' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/3223713003809878750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/3223713003809878750'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2008/06/foot-photos-continued.html' title='Foot Photos Continued!'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-2191999197408061885</id><published>2008-05-18T13:50:00.002+10:00</published><updated>2008-05-18T14:05:40.088+10:00</updated><title type='text'>Mattise Progress (and blog updates)</title><content type='html'>Well, it's been a while since I talked about Mattise here, and although I'm not sure exactly how many people follow its development I think it helps me as much as it helps everyone else to know exactly what's going on...&lt;br /&gt;&lt;br /&gt;The current working copy of Mattise (ie, Mattise 3.0) has the following features:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Powerful bitmap-based page allocator&lt;/li&gt;&lt;li&gt;Simple kernel heap allocator (possibly changed to dlmalloc in the future)&lt;/li&gt;&lt;li&gt;Paging support, with reference counting for mappings&lt;/li&gt;&lt;li&gt;ELF binary support (loading modules, which are basically object files, and linked binaries)&lt;/li&gt;&lt;li&gt;Rudimentary VFS (currently just performs replacement based on a prefix/device binding, soon will replace the old device manager)&lt;/li&gt;&lt;li&gt;Device manager (soon to be replaced with VFS)&lt;/li&gt;&lt;li&gt;ATA driver (hard drive I/O)&lt;/li&gt;&lt;li&gt;Console driver (/dev/tty basically, though no terminal compatibility at all yet)&lt;/li&gt;&lt;li&gt;FAT32 support (no other FATs though)&lt;/li&gt;&lt;li&gt;Tiny bash-like shell&lt;/li&gt;&lt;li&gt;Functional newlib port&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Runs NASM, binutils&lt;/li&gt;&lt;/ul&gt;The last point is what I'm most proud of.&lt;br /&gt;&lt;br /&gt;Also, to avoid making multiple entries within the space of such a short amount of time, I'm going to mention some new things that I'll be bringing into this blog:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;More personal stuff (photos, anecdotes, etc...)&lt;/li&gt;&lt;li&gt;Updates on projects&lt;/li&gt;&lt;li&gt;Informational articles&lt;/li&gt;&lt;li&gt;(Rarely) A discussion about some concept (eg, "Gaming: Pick up and Play or The Epic?")&lt;/li&gt;&lt;/ul&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-2191999197408061885?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/2191999197408061885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=2191999197408061885' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/2191999197408061885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/2191999197408061885'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2008/05/mattise-progress-and-blog-updates.html' title='Mattise Progress (and blog updates)'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-3635180255049395424</id><published>2008-05-17T18:24:00.009+10:00</published><updated>2008-11-14T01:17:16.978+10:00</updated><title type='text'>Thailand/Laos Trip: Foot Photos!</title><content type='html'>In my not-so-recent-anymore Thailand/Laos trip, I had a thing where I took photos of my feet at different places. It's about time I actually put these up somewhere, so here they are!&lt;br /&gt;&lt;br /&gt;This is outside a temple, if I remember correctly:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_wAn9G8gBmdQ/SC6YB25Y_gI/AAAAAAAAAD4/xtRWlpXjgSY/s1600-h/IMGP0115+scaled.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_wAn9G8gBmdQ/SC6YB25Y_gI/AAAAAAAAAD4/xtRWlpXjgSY/s320/IMGP0115+scaled.JPG" alt="" id="BLOGGER_PHOTO_ID_5201261777343020546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This isn't really a foot shot per se, but it looks cool.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_wAn9G8gBmdQ/SC6Y2m5Y_hI/AAAAAAAAAEA/mBP_ogHzmi4/s1600-h/IMGP0251+scaled.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_wAn9G8gBmdQ/SC6Y2m5Y_hI/AAAAAAAAAEA/mBP_ogHzmi4/s320/IMGP0251+scaled.JPG" alt="" id="BLOGGER_PHOTO_ID_5201262683581120018" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This here is at the Plain of Jars (Site 1) in Laos.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_wAn9G8gBmdQ/SC6ZKm5Y_iI/AAAAAAAAAEI/K_xCozAuOC8/s1600-h/IMGP0273+scaled.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_wAn9G8gBmdQ/SC6ZKm5Y_iI/AAAAAAAAAEI/K_xCozAuOC8/s320/IMGP0273+scaled.JPG" alt="" id="BLOGGER_PHOTO_ID_5201263027178503714" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This is at a bus station in Thailand, just before a long and tedious 12 hour bus trip. I dunno why we sat around waiting, because it would've been smarter to use up all of our energy and then get on the bus and sleep away the hours...&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_wAn9G8gBmdQ/SC6Zc25Y_jI/AAAAAAAAAEQ/qS6vZAPKe28/s1600-h/IMGP0299+scaled.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_wAn9G8gBmdQ/SC6Zc25Y_jI/AAAAAAAAAEQ/qS6vZAPKe28/s320/IMGP0299+scaled.JPG" alt="" id="BLOGGER_PHOTO_ID_5201263340711116338" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This is in Chiang Mai International Airport (who knows, you might stand on this exact spot one day...) waiting for our flight (in the checkin area though).&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_wAn9G8gBmdQ/SC6ZyG5Y_kI/AAAAAAAAAEY/pO758exALX0/s1600-h/IMGP0311+scaled.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_wAn9G8gBmdQ/SC6ZyG5Y_kI/AAAAAAAAAEY/pO758exALX0/s320/IMGP0311+scaled.JPG" alt="" id="BLOGGER_PHOTO_ID_5201263705783336514" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Next overseas trip I do I'll make it a goal to get a shot of my feet in all situations I'm in, so I can continue this idea.&lt;br /&gt;&lt;br /&gt;By the way, I did actually remove those shoes during the trip - they just happened to be more comfortable than my pluggers every single day.&lt;br /&gt;&lt;br /&gt;A final foot shot...&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_wAn9G8gBmdQ/SC6agm5Y_lI/AAAAAAAAAEg/YcaaJ7tErbA/s1600-h/IMGP0229+scaled.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_wAn9G8gBmdQ/SC6agm5Y_lI/AAAAAAAAAEg/YcaaJ7tErbA/s320/IMGP0229+scaled.JPG" alt="" id="BLOGGER_PHOTO_ID_5201264504647253586" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;None of those are my feet, but it goes to show what motorbiking in rural areas can do to your feet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-3635180255049395424?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/3635180255049395424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=3635180255049395424' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/3635180255049395424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/3635180255049395424'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2008/05/thailandlaos-trip-foot-photos.html' title='Thailand/Laos Trip: Foot Photos!'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_wAn9G8gBmdQ/SC6YB25Y_gI/AAAAAAAAAD4/xtRWlpXjgSY/s72-c/IMGP0115+scaled.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-5039621877159677396</id><published>2008-05-17T18:00:00.004+10:00</published><updated>2008-05-18T15:42:24.586+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seagate'/><category scheme='http://www.blogger.com/atom/ns#' term='freeagent'/><category scheme='http://www.blogger.com/atom/ns#' term='desktop'/><category scheme='http://www.blogger.com/atom/ns#' term='not working'/><category scheme='http://www.blogger.com/atom/ns#' term='failure'/><title type='text'>Seagate's External Hard Drives</title><content type='html'>I recently purchased a Seagate FreeAgent Desktop (500 GB) to store my music, disk images, and video editing scratch data. It was fast enough (even over USB) to suit my needs, and I was extremely happy with it - and it even looks stylish in comparison to some of the "bricks" you can get these days. I was a very happy customer.&lt;br /&gt;&lt;br /&gt;Until Wednesday.&lt;br /&gt;&lt;br /&gt;Turns out I've now experienced something a lot of other FreeAgent Desktop owners have experienced - the drive simply doesn't get recognized anymore. This of course causes no end of frustration as I have a couple of hours of video I can't ever get back (that's *extremely* important), several disk images for different operating systems (multiple Linux distributions), and my entire music library stored on a now unaccessible drive.&lt;br /&gt;&lt;br /&gt;Every troubleshooter I've done points to internal failure, and at the moment I'm pretty sure the internal controller is fried or something. I've seen many people put up pictures showing how to pull apart the case and get the hard drive, but it's completely useless to me because I don't have another enclosure (and I need it for my laptop).&lt;br /&gt;&lt;br /&gt;I highly suggest not getting a FreeAgent Desktop if you're looking for an external hard drive solution, but instead I would point you to a FreeAgent Pro, which doesn't seem to suffer from this problem.&lt;br /&gt;&lt;br /&gt;EDIT: To update with what's going on, it turns out I need to send my faulty drive to Seagate and they'll ship out a replacement to me. Of course, I need to pay to send the drive to them. Data recovery isn't included in any of this, so I'll have to pay extra to get my critical data off the stupid thing. Obviously the warranty is totally useless to me because it doesn't cover any data on the drive, so I may as well crack the case and shove the drive itself into another computer (or buy an enclosure).&lt;br /&gt;&lt;br /&gt;I'll say it now, I used to have faith in Seagate as a brand, but right now I'm drawing a line in the sand and saying that I will never be buying another Seagate device again. Sorry, Seagate, try harder next time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-5039621877159677396?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/5039621877159677396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=5039621877159677396' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/5039621877159677396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/5039621877159677396'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2008/05/seagates-external-hard-drives.html' title='Seagate&apos;s External Hard Drives'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-8973037792476338684</id><published>2008-03-20T15:57:00.003+10:00</published><updated>2008-03-20T16:29:43.763+10:00</updated><title type='text'>The Forum User Problem and Taking it On</title><content type='html'>Recently I've been reading around on osdev.org, and have been unhappy with what I've seen. It would appear that a wave of people are joining the forum, and in some way or another turning the forum against them. I'm not going to name any specific usernames, though...&lt;br /&gt;&lt;br /&gt;I'm sick of these people posting to a thread with no knowledge of the subject to pick apart the original topic, and point out what's wrong with it - even after a moderator or a more experienced member has posted with assistance. Further, I find it frustrating when a user is told an answer and replies along the lines of "laziness" or something like that and yet continue to complain about their issue.&lt;br /&gt;&lt;br /&gt;In fact, in a recent discussion assisting lukem_95 with his PCI Numeration code, he posted a "Smart Question" (which increased my respect for him/her) in which he explained the problem he was having well, provided his problem code, and showed evidence of attempting to figure out what went wrong himself. An answer was given, all seemed well, until another member decided he didn't like the question.&lt;br /&gt;&lt;br /&gt;Here starts a flame war that continues on and on, and includes a statement "I don't think there are any real programmers here" (paraphrased) - an extremely inappropriate statement considering we have a university lecturer (slash doctorate) as a moderator (Combuster) and several industry programmers (ie, JamesM, omin0us, et al).&lt;br /&gt;&lt;br /&gt;So what can we do to tackle this problem, when threats of a ban, comments about a member's behaviour, and generally going against the community doesn't stop anything?&lt;br /&gt;&lt;br /&gt;I believe there are several ways to solve the problem:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;User suspensions: suspension for a week (or longer/shorter depending on severity of issue) that gives the member time to think over what he/she did and lets any flamewars cool down&lt;/li&gt;&lt;li&gt;Thread locking: a feature of most forum systems that I believe isn't used enough. Locking a thread stops both parties from continuing the fight&lt;/li&gt;&lt;li&gt;Personal messaging: let the two concerned parties continue with the discussion in a personal message chain. I know that PHPBB2 forums support multi-user personal message sending, so this is not difficult. A problem with this approach is a lack of moderation.&lt;/li&gt;&lt;li&gt;User bans: ban users who break the rules.&lt;/li&gt;&lt;/ul&gt;I dislike the last option, because it's final and harsh, but it is definitely justified after several warnings.&lt;br /&gt;&lt;br /&gt;Forums are online communities - let's try to get along with each other - and think twice before hitting that "Post" button.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-8973037792476338684?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/8973037792476338684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=8973037792476338684' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/8973037792476338684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/8973037792476338684'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2008/03/forum-user-problem-and-taking-it-on.html' title='The Forum User Problem and Taking it On'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-7185988455226435824</id><published>2008-01-26T21:16:00.000+10:00</published><updated>2008-01-26T21:30:09.374+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='operating systems'/><category scheme='http://www.blogger.com/atom/ns#' term='GDT'/><category scheme='http://www.blogger.com/atom/ns#' term='OS'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='osdev'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='descriptor tables'/><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='mattise'/><category scheme='http://www.blogger.com/atom/ns#' term='IDT'/><title type='text'>OS Development and Debugging</title><content type='html'>Well, I've finally gotten back into my OS developing - this is now the third rewrite of Mattise (titled "Mattise 3.0") and I'm truly starting from scratch on this one. I'm spending a lot longer getting the basic x86 code implemented (stuff like paging and the descriptor tables) and putting it through a lot of tests to verify that it's ready to do the job. Once I've finished with these tests I can add layers to it, such as context switching (threads and processes, although processes are really just a set of threads) or a driver system.&lt;br /&gt;&lt;br /&gt;Debugging all this is proving to be the hardest thing out of all the code I've written. At the moment I have to use a whole bunch of printing calls to output state until I finally figure out the source of the problem (and hope it's not those same printing calls). I've heard of people writing a dprintf interface to the Bochs port E9 hack but I personally think that sounds pretty, well, hacky, and means testing in other emulators is harder. My favorite idea is a debugging system that talks to the kernel via a serial line, but I'd still need to verify that the serial line works properly. A serial driver could even be written inline, not using a proper driver interface, to make life easier.&lt;br /&gt;&lt;br /&gt;I'm happy with my first couple of days re-entering the fray that is OS development on the x86 architecture. All I need to do is wait for the Intel Manuals to arrive in the mail and I'm set. I'll make an effort to keep this blog up to date with all that's happening as a reference point not only for everyone else but for myself.&lt;br /&gt;&lt;br /&gt;The project page hasn't been modified yet but it's at &lt;a href="http://www.sourceforge.net/projects/mattise"&gt;http://www.sourceforge.net/projects/mattise&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-7185988455226435824?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/7185988455226435824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=7185988455226435824' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/7185988455226435824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/7185988455226435824'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2008/01/os-development-and-debugging.html' title='OS Development and Debugging'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-8121420602098470362</id><published>2007-10-28T18:07:00.002+10:00</published><updated>2008-05-17T18:45:30.252+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lol'/><category scheme='http://www.blogger.com/atom/ns#' term='humour'/><category scheme='http://www.blogger.com/atom/ns#' term='wikiforall'/><category scheme='http://www.blogger.com/atom/ns#' term='wiki'/><category scheme='http://www.blogger.com/atom/ns#' term='rofl'/><category scheme='http://www.blogger.com/atom/ns#' term='humor'/><category scheme='http://www.blogger.com/atom/ns#' term='funny'/><category scheme='http://www.blogger.com/atom/ns#' term='laughs'/><category scheme='http://www.blogger.com/atom/ns#' term='comedy'/><title type='text'>WikiForAll - a wiki devoted to comedy</title><content type='html'>Yes, that's right, a new wiki enters the world...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.wikiforall.net/"&gt;http://www.wikiforall.net/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you're in need of some humour, this wiki is the place for you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-8121420602098470362?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/8121420602098470362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=8121420602098470362' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/8121420602098470362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/8121420602098470362'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2007/10/mywiki-wiki-devoted-to-comedy.html' title='WikiForAll - a wiki devoted to comedy'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-4614554560050422802</id><published>2007-10-14T20:10:00.000+10:00</published><updated>2007-10-14T20:23:44.079+10:00</updated><title type='text'>On Dvorak Layout and Game Design</title><content type='html'>After a mate suggested I try out Dvorak because, I quote, "your fingers fly, man!", I figured I had nothing to lose and setup the Windows language bar to let me switch input modes from the standard US keyboard to US-Dvorak keyboard layouts. Needless to say, the switch has not been seamless. It is so much more difficult to learn a new layout when I've been typing on the standard US layout for such a long time (it may also have something to do with the lack of proper labels on my US-style keyboard). Even having an image in front of me of the layout doesn't help much.&lt;br /&gt;&lt;br /&gt;And, to make it worse, I keep hitting the key combination to o,cyjd mre.o (switch modes) accidentally. One day when I get really bored I'll just open up Notepad and type "The quick brown fox jumps over the lazy dog" over and over until I can get it nice and fast. But who has time to spare, in this fast-paced world?&lt;br /&gt;&lt;br /&gt;Me, obviously. After all, I have taken on a project at school to write a multi-player RPG for my class to play when assessment finishes. As of the time of writing, it currently supports scrolling the map when the local player moves too close to the edge, drawing other players (although I have not yet plugged in the networking code to update these other players), an inventory manager (though no pickups yet or anything like that), and am in the progress of implementing a statistics manager (experience points and such).&lt;br /&gt;&lt;br /&gt;When complete, I hope to do a test run with the class and if successful recruit some of the more artistic members to draw the tiles for the game (as it is a 2D, top-down, tile based game). After creating some nicer tiles, I can then proceed to optimize the code like crazy, making it run really quickly locally so that network latency is not as much of a problem as it could be in a 3D game where the local version must update the frame and wait for input from the network.&lt;br /&gt;&lt;br /&gt;I actually have had an ingenious inspiration relating to NPCs in the game as well. Instead of having them built into the game, which increases code bloat and makes life harder, NPCs will be programmed as clients to the server, meaning that an NPC is nothing more than a basic program with AI logic in it to respond to game events, that connects to a specific server as if it was a human player. This method allows the NPCs to be easily customized on the fly, and makes testing the program much easier (once the server is started, it doesn't need to be quit again just to fix an AI bug).&lt;br /&gt;&lt;br /&gt;The only thing I can't figure out is what to call the game. If you like, you can post tile ideas as a comment to this post. Who knows, maybe your suggestion will become the name of the game!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-4614554560050422802?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/4614554560050422802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=4614554560050422802' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/4614554560050422802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/4614554560050422802'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2007/10/on-dvorak-layout-and-game-design.html' title='On Dvorak Layout and Game Design'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-7758491911153896024</id><published>2007-09-29T14:58:00.000+10:00</published><updated>2007-09-29T15:11:18.416+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='api'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='pong'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='game'/><category scheme='http://www.blogger.com/atom/ns#' term='directx'/><title type='text'>On Game Development</title><content type='html'>Due to my recent lack of success in game development (a 3D FPS is quite a challenge at times - more on this later), I've decided to go back to the first game I wrote - a simple "Pong" clone with a couple more features and a nasty AI.&lt;br /&gt;&lt;br /&gt;My 3D FPS works nicely, it loads levels and you can move around in them, but I never got collision detection setup in the engine, or any guns or any FPS-related stuff. I was mainly concentrating on getting a scripting engine setup for it, and after I got boost::python to work in the engine I realized most parts of the engine needed to be rewritten anyway because they were slow and causing massive code bloat.&lt;br /&gt;&lt;br /&gt;My old Pong game works nicely as well. You can load it up, select the difficulty level from the (extremely) rudimentary menu, and the AI can get tough. Unfortunately it was plagued by my lack of knowledge of the DirectX APIs and hence code is scattered everywhere in an attempt to make a working game.&lt;br /&gt;&lt;br /&gt;The new one will use a simple structure to do its work - not one massive procedure called every time the screen needs to be rendered. With a separate procedure for AI, physics, and drawing, the internal code base becomes much simpler and easier to work with. Monolithic functions (ie, those with &gt; 100 lines of code) will be split into multiple (smaller) procedures.&lt;br /&gt;&lt;br /&gt;And, possibly one of the most important things, the menu will be separated from the main game loop.&lt;br /&gt;&lt;br /&gt;I don't know what I was thinking when I wrote the first revision of Pong, but for some weird reason I decided it'd be a good idea to put the menu code into a conditional block:&lt;br /&gt;&lt;pre&gt;if( inMenu )&lt;br /&gt;{&lt;br /&gt;   // do menu stuff&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;   // do game stuff&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;The initialization for the menu was a bunch of hacks to get a bunch of strings into an array - now I know better methods for doing this. Often the menu strings would mingle with each other and end up becoming quite confusing.&lt;br /&gt;&lt;br /&gt;The new game will hopefully fix all these bugs in the initial code base and utilize the full power of DirectX 8 (instead of DirectX 1 which I was using before). The final planned feature is something that all my friends suggested after playing the first version - "Add networking". It should be fun to write a basic protocol that updates paddle and ball position for a single client. Or even to have a fancy "spectator" view and a "tournament" mode for those who wish to have a LAN party with a bunch of mates.&lt;br /&gt;&lt;br /&gt;It shouldn't take too long (hopefully no more than a month) and I'll post a link to the final binary when I'm done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-7758491911153896024?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/7758491911153896024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=7758491911153896024' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/7758491911153896024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/7758491911153896024'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2007/09/on-game-development.html' title='On Game Development'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-1032054778779332663</id><published>2007-09-28T15:49:00.000+10:00</published><updated>2007-09-28T16:28:47.727+10:00</updated><title type='text'>Gaming: Pick up and Play or The Epic?</title><content type='html'>Has anyone noticed a trend lately in game development?&lt;br /&gt;&lt;br /&gt;We have near-realism in our graphics (see some screen shots of F.E.A.R or Half-Life - they look incredible), with advanced sound systems that allows us to hear something "behind" us, and artificial intelligence that makes your enemies seem that much more real. Games almost make us feel like we are playing a movie.&lt;br /&gt;&lt;br /&gt;Who cares?&lt;br /&gt;&lt;br /&gt;Why is it that a simple game, with terrible graphics yet a &lt;span style="font-weight: bold;"&gt;fun&lt;/span&gt; concept, can leave the player entertained for hours?&lt;br /&gt;&lt;br /&gt;Yet, after viewing screenshots and attempting to play a game called "Ragdoll Smasher" (see &lt;a href="http://www.gamedev.net/community/forums/topic.asp?topic_id=455599"&gt;here&lt;/a&gt;), I realized that this guy had figured it out. The graphics are simple (at best) and sometimes a bit jerky, and there's no story, but you can sit there for hours throwing bodies around trying to knock over the obstacles.&lt;br /&gt;&lt;br /&gt;Another simple yet fun game is "Thermonuclear War" (see &lt;a href="http://messiahandrw.netfast.org/portfolio/thermonuclear_war/thermonuclear_war.htm"&gt;here&lt;/a&gt;) - basically, you have a bunch of nukes and blackness in which to nuke. Take out all your enemy's cities, you win. It's written using the Windows console, so it's not gorgeous, but interesting nonetheless.&lt;br /&gt;&lt;br /&gt;Small and simple games like these can become quite addictive, because you don't need to spend a long time at the computer to be &lt;span style="font-weight: bold;"&gt;engaged&lt;/span&gt; in the gameplay. They're literally pick up and play games. For a casual gamer, such games as Ragdoll Smasher (for the violent types) and Thermonuclear War (for the control freaks) can often be a quick boredom buster.&lt;br /&gt;&lt;br /&gt;I don't want to discount the success of Half-Life (or other similarly successful games). They are excellent games and a lot of hard work has been put into them. But if I just want to play for a half an hour, I won't be satisfied with my progress in Half-Life as compared to a win in Thermonuclear War.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-1032054778779332663?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/1032054778779332663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=1032054778779332663' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/1032054778779332663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/1032054778779332663'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2007/09/gaming-pick-up-and-play-or-epic.html' title='Gaming: Pick up and Play or The Epic?'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-1575500644996741696</id><published>2007-06-11T09:45:00.000+10:00</published><updated>2007-06-11T09:48:02.028+10:00</updated><title type='text'>Direct3D Mistakes</title><content type='html'>My stupid pyramid shape was rendering wrong, and I was getting somewhat confused at this until I actually asked some people over at GameDev.net and got some help. Nothing they did helped, so I looked through my code. After some searching, I found I was disabling depth buffering! Enabling it was a quick fix to my problem.&lt;br /&gt;&lt;br /&gt;Read your code often!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-1575500644996741696?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/1575500644996741696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=1575500644996741696' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/1575500644996741696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/1575500644996741696'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2007/06/direct3d-mistakes.html' title='Direct3D Mistakes'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-6167321934461943031</id><published>2007-06-10T11:13:00.000+10:00</published><updated>2007-06-10T11:17:16.547+10:00</updated><title type='text'>Frustrating Forum Users</title><content type='html'>This really frustrates me: http://www.developerfusion.co.uk/forums/thread/153675/#153675&lt;br /&gt;&lt;br /&gt;The person asks for some help to learn the language and instead gets given hundreds of lines of code, which is poorly commented and in no way helps him.&lt;br /&gt;&lt;br /&gt;To make it worse, it's an assignment this guy is doing, and to get given code like that can get him in trouble for cheating on his assignment. I just don't think it's fair on him for such a person as            "Mohammad Rastkar" to give him all that code, and not give him any real understanding of &lt;span style="font-weight: bold;"&gt;what it does, and why it does it&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Rant finished.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-6167321934461943031?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/6167321934461943031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=6167321934461943031' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/6167321934461943031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/6167321934461943031'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2007/06/frustrating-forum-users.html' title='Frustrating Forum Users'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-4072399217417854935</id><published>2007-06-08T20:42:00.000+10:00</published><updated>2008-11-14T01:17:17.172+10:00</updated><title type='text'>My OS and 3D Graphics (not related)</title><content type='html'>I was talking to a fellow devver on AIM this morning, and he asked to see my OS GUI, which of course I agreed to. I'm going to post it here so I can look back in a year's time and see how far I've come (click to see it in full size, it's 800x600):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_wAn9G8gBmdQ/RmkzYhCLVRI/AAAAAAAAAAM/q7ReSmD6Tac/s1600-h/mattise.png"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_wAn9G8gBmdQ/RmkzYhCLVRI/AAAAAAAAAAM/q7ReSmD6Tac/s320/mattise.png" alt="" id="BLOGGER_PHOTO_ID_5073642951486952722" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The cursor you can see is the one in my OS, and the wallpaper is that of a fave band of mine. So far so good, I'm going to rewrite my window manager because at the moment it crashes. Once done, I can post the image of windows in my OS here.&lt;br /&gt;&lt;br /&gt;Anyway, other than that, I've been toying with Direct3D, which I was talking about a couple of months ago. After giving up I've decided it's time to try again, and I've succeeded! I can create (and, most importantly, modify) a spinning pyramid! I'm really pleased, and I'm about to texture it, which will make me even more pleased.&lt;br /&gt;&lt;br /&gt;In other news, I'm planning on porting Descent 1 to my OS, and once complete it will be the first 'official' game for my OS.&lt;br /&gt;&lt;br /&gt;And now, I must go because I need sleep.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-4072399217417854935?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/4072399217417854935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=4072399217417854935' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/4072399217417854935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/4072399217417854935'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2007/06/my-os-and-3d-graphics-not-related.html' title='My OS and 3D Graphics (not related)'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_wAn9G8gBmdQ/RmkzYhCLVRI/AAAAAAAAAAM/q7ReSmD6Tac/s72-c/mattise.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-2911985930476774291</id><published>2007-06-04T13:06:00.001+10:00</published><updated>2007-06-11T13:28:24.823+10:00</updated><title type='text'>Compilers and Such</title><content type='html'>&lt;span style="font-family:arial;"&gt;Since the last time I posted, a lot has happened in my development life.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;At the moment, I have 3 main projects which I am working on:&lt;/span&gt;&lt;br /&gt;&lt;ul style="font-family: arial;"&gt;&lt;li&gt;My hobby operating system (Mattise - http://mattise.sf.net/)&lt;/li&gt;&lt;li&gt;The TI-Basic compiler, for Texas Instruments graphics calculators (http://tibasic.sf.net/)&lt;/li&gt;&lt;li&gt;Neural Network System ('learning' AI)&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:arial;"&gt;Add in exams and school, and I'm pretty busy! So I decided to save myself a lot of time, and wrote a simple linked list class, that I'm going to post here.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;//--------------- CLinkedList: Linked lists for any type ---------------//&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;// Copyright 2007 _____________&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;// Created 29-5-07&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;// License: GPL&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;//--------------- Includes ---------------//&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#include &lt;iostream&gt;&lt;/iostream&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#include &lt;stdio.h&gt;&lt;/stdio.h&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;//--------------- Class Definition ---------------//&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    The CLinkedList class basically is a shell around a certain data&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    type. It allows linked lists to be created for any data type,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    hence saving coding time.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;**/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;// main class&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;template&lt;&gt; class CLinkedList&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    public:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // initializes the list&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        CLinkedList();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // destroys all data in the list&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        ~CLinkedList();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // dumps the list&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        void Dump();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // clears the list&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        void Clear();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // inserts data at the given offset, shifting everything else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        int Insert( _T, int );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // pushes data onto the end of the list&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        int Push( _T );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // pops data off the end of the list&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        _T Pop();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // gets data from the list&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        _T Get( int );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // deletes an item&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        void Delete( int );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    private:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // the list type&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        struct myType&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            _T data;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            struct myType* next;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            struct myType* prev;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        };&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // the start of the list&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        struct myType start;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;};&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;template&lt;&gt; CLinkedList&lt;_t&gt;::CLinkedList()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // set the next and prev fields of start to null&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    start.next = start.prev = (struct myType*) NULL;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;template&lt;&gt; CLinkedList&lt;_t&gt;::~CLinkedList()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // clear the list, free the memory&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    Clear();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;template&lt;&gt; void CLinkedList&lt;_t&gt;::Dump()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // iterate through the list, displaying information about each item&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // running pointer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    struct myType* curr = start.next;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // running accumulator&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    unsigned int i = 0;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // delete each item&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    while( curr != (struct myType*) NULL )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // print it&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        cout &lt;&lt; "LIST[" &lt;&lt;&gt;data &lt;&lt;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // get the next pointer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        curr = curr-&gt;next;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;template&lt;&gt; int CLinkedList&lt;_t&gt;::Push( _T d )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // find the end of the list, then append the data&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // running pointers&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    struct myType* prev, *curr = &amp;start;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // wait until curr is null&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    while( curr != (struct myType*) NULL )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // save the current pointer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        prev = curr;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // load the next one&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        curr = curr-&gt;next;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // check that the one we want to add to isn't null&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    if( prev == (struct myType*) NULL )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // fail!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        return -1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // safe, so append - we need to make a structure first&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    struct myType* m = (struct myType*) malloc( sizeof( struct myType ) );&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    m-&gt;prev = prev;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    m-&gt;next = (struct myType*) NULL;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    m-&gt;data = d;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // fill it in&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    prev-&gt;next = m;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // success!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    return 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;template&lt;&gt; _T CLinkedList&lt;_t&gt;::Pop()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // find the end of the list, and remove it after saving its data&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // running pointers&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    struct myType* prev, *curr = &amp;start;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // wait until curr is null&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    while( curr != (struct myType*) NULL )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // save the current pointer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        prev = curr;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // load the next one&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        curr = curr-&gt;next;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // check that prev isn't null&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    if( prev == (struct myType*) NULL )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // return start's data&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        return start.data;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // prev holds the data we want&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    _T ret = prev-&gt;data;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // now unlink prev (the previous one's next is NULL)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    prev-&gt;prev-&gt;next = (struct myType*) NULL;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // and free the pointer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    free( prev );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // return the data&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    return ret;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;template&lt;&gt; _T CLinkedList&lt;_t&gt;::Get( int offset )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // loop through the list until we hit either NULL or the offset&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // offset into the list&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    int o = 0;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // running pointer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    struct myType* curr = start.next;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // keep on going&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    while( o++ != offset &amp;&amp;amp; curr != (struct myType*) NULL )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        curr = curr-&gt;next;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // we've hit the offset or NULL&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    if( curr == (struct myType*) NULL )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        return start.data;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // return the data&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    return curr-&gt;data;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;template&lt;&gt; void CLinkedList&lt;_t&gt;::Delete( int offset )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // loop through the list until we hit either NULL or the offset&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // then unlink it&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // offset into the list&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    int o = 0;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // running pointer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    struct myType* curr = start.next;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // keep on going&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    while( o++ != offset &amp;&amp;amp; curr != (struct myType*) NULL )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        curr = curr-&gt;next;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // we've hit the offset or NULL&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    if( curr == (struct myType*) NULL )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        return;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // unlink the item&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    curr-&gt;prev-&gt;next = curr-&gt;next;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // free the memory&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    free( curr );&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;template&lt;&gt; int CLinkedList&lt;_t&gt;::Insert( _T d, int offset )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // loop through the list until we hit either NULL or the offset&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // then append data to it&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // offset into the list&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    int o = 0;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // running pointer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    struct myType* curr = start.next;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // keep on going&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    while( o++ != offset &amp;&amp;amp; curr != (struct myType*) NULL )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        curr = curr-&gt;next;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // we've hit the offset or NULL&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    if( curr == (struct myType*) NULL )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        return -1;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // create a new item&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    struct myType* m = (struct myType*) malloc( sizeof( struct myType ) );&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    m-&gt;data = d;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    m-&gt;next = curr-&gt;next;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    m-&gt;prev = curr;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // link it into the list&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    curr-&gt;next = m;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // success!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    return 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;template&lt;&gt; void CLinkedList&lt;_t&gt;::Clear()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // iterate through the list, freeing memory as we go&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // running pointers - never start at 'start' because it isn't heap allocated&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    struct myType* savnext, *curr = start.next;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // delete each item&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    while( curr != (struct myType*) NULL )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // save this one's next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        savnext = curr-&gt;next;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // delete this one&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        free( curr );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // get the next pointer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        curr = savnext;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // and make sure start is setup properly&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    start.next = (struct myType*) NULL;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    start.prev = (struct myType*) NULL;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;It's extremely simple to use:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;CLinkedList&lt;int&gt; ll;&lt;/int&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ll.Push( 5 );&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ll.Push( 6 );&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ll.Push( 7 );&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ll.Delete( 1 );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;You might say, 'what about std::vector?' The above class is more portable, and works without modification in my own OS.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;I'm gearing up to post a multitasking tutorial someday, so keep your eyes peeled!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Bye for now, not forever!&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-2911985930476774291?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/2911985930476774291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=2911985930476774291' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/2911985930476774291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/2911985930476774291'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2007/06/compilers-and-such.html' title='Compilers and Such'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-1177487202027327624</id><published>2007-04-09T16:53:00.000+10:00</published><updated>2007-04-09T16:57:42.569+10:00</updated><title type='text'>Operating System Development...</title><content type='html'>It's been a while since I've posted here... Been too busy working on my newest project: Mattise, my hobby operating system. You can see a couple of screenshots and download it at &lt;a href="http://www.sourceforge.net/projects/mattise"&gt;http://www.sourceforge.net/projects/mattise&lt;/a&gt;. Many thanks to all the people over at OSDev.org for helping me with all the problems I had with it.&lt;br /&gt;&lt;br /&gt;The other project I'm embarking on alongside my operating system is a physics class which can be inherited by other classes. For instance, the physics class is called 'PhysicsObject'. If a user wanted a box, he creates a class called 'PhysicsBox' that is derived from 'PhysicsObject'. At the moment it is extremely experimental but covers velocity changes and acceleration.&lt;br /&gt;&lt;br /&gt;If I get around to it I may post some little tutorials on operating system development here. Keep your eyes peeled.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-1177487202027327624?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/1177487202027327624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=1177487202027327624' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/1177487202027327624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/1177487202027327624'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2007/04/operating-system-development.html' title='Operating System Development...'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-116216618194467568</id><published>2006-10-30T09:49:00.000+10:00</published><updated>2006-10-30T09:56:21.950+10:00</updated><title type='text'>Programming Languages</title><content type='html'>Well, yesterday I was happy to see that I was the number 1 most active user on Developer Fusion... Not that that's an achievement! Apart from that, my newest project is a programming language (interpreted, as I couldn't be bothered writing a compiler). It's really simple, and has the same sort of functionality as, say, BASIC... But it's a programming language, and I made it, so that's all that matters.&lt;br /&gt;&lt;br /&gt;I've also written an email sending system on my server that connects to small via libgmailer and allows me to send emails without much effort! I also finally got around to making my forms look good with good old CSS so I now have good looking forms (using a bit of a hack... Using a DIV in the background with the input box on top).&lt;br /&gt;&lt;br /&gt;Finally, I am continuing to work on my Winsock class - next thing to add to it: server-side stuff! I can't believe I forgot all that! Once that's done, I'm going to write a web server and hope for the best.&lt;br /&gt;&lt;br /&gt;Bye for now, not forever...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-116216618194467568?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/116216618194467568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=116216618194467568' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/116216618194467568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/116216618194467568'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2006/10/programming-languages.html' title='Programming Languages'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-116149580792845992</id><published>2006-10-22T15:39:00.000+10:00</published><updated>2006-10-22T15:43:27.936+10:00</updated><title type='text'>Microsoft makes it intentionally vague...</title><content type='html'>I've finally given up on looking and now I'm writing a class for sockets - so far it works for connecting to my home web server so hopefully I've done someting right.&lt;br /&gt;&lt;br /&gt;Yesterday I learnt how to use Amazon Web Services so now I'll be able to extend some of my websites to include searches for Amazon stuff (I'm already using it with ISBN numbers on a website!)&lt;br /&gt;&lt;br /&gt;I'll keep you all filled in on the happenings of my programming and may even get around to posting some code, if you're all lucky!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-116149580792845992?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/116149580792845992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=116149580792845992' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/116149580792845992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/116149580792845992'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2006/10/microsoft-makes-it-intentionally-vague.html' title='Microsoft makes it intentionally vague...'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-116115656999740802</id><published>2006-10-18T17:25:00.000+10:00</published><updated>2006-10-18T17:29:30.003+10:00</updated><title type='text'>Hey, we all make mistakes</title><content type='html'>Ok, ok... I have been greatly mistaken. It was almost going to happen, wasn't it. I actually searched the DirectX SDK directory and, lo and behold, found a help file with everything I need to know to make anything in Direct3D.&lt;br /&gt;&lt;br /&gt;Moral of the story? Read the manual.&lt;br /&gt;&lt;br /&gt;In other news, I'm writing a discussion board system that runs completely off XML files. When its done I'll put the link into one of these posts. In fact, I think I might write a simple website just to hold the projects I'm working on so that anyone can download them.&lt;br /&gt;&lt;br /&gt;Farewell for now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-116115656999740802?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/116115656999740802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=116115656999740802' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/116115656999740802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/116115656999740802'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2006/10/hey-we-all-make-mistakes.html' title='Hey, we all make mistakes'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-116105854936440050</id><published>2006-10-17T14:15:00.000+10:00</published><updated>2006-10-17T14:15:49.643+10:00</updated><title type='text'>DirectTutorial - Game Programming with Direct3D 9</title><content type='html'>&lt;a href="http://www.directtutorial.com/DX9/Direct3D/dx9-B.php"&gt;DirectTutorial - Game Programming with Direct3D 9&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My mistake, there is actually a tutorial on the net, this will easily be converted to Direct3D 8 with a bit of editing... It's for Visual C++ 2005 (or one of the Express Editions, which is what I have).&lt;br /&gt;&lt;br /&gt;Just shows what Google can do, doesn't it (search Simple Direct3D Tutorial C++ in Google)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-116105854936440050?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/116105854936440050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=116105854936440050' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/116105854936440050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/116105854936440050'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2006/10/directtutorial-game-programming-with.html' title='DirectTutorial - Game Programming with Direct3D 9'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36152295.post-116104972461258068</id><published>2006-10-17T11:30:00.000+10:00</published><updated>2006-10-17T11:48:44.620+10:00</updated><title type='text'>First Game Completed: Pong</title><content type='html'>Well, we all have to start somewhere, so I decided to write a simple game to learn the basics behind game design before I went to some more complicated project. It definitely paid off, with my first game being a clone of the hit game 'Pong'. Ok, maybe not a hit, but close enough :D. My next project is to write an Asteroids clone... it would be nice to show those asteroids in real 3D, not just wimpy 2D renderings of 3D models for my DirectDraw engine... why must they make it so hard to do anything in Direct3D? I've searched for ages just to find a tutorial just to initialize Direct3D - not even draw anything... I found some thing called D3DX, but couldn't be bothered downloading anything and I read that it only comes with the SDK after version 9 - I just so happen to be using version 8... if you have any idea how to do Direct3D, please send an email &lt;a href="mailto:pcmattman@gmail.com"&gt;pcmattman@gmail.com&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I'll keep this space up-to-date with the happenings of the Asteroids implementation, until then, farewell for now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36152295-116104972461258068?l=youngdev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youngdev.blogspot.com/feeds/116104972461258068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36152295&amp;postID=116104972461258068' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/116104972461258068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36152295/posts/default/116104972461258068'/><link rel='alternate' type='text/html' href='http://youngdev.blogspot.com/2006/10/first-game-completed-pong.html' title='First Game Completed: Pong'/><author><name>pcmattman</name><uri>http://www.blogger.com/profile/14733656658478598418</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_wAn9G8gBmdQ/SC6WL25Y_fI/AAAAAAAAADw/Axc7OL-hW8w/S220/IMGP0249+smaller.JPG'/></author><thr:total>2</thr:total></entry></feed>
