05 April 2010

The bugfix for the bugfix

Ever since I have started participating in LilyPond development, I've known that Guile plays an integral role in LilyPond's overall "functioning".  The Guile library, libguile, allows access to Scheme code from C (or C++) code (and vice versa).  Guile lies at the heart of LilyPond's infrastructure, so it's critical that LilyPond integrates well with Guile.

Recently, there have some dramatic changes to the Guile code base; basically, Guile has been modernized and now rightfully belongs in the 21st century.

Since Guile has seen such sweeping changes, it's not surprising that there might be some compatibility problems between Guile 1.9 (latest development series) and Lilypond.  And... there are many problems.  :-)

Some have been fixed.  Some might (and hopefully will) be fixed before Guile 2.0 is released.  One of the most annoying ones that the Guile devs are aware of is the removal of "currying" define forms.  My commit here shows how I'm temporary working around this problem.

So, on to the "bugfix for the bugfix".  One of the Guile-compatibility issues is an improvement that LilyPond needs to adapt to.  I'm currently have a patch (posted here), but I apparently didn't test it well enough.

For those interested, the "#if !HAVE_GUILE_HASH_FUNC ..." part of the patch is not working because I forgot to include the header "config.hh".  Funny thing is, after trying to include config.hh, some previously non-functioning #ifdefs started working, and some of the conditionally compiled code does not compile!  :-)  Oh, the joys of conditional compilation.  I haven't checked yet, but that code has probably been untouched for five years.  Compilers have improved tremendously over the past five years, so it doesn't surprise me that previously (supposedly) working code no longer compiles.

In other words, I have to amend my patch by including "config.hh" in the appropriate place, AND by fixing non-compiling code that, before including "config.hh", never compiled and was therefore unnoticed.

Happy Monday night!

23 March 2010

Updates

I haven't posted an update to this blog in a long time.  Well, I've been very busy with school; last term, I accompanied approximately 20 people, so that occupied much of my time.

My work with LilyPond has slowed down a little bit, but there is still a lot to do.  The release manager, Graham, wants to release a new stable release 2.14 ASAP, but I'm not quite sure when that will really happen.  There are still many critical issues to resolve; I want to help out more with this, but most of them are "over my head".  Time invested in discovering solutions to one of these bugs might take me 20 hours, whereas the person who originally introduced the bug might be able to fix it in a half hour.  Oh well, we'll get them fixed eventually.

I'm happy to report that LilyPond's SVG output is "production ready".  Actually, it has been for a few months, but I haven't discovered any bugs besides this one.  Honestly though, it's not too critical of a bug.  I have a feeling most people will be using the SVG output for snippets less than a page long, so those use cases are not affected.

For now, my plans are to leave the SVG backend as is, unless I find a fix for #971.  After 2.14 is out, then I'll start thinking about it again.

Some of my more immediate LilyPond goals:

  • Add a new markup command, "path", that uses SVG path primitives and works for both the PS and SVG backends.
  • Fix slur ugliness.  My previous attempt to fix these issues failed not because I was off-track, but because a proper solution needs to be more comprehensive.  If I claim to have fixed slurs, LilyPond users will really want them to be fixed (and beautiful).
  • Port LilyPond to Guile (soon to be) 2.0.
Other free software goals:
  • Start fixing bugs in librsvg, and in the far-off future, consider becoming the maintainer of this project.  The entire GNU/Linux community will benefit from improvements to librsvg.  All of GNOME uses this library, as well as other important programs like ImageMagick.  I am so confused why it is not currently being maintained.  :-(
Gotta run.  Hope everyone's having a nice March!

28 September 2009

Free Software

While purchasing my computer science textbook today, one of the cashiers commented about the blurb on the front cover thay says "Free software CD included". Paraphrased, he said something like "Free software...that's funny!"

This really hit home. Though I'm currently not aware if the contents of the included CD consist of free software (in the "GNU" sense, or the "open-source" sense), I took this comment to mean that "software cannot be free, so the statement on the front cover is misleading".

This is how I used to think about software. Five years ago, my understanding of "software" was very limited; I was aware of Microsoft and Apple software, but everything else was foreign to me.

Right here, the real truth should be reiterated: free software is not a myth. Free software exists and is used everyday. There are even different levels of free. Let's consider two different cases:

Internet Explorer. Is it free? Well, it's free to download and typically installed on Windows. There's also a catch here: many people don't understand that Internet Explorer is a piece of software. It is. It is not the internet. Internet Explorer is software, just as Microsoft Word is. Back to the point... For many people, this level of freedom is enough. Most of the time, the reason is that they don't give the matter a second thought. Just trust Microsoft or Apple, right?

LilyPond. This is the other side of the coin. Is it free? Yes, it's free to download from lilypond.org, and it can be installed on the most popular operating systems (Windows, Mac, GNU/Linux, BSD) or compiled from source on almost any operating system. There is a difference of "freedom" between Internet Explorer and LilyPond: Internet Explorer's source code can only be modified by Microsoft, but LilyPond's source code can be modified by anyone and redistributed under the same license. Is this important? It depends on your perspective. From the perspective of a computer programmer, the level of "freedom" a user has with LilyPond might sound more appealing, but a lay user might not give a s*** and just go with the flow. Of course, I am simplifying the issues here, but hopefully this is clear.

Free software exists. You don't have to pay for software. If you have hardware that apparently requires drivers that do not run on your system, or do not respect the level of freedom you require, hire a computer programmer to write drivers for you, or write them yourself if you have this ability. If you use niche software that can't run on your operating system, hire someone to write a program for you that does what you want, or again, do it yourself (if you have the ability, have time, etc.), or post a request to an online forum, newsgroup, etc.

But, wait! Did I just contradict myself? I just suggested that you can hire a programmer...and that requires money! Yes, but this is also free, from a different perspective. You, as a computer user, have the freedom to seek better software that you can use, that fits you. Certainly, programmers will charge you, but you will feel better in the end knowing that your software will work for you, not against you.

P.S. Of course, in the end, I think the cashier misunderstood; the blurb meant "Free CD with software included". A CD is bundled, the CD is free, and the CD contains software. In other words, the "free" description does not refer to the software. :-)

16 September 2009

Google scores again

I have recently noticed Google's interest in spicing up their search result pages, and now (finally), their home page:

Google

Not too much different, but it's standards compliant. It's compliant with HTML 5. Awesome. Go Google!

11 August 2009

Single-letter GDB commands

So, today I have a very boring post for you. I'm simply going to list the single-letter GDB commands, as noted in the post title. To make this list useful, I will separate each command with a hyphen, and then follow it with the "real" command. Enjoy!

b - break
c - continue
d - delete
f - frame
h - help
i - info
j - jump
k - kill
l - list
n - next
p - print
q - quit
r - run
s - step
t - thread
u - until
x - examine
Have a nice day!

29 March 2009

Source of Thought

Three years ago, I kept a blog on MySpace. I don't remember my exact reasoning behind wanting a blog, but I felt that I had information to share with the world. Well, I'm starting to feel that way again. Regrettably, I deleted my entire blog when I trashed my MySpace account (best choice I've made in years). Some of my posts, in my opinion, were very fascinating, and might have been even more fascinating to me now.

But...I'm beginning to remember some of them. I want to share one of these insights right now.

...

What is the source of thought? We could also ask...where is the source of thought?

We are brought up to believe that we have a brain in our heads (of course, this is true) and that we create our thoughts with our brains. Is this true?

From a reductionist/dualistic point of view, this is not true. In reductionism, there must exist some sort of special arrangement and interaction of small pieces of matter in order for thought to exist. From a nondualistic point of view, this is not true either. Nondualism demands that we take consciousness into account without separating it from matter, chemical reactions, etc. So, in this view, it is not possible to say that we alone create our thoughts, since the I does not exist in the first place.

If the two large schools of thought say that we do not create our thoughts, then, from a subjective point of view, why do we believe that it's true?

I claim that thoughts appear and that we observe and remember them. The problem is that we often believe them and label them as reality. But really, thoughts are ephemeral things that shouldn't be taken for granted.

For example, the only reason you say your name is "Bla" is because you were told this when you were young, repeated it over and over in your mind so that you could never forget it, and then took this "fact" as reality without ever questioning it.

But the fact that you can observe your thoughts implies that you are not your thoughts. Think about that one for a moment.

So, do we actually think? No, we observe and remember thought. New thoughts appear from thin air, just as old thoughts do. By "thin air", I mean consciousness of a universal order.

How can we question thoughts then, if we don't think? Well, we can use the existing thought constructs of logic and reason.

Is this a contradiction? Certainly, but if we understand the true nature of reality, we don't need to worry about it.

The source of thought, then? Not from within. From everywhere.

23 March 2009

Insight into previous post

So, I've been thinking quite a bit about the question raised in my previous post, and I want to touch on something I learned a couple of years ago but only remembered recently.

Q: Is it possible to open a book and not see the words?

A: Certainly. To do so, you must either look through the book or use your peripheral vision.

Both of these actions relax the eyes and prevent you from reading the words. Are you familiar with those 4-D Magic Eye Puzzle books (or whatever they're called)? You use the same technique here as you do to see the pictures. People usually suggest to cross your eyes, but this is not the best way, since it has the potential to strain your eyes. Relaxing the eyes is the better technique.

Is this useful?

IMO, it is incredibly useful to be able to relax the eyes. In fact, this state should be the natural one. For some people, myself included, it is not. Maybe that's why I wear glasses...

We all know what peripheral vision is, but how can this come in handy? One way to think of it is to hold more than one object is your field of vision at once. I'm choosing not to say the word `focus' here, because this act is really the opposite of concentration. One technique is to imagine a line connecting the two objects and observe the entire line at once. For three objects, you can imagine a triangle instead (or still a line if the objects are colinear). Another technique is to not look directly at something before you pick it up.

After all, what would a blind person do?