I have written some notes on building Fedora DS and the Fedora DS console from source.
Archive for the 'delicious feed' Category
I am dictating this post using MacSpeech Dictate. It is amazing and much better than I expected at understanding what you’re saying. In addition to dictation it also allows you to control your computer, with commands such as “open mail” and “put this computer to sleep”.
When you are controlling your computer you have to be careful to use the correct language and it does take a bit of getting used to but it’s quite easy. There is an on-screen list of commands to refer to and most of them are fairly intuitive.
As far as I can tell MacSpeech Dictate seems to work in all applications. I have used it this morning in TextMate to write an XML document. Speaking “open angle bracket” is almost as easy as typing angle bracket. And long sections of text are obviously much easier to speak.
MacSpeech Dictate is able to detect commands during spoken text. Adding punctuation is easy, to add a full stop just say “full stop”. Correcting mistakes can be a little painful but can be done. Deleting a single word is done by saying “forget word” and deleting the last chunk of text that you dictated can be done by saying “forget that”.
It is really good in iChat. Being able to speak is exactly what you want when writing a chat message.
However, don’t forget to read what you wrote because it can make mistakes!
A recent upgrade of my server to Ubuntu 8.04 beta forced me to solve an issue I have been having with the integrated MCP55 ethernet and recent Linux kernels. At boot the network interface appears to come up and shows as up in ifconfg. However, it just will not work. Eventually I found a fix on the Gentoo Wiki. However, adding the forcedeth module options specified to /etc/modprobe.d/options did not fix the problem. I think that the kernel is loading the module from initramfs and that needs to be updated as well. This is what fixed things for me.
Add the following line to /etc/modprobe.d/options
options forcedeth msi=0 msix=0
Then rebuild initramfs like this
sudo update-initramfs -u
BTW - this was the only issue I came across doing the upgrade over ssh. Everything else worked perfectly.
This weekend I thought I would have a go at throwing together a Rails front end to my mythtv database. I thought this would be easy but it seemed to highlight one difficulty after another with using Rails with a so called “legacy” application (one that already exists and not designed for Rails).
To start with I used the Rails install that comes with OS X. I did something like
rails mythrails
cd mythrails
#edit database.yml
ruby script/generate scaffold Program program
Since this is a so called legacy application you need to edit config environment.rb to tell rails not to pluralize table names
ActiveRecord::Base.pluralize_table_names = false
and edit the model to tell it what the table is actually called
class Program < ActiveRecord::Base
set_table_name "capturecard"
end
then starting the web server gives you a web interface to the program table. It’s really simple. But …
If you try to edit the data or create a new entry it will complain because (I think) there is no id field in the program table. This lead me to discover that you can add something like
class Program < ActiveRecord::Base
set_table_name "capturecard"
set_primary_key "the_id_field"
end
This raises the next problem. Rails can not cope with composite primary keys. You need to install composite_primary_keys. However, this leads to the next issue - composite_primary_keys needs Rails 2. This then has the side effect that generating the scaffold no longer works. In Rails 2 you need to specify the fields and types for all the fields in the table. In the case of a legacy system the table already exists so why can’t the scaffold generator just read the fields from the database?
At this point I gave up. I am sure this is not too hard to work around but I only wanted to play and this all seemed like it was getting harder than I ever intended.