Posted
1 day
ago
by
and...@operationaldynamics.com (Andrew Cowie)
Frederico writes that he’s recently discovered Raph Levien’s Inconsolata font and really liking it.
I likewise discovered Inconsolata not too long ago (it was packaged in Gentoo and I was really pleased to discover it also available in
... [More]
Debian), and have been using it as the constant-width font in Quill and Parchment for program listings in technical writing.
We all tend to get obsessive about things we like, and so of course I tried it as a terminal console font. Interestingly, after a brief consideration, I decided not to use it for terminals and gedit and such. Deja Vu Sans Mono is still the king for that, especially if you’re using Deja Vu Sans and Deja Vu Serif for the rest of your UI; it means that the visual consistency across your desktop is really awesome.
Inconsolata doesn’t have anything even remotely close to the kind of Unicode coverage you need in your full-time constant-width font, and when fontconfig does a fallback it looks awful because Inconsolata’s metrics are so different from others. That’s all ok; Inconsolata is meant for program listings, and looks incredible on paper.
Anyway, Frederico noted that bold didn’t work when specified as a FontDescription, it doesn’t come up bold me either when I tried to do so via a bold PangoAttribute. But if you use Benjamin’s Specimen, it shows up fine (on an Ubuntu box, anyway):
So there’s a bug in our stack somewhere.
AfC
Update
Or not. I just reread the JavaDoc for the FontDescription constructor, and lo and behold relearned what I wrote there in the first place. To get bold Inconsolata you just need to use a ',' in the right place:
desc = new FontDescription("Inconsolata, Bold 8.0");
...
and my Cairo drawing code on screen in a XlibSurface shows bold. Great.
But nothing is ever simple. I ran the same drawing code out through to a PdfSurface, and no bold. What the hell? There’s a bug in our stack somewhere. {sigh} [Less]
Posted
1 day
ago
Recently I have been writing a lot about Lernid, an application that makes online learning events more fun and more accessible, and at the heart of what has enabled me to write Lernid is Quickly; a framework for scratching itches. Quickly has
... [More]
enabled me to re-connect with my coding mojo, and deliver the fruits of my labor to others.
As such, Quickly and I are friends. Good friends.
What excites me most about Quickly is how it helps opportunistic programmers to be productive and feel accomplished in their work. This in turn leads to huge opportunities around diversity in the application space. My excitement is not just about Quickly as software, but an ethos that is at the heart of Open Source.
To explain more about this, my friends at ZDNet published an article I have just written called Unchaining the opportunistic programmer. Go and check it out.
For extra bonus Quickly content, check out our Shot Of Jaq shot too. [Less]
Posted
2 days
ago
After reading Luis Villa’s concerns about how little Google values our privacy, I decided leaving Google services as well. In fact, I already left Gmail 1.5 year ago, not (only) because of privacy concerns, but because I was simply not satisfied
... [More]
with its IMAP support.
Call me old fashioned if you will, but I want an offline cache of my email. IMAP is of course the best protocol for that, but Google doesn’t support IMAP very well. They use folders as an offline implementation of their tagging feature, instead of actually using IMAP tags. This means downloading messages multiple times, which is not funny at all. And then, there is Philip Van Hoof saying [Google's] IMAP server is probably one of the poorest imaginable.
I don’t feel like running my own email server, either on my computer or in the cloud, so I went with FastMail. Their email solution is not free of cost, unless you keep very little email, but I find their price and service fair enough. I think that the only catch is, I didn’t go for the most expensive plan, so I can’t keep arbitrarily large attachments from many years ago. That’s OK for me. I download the important attachments to my hard drive and use a proper backup instead; and I can still keep the respective email messages.
I still have my Gmail account, which redirects to the FastMail one. I just don’t give my Gmail address to anyone these days, and I don’t use their SMTP server any more. I miss the conversation view, but I found out I can live without it. I reimplemented Gmail’s archive with an “Archive” folder inside Inbox, but latter it grew too big and I split it in one folder for each year.
I gave up most of my tags during the migration, because I didn’t really use them to search the email archive. For the remaining tags, I used the extended tagging feature of IMAP. I have less then 5 tags, so I could use the standard ones, but Evolution and Thunderbird have the same default names for these 5 tags, so I decided to just not change them. FastMail doesn’t really provide a way for me to set or see tags in their web interface, but that’s OK for me, because I use primarily Evolution to check and manage my email. The important thing is that FastMail doesn’t brake my tags. Sadly, OfflineIMAP doens’t implement these arbitrary tags yet, so I can’t use it to relay my email.
I’d love to know about other email solutions. I’m not really considering a move any time soon, but the discussion could be very interesting for current Gmail users. [Less]
Posted
2 days
ago
A new phrase that I learned yesterday. Probably something that’s been around computers for a long time, but it was my first exposure to it.
Basically a “skid mark” is something you leave in code as a signature so that in a crash dump
... [More]
you can figure out how you got there.
We’ve been doing a huge amount of work in Firefox 3.5 and 3.6 to reduce the number of crashes. For some crashes we have stack traces, but not a lot of data on how we got to that stack. So we’re actually checking in code changes and and shipping them into the wild to see how they change crash signatures.
The interesting thing is that it’s working – we’ve been able to track down some pretty serious crashes with this technique. [Less]
Posted
2 days
ago
My employer, Collabora was very generous and bought N900s for the entire company!
Mine just arrived:
I was lucky enough to pick one up at the Maemo Summit in October as well. However, those have to be sent back to Nokia in a few
... [More]
months, so now I won't have to dread the deadline :)
In related news, I'm (slowly) working on a handy Maemo 5 app of my own. More details as soon as it's usable (and uploaded to Maemo Extras [Devel]). [Less]
Posted
2 days
ago
Dear lazyweb,
I just started using Emacs 23 in
openSUSE 11.2. Running this:
emacs -fn "Inconsolata Bold 12"
actually gives me Inconsolata, but definitely
... [More]
not Bold. Why? How do I make it Bold?
(Inconsolata
is a truly beautiful font for programmers, by our GNOME
Emeritus Hacker Raph Levien.)
[Less]
Posted
2 days
ago
by
nor...@blogger.com (Tomeu Vizoso)
In the days 7th and 8th of this month took place in Montevideo the First International Event on Experiences about the Ceibal Plan, with the objective of sharing the experience gained during the first years of the implementation in Uruguay of the OLPC
... [More]
initiative, with the name of Plan Ceibal. On the afternoon of the second day, some schools displayed the work they had done with the XOs.
Project Rayuela and LATU were kind enough to invite me to assist, which has been an unforgettable experience for me. The plan was that after the event I would stay for one week discussing with the software team at LATU how they can work most profitably with the Sugar community upstream, will talk about this in a later post.
I still can hardly believe that it has been the second time that I have been close to a child learning with Sugar, and the previous one was more than 2 years ago, when attended FISL in the company of J5 and Jim Gettys. We visited then a school where the Federal University of Rio Grande do Sul was conducting a pilot with very early prototypes of the XO and Sugar.
This time was very different because we were seeing the results of at least one year of continuous work with Sugar, something that was happening in the mainstream of that society, backed by the government, the families, several volunteer organizations, and the primary education system.
Though I was ecstatic seeing each school presenting their work, I felt a bit sorry for the developers and non-developers that made that possible with their work but received very little feedback to date on the actual use of it. I have plans to improve that.
It has been a very enlightening and encouraging experience, wish all my colleagues at Sugar Labs could have this opportunity as well in the near future. The last 2 years have been pretty hard for the Sugar developers, always having to stand the never ending stream of naysayers, even from OLPC itself, and with the last year having to live off our savings. I'm very proud that we have managed to stand firm on our believe that the best GUI for learning hadn't been invented yet and that we could contribute something valuable to the mission of giving more learning opportunities to children around the world, specially those from less favoured backgrounds.
After having seen children and teachers involved together in learning with Sugar, I can finally say that we were right. Though of course, this is just starting...
The program of the event can be found here and I expect that soon will appear video recodings of the sessions and of the school presentations. Will post here when they are made public. Also will post soon about the week that followed, in which I had the luck of being a small part of a process in which an organization (and in some sense, a country) moves from being a consumer of FOSS to being a full rights member of the FOSS community.
Thanks to J5 and Gonzalo Odiard for the photographs. [Less]
Posted
2 days
ago
Etherpad is being released as open source software because the team is moving onto Google Wave. As an open source web hosted project, without a company behind it, it is unlikely to succeed.
Back when I used to talk about the business
... [More]
reasons for open sourcing code, "end-of-life" was always one of my first examples. People think, "oh, I have this project that I no longer want to work on but people still want to use it, so I'll open source it!" They have the (often mistaken) idea that somebody out there will just start working on it.
This is exactly what Etherpad is doing:
Our goal with this release is to let the world run their own
etherpad servers so that the functionality can live on even after we
shut down etherpad.com.
They are likely to lose a lot of users immediately as hosted software is very hard for end users to use without hosting.
There is a real need for hosting of open source web services.
Open source web service projects that have been successful like Wordpress and Drupal have companies that can host it for end users. Without hosting, I think it's unlikely that projects like Etherpad will be widely successful. And we should now ask what happens to the companies behind Wordpress and Drupal when they get acquired?
The other type of successful open source web service are projects started by companies and open sourced as part of the business strategy for creating community or
encouraging developers to help them out. In these cases the code is
often written entirely by company employees. And the hosting is done by the company as part of that same business strategy. Projects like SugarCRM and
Alfresco are successful open source web services but if the companies
went away (or were acquired), the projects would have a hard time
living on in the open source ecosystem.
Hosting for free and open source software projects is hard.
While it's virtually free (other than labor) to start a free software project, hosting a web service costs money, especially if it becomes popular. And consumers are used to free web services. (Web service companies often make money off of advertising (on the free version) or by charging for a supported version or a version with more features or by hoping to be acquired some day.)
So if it takes a business model right now for web hosted projects to be successful, how do free software projects transition to the web services world? How does a project start as a free and open source software project and transition to a hosted web service without becoming a company?
I don't think it's enough to just make the hosted version available for people to install and use on their own. I think we have to figure out a way to also host the software. If you require people to host the web services piece themselves, you are confining your market to technical people or companies with IT staff. The project might become successful but it's unlikely to be used by the average end consumer as part of their daily life.
So how do free software projects develop and host web services? Do they use business models like advertising to be self sustaining? Do they start foundations like the GNOME Foundation that will run as a nonprofit but make enough money of the hosted version to at least cover expenses? Or will all hosted services be essentially startup companies done by free software developers hoping to create a successful company?
Can we have self sustaining web service free software projects? [Less]
Posted
2 days
ago
I'm currently writing a PyGTK client that needs to make network requests using a library that doesn't integrate with the GLib mainloop (python-suds), so I found myself wanting to be able to make network requests without blocking the mainloop, and
... [More]
getting callbacks in my main thread when operations were done. The pattern to use is clearly having a dedicated network thread. In C I might have used GAsyncQueue, however I've found myself quite liking queue.Queue.
The following is a fairly generic class for queuing asynchronous requests. Calling the add_request() method from the main thread queues a function to be run in the worker thread. If the callback or error keywords are provided, these will then be called from the GLib mainloop in the main thread (queued via g_idle_add).
from threading import Thread
from Queue import Queue
import gobject
class ThreadQueue(object):
def __init__(self):
self.q = Queue()
t = Thread(target=self._thread_worker)
t.setDaemon(True)
t.start()
def add_request(self, func, *args, **kwargs):
"""Add a request to the queue. Pass callback= and/or error= as
keyword arguments to receive return from functions or exceptions.
"""
self.q.put((func, args, kwargs))
def _thread_worker(self):
while True:
request = self.q.get()
self.do_request(request)
self.q.task_done()
def do_request(self, (func, args, kwargs)):
if 'callback' in kwargs:
callback = kwargs['callback']
del kwargs['callback']
else:
callback = None
if 'error' in kwargs:
error = kwargs['error']
del kwargs['error']
else:
error = None
try:
r = func(*args, **kwargs)
if not isinstance(r, tuple): r = (r,)
if callback: self.do_callback(callback, *r)
except Exception, e:
if error: self.do_callback(error, e)
else: print "Unhandled error:", e
def do_callback(self, callback, *args):
def _callback(callback, args):
callback(*args)
return False
gobject.idle_add(_callback, callback, args)
We can then inherit this class to provide setup for our specific application:
class WebService(ThreadQueue):
def __init__(self, guid=None, **kwargs):
"""Initialise the service. If guid is not provided, one will be
requested (returned in the callback). Pass callback= or error=
to receive notification of readiness."""
ThreadQueue.__init__(self)
self.guid = guid
self.add_request(self._setup_client, **kwargs)
def _setup_client(self):
print "Setting up client"
...
return self.guid
Which we call from our program like this:
class Client(object):
def __init__(self):
self.w = WebService(guid=guid, callback=self.client_ready)
def client_ready(self, guid):
print "client ready:", guid
gobject.threads_init()
Client()
gtk.main()
What's really cool though is adding methods to the API that are called asynchronously for you. Python makes this possible through the power of decorators. Add the following decorator to a method, and it instead of it being called directly, it will be added to the processing queue.
def async_method(func):
"""Makes the given method asynchronous, meaning when it is called it
will be queued with add_request.
"""
def bound_func(obj, *args, **kwargs):
obj.add_request(func, obj, *args, **kwargs)
return bound_func
class WebService(ThreadQueue):
@async_method
def GetStopInformation(self, stopNo):
print "Requesting information for stop", stopNo
...
And that's it! If you can't follow it, don't worry too much. This is possibly the most Pythonesque bit of code I've ever written, but I've tried to make it generic enough that other people can use it for whatever they need. It's currently part of my app that's beginning to take shape, but the source is here.
Incidently, Maemo people: are there Glade definition files allowing me to use Hildon widgets, GtkBuild and Glade 3? That would be super awesome if there were. [Less]
Posted
2 days
ago
The hackfest is in full force now. Behdad arrived yesterday evening (without luggage) and he and Evan are now working on making WebKitGTK+ use the Harfbuzz layout engine.
Xan finished made a first version of the DOM bindings. This means
... [More]
there’s an API to access the DOM without having to go through JavaScriptCore. Also Form authentication saving has been implemented!
Some more photos of the hackfest
Gustavo made overriding context menu grab by Ctrl key possible. We now have the best of two worlds: rich web applications with context menus can be used while we can also override “malicious” sites that try to block the browser context menu! He’s also working on reinstating Shift-click downloading.
Dan checked in Content-Encoding support for libsoup. Sites like Lenovo.com can now be rendered instead of just showing garbage!
» Plaats op eKudos [Less]