fork(6) download
  1. #include <stdio.h>
  2. #include <time.h>
  3.  
  4. typedef struct {
  5. union {
  6. char * company;
  7. char * school;
  8. char * project;
  9. };
  10. union {
  11. char * location;
  12. char * url;
  13. };
  14. union {
  15. char * title;
  16. char * program;
  17. };
  18.  
  19. time_t started;
  20. time_t left;
  21.  
  22. char * description[];
  23. } thing_t;
  24.  
  25. typedef thing_t job_t;
  26. typedef thing_t school_t;
  27. typedef thing_t project_t;
  28.  
  29. #define CURRENT 0 /* I wasn't alive at the Unix epoch, so that'll work */
  30.  
  31. /* Contact Information */
  32. char * name = "Kevin R. Lange";
  33. char * email = "klange@toaruos.org";
  34. char * address = "1045 Mission St, Apt 440\n"
  35. "San Francisco, CA 94103";
  36.  
  37. /* Education */
  38. school_t uiuc = {
  39. .school = "University of Illinois at Urbana-Champaign",
  40. .location = "Urbana, IL",
  41. .program = "BS Computer Science",
  42. .started = 1251158400,
  43. .left = 1336608000,
  44. .description = {
  45. "Minor in International Studies in Engineering, Japan",
  46. "Focused on systems software courses",
  47. NULL
  48. }
  49. };
  50.  
  51. school_t hit = {
  52. .school = "Hiroshima Institute of Technology",
  53. .location = "Hiroshima, Japan",
  54. .program = "Study Abroad",
  55. .started = 1274745600,
  56. .left = 1278288000,
  57. .description = {
  58. "Cultural exchange program",
  59. NULL
  60. }
  61. };
  62.  
  63. school_t * schools[] = {
  64. &uiuc,
  65. &hit,
  66. NULL
  67. };
  68.  
  69. /* Projects */
  70. project_t compiz = {
  71. .project = "Compiz Window Manager",
  72. .url = "http://c...content-available-to-author-only...z.org",
  73. .title = "Developer",
  74. .started = 1201392000,
  75. .left = 1264291200,
  76. .description = {
  77. "Minor plugin contributor",
  78. "Various research projects",
  79. NULL
  80. }
  81. };
  82.  
  83. project_t toaruos = {
  84. .project = "ToAruOS",
  85. .url = "https://g...content-available-to-author-only...b.com/klange/toaruos",
  86. .title = "Lead",
  87. .started = 1295049600,
  88. .left = CURRENT,
  89. .description = {
  90. "Hobby x86 Unix-like kernel and userspace",
  91. "Advanced in-house GUI with compositing window manager",
  92. NULL
  93. }
  94. };
  95.  
  96. project_t * projects[] = {
  97. &toaruos,
  98. &compiz,
  99. NULL
  100. };
  101.  
  102. /* Employment History */
  103.  
  104. job_t yelp = {
  105. .company = "Yelp, Inc.",
  106. .location = "San Francisco, CA",
  107. .title = "Software Engineer, i18n",
  108. .started = 1339977600,
  109. .left = CURRENT,
  110. .description = {
  111. "Developed several internal tools and libraries",
  112. "Provided critical input and design work for Yelp's launch in Japan",
  113. NULL
  114. }
  115. };
  116.  
  117. job_t apple_internship = {
  118. .company = "Apple Inc.",
  119. .location = "Cupertino, CA",
  120. .title = "Software Engineering Intern",
  121. .started = 1306886400,
  122. .left = 1314662400,
  123. .description = {
  124. "Built software framework for testing and verification of desktop retina display modes",
  125. "Assisted other interns with Unix fundamentals",
  126. NULL
  127. }
  128. };
  129.  
  130. job_t * jobs[] = {
  131. &yelp,
  132. &apple_internship,
  133. NULL
  134. };
  135.  
  136. void print_thing(thing_t * thing) {
  137. char started[100];
  138. char left[100];
  139. struct tm * ti;
  140. int i = 0;
  141.  
  142. printf("%s at %s - %s\n", thing->title, thing->company, thing->location);
  143.  
  144. ti = localtime(&thing->started);
  145. strftime(started, 100, "%B %d, %Y", ti);
  146.  
  147. if (thing->left == CURRENT) {
  148. printf("%s to now\n", started);
  149. } else {
  150. ti = localtime(&thing->left);
  151. strftime(left, 100, "%B %d, %Y", ti);
  152. printf("%s to %s\n", started, left);
  153. }
  154.  
  155. char ** desc = thing->description;
  156. while (*desc) {
  157. printf("- %s\n", *desc);
  158. desc++;
  159. }
  160. }
  161.  
  162. int main(int argc, char ** argv) {
  163.  
  164. printf("%s\n%s\n%s\n\n", name, email, address);
  165.  
  166. puts("Education\n");
  167. school_t ** s = schools;
  168. while (*s) {
  169. print_thing(*s);
  170. puts("");
  171. s++;
  172. }
  173.  
  174. puts("Employment\n");
  175. job_t ** j = jobs;
  176. while (*j) {
  177. print_thing(*j);
  178. puts("");
  179. j++;
  180. }
  181.  
  182. puts("Projects\n");
  183. project_t ** p = projects;
  184. while (*p) {
  185. print_thing(*p);
  186. puts("");
  187. p++;
  188. }
  189.  
  190. return 0;
  191. }
Success #stdin #stdout 0s 2184KB
stdin
Standard input is empty
stdout
Kevin R. Lange
klange@toaruos.org
1045 Mission St, Apt 440
San Francisco, CA 94103

Education

BS Computer Science at University of Illinois at Urbana-Champaign - Urbana, IL
August 25, 2009 to May 10, 2012
- Minor in International Studies in Engineering, Japan
- Focused on systems software courses

Study Abroad at Hiroshima Institute of Technology - Hiroshima, Japan
May 25, 2010 to July 05, 2010
- Cultural exchange program

Employment

Software Engineer, i18n at Yelp, Inc. - San Francisco, CA
June 18, 2012 to now
- Developed several internal tools and libraries
- Provided critical input and design work for Yelp's launch in Japan

Software Engineering Intern at Apple Inc. - Cupertino, CA
June 01, 2011 to August 30, 2011
- Built software framework for testing and verification of desktop retina display modes
- Assisted other interns with Unix fundamentals

Projects

Lead at ToAruOS - https://g...content-available-to-author-only...b.com/klange/toaruos
January 15, 2011 to now
- Hobby x86 Unix-like kernel and userspace
- Advanced in-house GUI with compositing window manager

Developer at Compiz Window Manager - http://c...content-available-to-author-only...z.org
January 27, 2008 to January 24, 2010
- Minor plugin contributor
- Various research projects