2013/05/24

From PyDev to VIM, A Desktop Trick

I've written elsewhere about how after having procured a laptop that could finally run Eclipse+PyDev well, I decided to switch to VIM as my main editor for Python programming.

This time I won't talk about why I was so tempted to switch to a keyboard-friendly environment, but about one feature of the operating system that not only enabled the switch, but also made it very easy.

It's multiple desktops.



On the set of desktops in the image, I'm editing Python on the center desktop. To the left, is the IBM COBOL Reference Manual. To the right, is MonoDevelop with the project for the test suite of the related C# library.

On the top row, from left to right, is Chrome letting me type this post, then a SSH session to the server, and then a VCN to the KVM-virtualized WinXP on the same server, which is running Visual Studio and has just finished an MSBuild.

On the bottom-left desktop, I'm editing a related Python project with VIM.

At times, one of the remaining virtual desktops may hold a Google Hangout, and another would have yet another Python editing session on a related project.

As you can see, I'm using a 3x3 grid of desktops, but at times I've thought about going to 4x4.

Switching among the desktops is a matter of Ctrl-Alt-<direction>, and it's really, really fast. It sure beats click-click-click required even by the best IDE's.

And that is the trick!



2013/05/21

Common Area


Don't tease, I won't stray, to
Follow this walk, The Way
How dare I else do?
Eliza thus told me to!

I grieve the adrift of those
Bussy such, grok not the sigh
Lo, behold, in all his might! The
King wears no clothes

2013/05/19

Grako 2.0.0

grammar diagram
Grako 2.0.0 was just released. This new version includes many simplifications to the generated grammars, semantics through delegation, a complete antlr2grako example, and the ability to create silly diagrams of the grammars through graphviz. For a full list of changes, see PyPy or the Bitbucket changelog.

2013/05/15

Home

When in doubt, seek Honey
Honey's always home

And if you meet The Wicked Witch of West
Just click your heels times three
It doesn't matter which shoes you're wearing
Because home is not where you are
But where you want to be

When The Red Queen of Hearts is near
Paint a white rose red, and see
You'll be judged anyway
And it would be Off with your head
If there wasn't everyday a time for tea

At other times, just Chant this Spell
Dear Fear, I must leave you now
Come find it, and you won't 
For Fear lives far away from home 
for Tom, who sometimes forgets where his Honey is.

2013/05/12

Mamá Mafalda

¿Cómo podía algo tan maravilloso, la puerta a todas las vidas posibles, parecerles tan tedioso?

Es lo que me atormentaba cuando mis hijos comenzaron a aprender a leer. Para ellos, era otra tarea sin significado, peor que tener que recoger los juguetes al terminar de jugar.

Pero llegó un día de epifanía (o sincronismo Junguiano), cuando allí, en medio del automercado de farmacia (el lugar menos esperado), estaba "Toda Mafalda", en empastado, y a buen precio.

No lo dudé, y luego mis hijos tampoco. Compré el libro, y mis hijos lo leyeron ávidamente, de una cubierta a la otra, muertos de la risa, o en silentes reflecciones.

Y esa es la historia de como mis hijos nunca más pararon de leer, y la razón por la cual tengo que recordar a Mafalda en el Día de las Madres, a pesar de que Mafalda nunca dejó de ser niña.

¡Feliz Día de las Madres, Mafalda!

2013/05/02

Grako 1.4.0 PEG/Packrat parser generator for Python



Grako 1.4.0 has been published with this changelog:

  • BUG! Sometimes the AST for a closure ({}) was not a list.
  • Semantic actions can now be implemented by a delegate.
  • Reset synthetic method count and use decorators to increase readability of generated parsers.
  • The Grako EBNF grammar and the bootstrap parser now align, so the grammar can be used to bootstrap Grako.
  • The bootstrap parser was refactored to use semantic delegates.
  • Proved that grammar models can be pickled, unpickled, and reused.
  • Added the antlr example with an ANTLR-to-Grako grammar translator.
  • Changed the licensing to simplified BSD.


2013/04/11

Grako 1.3.0

I just released a new version of Grako:
https://pypi.python.org/pypi/grako/1.3.0
The most relevant change is the the memoization cache optimization thanks to the advice given by  Kota Mizushima.

This time I'm requesting help on the work on the semantic_delegate branch of the repository, because that's the way to go for amazing performance with parsers and translators in Python.