Jump to Content
Jump to Navigation

Rolling in Internets

October 26th, 2007 by SodaBrew

Well, it finally happened. I caved. I bought Internets everywhere with a Sprint plan and the Novatel USB727 doohickey. Bonus points to Novatel for packing a GPS and a EVDO rev A modem into such a small package and providing working Linux instructions involving only standard kernel serial drivers!

Novatel USB727

My critique of the instructions is also a strength: they’re looong, repeated several times for various distributions, but also totally idiot-proofed. At the very end, the steps to quickly get the modem dialing from the command line are presented.

Instruction for using the Sprint U727 in Linux, (and very likely the Verizon USB727, too). Here’s what works for me:

  • First, add this line to /etc/modprobe.conf:options usbserial vendor=0×1410 product=0×4100
  • Create /etc/wvdial.conf with these contents:

    [Dialer Defaults]
    Modem = /dev/ttyUSB0
    Baud = 460800
    Init1 = ATZ
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    ISDN = 0
    Modem Type = USB Modem
    Phone = #777
    Username = ''
    Password = ''
    Carrier Check = no
    Stupid Mode = yes
  • Then, each time you want to use the modem:
  1.  Insert the USB modem.
  2. Wait for the device to be recognized as a cdrom.
  3. eject /dev/cdrom(since I don’t have any other cdrom - you might need to eject /dev/cdrom1 or something)
  4. Wait a beat.
  5. wvdial
  6. route add default ppp0

Things that make MySQL dumb

October 19th, 2007 by SodaBrew

http://forums.mysql.com/read.php?92,133026,133102

Hi. Since the updates on a memory table should be very fast, the locks are taken for a very short time only. I won’t expect that they become a bottleneck. But I must admit that I don’t have any experiences with applications like this. If they do indeed become a bottleneck, you could try to use a transactional engine that uses row level locks, like InnoDB. But I guess that the overhead will outweigh the improvements in locking. Regards Ingo

Ingo Strüwing, Senior Software Developer - Storage Engines MySQL AB, www.mysql.com

Ouch, man. That’s my cerebellum you’re destroying.


Coloring in the planet

October 19th, 2007 by SodaBrew

Earth swatchesGrey is so out! Blue? Green? Hmm, how’s brown these days?


First of October ToDo list

October 1st, 2007 by SodaBrew

Here we go…

  • Done! Edit draft-ietf-ipv6-ra-flags-option-02 and draft-weiler-dnssec-dlv-04
  • Done! Submit draft-ietf-sieve-refuse-reject-05
  • Done! Release libSieve 2.2.6
    • Update docs
    • New callbacks for address and header parser errors

Saw Raw & Uncut Festival and Balkan Beat Box on Saturday evening. Hurrah for fun!


libSieve Todo List

September 6th, 2007 by SodaBrew

A few things to do before I get to libSieve 2.2.6…

  • More checkins.
  • Bracketed comments.
  • Stress tests for header and address parsers.
  • Resolve extant memory leaks (switch to a memory pool system? methinks yes).
  • Benchmark parsing a monster script. Compare with previous versions.
  • Stress test the stack with deeply nested if blocks.

Whenever it takes me a while to close a bug…

August 6th, 2007 by SodaBrew

Someone else proves that they can take even longer on something even simpler: KDE Bug 122870. In a nutshell:

Opened: 2006-03-01 00:32
Gist of fix required: accept “{” bytecount “+}” in addition to “{” bytecount “}” for RFC compliance.
Closed: 2007-08-06 19:29

Thanks nonetheless to the KDE folks for closing this bug; fewer complaints from my DBMail users! :-)


Romanesca Cauliflower

August 5th, 2007 by SodaBrew

This week’s Two Small Farms CSA basket came with this weird thing:Romanesca cauliflower  Well, what to do? Cut it up and saute it in olive oil with some garlic! Yum :-)


libSieve hacking

July 28th, 2007 by SodaBrew

Today I spent some time hacking on libSieve for the first time in way too long. I was telling a friend about the inefficiency of putting all of your keywords into a lexer because it has to go through tons of state shifts to get to the terminals. A better way to do it is to match a generic identifier with a regular expression, then look up the matches in a hash table of keywords. Well, enough was enough, time for me to do that! The old CMU sieve-lex.l, with 56 keywords each as its own lexer state, yielded this flex -v output:

/bin/sh ../ylwrap sieve-lex.l lex.yy.c sieve-lex.c — flex -v -s -olex.yy.c
flex version 2.5.33 usage statistics:
scanner options: -svB8 -Cem -olex.yy.c -Plibsieve_sieve
584/2000 NFA states
340/1000 DFA states (737 words)
72 rules
Compressed tables always back-up
Beginning-of-line patterns used
3/40 start conditions
179 epsilon states, 98 double epsilon states
8/100 character classes needed 22/500 words of storage, 0 reused
1235 state/nextstate pairs created
414/821 unique/duplicate transitions
347/1000 base-def entries created
448/2000 (peak 399) nxt-chk entries created
28/2500 (peak 266) template nxt-chk entries created
0 empty table entries
8 protos created
7 templates created, 23 uses
38/256 equivalence classes created
4/256 meta-equivalence classes created
0 (15 saved) hash collisions, 81 DFAs equal
0 sets of reallocations needed
1884 total table entries needed
After moving the keywords out of sieve-lex.l and into sieve-keywords.gperf, replacing them all with a generic state,

ident           :?[a-zA-Z_][a-zA-Z_0-9]*
<INITIAL>{ident}        { int k = libsieve_keyword(yytext, yyleng); … error handling … }

the flex -v output reads like this:

flex version 2.5.33 usage statistics:
scanner options: -svB8 -Cem -olex.yy.c -Plibsieve_sieve
146/2000 NFA states
72/1000 DFA states (304 words)
19 rules
Compressed tables always back-up
Beginning-of-line patterns used
3/40 start conditions
79 epsilon states, 50 double epsilon states
11/100 character classes needed 165/500 words of storage, 1 reused
830 state/nextstate pairs created
144/686 unique/duplicate transitions
83/1000 base-def entries created
204/2000 (peak 392) nxt-chk entries created
88/2500 (peak 308) template nxt-chk entries created
0 empty table entries
13 protos created
11 templates created, 35 uses
28/256 equivalence classes created
8/256 meta-equivalence classes created
3 (3 saved) hash collisions, 79 DFAs equal
0 sets of reallocations needed
858 total table entries needed

Ok, that’s better. But what about that one ident with the :? up front? What if it were this:

ident           [a-zA-Z_][a-zA-Z_0-9]*
<INITIAL>{ident}        { int k = libsieve_keyword(yytext, yyleng); … error handling … }

<INITIAL>:{ident}        { int k = libsieve_keyword(yytext, yyleng); … error handling … }
And flex -v says:

flex version 2.5.33 usage statistics:
scanner options: -svB8 -Cem -olex.yy.c -Plibsieve_sieve
150/2000 NFA states
73/1000 DFA states (306 words)
20 rules
Compressed tables always back-up
Beginning-of-line patterns used
3/40 start conditions
81 epsilon states, 52 double epsilon states
11/100 character classes needed 165/500 words of storage, 3 reused
844 state/nextstate pairs created
145/699 unique/duplicate transitions
85/1000 base-def entries created
207/2000 (peak 420) nxt-chk entries created
96/2500 (peak 336) template nxt-chk entries created
0 empty table entries
14 protos created
12 templates created, 36 uses
28/256 equivalence classes created
8/256 meta-equivalence classes created
0 (4 saved) hash collisions, 79 DFAs equal
0 sets of reallocations needed
868 total table entries needed


Calendaring is still a pain

July 27th, 2007 by SodaBrew

Why is calendaring still such a pain in the ass? There’s been nothing but a proliferation of propriety solutions, web apps that store their data locally and do not share it, servers that speak antiquated versions of dodgy protocols, and clients that are continually being rebuilt from the ground up instead of evolved to be more useful over time.

Killing Exchange is still the killer application. We can’t think past that because, much as we’d like to, we still have to work with our sales, marketing, executive, and other non-technical staffs that Just Won’t Use Anything Else (TM). Or will they? Is the big problem here that everyone is so accustomed to Outlook that they cannot switch, or that organizations think this way and therefore attempt to deploy Exchange-compatible services to cater to a perceived need for Outlook clients?

Is anybody actually running Mozilla Sunbird in a real office environment?

Off in my project world, I was just thinking to myself, “Hmm, maybe I should build a WebDAV server into DBMail. The storage model is all key-value, so I could fake the whole thing as email headers.” Then I found this DAV-IMAP proxy. I’m not actually sure if it speaks DAV or just the subset required for Mozilla Sunbird. But whatever - the point is, it’s a calendar in a mailbox. On a non-calendar-aware client, you could just read through your Calendar mailbox to see an ugly-but-workable view of your calendar events. On a calendar-aware client, you get the full awesomeness of a calendar. And shared calendars? That might just come for free if your mail server implements shared folders, as DBMail indeed does.


Crosspost test

July 17th, 2007 by SodaBrew

This is a crosspost. Let’s see if it works…

This is more stuff. It should be an lj-cut that links back to my blog. Wow cool if it works!Bonus point to San Diego for having awesome beaches!