Posts for Sunday, September 6, 2009

Looking better.

Just a few small updates today before work. It looks like my updated captcha is stopping all the spam comments, thank god. Today, I focused a little on the backend to make sure categories were working properly. Changing pages on categories still doesn't work, but I haven't started on it yet. I'm sure it'll be done in a few more days.

I'm trying to focus a little more on the aesthetics at this point as well, but I just can't find a way that I like the little login box on the right hand side. What's there at the moment works for me at the moment, but any ideas would be appreciated.

I'm also thinking about writing my own Twitter script to update the Twitter box at the top of my page. After about an hour or so of no updates, the box stops displaying anything. Why? That's stupid.

avatar

How to solve the big Internet problem.

I’ve said it before and I’ll say it again, the Internet is full of trash.

When I say trash, I don’t just refer to websites and data, I mean people. The Internet has a startlingly similar effect to drugs – its addictive and makes people act like idiots. As you’ve probably already guessed from the title, these two are the “big internet problem(s)”.

Addiction is one that is easily fixed and is progressively being fixed. As we integrate technology and the Internet more and more into our daily lives addiction will be disguised as a lifestyle. If you can’t see the problem anymore, you don’t try to solve it. Not because it’s the right or wrong thing to do, it’s because most people are lazy arses (I once misspelt “lazy” as “lady” in a chat conversation, big mistake) and so the tackling the fundamental problem becomes quite futile.

The second is that people start acting like idiots. The reasons for this falls neatly into two categories: 1) they were idiots to begin with, and 2) they interacted too much with real idiots and so acculturated accordingly. Removing the first category kills two birds with one stone, which is what I shall accomplish in my lovely plan which I’ll write about in a bit.

In a bit.

Here’s the plan. You let evolution take its course. You simply remove the Internet. For a year or two. The issue lies with the fact that you can’t punch somebody through a computer screen. Once you remove the Internet, idiots cannot hide behind aliases and are forced to be idiots to real, live people.

These innocent people will be suddenly exposed to a huge influx of stupidity and will involuntarily resort to their instincts – to vent out their frustration in the most effective way possible. The most effective way is also normally proportional to the amount of pain the idiot experiences.

A year or two of this shock treatment should be enough to weed out the majority of this problem. We then put the Internet back up and purge any website that isn’t visited within the first couple of days. The people hosting these websites that get purged which represent more than 30% of the total amount of folks they host will be suspended for manual interrogation.

This one to two year absence of the internet will also remove Internet addiction. It should be ample time for people to redevelop a lifestyle that doesn’t revolve around the constant communication the Internet provides.

We’d also save on a crapload of energy costs for those two years. This has major environmental advantages. We’d also shutdown a good percentage of our industry with labourers with non-transferrable skills, not to mention seriously harm the backbone of many other businesses. However this will also allow us to look with a fresh vision on whatever stupid economic system we’ve got in place today. This is the jolt we all need to start restructuring our societies, not with visionaries spouting their optimism to closed ears but an actual realisable event.

Ok. I promise I’ll do a real post when I’m next due.

Related posts:

  1. Good riddance, Twitter.
  2. Is your ISP causing slow Internet?
  3. Mass-amateurisation of the Internet

Posts for Saturday, September 5, 2009

Improve flash performance (a bit, maybe)


Header

I’ve been struggling with flash quite a bit. I like to watch flash videos online because the time I’m able to get to them are usually at odd times of the day. The issue with flash (I’m using the 64bit alpha but think this effects other versions too) is that higher definition flash can often become choppy, and tear – particularly in fullscreen. I read that this has to do with how flash uses Xvideo. I’ve tried numerous hacks I’ve seen around but none that have worked. Flash 64bit alpha has been around coming on 10 months now so hopefully we’ll see an update soon, but until then I did find something that might improve your flash performance a bit. This I found while going through the Ubuntu forums – (thanks to Labello who figured it out). This is just a simple xorg server edit that may on some systems be already enabled. Flash appears to require a couple options that some xorg.confs may not provide. To give an idea on performance, 1080 flash video before was unwatchable sometimes giving me as low as 1 frame every five seconds and 720 video would tear at times. With the edit, low motion 1080 video (yeah I know) like Law and Order is mostly tolerable and 720 is playing without a problem. To get these benefits (will vary from system to system) be sure that these settings are in your xorg.conf and then restart the xorg server.

Section "Extensions" Option "Composite" "Enable" EndSection Section "DRI" Mode 0666 EndSection

There’s also an edit on the link about overriding gpu checks. I think that this may help a bit, but it could just be my imagination :), not sure.

Assorted C++ Linkage


Posted in Uncategorized Tagged: c++, c++0x, programming

Posts for Friday, September 4, 2009

avatar

why do people program perl these days?


With so many other awesome alternatives, I don’t understand why people use perl.

Just the other day, I was programming in perl (at the day job… as I have written a considerable amount in perl already and haven’t gotten the infrastructure in python yet to switch over).  I noticed how poorly the support is for Windows.  Alright everyone, guess what perl returns from this on Windows:

C:\Documents and Settings\username\> perl
use Cwd;
print “cwd: “.getcwd().”\n”;

Well, if you guessed “C:\Documents and Settings\username\“, you are wrong.  In perl, of course, its actually “C:/Documents and Settings/username/“.  I realize it “happens” to work (as in, some windows versions support it… not perl), but I’m not ok with it “happening” to work.  I need it to work.  I don’t want my code breaking on something so simple as a path separator.  And it really isn’t that hard to support both / and \.  Sure enough though, I can’t trust perl to “do the right thing”.  I end up hacking around everything perl has in its standard library.

Another doozy is when you start using File::Find and find out, it doesn’t work on Windows with no_chdir.  Why? Not sure… And I don’t much care.

I guess, what I’m curious about is, how many people still see a good reason to use perl.  One that doesn’t include “we already have an entire infrastructure coded in perl”.  I understand no one really likes “rewriting” code and that it has a batch of its own problems such as reintroducing regressions and is “needlessly expensive”.  However, I would think those projects go away over time.  New projects should use newer technologies and get the old and new technologies to work together.  And eventually, maybe, phase out the old stuff.  Maybe its not something that someone converts overnight, but at least move in the right direction.

My biggest problem with perl is that its standard library is hard to trust to “do the right thing”.  A language in which this stands true is very hard to program efficiently and effectively in.

avatar

Sabnzbd behind apache

So after upgrading my sabnzbd installation to version 0.4.11, which I by the way the way should create a better ebuild for and do some dependency cleaning but that is a different story.

Like I was saying after upgrading to version 0.4.11 I decided I wanted to close port 8080 (the one sabnzbd is using) to the outside word. Now I know apache has some nice proxy functions so it should be easy.

Make sure apache is compiled with the following modules: apache2_modules_proxy apache2_modules_proxy_http apache2_modules_proxy_balancer

That was the hard part. Now just add a vhost:


ServerName yourserver.com

order deny,allow
deny from all
allow from all
ProxyPass http://localhost:8080/sabnzbd/
ProxyPassReverse http://localhost:8080/sabnzbd/a

ErrorLog /var/log/apache2/error.sabnzb.log
LogLevel warn
CustomLog /var/log/apache2/access.sabnzb.log combined

This assumes that you have sabnzbd listening on localhost:8080. Now you probably do not want the whole world watching your downloads (or deleting them or whatever). So we just add some basic apache authentication, use htpasswd2 to create a file with authorized users and add the following lines into the location block.


AuthName "Login Required"
AuthType Basic
AuthUserFile <>
require valid-user

That is all.
Happy downloading!

Posts for Thursday, September 3, 2009

avatar

The Euphemism Website – the failed idea.

One of the websites I always wanted to make was a Euphemism dictionary. It would be pretty similar to urbandictionary in terms of concept and allow user-defined euphemisms for common insulting phrases. This would thus prevent us racking our brains every single time we wanted to come up with another creative way of saying “my aunt’s maid’s son is better at computers than you“.

It’s also a great initiative to start putting literature to good use rather than the common application of analysing the themes and symbolic imagery behind fictional characters.

Another objective would be to disprove most of the web community do’s and don’ts through the context and artificially induced environment the website will create. For example, users will be insulted constantly, from the minute they enter the website, when they register, log in, or do anything that involves a mouse and a screen. Definitions and euphemisms will have a voting system, except it’s unidirectional – you are only allowed to vote down submissions. I don’t mean this in the rottentomatoes format where more tomatoes means its good, I mean this quite literally. You’re not allowed to say something is good, you say if something is crap, and then we’ll list the least crap and the most crap. Take your pick. User interaction will be minimal – you’re allowed submit and vote, nothing else, users with accounts will be given no option but to receive spam email from an entirely unrelated mailing list, all the time mocking you of your gullibility of registering to such a shady website.

We won’t only break community conventions, we’ll break design conventions too. There will be no clear header or footer. The title will be a randomly rotating insulting phrase (of your choice if you register an account). The content will be single column, left aligned, with a colourscheme worse than my dad’s tie, and a table will be used for everything. One huge table with colspans and rowspans that’ll make the folks in the #css channel choke.

With all that said, it’ll still be better than 95% of the websites on the internet.

Gosh the internet is so full of trash.

Related posts:

  1. How to Make a Website Part 1 – The Environment
  2. Blender Model Repository system upgraded
  3. What is FTP?

Paludis 0.40.0 Released


Paludis 0.40.0 has been released:

  • Notifier callbacks allow clients to tell the user what’s going on when generating metadata, performing resolutions etc.
  • Sets now work slightly differently. For sets defined by multiple repositories (e.g. ’system’), ’setname::repo’ can be used to access the part of the set defined by a given repository.
  • Bugfix: Upgrading an unpackaged package no longer errors out.
  • Bugfix: Combining :slot and ::/path restrictions now works correctly.
Posted in paludis releases Tagged: paludis

dev-lang works… maybe


I updated the one exheres in my dev-lang repository. I still have not purchased the power supply for my Linux computer so I still have not tested my own repository, but if someone else wants to that would be nice! I more or less just copied the it straight from the ebuild in Gentoo (giving proper credit of course). I hope they all work. I’ve been looking around at how to get all of falcon vim config files pulled in together into one exheres.

Moving on to my app-vim exheres; I’ve been looking around and the only method of doing this I can find is to tarball the files then install that. While I’m sure that works wonderfully, that would require more work than I thought it would. While creating an exheres for every config doesn’t sound like a good idea either, it would be easier to keep current. I’d only have to update the script on Vim’s homepage, which I’ll be doing anyway. If I did have one for each file though, then I could simply do a single flacon-vim-config-all.exheres-0 file and let it pull them all in as required deps. That seems very sloppy to me though, and I’m not sure how paludis would handle the deps. Suggestions anyone?

Enjoy the Penguins!

Posts for Tuesday, September 1, 2009

Exherbo Repository


My would be repository, as far as I can tell, has everything it needs now in order for paludis to actually pick up and install things from it. Granted, at this point it only has three exheres in it, and granted, only two of them will work. But none the less it is there and you can use it.

the steveno repo

Again, suggestions, hints, and corrections are welcome.

Enjoy the Penguins!

avatar

Rapid Fire

Some things that didn’t make it into a thinkMoult post. In no particular order. Sometimes posts like these are mandatory.

  • Wipup.org is now functional and running, albeit very unfinished. Our social desktop submission stands at 68% and we welcome you to contribute your vote.
  • Kamal has joined the Eadrax team from the graphics side to replace Chris Peters.
  • I have the privilege of being a beta-tester on Lockerz, a site where you earn points through doing activities and can exchange these for real-life merchandise. It’s legit and looks quite spiffy. Leave a comment if you want me to send you an invite.
  • The first 5 portfolio entries on the carousel have been linked properly to their respective items. Go on, try click them.
  • 10 or so new submissions have been added to the Blender Model Repository.
  • A one-hour speech to a small group of 50-60 people on education and communities.
  • School has started and I finally received my badge for the International Award Silver Level (they forgot to give it last time and I only got the certificate) – hopefully I’ll get my gold before the end of this year.
  • A lovely new set of material to use for portfolio creation after some full time work-experience at an architecture firm.
  • An attempt to cook with my Dad that ended up in spaghetti being burned. Yes, with flames and everything – I didn’t even know that was possible.

… and of course all the usual routine stuff with a hilarious schedule – but then again, you already knew that.

Related posts:

  1. Blender Suzanne Awards announced.
  2. Back from the Jungle
  3. What’s new 18th July 09

Posts for Monday, August 31, 2009

Tools for prototyping

Yesterday I sat in a meeting where we looked at a prototype modelling something that we had come up in an earlier workshop. The prototype is necessary cause it's not obvious whether the model we came up with works (well enough) to be of use to us, we had to check our assumptions basically.

One of the participants put quite a lot of work into the prototype so we could check out results, the prototype kinda integrated with some sort of metamodelling framework in JAVA so the class diagram was a mess (not cause of bad modelling on his part but just cause of all the hoops he had to jump through to get stuff going).

It was one of those moments where you realize something consciously that you always knew but never properly phrased: You need some sort of prototyping tool for your area of expertise or you will waste a lot of time and/or create bad results.

Prototyping is something completely different than "proper" development. Let's look at software as an example: If I write software to try out something the internal design, the architecture isn't all that relevant, I just slap enough code together that I can validate or invalidate my assumptions, not one line more. In prototyping there's no "ugly code", no "wrong" cause they are basically just tests that are gonna be thrown away later anyways. After I have validated my assumptions I then start from scratch and design a "proper" solution, that does things right.

We are lazy and the idea of throwing away code scares many people: "Why would I write something again that already worked? That sounds like twice the work!" is something you might hear from these people. This train of thought is based on the wrong assumptions.

More often than not it's a bad idea to carry the code from your prototype over to the proper implementation. All the corners you cut when prototyping will get expensive code dept in your "proper" design.

Prototyping is about quicklygetting results. That also means that some technologies work better than others: If you design interfaces for your software for example, prototyping on paper is about the fastest and most useful tool you can ever have. Using a GUI-editor to click together interfaces is second and writing real "code" to create a GUI is way last. Paper gets results quickly, it's easy to change stuff, to develop ideas and change details, it's easy to rearrange things. When you want to write prototypical code, don't use something like C++ or JAVA cause you have to deal with too much "administration" and "code bureaucracy" in order to get shit done. Use something dynamic, fast that gives you a bunch of building blocks that you loosely throw together to check whether an idea works. Use Python, Ruby, Prolog, whatever dynamic tool floats your boat and gets stuff done quickly, even if you subscribe to the belief that static typing is somehow a good thing. Actually, especially then.

Thinking back to the wide array of classes on the diagram yesterday I wonder how much more could have been done using a proper prototyping tool for the job. How much easier some quick fixes would have been to check some other idea.

If you develop anything you will have to prototype at some point. If you don't have the proper toolset to do that you will waste your time running in the wrong direction. Look at your own design process. Do you have proper tools to prototype really quickly? If not, find some now. Learn their ins and outs. You'll be thankful when your next project comes.
avatar

Xen Hypervisor Nullmodem Connection

Been playing about with the rebase/master xen git branch again today to see if I can get it to boot my Gentoo xen setup. No luck, still the same panic on boot, so I decided to find out how to capture the output.

Grabbing the output from the kernel is simple: Add “console=tty0 console=ttyS0″ to your kernel command line. Then cat ttyS0 on the other end. For more details, there’s the TDLP Remove Serial Console Howto

Getting the Xen hypervisor to do something similar was slightly trickier. Turns out you have to use minicom, or all you get is a string of control codes. After some help from ##xen on Freenode, I was able to find OpenSuse Wiki: How to capture Xen hypervisor and kernel messages using a serial cable.

I can now get Xen output - however it seems to block the kernel output, so it’s one or the other at the moment. Would be nice if I can find out how to get both (kernel and hypervisor) working at the same time.

Posts for Sunday, August 30, 2009

Apple Trailers Fix


Header

As some of you may have found out or read about, Apple trailer downloads for Linux are currently broken. Apple has implemented a Quicktime user agent check prior to downloading. Personally I agree with the decision because Apple is concerned about the quality of reproduction (though Apple trailers still play with an odd hue on Windows – think this has to do with Quicktime not correctly reading Window’s color setting – but I’m getting off topic). This means that movie players plugins for web browsers (like gecko-mediaplayer and totem) will no longer work. Until gstreamer gets a patch that fix’s this, here’s a script that can download them manually.

#!/bin/bash # atget - download trailers from Apple website # Usage if no parameters given if [ -z $@ ]; then echo "atget apple-trailer-url"; exit fi # Prepend 'h' before resolution to create a valid url newurl=$(echo $@ | sed 's/_\([0-9]*[0-9][0-9][0-9]\)p.mov/_h\1p.mov/g') # Download trailer and save to the desktop wget -U QuickTime/7.6.2 "$newurl" -O $HOME/Desktop/${@##*/} # Play trailer with mplayer (using 200MB cache to be sure trailer is dl'd first) #mplayer -cache 200000 -user-agent 'QuickTime/7.6.2 (qtver=7.6.2;os=Windows NT 5.1Service Pack 3)' $newurl

You can comment wget line and uncomment the mplayer line to directly play the trailer. The mplayer line needs to have a cache to be sure the video is downloaded before it start or errors will occur (200MB should be enough for just about and video on the site). Watching trailers is a fix for me, so hopefully this will help you too.

Credits

Thanks to Ian on stack overflow, who help me figure out how to prepend a regex search.

Falcon and Exherbo updates


Thanks to this guy, you can now learn about setting up Vim for use with the falcon programming language on Falcon’s site. Which I must admit I broke the first day I had access too. I’m back to that “feeling like a tool” comment I made a couple of posts ago. I created a separate filetype plugin and detection script for vim. So now vim will properly detect and use falcon source code. The filetype.vim code I have is correct, and works, but using the separate files works better. You can naturally find them all on my github site in their respective directories. If you would rather download them from vim’s website, they are here.

I have not created exheres for these new files yet. No real reason why not at this point. I would like to create a single exheres to setup all the vim scripts needed to use falcon. But, looking at the examples on Exherbo’s git repository, I have not setup mine correctly. I assume there is a way around it, I just haven’t found it yet. Speaking of which the dev-lang exheres, while in much better shape now, still doesn’t do anything. Any suggestions on any of this would be much appreciated.

Enjoy the Penguins!

avatar

Good riddance, Twitter.

Twitter has successfully put the “Twit” in “Twitter”. Some people realised that I apparently vanished off the face of the Earth on Twitter. I realised that I used Twitter in a way that was better served through other methods. I followed people/groups in order to keep up with tech news, and mainly “tweeted” in order to alert others of new updates on my various projects.

The first is obviously a crappy function duplication of the RSS aggregator – except for lazy people. The people that I were following that weren’t simply news corporations were, quite frankly, idiots. Well, idiots on Twitter.

No. I don’t want to hear about the weather, no matter how you choose to describe it. I don’t care for parrots who simply re-tweet everything. I especially don’t want to hear about your depressing thoughts described in the most enigmatic and bullshit words possible.

What I do like however is people who can readily distinguish between reality and their own little fantasy world and know which of those other people like to know about. Once that distinction is made I’d like further categorisation for time-wasters and useful information. Sad to say that I didn’t really see anything in the “useful information” column outside news companies – who reported real people doing real things that made real impacts.

As interesting as technology might be, the Internet is the nine-years consecutive winner of the “stupid content” award. If you don’t believe me, take a look at this blog post, which lists the most popular alphabetically listed search terms on Google after “I like to”, including my all-time favourites “I like to tape my thumbs to my hands to see what it would be like to be a dinosaur” and “I like to think of Jesus as a mischievous badger“. So-called Social Networks like Twitter are propagating this nonsense and it stands to reason that my Tweets were being read by similar idiots. Or not read at all.

Suffice to say that my account was better off being nonexistent. I wish to disassociate myself from this crowd and remain close to my ideals.

Related posts:

  1. Twit-to-who?
  2. The end is nigh!
  3. Blender Suzanne Awards announced.

Kontact/KMail/KOrganizer <-> Thunderbird/Sunbird conversion

As I'm (again) without my own laptop, I depend (again) on PortableApps.

This means that I use Thunderbird and Sunbird (or rather the Lightning plugin for Thunderbird) to cover my PIM needs. The question now is does anyone know if it's possible (and how) to:

  • import Thunderbird's sentbox to KMail
  • import Thunderbird's inbox; although I can just POP the inbox from the server itself, but having it marked that it's already read, replied to and/or important would be nice without having to do it again in KMail
  • sync Sunbird's/Lightning's calendars and tasks with KOrganizer's (importing KOrganizer's iCal files into Lightning failed already for me)

So, dear lazyweb, if anyone has any tips on how to do that, I'll be glad if you'd share.

hook out >> studying and listening to the latest hip-hop album on BlocSonic
<!--break-->

Posts for Saturday, August 29, 2009

Looking for KDE minions

As the title says I'm looking for a few people to help maintain the KDE packages in Exherbo.

I'm looking for people who's going to actively work on resolving bugs and problems as well make sure we have all the latest packages versions in the KDE repository. Part of the work requires working closely with KDE upstream as you'll be filing bugs and patches upstream as well as applying upstream patches to our packages. We try to stay as close as possible to upstream and I don't expect too many problems from this work.

Standard Exherbo benefits includes:
- The  very cute Exherbo mascot (yes, even as a frequent contributer you can use Zebrapig any way you like as long as you respect the Creative Commons Attribution Share Alike 3.0 license)
- Verbal abuse from Ingmar Vanhassel and myself every time you screw something up
- Your 15 minutes of fame spend on a relatively small open source project

and finally

- You get to pick your own theme song as long as you keep it yourself

So stop being so lazy and step up to this monumental task now :)

Oh, you also get a few other minor things of course..
- Get to hang around some very cool and friendly guys (collectively known as the Exherbo contributors)
- Learn way more about packaging problems in Linux distributions than you ever wanted to
- Move up the hierarchy of open source developers due to your contributions, often helped by other Exherbo contributors

Please contact kloeri (myself) or Ingmar in the #exherbo-kde channel if you're interested in helping and we'll figure out how to get you involved in the KDE/Exherbo work.
avatar

Sibelius, Finale, Cakewalk? Real men use Lilypond.

Some of the old-timers on this site might recognise the title’s startling similarity to the introductory article I wrote about LaTeX. I received some questions on how I created the music sheet in the previous post about my upcoming composition, Evan, and the answer is: with Lilypond.

As you’ve probably guessed already, Lilypond is a markup language, just like LaTeX. You don’t use a graphical user interface to insert your notes, rests, and whatnot, but instead just code it into a plain text file and convert it to a, let’s say PDF format when you’re ready to view it.

lily-1f1cc0c4

Music scores are complex. Much, much more complex than your word documents. You might have a good deal of fun formatting wizardry going around with LaTeX, but with music, you have notes, you have staffs, bars, stems, different symbols, different types of annotations, clusters, rests, expression markings, decoration (stuff like trills etc), and don’t even get me started on modern music. A score of a modern music piece is probably a piece of art in itself, my stemless notes, dotted barlines and lack of a time signature in my previous post being nothing compared to what’s out there. All of this has to be pieced together in a readable format, whilst still giving the composer flexibility to modify the score to put whatever they wants.

If anybody here has used the famous notation softwares out there such as Sibelius or Finale, it’s quick and easy to learn but a pain when you get to decently complex scores. You also quickly realise that the stuff you produce on there definitely looks nothing professional and mediocre at best. If you consider creating a score, for, let’s say an orchestral piece, you’d not want to continue using these traditional programs.

2009-08-26-232355_1280x800_scrot

Take for example that score above. It’s of decent complexity and created using lilypond. Attempt something like that in other programs and you’d fail horribly.

Lilypond is like LaTeX. You tell it what your score will contain, and Lilypond will work out the best way to format it. That’s the best thing - it ensures readability, something vital in any score and a real pain to do manually. Here is a simple example, as a picture speaks a thousand words:

2009-08-26-232958_1280x800_scrot

Lilypond is flexible. It allows you to notate very modern pieces with weird artifacts such as, in my own piece missing stems. Of course you may even have missing notes, or even stems that branch out or waving lines to symbolise a direction. (please, don’t just add these for the fun of it, you need to know why and when they should be used and more importantly how to use them)

2009-08-26-234829_1280x800_scrot

It’s also fast. Don’t believe me if you want to, but I would honestly say that creating a score in Lilypond is faster than other software (well, LaTeX in my opinion is also faster than Word Processors). Not only can you chunk in notes as fast as you can possibly type them (and you get used to how to input notes very quickly), you can also use variables. If you have a repeating section of a piece, you can just assign it to a variable, just like in math you can say x = 5, and whenever you want to use that section, or in math, the number 5, you just dump the variable and it does it all automatically.

One other feature some might consider a plus point is that it can output the score in midi format. My personal view is that midi should be marked illegal and anybody who uses it be sent straight to prison, because it sounds like crap and effectively slaughters the beauty of the piece, but – well, it does it anyway if you tell it to.

flat-design

It’s hard to fully appreciate the capabilities that Lilypond provides but I’d like to stress one: readability. Lilypond takes this very seriously. Just as music has evolved through the ages so has scorewriting, and Lilypond really adds that professional feel to whatever score you produce. If you create scores, I would recommend it.

All well and good, but how do I start using Lilypond?

Just like LaTeX it doesn’t matter if you’re on Windows, Mac or Linux. Lilypond works cross-platform and doesn’t charge a buck. First you’d want to hop over to their website, and proceed to the download page. Their website looks as though somebody ate the stylesheet, but nevertheless I can assure you that the program definitely has style. You’d then want to start reading the documentation.

You’d want to read that documentation carefully and ensure you understand what’s going on especially if you’re new to markup languages. Go through step by step – it contains many cross-links but I would recommend just doing it in the order it presents itself in. I cannot say the first score you ever produce with Lilypond will be up and running within 5 minutes, but you’ll get used to it, and when you do, you’ll be really glad you did.

Note (no pun intended): the images were shamelessly ripped off various parts of their site, but all with good promotional intention.

Related posts:

  1. Word Processing? Real Men use LaTeX!
  2. Composition in progress: Evan
  3. A little introduction to MP3s

Posts for Friday, August 28, 2009

PulseAudio Foray

I’ve taken then plunge: I just installed PulseAudio (PA) and related tools (on Gentoo). A lot of users are vehemently anti, stating numerous complications and bugs, but its potential advantages for networked audio are attractive.

Evidently KMix is supposed to support PA, but it still only shows the alsa devices. I suspect this is related to when PA is loaded, and currently I do not have any user-space loader. What’s the optimal way for this to happen in KDE? An autostart entry? Symlinking some mysterious file to kde’s env directory? All the forum posts are for older KDE versions. Phonon works so far though. All the PA apps are GTK/GConf based, and aren’t very KDE friendly, and generally it seems like KDE has neglected PA support, or PA has neglected KDE support. They simply aren’t very pretty together. What are the plans for integrating KDE and PA a little bit more closely?

I’m using a Macbook as a print server, printing to it from my Linux box, and everything is simple because they both use CUPS. However, I’m having a bit of trouble streaming audio to it. I can’t seem to build PA on OSX, and I don’t even think OSX is officially supported by PA. I tried installing ESD using MacPorts and using PA’s bridge for that, but it played a half a second of sound before skipping. ESD doesn’t do good latency calculations. PA supports streaming to Airport Express, so I thought I’d try out Airfoil Speakers, but unfortunately, Airfoil uses a different protocol. So I’m not sure what to do now… How do I send PA to my Macbook?

PA also doesn’t work well with Skype, and I anticipate some other problems as well. What a hassle. Why the bad integration with KDE? Why the numerous bugs? Any PA tips from veteran readers?

avatar

how to use encrypted loop files with a gpg passphrase in Debian

Fast howto (mostly a note for personal use) on what’s needed on Debian to use an encrypted loop:

1. The necessary utilities (patched losetup)
# aptitude install loop-aes-utils
2. The necessary kernel-module
# aptitude install loop-aes-modules-2.6.30-1-686-bigmem
3. Create the keyfile (keep your computer as busy as possible while doing this to increase entropy)
# head -c 2925 /dev/urandom | uuencode -m - | head -n 66 | tail -n 65| gpg --symmetric -a >/path/to/keyfile.gpg
4. Loopfile creation (10Mb)
# dd if=/dev/urandom of=/my-encrypted-loop.aes bs=1k count=10000
5. Initialize loopfile
# losetup -K /path/to/keyfile.gpg -e AES256 /dev/loop5 /home/username/crypto-loop.img
6. Format loopfile
# mke2fs /dev/loop5
7. Delete loop device
# losetup -d /dev/loop5
8. Create mount point for loopfile
# mkdir /mnt/crypto-loop
9. Add entry to fstab

/home/username/crypto-loop.img /mnt/crypt-loop ext2 defaults,noauto,user,loop=/dev/loop7,encryption=AES256,gpgkey=/path/to/keyfile.gpg 0 0

10. Try mounting the loopfile as user
$ mount /mnt/crypto-loop
11. Check it’s mounted properly
$ mount | grep -i aes

and use it!

P.S. Secure your keyfile.gpg, if it gets lost you won’t _ever_ be able to decrypt what was inside crypto-loop.img!

avatar

Froscon 2009 afterthoughts

Froscon was great.

  • It was smaller then I thought, I especially assumed more activity in the devrooms (I'm too used to fosdem which is much bigger), but hey nice conference anyway.
  • It was great to meet (some of) my Arch Linux colleagues. Mostly the guys from Germany showed up, and Roman who is from Ukraine.
  • We all got an Arch t-shirt/polo of which we could pick the color ourselves. Woohoo. Thanks donators.
  • A few people also told me they had tried / were using uzbl (my browser project) so that was really cool.
  • I had an interesting chat with Thomas Lange, the author of FAI (a tool to automatically mass-install systems, mostly Debian). I've used it in the past, liked it and was somewhat inspired by it when building AIF. (but some design goals are different).

Here is a picture of my "Arch releng partner" Gerhard (right) and I (left). We've done a lot of work together and it was great to talk face to face for once. Here we're showing (proudly) an Arch Linux Froscon disc (which is a slightly modified version of the 2009.08 core images):

Team photo:

Image gallery

avatar

Gentoo & Trac: Post-commit magic

When using trac under Gentoo, the location of the pre-commit and post-commit scripts changes every version. In addition, I have multiple repositories. Together this makes for annoying maintainance every time I create a new repo or upgrade trac. The solution? Shell scripting magic:

# Repo path is in format: /home/allenjb/allenjb.me.uk/svn/<project>
# Trac env path is in format: /home/allenjb/allenjb.me.uk/trac/<project>
# PROJECT contains the <project> name
PROJECT=`echo ${REPOS} | cut -d "/" -f 6`
TRAC_ENV="/home/allenjb/allenjb.me.uk/trac/${PROJECT}"
# TRAC_VER contains the trac version
TRAC_VER=`trac-admin --help | head -n 1 | sed -e 's/^\([^0-9]*\)\(.*\)/\2/'`

/usr/bin/python /usr/share/doc/trac-${TRAC_VER}/contrib/trac-post-commit-hook -p "$TRAC_ENV" -r "$REV"

Posts for Thursday, August 27, 2009

avatar

Django makes web development… fun?


Fun may be going _too_ far, but it is a heck of a lot cleaner than anything I ever hacked up before.  To be honest, I really stayed away from web development before I really gave Django a try.  Now, I’m almost ready to start writing my own website/blog/everything (I know, cliche) in Django.

I’ve really gotta hand it to Chipx86 and Djblets though.  My first Django project immediately ran into issues with deployment.  Issues that Djblets immediately solved with the SITE_ROOT stuff.  I have to say, my inexperience with Django most certainly would have led me to hack in something not nearly as clean as what Djblets has in place.

One thing does bother me about the SITE_ROOT stuff.  It’s actually more of a Django problem.  It seems that after adding ‘djblets.util.context_processors.siteRoot’ to TEMPLATE_CONTEXT_PROCESSERS in settings.py, it doesn’t do anything.  In fact it doesn’t, until you use RequestContext() from django.template.context like:

render_to_response(template, RequestContext(request,{…}))

The TEMPLATE_CONTEXT_PROCESSERS are not used until you use RequestContext() which seems so very wrong.  Can someone explain this to me?

Anyways, I really enjoy programming django for the web (still not a huge fan of any web programming, but I’m warming to it…).  If you have working knowledge of python and web programming, I highly suggest Django.

Linux + ATI != ETQW

Okay..  I have no idea why I'm writing this, but to heck with it.  People should know.  Either that, or I need to figure out what the hey I'm doing wrong.

So, about a year ago I began a crusade to help AMD / ATI as much as I possibly could.  I've already been buying AMD processors now for at least 5 years for myself, my work, my friends, and my family.  I also have been buying Nvidia graphics cards.  Well, since AMD acquired ATI, I've been buying ATI cards.  I've even got a couple of my friends to see the light and begin buying the RadeonHD series instead of the Nvidia counterparts.

So, I had a pretty good start with my RadeonHD 4850.  It installed just fine, and I could run my ETQW games just fine.  That is, until about 2 months ago.  Something in the new 9.6 drivers is causing that one game to segfault each time I try to run it.  I can play UT2004 and Nexuiz just fine, but ETQW just refuses to load.

It was about that time that I got very sick of dealing with games in Linux.  From the lack of support for games I want to play, to the finagling required to get the supported games to work.  Ugh...

So, I did it.  About a month ago, I installed windows on a spare hard drive I had laying around, and haven't dealt with anything having to do with games in Linux ever since.  Windows still blows, and blows hard, but unfortunately, people use it and companies develop for it.

Also, in doing this, I uninstalled the fglrx driver I've been using and now use the radeonhd driver instead.  I've got dual-monitor setups at home and work now, and the radeonHD driver seems to handle it with ease.

So... Yeah...  I'm using windows XP for games.

Maybe that's why I feel nauseated all the time now.

Who knows...  Maybe when the 3D support in the radeonhd driver is done, I'll consider giving it another try.

Planet Larry is not officially affiliated with Gentoo Linux. Original artwork and logos copyright Gentoo Foundation. Yadda, yadda, yadda.