Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Tuesday, 29 January 2008

day of upgrading and hacking (reg 3)

I've been bad today. Real bad.

upgrading

On a whim, I decided to upgrade from Feisty Fawn to Gutsy Gibbon. What's the worst that can happen, right?

Somewhere in the middle, the update died and said my system was in an unstable state. Part of it was due to my uninstalling some packages by hand (Haskell's X11 1.2.1). When the unregister script in the package tried to run ghc-pkg, the latter simply complained that it couldn't find the package, normal because I had unregistered it by hand to put X11 1.4.1 in its place. After some frantic aptituding, I figured out that I only had to edit the file /usr/lib/libghc6-x11-dev/unregister.sh to comment out the ghc-pkg call. Then, I could remove the package in peace and everything was ok again (I hope! Did an aptitude dist-upgrade and got no complaints).

Also continuing that whim, I decided to upgrade GHC 6.8.2. After reading Cale Gibbard's advice on a reddit thread, I have learned that the right way to do it is just to forget the Ubuntu packages, and install the binary from the GHC site. Said binary comes with a whole bunch of libraries, so that makes life simple. I had to install a couple more packages to recompile darcs, and tagsoup, but seems fine now. I tried cabal-install again, but unfortunately, my proxy server seems to respond with an HTTP code 400 to the HTTP package (I'm guessing that's what happens). Sigh. More installing stuff by hand.

My xmonad is now at version 0.6 (after the upgrading). Works fine.

I have solved my problem with the inconsistent font sizes.. Just had to start gnome-settings-manager. Probably applies to anybody who's not using Gnome, but is using some Gnome apps or other stuff built using GTK-2 (guessing wildly!). Always suspected it was something like that, but just didn't know what it was called. Should have thought about gnome, and not just gtk.

Well, that was foolish, but now I have a new system and some nice new software. In the grand scheme of things, it wasn't so bad. Mail still working, printers still working. Just a little scare in the beginning.

I guess upgrading somewhat regularly makes sense. Part of it is that the state of Linux software, as advanced as it now is, still kinda sucks (Dia for example, which I think is no insult to the developers. Non commercial software has a "right" to suck)... so you're always hopeful to get a less-sucky Dia, or a less-sucky Openoffice. Another thing is that it just makes life simpler because everyone else is upgrading... so you can keep up with them in terms of libraries and what not. Now, that's not just a case of herd mentality. Everyone pretty much has to upgrade, because different people start using software at different (read: newer) versions. Frequent upgrading just makes life easier for everybody in the long run.

darcs hacking

I think I've spent over two hours today working on darcs, minor bugfixes, etc... very clearly NOT my job. Maybe if I hang on long enough I can get to the point where the definition of my job becomes fuzzy enough that I can do what I want without feeling guilty about it.

work work

This morning, I spent some time re-reading belz2004cru to make sure I haven't missed anything. Need to try again; wasn't really concentrating.

I estimate that I've spent three hours today trying to configure latex2html so that the reg2008 participants' pack looks a bit like the web page. Watch it turn out to have been wasted effort. Think I've pretty much got it where I want it, although will have to spend some time tomorrow refactoring it. You might be seeing little parenthetical (reg N)s in the title. I'm supposed to be counting how much time I spend on this stuff so that we get a better idea on our time estimates.

Also, oh! Some good news: the PDTB got back to me! No PDTB 1.0 because 2.0 is coming out real soon (although c'est payant). Some other info and discourse connectives. Thanks!

I guess today really is more a ":-|" day than a ":-(", but let's slap a frowny face on the day for how bad I've been.

Friday, 28 December 2007

the weird fonts problem (GTK?)

Found a way to reproduce it:
  1. Start meld (observe tiny fonts)
  2. Kill meld
  3. Start rhythmbox
  4. Start meld (observe big fonts)
So this is annoying because you can't just pick a font size for your text editor and have it work. You pick something that works in tiny fonts mode, then it gets ginormous in big fonts mode, and vice-versa if you pick something that works in big fonts mode, it's itty bitty in little fonts mode. I guess systematically starting rhythmbox first would be an ok workaround.

It could be related to me not using the Gnome desktop stuff (and using xmonad instead). Dunno.

Thursday, 27 December 2007

details details

On my Ubuntu box at work, if I print two copies of a document with an odd number of pages, the first page of 2nd copy gets printed on the back side of the last page of the 1st copy, which is of course, nearly useless. I was going to rant about how little details like this matter (don't get me started on "collate"), but then if I recall correctly, my Mac did the same exact thing to me when I was trying to print out slides for my viva. Is it CUPS's fault? Or did I just remember wrong? Well, in any case, little details like this matter. Harumph.

Friday, 21 December 2007

sCRUed up

grammars

Morning: Sort of cruised around looking at papers, people converting from HPSG to TAG, from TAG to HPSG, from TAG to CCG... just getting a feel for what people have done in re-using other people's grammars. I get the feeling that this is really not going to be easy. But maybe as consolation, the thing that seems be hard is that people keep trying to do things the "right" way, respecting the principles in the target formalism. We just sorta want everything to work and probably don't care if our grammars overgenerate wrt original.

recipes

Afternoon: got discouraged by that. Shifted to more recipe work. Collected another 80 recipes from two more sources on Project Gutenberg. Formatting is a bit different. See what we can work with it.

sCRU up

Late afternoon: Talked with AB a bit more about everything. Let's see, we've got a website to build at some point, want to get the pCRU stuff packaged and out the door, and there may be some teaching in the near future, say February. AB showed me what grammar and testing data she used from the pCRU stuff. Now I feel a bit embarrassed, because I could have figured this out for myself if I had bothered to scrutinise the cru-alpha directory below the CRU top-level.

In fact, lack of scrutiny is where the "parasite 1" bugs from the day before yesterday came! I think I found out where the weird bug was coming from. AB gave me a bundle with a cru-alpha and a cru-beta directory. The cru-alpha directory had lots of stuff, and the cru-beta only a little bit of stuff. For some unknown reason, I mixed and match when I assembled my own version of CRU. Maybe I thought the cru-beta was the more recent version or something. Turns out, on closer inspection that the cru-alpha has more stuff and fixes some bugs wrt cru-beta. I've been starting off the from the wrong CRU. The key difference is that cru-alpha does not attempt to prefix the rules by a count; instead, it prints them out once for every use. Will have to check to make sure that's what's really happening.

This kind of stuff is deeply embarrassing because it means that (1) I wasn't being very independent, i.e., in working things out on my own from what I was given and (2) I was being sloppy. The lesson here is not to simply mix and match, but either ask for confirmation, "say AB, what's the difference between cru-alpha and cru-beta", or do a diff and look carefully, or go the safe, sensible route and pick the one that's got all the data and scripts hanging off it.

Anyway, the pCRU release is once more the main mission. Put your recipes away.

DontZap

This is the third time I've lost work, or at least my train of thought because I accidentally hit Ctrl-Alt-Backspace (I think I was editing something in gVim). Maybe it's my fault for using a text editor where it is really easy to hit Ctrl-Alt-Backspace... but I really hate the way the X server has zaps out and takes everything down with it. Dumdedum, here you are editing some source code, tap tap PUFF... the music stops, your code disappears and you see yourself back at the login prompt. Sigh... Here's the /etc/X11/xorg.conf snippet to make it stop doing that
Section "ServerFlags"
Option "DontZap" "true"
EndSection


ginger sponge cake

GINGER SPONGE CAKE (a nice Cake for Children who do not like
Gingerbread).

3 breakfast cups of Allinson wholemeal flour, 1 breakfast cup of
sugar, 3 eggs, 6 oz. of butter or vege-butter, 2 heaped
teaspoonfuls of ground ginger, 1 saltspoonful of salt, 1/2 gill
milk. Beat the butter, sugar, and eggs to a cream, mix all the dry
ingredients together; add gradually to the butter, &c., lastly
the milk. Put into a well-greased tin, bake about 20 minutes in a
quick oven. When cold cut into finger lengths or squares.

Wednesday, 19 December 2007

no more dossier! and some pCRU work

dossier sent!

Thank-you very much, YP, PB (both,) CG, LR and JPJ! It is a huge relief to have this over with. I pretty don't care what happens from here.

configuring

I don't really know what I've been doing today. I know I fixed one really annoying problem with my machine, without really understanding what I was doing. Noticed in my syslog that I was getting errors like
[ 1734.725922] statd: server localhost not responding, timed out
[ 1734.725928] lockd: cannot monitor nfs-share
[ 1734.725930] lockd: failed to monitor nfs-share

The solution comes straight from back home! TP says on the Ubuntu forum that all he had to do was install the nfs-common package and everything works. The big improvement here is that Firefox starts instantly, instead of taking a couple of minutes...

Doesn't fix my original problem of gVim not being able to make up its mind if a 10 point font is really tiny or really huge, though. I'm guessing it's not gvim's fault per se, but something lower level. I think it's all GTK based stuff. Like menu bars. I don't care what it does as long as it's consistent, so that I can adjust accordingly

reading

Read Incremental Generation by Incremental Parsing: Tactical Generation in Dynamic Syntax (purver2003igi) over lunch. Sort of glossed over the meaty parts, so didn't get much out of it. Hadn't realised that the generation literature and the psycholinguistic literature had different notions of incrementality. Would be nice to look over this again. No high priority.

CRU 1.1pre1

Put together a prerelease of CRU 1.1. Still need some nice example grammars and corpora (which might take a very long time).

the parasite 1

Worked out some potential bugs (?) which were causing the weather-num stuff to fail on probabilistic parsing.

Quoting myself for future reference:

The culprit is entries that look like these:

-0.721 1 the_rule

What's that extra 1 doing there? It turns out that it comes all the way from the beginning of the treebanking chain.

To write a 'mod rules file' we invoke CRU's rules_in_parses_TOP/2 which outputs the rules that were used to parse a string and the number of times it was used. For some reason, this predicate outputs the whole text of the rule, including its original count. So, if the rule was used three times, we get something

3 1 the_rule

where the '1' comes straight the grammar file. Is that intentional? Anyway, I've modified the Perl script to filter out the second number, giving us something more like

3 the_rule

This eliminates the parasite 1 in the probabilistic grammar at the end of the treebanking chain and makes everything work. But I wonder if I've changed something I shouldn't


potential new mission

Not that the first one is finished. Just need to take care of some pre-requisites. Three paths I can follow now:
  1. Get a toy and not-so-toy surface grammar for English in CRU. Can we convert a TAG grammar? something else, like an HPSG or LFG one?
  2. Develop a content representation language that is adequate for our five project tasks
  3. Go build some corpora...

Thursday, 13 December 2007

disable scrollwheel click

Ok, this has been annoying me enough that it deserves its own post. This is the kind of thing that shows you that the I spend configuring my computer is not to trick it out, but to make it simply usable.

Problem: Clicking the scrollwheel causes a Paste event. Scrollwheel is easy to click accidentally, so you get random bits and pieces pasted, for example, into your PhD thesis.

Caveat: You need the middle click somehow. I don't know how else to paste. There's no equivalent to Command-V that I know of

Solution:Bind the middle click to a scrolling event. Some of the advice in the Ubuntu forum has it bound to right-click, which seems silly.
        Option          "ZAxisMapping"          "4 5"
Option "ButtonMapping" "1 5"
Option "Emulate3Buttons" "true"