Monthly Archives: October 2011

The Praxis of Event Loops

On a theoretical world, given the ability for a processor to run an infinite amount of threads, we could prove the following statements (no attribution purposely given):

  • If you do more CPU than I/O, use threads.
  • If you do more I/O than CPU, use more threads.

which would allow us to conclude with the following corollary:

at full utilization, threads and events have the same theoretical throughput.

Such argument ignores praxis — it is a purely theoretical debate disconnected from the reality of scaling services –.…

Markdown, An Open Document Workflow

I’ve been using Markdown since 2006, taking all my notes at work using a simple text editor and using the Markdown text markup format. I also use Markdown for writing down thoughts and posting to this blog. I rarely, if ever, use Word or even TeX/LaTeX. I treat markdown as my source format and I generate all my target formats using multimarkdown: PDF, HTML, RTF, etc.

I am happy with this process. I use a standard editor I find in any operating system I happen to work with.…

Railroad Diagrams from EBNF

I am playing with a new query language. I am defining the grammar as EBNF, but I want to show railroad diagrams for those readers that are more graphical and less familiar with BNF. I’ve found limited support for generating syntax diagrams from EBNF. I’ve found a few tools, some working better than others:

  • Ebnf2ps (Haskell). This is the only tool I have not been able to get to work. I seem to be missing AFM fonts in my TeX installation and I am not sure I want to spend time figuring out how to generate the AFM files.