Zen-chan (smoothed)


I've been working on my very first PC build over the last three evenings. Tonight I plugged it in, crossed my fingers and turned it on... and booted into the BIOS config! Woohoo! I'm now past my worst fears of crushed CPU socket pins and the like. (And considering what I spent on all this, that was no small fear.) Tomorrow, I'll get the drives in and try to tidy up the cables, but for now I'm happy.

Now, I really do need to think of a good name for it.
  • Current Mood
    excited excited
Zen-chan (smoothed)

On Fitting Fonts

A little while back I mentioned that I was working on a custom programming font. It's been rather educational and I've learned a ton of trivia about computer fonts. By far the most interesting thing is that drafting the shape of each glyph has turned out to be the easy part. What's the hard part? Grid fitting (a.k.a. hinting or instructing).

Collapse )
  • Current Music
    Eagles - Hotel California
Zen-chan (smoothed)

An old friend.

For nearly five years now, I've had two color schemes defined in my init.el file for Emacs. One is a basic dark text on white scheme that's a tweaked version of the default colors from XEmacs. The other color scheme is something of its inverse with light text on a black background. I based the second one off of the first. While I found that the pure primary colors work nicely on the white background, they're a little too strong against black. So I ended up switching them to analogous secondary colors that are a little bit desaturated:

For some reason, I always found this to be a really comfortable color scheme. This week I realized why. While switching to it, I was thinking of it as my "midnight" color scheme. That rung a bell and for some reason it made me think more specifically of something about pinball at midnight.

Collapse )

Incidentally, that Emacs screen shot is also showing off my very own programming font made from scratch in Fontforge. But that's a topic for another post.
  • Current Music
    The Cambridge Singers: I Wonder As I Wander
Zen-chan (smoothed)

ICFP 09, Post Mortem, Part One

"It would be pointless to observe that the finest volume of all the many hexagons that I myself administer is titled Combed Thunder, while another is titled The Plaster Cramp, and another Axaxaxas mlö."
         — "The Library of Babel" Jorge Luis Borges.

Well, as of the point when they froze the scoreboard, my solo effort was ranked in the 24th place with 2763.6783 points. The following is the first half of my post mortem, describing the basics and the lower level parts of my code. I intend to post a second half tomorrow, describing my solutions to the specific problems.

Collapse )
  • Current Mood
    tired tired
Zen-chan (smoothed)

ICFP 09, #2

I'm calling it a night.
Position         Score           Team                   Problems Solved
21               2763.6783  	 Combed Thunder         16
I'd broke the top twenty and was in 19th place for a good long while earlier. Oh well. At least I finally had a respectable ICFP showing this year and did reasonably well for a solo effort.
Zen-chan (smoothed)

ICFP 09, #1

 Step: 0 Distance: 2.2343e+06 VDiff: 3588.08
 Step: 711 Distance: 0.0530664 VDiff: 3.04898e-05

This is just with made up numbers since I haven't hooked it into the VM yet, but still. I also need to optimize for fuel consumption (7688 units, in this case). By I can hit an arbitrary moving target fairly squarely now.

Debugging my VM this afternoon was frustrating when it turned out that the error was in the specification. On the other hand, I wrote a nifty little decompiler thing.
Zen-chan (smoothed)

Shell Recipes

I doubt these will be useful to anyone else reading this, but I'm going to collecting these here as notes to myself so that I don't lose them. I should really just turn them into shell scripts.

Generate an Emacs TAGS file for a project
find . | grep -E "\.(cpp|cc|cxx|hpp|h|hxx)$" | etags -
Use this recursively scan a directory and all subdirectories for C++ source code, and index it with etags.

Convert PDFLaTeX PDF to Illustrator-usable EPS
gs -dNOCACHE -dNOPAUSE -dBATCH -dSAFER -sDEVICE=epswrite -dEPSCrop -sOutputFile=out.eps in.pdf
Use this to turn a page with snippets of equations into vector paths that Adobe Illustrator can handle without choking on font embedding and substitution issues. Good for keeping fonts consistent when labeling charts and diagrams. Also good for embedding equations into diagrams.

Convert B&W scans to searchable PDF
convert pagexxx.png -filter Cubic -resize 200% -threshold 50% -compress Group4 pagexxx.tiff
tiff2pdf -z -p letter -ro -x 1200 -y 1200 -o pagexxx.pdf pagexxx.tiff
Scan pages in, clean them up in an image editor, save to individual files. Use these two commands to convert each page to PDF. Combine in Acrobat Professional, and use the built-in OCR with the "Searchable Image (Exact)" option. Gives excellent image quality and file size (avoids bad JPEG image recompression.)

Grouped bar charts, thick lines, and font embedding with gnuplot
set terminal postscript eps enhanced color solid linewidth 3 \
    "NimbusSanL-Regu,17" fontfile "/opt/local/share/texmf-dist/fonts/type1/urw/helvetic/uhvr8a.pfb"
set output 'cache_issue.eps'
set style data boxes
set boxwidth 0.2
set xlabel "Pirates"
set ylabel "Ninjas"
set grid y
set xrange [0:4]
set yrange [0:6]
set xtics ("1"  0.5, \
           "2"  1.5, \
           "3"  2.5, \
           "4"  3.5 )
plot '-' using ($1-0.7):($2) title "Red" with boxes fs pattern 0, \
     '-' using ($1-0.5):($2) title "Green" with boxes fs pattern 2, \
     '-' using ($1-0.3):($2) title "Blue" with boxes fs pattern 3
1 2.4104
2 4.4581
3 4.7087
4 4.7337
1 0.5815
2 1.0963
3 1.1257
4 1.1282
1 0.7219
2 1.3632
3 1.4184
4 1.4223
Basic example of how to set up grouped bar charts. First line shows how to make lines thicker so that they'll show up better when reduced to the width of a text-column. Also shows how to specify a specific postscript font file to be embedded.
Zen-chan (smoothed)

Qualifying Exam

It's done! Grand totals: one full week, five questions, and seventeen typed pages written including almost four pages for the 64 entries in the references list. And countless iced chais chugged.

Frankly, I'd rather have spent the time and energy doing, well, the actual publishable research that this is supposedly testing my preparation to do. I often wish that the Ph.D. could simply be granted after you've published enough peer-reviewed first-author papers. Given that those would all have passed evaluation by many (hopefully impartial) external experts, I'd think it'd be pretty good proof that you know your field well enough at that point.
Zen-chan (smoothed)

ICFP 2008 #3 - The End, but with a bit of ray tracing

Real life has sort of overtaken things and it's clear that I won't be able to get as far as I'd like in the ICFP contest so I've decided to bow out. Given that, I figure that I might as well save some time for those still in the running and impart some of my ray tracing knowledge. So I'm giving away two little routines that ought to be helpful to those still in the running. Collapse )

  • Current Mood
    disappointed disappointed