{"id":185,"date":"2008-08-02T18:11:05","date_gmt":"2008-08-03T02:11:05","guid":{"rendered":"http:\/\/wp.colliertech.org\/cj\/?p=185"},"modified":"2008-08-02T18:35:18","modified_gmt":"2008-08-03T02:35:18","slug":"writing-free-software-part-1","status":"publish","type":"post","link":"https:\/\/wp.c9h.org\/cj\/?p=185","title":{"rendered":"Writing Free Software &#8211; Part 1"},"content":{"rendered":"<p>There are a lot of folks who want to learn how to write software, I hear.  So I&#8217;ll see if I can write something up about it.<\/p>\n<p>I&#8217;m going to assume that the reader has at their disposal an i386-class computer running Ubuntu or Debian.  This will all probably work for other operating systems, but it&#8217;s what I&#8217;ve got, and I&#8217;m not going to bend over backwards. :)  I&#8217;m also going to write it in C#.  Get over it.  If something doesn&#8217;t work for you, if I miss a prerequisite or whatever, you can send me an email and I&#8217;ll fix the post.<\/p>\n<h3>Install the C# compiler<\/h3>\n<pre><b>$<\/b> sudo apt-get install mono-gmcs<\/pre>\n<p>pretty easy, eh?<\/p>\n<h3>create a workspace<\/h3>\n<pre><b>$<\/b> mkdir -p ~\/src\/greeting<\/pre>\n<p>Also pretty easy.<\/p>\n<h3>Write a simple app<\/h3>\n<pre style=\"color: grey; padding: 0px; margin: 0px;\">\r\n<b>$<\/b> cd ~\/src\/greeting\r\n<b>$<\/b> cat &gt; Greeting.cs\r\n\/\/ This brings in Console.Writeline, used below\r\nusing System;\r\n\r\nclass Greeting {\r\n  \/\/ This is the program entry point\r\n  public static int Main( string [] argc ){\r\n\r\n    \/\/ A simple operation to confirm that our app is running:\r\n    Console.WriteLine(\"Greetings, World!\"); \r\n\r\n    \/\/ Well-behaved software returns an int from Main\r\n    return 0;\r\n  }\r\n}\r\n^D\r\n<\/pre>\n<h3>Compile the app<\/h3>\n<p><code><b>$<\/b> gmcs Greeting.cs<\/code><\/p>\n<h3>Run the app<\/h3>\n<p><code><br \/>\n<b>$<\/b> .\/Greeting.exe<br \/>\nGreetings, World!<br \/>\n<\/code><\/p>\n<h3>Summary<\/h3>\n<p>Okay, so that&#8217;s not all that impressive, I know.  I&#8217;m starting small.  I intend to teach folks how to write an autotools package, including support for producing and consuming pkg-config bits (app-name.pc files), internationalization, etc.  It&#8217;ll be fun, really.  Just give me a little while to get it finished. :)<\/p>\n\n<div class=\"twitter-share\"><a href=\"https:\/\/twitter.com\/intent\/tweet?via=cjamescollier\" class=\"twitter-share-button\">Tweet<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>There are a lot of folks who want to learn how to write software, I hear. So I&#8217;ll see if I can write something up about it. I&#8217;m going to assume that the reader has at their disposal an i386-class computer running Ubuntu or Debian. This will all probably work for other operating systems, but [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[180,38,188,190,17,79,116,47,7,166,130],"tags":[],"class_list":["post-185","post","type-post","status-publish","format-standard","hentry","category-autotools","category-c","category-cli","category-compiler","category-debian","category-free-software","category-language","category-linux","category-mono","category-software","category-ubuntu"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1YDIB-2Z","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/posts\/185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=185"}],"version-history":[{"count":0,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=\/wp\/v2\/posts\/185\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.c9h.org\/cj\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}