Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
User Journal

Journal Journal: House shopping

Just been shopping for a new house to live in next year. After a bit of driving around finding it we finally managed to find the place (more through our error than odd placement of house). Here is the summary:

Plus -

  5 Big downstairs (open plan lounge)
  3 Quiet location
  1 Nice garden
  3 Lockable shed
  3 Electric shower
  3 Tumble dryer
  1 4 bedrooms
  5 Big master bedroom
  5 NTL enabled
  1 ~10 mins Aldi + Iceland
  3 Lots of storage & en-suite bathroom downstairs.
  5 Generally nice on the inside (clean, well presented, etc).
  5 Everything seemed to work.
  1 Current tenant seemed happy.
  3 Parking space, lots of parking for guests.
  3 Double-glazing.
  3 Central heating.
  3 Definite furniture was OK.
  5 Good three-piece-suite.
  1 Council Tax band C

Total + : 62

Negative -

  5 Long way from centre
  5 Wrong side of town for Rich
  3 Dodgy-ish area (quiet but unknown at night)
  1 Outside looked scummy
  1 Parking space exposed.
  5 Kitchen small
  3 Electric hob
  5 Only one fridge/freezer.
  5 Aside from master bedroom, rooms small (lots of storage)
  5 Only room for one double.
  3 Upstairs bathroom a little scummy.
  1 Unsure about how much furniture will be there.

Total - : 42

Overall: 20

User Journal

Journal Journal: New server!

Well here I am typing to you via the brand new charon (actually just a new HD). Debian is no more and Gentoo is here to stay! Its testament to the power of Linux that I can get the server up and running to mostly its original specs within a day.

So now I'm a totally Debian-free shop.

While I was mucking around I decided to do a bit of cleanup. Charon and Hades' homedirs are now synced therefore can edit webpages from Hades and have been migrated to my new super fast disc on their own partition. The idea being that now it should be able to pull them out if ever needed.

User Journal

Journal Journal: More perl

OK so I got one reply from a bloke who had already dome some work which I had a look at. Looks interesting and I might merge a bit in. Been doing a big cleanup of the code to make it threadsafe (from the PoV of perl, not C#) and support multiple interpreters (where Perl does). Also been tightening up implicit defaults.

Put it into arch as well so can see how my hacking is progressing. Just adding Hashes and we'll be pretty usable. The final features I want to add are closures and XSUB integration (so I can call the managed world of Mono from Perl).

Why do this? Well partly for the coolness, partly to allow me to leverage the CPAN modules and partly to allow for Perl to ba a supported language for ASP.NET.

User Journal

Journal Journal: Server Wonk

*sigh* Charon (my server box) was up and down last night. What I initially put down to hardware failure actually appears to be driver/kernel related. Under heavy load the wifi driver managed to hang the networking stack requiring (since the box is headless) a hard-restart :(. Lots of buggering about last night attempting to upgrade the kernel/WiFi driver and interfacing with Debian's fundamentally broken kernel system. Really they should just admit that APT/dpkg, whilst wonderful in some ways, just isn't up to managing the kernels in Debian. They either need a specialised kernel package management system or to fix dpkg.

That aside, Charon seems happier now with the new drivers/kernel + a bit of manual fscking/restoring the disks but I've decided I've had enough of Debian. Although wonderful when it Just Works, you have to live with some parts of unstable just to get things working :(. Gentoo will be my new friend.

Aside from that, I also posted a request for help to the mono list wrt Perl#. Reproduced below for posterity :)

Hi,
 
  I was wondering if anyone on this list had a Windows box + Mono + Perl that
could try out my Perl interpreter bindings for C#[1]. Basically I wanted
access to all the useful utilities out there on CPAN[2] that aren't yet
available in managed code or in the standard class libraries. The
distribution gives a sample IMAP client using Mail::IMAPClient.
 
  It works on Linux (Gentoo & SuSE 9) and seems to work OK on OS X with a
little munging of the library names and modulo mono-wierdness wrt exceptions
(yes I know about mint...). I'd ideally like it to work on Windows as well,
then it could be a truly cross-platform way of getting lots of functionality
into C# for 'free'.
 
  I've based the build system on Gtk#. For those that just want to look at how
easy it is to embed Perl using the powerful features of C# take a look at the
IMAP example[3]. C# really does make this nice, a lot nicer than the Perl C
API! For example Scalars are auto-boxed to the approriate fundamental types
(int, double, string).
 
[1] http://www.srcf.ucam.org/~rjw57/mono_files/
[2] http://search.cpan.org/
[3] http://charon.ucam.org/mason/highlight.html?file=IMAPExample.cs
 
--
Rich

User Journal

Journal Journal: Grr

Missed the bus by seconds this morning -- been cutting it closer and closer I suppose. Anyhow, decided to walk instead and felt a bit better for doing so, it was a lovely morning, cool and sunny without being bright.

Just had a looooong discussion in the tea-room about Wireless network infrastructure. I think the CO was somewhat suprised at my random knowledge of some features of the network here, amazing what you find out if you just keep your ears open.

Also been posting a bit to the mono-list. Want to get some of the obvious nastiness in perl-sharp out and get it out into the world, or at least into CVS :)

User Journal

Journal Journal: More perl...

More wodges of code now. This nicely shows the autoboxing of Scalars and actually does something useful that you /can't/ do easily with the standard .NET framework :).

namespace PerlEmbedExamples {
    using System;
    using Perl;

    class IMAPExample {
        public static void Main(string[] args) {
            Console.WriteLine("Embedding Perl within Mono - IMAP Example");
            Console.WriteLine("(C) 2004 Rich Wareham\n");

            Interpreter interpreter = new Perl.Interpreter();
            interpreter.Embed(); // Do the required magic for Perl to be // sitting listening to us.

            try { // Ensure we have the Mail::IMAPClient package.
                interpreter.Require("Mail::IMAPClient"); // Create a new connection
                Scalar client = interpreter.CallClassMethod("Mail::IMAPClient", "new",
                        "Server", "charon",
                        "User", "rjw57",
                        "Password", "XXXXXXXXX"); // Check for success - autoboxing of Scalars to bools.
                if(!client) {
                    Console.WriteLine("Could not log into server.");
                    return;
                } // Get list of subscribed foderss.
                Scalar[] folders = interpreter.CallMethod(client, "subscribed",
                        Interpreter.CallFlags.ArrayContext); // List them to STDOUT, note autoboxing of Scalars to strings.
                Console.WriteLine("Subscribed to {0} folders:", folders.Length);
                foreach(string folder in folders) {
                    Console.WriteLine(" -> {0}", folder);
                }
            } catch ( PerlException e ) { // If there is some Perl error, catch it and report.
                Console.WriteLine("Error was thrown: {0}", e.Message);
            }
        }
    }
}

User Journal

Journal Journal: Sickness

Well I've been playing with embedding Perl within C# and have managed to write the first 'useful' program. The following is a re-write of the LWP simple test program in C#.

namespace PerlEmbedExamples {
    using System;
    using Perl;

    class LWPExample {
        public static void Main(string[] args) {
            Console.WriteLine("Embedding Perl within Mono - LWP Example");
            Console.WriteLine("(C) 2004 Rich Wareham <richwareham@users.sourceforge.net>\n");

            Interpreter interpreter = new Perl.Interpreter();
            interpreter.Embed();

            try {
                interpreter.Require("LWP::UserAgent");
                Scalar ua = interpreter.CallClassMethod("LWP::UserAgent", "new");
                interpreter.CallMethod(ua, "agent", "Mozilla/6.0");
                Scalar req = interpreter.CallClassMethod("HTTP::Request", "new",
                        "GET", "http://example.com/");
                Scalar res = interpreter.CallMethod(ua, "request", req);

                if(interpreter.CallMethod(res, "is_success")) {
                    Scalar content = interpreter.CallMethod(res, "content");

                    Console.WriteLine("Success!");
                    Console.WriteLine("Content:\n{0}", content);
                } else {
                    Console.WriteLine("Request failed.");
                }
            } catch ( Exception e ) {
                Console.WriteLine("Error was thrown: {0}", e.Message);
            }
        }
    }
}

You may well ask "Why bother?". Well actually I've been wanting to write some code in C# for a while but there just aren't enough utility libraries/classes about under sufficiently good licenses. I could do a load of P/Invoke magic to make use of C-libraries but that invoves a) recompiling on each platform and b) only using C-libraries available on multiple platforms. Using Perl gives C# immediate access to the vast wealth of modules on CPAN.

This makes wrapper classes around Perl modules pretty easy to implement :). Also the magic boxing and unboxing ability of C# means that I can use 'Scalar's pretty much just like 'Variants' in VB (which is more or less a good thing, I think).

User Journal

Journal Journal: Not much

Slow news days today and yesterday. Not much to report. Managed to get into work every dayt his week though. Thank fsck its Friday :).

Progress on MasonMail (my attempt to make webmail clients not suck) is going well. Its actually very usable for reading e-mail. This I suspect will be a plateau point, much like where DM is (I seriously need to spend some time on that).

On other coding fronts I'm re-discovering mono and decided that the next project I code which doesn't just need a Perl script will be written in C#, attempting to use as much managed code as possible.

In the vein, I'm just writing some ebuilds to let me play with System.Drawing and friends. Should be exciting.

User Journal

Journal Journal: Desks

Just finished moving desks. I now have a window and 70 quid that I found hidden in all my crap. Woohoo.

That aside I need to do a bit of work now. Got corrections to The Paper as well as a few chapters of a book to read. Its all go here!

User Journal

Journal Journal: Stuff

Went out with James last night. Poor dear has had Jenni go up to Scottie-land and leave him on his own. It was a very 'chilled' night, basically spent in the MCR watching telly.

Woke up early this monring, then went back to bed and fell totally asleep until 1pm. Guess I'm not quite sorted yet. Came in and had fun playing with itteration 2 of The Paper.

Dunno whats happening tonight. Hopefully something relaxing...

User Journal

Journal Journal: Mondays...

Well, not much of an entry for the weekend :).

On Saturday Jennie and I got up early and went around bits of the National Science week stuff here with my parents and their French friends. All very nice and very tiring. Still my mother hinted at some exciting financial arrangements so things could be good on that front.

In the evening was Improv curry. There is definately a critical mass of improvised comedians and we attained it. Jokes were flying all night and, with comedians, when the ball is dropped someone not only picks it up and runs with it but propells it somewhere towards the far-reaches of the Universe as well.

After the curry, everyone decamped to the Pub to have beer and festivities. After the beer staret flowing an ambitious plan was crafted 'Impro 24', almost exactly the same idea as the series '24' but improvised, back to back, for 24 hours. Yes, a crack team of comedians will risk certain brain damage just for entertainment. OTOH, it being May Ball season, most people will be used to random sleep patterns.

Eventually we ended up in the ADC bar talkign about 'Impro 24' and attempting to work out where we could hold such a thing. Ideas at this point were not forthcoming.

Around half-midnight Jennie and I finally moved to our beds and I fell asleep and didn't wake up until Sunday afternoon -- a good night.

Sunday was pretty boring, with not much happening and now its Monday. Wondering about moving desks actually. A nice one has just become available...

User Journal

Journal Journal: Comedy

Gig last naight at Homerton went OK. It was odd working with people we haven't worked with before - they are so unreliable. Right in the middle of '3 words' there was the biggest block I have ever come accross :(.

The audience seemed to like it and it all managed to come off OK in the end. Jennie and I commented to each other how snobby we have become, I guess we assume everyone is going to be as professional as Rich and Alex. Sarah was amazingly thespy at the end and gave everyone cards. Good god!

Marisa, Ashleigh, Jenni and James were there and seemed to enjoy themselves. James said he actually preferred it to Improwar. Of course I keep going over all the mistakes in my head but I reckon its fine really.

Two supervisions today which I'm doing the work for now. Should be OK.

Jennie didn't get the ADC job either :(. Big hugs to her.

User Journal

Journal Journal: Dropping off

Not too wonderful today. Feeling a bit under the weather. Probably perfectly timed to be ill over the weeked :(. Improv tonight which might wake me up a little though :).

The running order sent out yesterday prompted quite a few comments from participants -- mostly identical so that should be resolved soon.

I should also get around to replying to the e-mails about my OSNews.com article soonish....

User Journal

Journal Journal: Improv

Got the proposed running order for tomorrow's improv show through. Its a wee bit odd, both in pace and assignments, but then I reckon that because Sarah hasn't planned, or appeared in, an improv show with us before. There appear to be some stalling points on odd choices of games but seems OK. Will be playing with some people we haven't worked with much before which should be exciting...

User Journal

Journal Journal: Supervisions

Lots of buggering about required today. Need to buy some Formal Hall tickets, pick up superivision work and, possibly, grab some Grad-lunch. On the other hand I'm feeling pretty bad today. Might leave the ticket buying to this evening - I still need to find someone to buy some for me.

Slashdot Top Deals

An Ada exception is when a routine gets in trouble and says 'Beam me up, Scotty'.

Working...