skip to main | skip to sidebar

Yet Another Mac Dev Blog

asr -source /childlike/wonder -target /world -noverify -noprompt

Monday, September 8, 2008

Fun With Digraphs

Christ, I can't believe this compiles-
%:include <stdio.h>
%:include <Cocoa/Cocoa.h>

int main()
<%
NSString *message = @"Hello, world";

printf("%s\n", <:message UTF8String:>);

return 0;
%>

It's section 6.4.6 in the C spec. Good stuff for playing jokes on coworkers, but please don't ship code like this.
Posted by Blake C. at 9:47 PM 2 comments:
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

About Me

Blake C.
MPW/Toolbox -> CW/PP -> XCode/Cocoa -> ?
View my complete profile

Blog Archive

  • ▼  2008 (8)
    • ►  October (1)
    • ▼  September (1)
      • Fun With Digraphs
    • ►  August (1)
    • ►  June (2)
    • ►  April (1)
    • ►  January (2)
  • ►  2007 (30)
    • ►  November (1)
    • ►  September (2)
    • ►  August (1)
    • ►  June (3)
    • ►  May (3)
    • ►  April (2)
    • ►  March (5)
    • ►  February (6)
    • ►  January (7)
  • ►  2006 (6)
    • ►  December (6)

Internets

  • Bill Bumgarner
  • Blake Seely
  • Brent Simmons
  • briksoftware
  • Cabel Sasser
  • Chad Weider
  • Chris Hanson
  • Cocoa Blogs
  • Dan Wood
  • Daniel Jalkut
  • Dave Batton
  • Dave Dribin
  • Devin Coughlin
  • Gus Mueller
  • Jens Ayton
  • John Gruber
  • Manish Tomar
  • Mark Alldritt
  • Marko Karppinen
  • Marmaduke
  • Matt Gemmell
  • Michael Tsai
  • Mike Ash
  • Mike Lee
  • Mike Piatek
  • Mike Zornek
  • Out of Cheese
  • Paul Marks
  • Peter Hosey
  • Ridiculous Fish
  • Scott Stevenson
  • Steve Dekorte
  • Steven Frank
  • The Macalope
  • Toxic Software
  • Travis Cripps
  • Tyler Ballance
  • Uli Kusterer
  • Victoria Wang
  • Wil Shipley
  • Wolf Rentzsch
  • xkcd