Log in

No account? Create an account
About this Journal
Current Month
Oct. 7th, 2010 @ 02:29 am It LIIIIIVES!
Current Mood: excitedexcited
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.
About this Entry
Zen-chan (smoothed)
Apr. 16th, 2010 @ 02:25 am On Fitting Fonts
Current Mood: tiredtired
Current Music: Eagles - Hotel California

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).

Read moreCollapse )
About this Entry
Zen-chan (smoothed)
Dec. 11th, 2009 @ 10:36 pm "They Call Me Dr. Worm"
I defended today!
About this Entry
Zen-chan (smoothed)
Dec. 4th, 2009 @ 11:44 pm An old friend.
Current Music: The Cambridge Singers: I Wonder As I Wander
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.

And that's when I realized...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.
About this Entry
Zen-chan (smoothed)
Jun. 30th, 2009 @ 01:11 am ICFP 09, Post Mortem, Part One
Current Mood: tiredtired
"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.

Part OneCollapse )
About this Entry
Zen-chan (smoothed)
Jun. 29th, 2009 @ 12:05 pm 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.
About this Entry
Zen-chan (smoothed)
Jun. 28th, 2009 @ 06:50 am 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.
About this Entry
Zen-chan (smoothed)
Sep. 22nd, 2008 @ 02:35 pm 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.
About this Entry
Zen-chan (smoothed)
Aug. 25th, 2008 @ 05:04 pm 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.
About this Entry
Zen-chan (smoothed)
Jul. 13th, 2008 @ 02:27 am ICFP 2008 #3 - The End, but with a bit of ray tracing
Current Mood: disappointeddisappointed

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. Read moreCollapse )

About this Entry
Zen-chan (smoothed)