Older blog entries for federico (starting at number 206)

20 Aug 2010 (updated 20 Aug 2010 at 22:04 UTC) »

Fri 2010/Aug/20

  • Which document is open in a window?

    Yesterday I mentioned a patch for Evince to add an "Open Containing Folder" command. In the bug that tracks the patch, Milan Bouchet-Valat asked about having an X window property that apps could set to let the environment know the URI that is being shown in a window.

    This sounds pretty useful. I told the Zeitgeist hackers about this, and Michal Hruby told me about exactly the same proposal, which had some discussion in the wm-spec-list.

    The basic idea is to add a _NET_WM_CURRENT_URI property to windows, whose value is a string with the URI of the document being viewed. From the application programmer's viewpoint, this would be something like gtk_window_set_current_uri&nbsp(window, string). You would call that function when you load a document.

    Gnome-shell and window managers could use this information to do several things — offer the "show in file manager" command themselves, provide information to Zeitgeist about the documents that are open at any one time, etc.

    The discussion has an interesting mail from Luboš Luňák. It seems that KDE has already been considering something similar.

    Extending the idea a bit further, gnome-shell has mockups to show a list of tabs that are open in your web browser. If you make that window property be a list of URIs (for all the open documents) instead of a single URI, then the window manager can list the open web pages easily. You would need a human-readable list of document titles (and possibly favicons and other nasties), but details, details...

    I think we would also need some sort of message that the window manager can send to windows, like "focus this document" for when you select your tabbed web page in gnome-shell's lists. This message should be the only command that we add to communicate from the window manager to apps; in theory you should be able to do everything else from the app itself, once you have focused the documents — close the document, move it, etc.; there is no need to complicate the window manager with that knowledge.

  • For my Mexican friends — correlación entre municipios PANistas y violencia.

Syndicated 2010-08-20 15:09:00 (Updated 2010-08-20 22:04:52) from Federico Mena-Quintero - Activity Log

Thu 2010/Aug/19

  • "Open Containing Folder" for Evince

    Remember the lack of bidirectional navigation in our document windows? The problem is that you can go down in the folder hierarchy with the file system until you open a file, but you cannot go up from the document app to visit the file system again.

    I just made a little patch for Evince to add an "Open Containing Folder" command, similar to the one that Firefox has in its Downloads window.

    Open Folder command

    This patch is is at bgo#627443.

    Unfortunately, Nautilus currently seems to have a bug. If you launch "nautilus file:///blah/blah/foo.pdf", Nautilus complains that "foo.pdf is not a folder". I'm sure this worked at some point before — you could make Nautilus open a window showing a folder *with* a certain file already selected.

    In the meantime, my patch for Evince just causes Nautilus to open a folder window. It would be nice if it could also select the file in that window.

Syndicated 2010-08-19 17:56:00 from Federico Mena-Quintero - Activity Log

Mon 2010/Jul/26

  • Not attending GUADEC

    The bad news is that I am not attending GUADEC this year. I miss you, people! This is the first GUADEC in which I fail to be a fixture of the conference.

    The good news is that I have a good reason for not attending. I will be at the inaugural event for the Talleres Libres de Artes y Tecnologías, or Free Workshops for Arts and Technologies.

    Talleres Libres
	      de Artes y Tecnologías

    There are several ideas behind the Free Workshops:

    • Resurrect traditional techniques for agriculture, woodworking, metalworking, permaculture, textiles — all the arts and crafts that no one longer knows how to do because everyone buys everything pre-made.

    • Publish that knowledge in online form, under a Creative Commons license.

    • Create physical workshops with the tools and knowledge for those arts and technologies. You need a space to make stuff; we make it happen.

    • Form an internal economy based on import-replacement. It's better if I use soap that my friend Joaquín makes, than to buy soap at the supermarket. I can make the wooden molds that he needs for his soap, or I can trade it for some vegetables that I grow.

    • Work to improve the quality of life of each workshop's local community. Are people filling their house's water tank from a truck? Help them build a rainwater-harvesting system. Are people going to the supermarket to buy bread? Start a bakery with a hand-built oven.

    Think of it as a 21st-century, networked, distributed, copyleft hippie/maker commune.

    My starting contribution to the Free Workshops is knowledge in woodworking and building techniques, and space in our backyard orchard and woodworking shop.

Syndicated 2010-07-26 15:12:00 from Federico Mena-Quintero - Activity Log

Tue 2010/Jul/20

  • A Roubo bench for woodworking

    Since I got interested in woodworking, I have used various inadequate surfaces to work and hold the wood. A wooden saw-horse that our builders left behind, the edge of the balcony, the quasi-vertical edge of the bathtub. This is all extremely uncomfortable, and so for the past months I have been working on a real woodworker's bench.

    Roubo workbench

    This is the back view of the bench, with a few bar clamps and a chisel holder.

    Back of the workbench

    André Roubo was a French cabinetmaker from the 18th century, who wrote a massive treatise on all the then-known techniques for working wood. The woodworking community online has been abuzz with a translation of Roubo's book that is being prepared by the editors of Popular Woodworking magazine.

    In his book, Roubo describes a workbench and its accessories in detail. This bench is a variation of that one.

    My bench is built from a thick slab of cedar on pine legs. The thick slab makes the bench heavy and stable — it is a royal pain in the ass to use hand planes on a bench that slides around the room. The legs are joined to the surface with through-dovetails and tenons. I am not exactly sure why Roubo built dovetails and tenons like that, but it has something to do with wood movement — you want the face of the legs to remain flush with the front face of the top, so that you can have a continuous surface for clamping.

    The legs have short stretchers with double-wedged tenons, and long stretchers with tusk tenons. This kind of joinery is done without glue; that way if any joint comes loose, I can just hammer it back into position.

    This is how the bench top is joined to the legs.

    Through-dovetails and tenons

    The main function of a workbench is to hold a piece of wood steady when you are working on its faces, edges, or ends. The bench needs to let you hold things in the X/Y/Z axes so that you can work on them.

    Here you can see the leg vise. You can use it to hold a board to work horizontally on its edge or vertically on its end. The leg vise is built using a commercial steel screw. The bottom rail keeps the vise vertically parallel to the leg. The holes in the rail are so that you can fit a metal peg on the outside of the leg, which acts as a fulcrum for the vise.

    Leg vise

    To hold the wood down and work on its face, you use holdfasts. A blacksmith made these for me. They have a 3/4" shaft, which you then fit through holes on the surface of the bench. To secure a holdfast, you just bang on the top of the curve with a mallet. To loosen it, you bang on the back of the curve. The holdfast gets "stuck" inside the hole where it fits, and that is what keeps it steady. The main advantage of holdfasts over clamps is that while you can only use clamps close to the edge of the bench, you can use a holdfast in any place that there is a hole.

    Holdfasts Holdfast in secured position

    Finally, there is a square block of wood which you can move up and down to use as a stop for planing the faces of boards. The stop keeps the wood from moving forward as you plane it. There is also a crochet, or hook, which you use to hold the end of long boards while planing their edge; the other end gets clamped in the leg vise.

    Crochet and planing stop

    People have been talking a lot about workbenches. This is the material that I used as reference:

    Bob Rozaieski's epic videos on building a workbench without using a workbench, using only hand tools:

    Chris Schwarz builds (yet another) workbench:

    Too many parts to list, but see 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,

    Roy Underhill makes sliding dovetails look easy:

    Parts 1, 2

Syndicated 2010-07-20 11:40:00 from Federico Mena-Quintero - Activity Log

28 Jun 2010 (updated 28 Jun 2010 at 23:05 UTC) »

Mon 2010/Jun/28

  • Twelve Lectures on Architecture, by Nikos Salingaros:

    1. Recursion and the Fibonacci sequence. Universal scaling. Biophilia.
    2. Geometric Recursion and Fractals: the Sierpinski gasket. Perforation, bending, and folding. Anti-gravity anxiety. Architecture of the horizontal.
    3. Universal distribution of sizes. Fractal design, ornament, and biophilia. Sustainable systems.
    4. Cellular automata. Sierpinski carpets and sea-shells. Design in hyperspace and connection to the sacred.
    5. Architectural harmony. Christopher Alexander’s theory of centers. Design as computation. Computational reducibility.
    6. Alexander’s 15 Fundamental Properties. Three laws of architecture.
    7. Biologically-inspired computation. Genetic algorithms. Computation versus memory retrieval. Evolutionary regression.
    8. Emergent systems. Examples from Artificial Life. Inhuman experiments. Architectural education.
    9. Symmetry production. Symmetry breaking. Classical moldings. Elementary particle symmetries. Binding energy.
    10. Generative codes and their application to building and urban morphology. Secularization destroys public space. Spiritual architects. Legalizing codes.
    11. Duany-Plater-Zyberk (DPZ) codes. The New Urbanism. Stephen Mouzon’s project. Tall buildings.
    12. Implementation of generative codes in design. Urban plazas. Designing for children. Favelas and social housing.

  • Harmony-seeking Computations, what Christopher Alexander has been working on after the publication of The Nature of Order.

Syndicated 2010-06-28 15:19:00 (Updated 2010-06-28 23:05:45) from Federico Mena-Quintero - Activity Log

Thu 2010/Jun/17

  • Custom prompt for jhbuild

    I used to have a hard time distinguishing jhbuild-controlled shells from normal shells. To help with this, I just pushed a small change to jhbuild. Now it sets an UNDER_JHBUILD environment variable, so your "jhbuild shell" can customize its prompt. You can add this to your .bashrc:

    if [ -n "$UNDER_JHBUILD" ]; then
        PS1="[jhbuild] $PS1"
    fi

    With this, my prompt now looks like this when I'm inside a jhbuild shell:

    [jhbuild] guanabana$

Syndicated 2010-06-17 12:15:00 from Federico Mena-Quintero - Activity Log

Wed 2010/Jun/09

  • Hack Week 2010 — Client-side awesome

    It is Hack Week this week, when all of Novell's hackers work on whatever project they want for the whole week.

    The infrastructure for Document-Centric GNOME is coming along just fine. The Zeitgeist hackers are kicking all sorts of ass with the engine and the activity journal — that's what lets you see your work in a nice timeline.

    Another part of the document-centric vision is to allow comfortable flow or circulation through your files, which is sorely missing right now.

    Placeless documents

    Let's say you open a document. It doesn't matter how you open it — by double-clicking on it in Nautilus, by clicking on an item in your activity-journal's timeline, or by a File/Open command. The document window you get is something like this:

    Normal document window

    This document window tells you the title or filename, but it does not let you see where the document is stored. It also does not let you access documents which may be near the place where the original document is stored.

    The user interface does not give you any hints about the place in which your document lives. Your document is effectively placeless, you have no way to orient yourself, and you have every reason to feel lost.

    What would Christopher Alexander do?

    A couple of months ago I wrote a little introduction to the work of Christopher Alexander, the architect behind the monumental book A Pattern Language and others.

    There are several patterns in A Pattern Language that deal with how you move from place to place and how you orient yourself, either in the city or in a building. To solve the problem of disorientation and placeless documents, I think we can grab ideas from these patterns:

    Main gateways. "Any part of a town - large or small - which is to be identified by its inhabitants as a precinct of some kind, will be reinforced, helped in its distinctness, marked, and made more vivid, if the paths which enter it are marked by gateways where they cross the boundary. [...] Mark every boundary in the city which has important human meaning - the boundary of a building cluster, a neighborhood, a precinct - by great gateways where the major entering paths cross the boundary."

    Circulation realms. "Lay out very large buildings and collections of small buildings so that one reaches a given point inside by passing through a sequence of realms, each marked by a gateway and becoming smaller and smaller, as one passes from each one, through a gateway, to the next. Choose the realms so that each one can be easily named, so that you can tell a person where to go, simply by telling him which realms to go through."

    The flow through rooms. "The movement between rooms is as important as the rooms themselves; and its arrangement has as much effect on social interaction in the rooms, as the interiors of the rooms. [...] As far as possible, avoid the use of corridors and passages. Instead, use public rooms and common rooms as rooms for movement and for gathering. To do this, place the common rooms to form a chain, or loop, so that it becomes possible to walk from room to room [...]"

    Circulation for your files

    File managers like Nautilus let you navigate down in the hierarchy of folders until you reach an actual document. But once you open a document window, you cannot navigate up to look for related files, or even to see the folder in which the document is stored. If you open the document with something other than the file manager, you will have a hard time knowing where the document is.

    We can solve this by adding a "Show folder" button to document windows, preferably so that it is close to the document's name or filename.

    &dquot;Show
	      folder&dquot; button in document

    When you click on that "Show folder" button, it takes you to the document's parent folder. In turn, we can make folder windows in the file manager similar, with a "Show parent" button to go further up in the hierarchy.

    &dquot;Show
	      parent&dquot; button in folder

    By adding a single button that is close to the document's or folder's name, we can let you navigate up in the hierarchy, just as you can currently navigate down with the file manager. This adds circulation and flow to your files.

    Name-able gateways

    Every time that I click on a PDF link while I'm browsing the web, the following happens:

    1. The PDF gets downloaded and put somewhere. Sometimes in /tmp, sometimes in ~/Downloads, depending on which button I click in Firefox's "what do you want to do with this file?" nag-window.

    2. Evince opens up to show me the PDF. In a few seconds I can tell if the PDF is something worth keeping.

    3. If I decide to keep or delete the PDF, I cannot move it easily to a good place or to the trash— I have no way to visit the PDF's parent folder so that I can drag it to another place. This would be solved with the "Show folder" button described above.

    4. For some reason, PDFs always seem to have terrible names: presentation.pdf, 2010.pdf, 10.1.1.55.8788.pdf. CiteSeer, I am looking at you. And yet there is no easy way to rename the document right there.

    This also happens when someone sends me an email attachment. They give it a crappy name, I want a better one, but there's no easy way to do it right there.

    In the mockup screenshots above, you can see that windows for documents and folders actually let you edit the filename right there. Instead of having a static filename in the title bar, you actually have a text entry that you can edit. If I could rename 10.1.1.55.8788.pdf right from Evince as I view the PDF for the first time, my ~/Downloads folder would be a much friendlier place.

    This is akin to having physical gateways with big name tags. You always know where you are, and you always know that you can go to a place nearby.

    Client-side what?

    Unfortunately, window managers don't let you customize a window's title bars like that.

    The valiant Cody Russell has been working on the client-side-decorations branch of GTK+. With this, you would be able to have a toplevel window and decorate its frame yourself, without the window manager's intervention.

    Having control of a window's frame means that we can stick a GtkEntry there for the rename-able filenames, and a GtkButton for the "Show folder" action.

    (Yes, this would also let programmers add all sorts of crap to their windows, but apps will shitty UIs will just kill themselves.)

    However, having an application paint the window's frame by itself also means that it should paint it exactly in the same way the window manager would, or the window will look out of place.

    My Hack Week project is to rip the code from Metacity/Mutter that reads a window manager's theme, and paints the window frames, and make that code reusable for GTK+. This way document windows would look exactly like normal managed windows, but with the addition of the few extra controls we need.

Syndicated 2010-06-09 11:01:00 from Federico Mena-Quintero - Activity Log

197 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!