{"id":18110,"date":"2012-12-19T10:56:24","date_gmt":"2012-12-19T15:56:24","guid":{"rendered":"http:\/\/www.shamusyoung.com\/twentysidedtale\/?p=18110"},"modified":"2012-12-20T07:56:27","modified_gmt":"2012-12-20T12:56:27","slug":"postcards-from-linux-part-1","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=18110","title":{"rendered":"Postcards From Linux Part 1: Welcome to Linux"},"content":{"rendered":"<p><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/splash_linux.jpg' class='insetimage'   alt='splash_linux.jpg' title='splash_linux.jpg'\/><\/td><\/tr><\/table><\/p>\n<p>So I&#8217;m using Linux Mint now. I&#8217;ve been installing Linux now and again over the years. It&#8217;s always interesting, but eventually I end up back on Windows after running into a problem with an unreasonably difficult solution, or discovering some bit of needed software just isn&#8217;t available. Each time I try Linux, I make it a little farther before I hit the point of &#8220;it would be easier to return to Windows than to put up with this.&#8221; <\/p>\n<p>I haven&#8217;t gone back to Windows 7 because in order to properly install Win 7 this time I really ought to go in, back up EVERYTHING, and re-partition my hard drive so it makes some kind of logical sense. I&#8217;m not eager to do that, which is why we&#8217;re having this <em>Linux Adventure of Discovery and Bafflement!<\/em> and not just sucking it up and installing Windows.<\/p>\n<p>We&#8217;re on day five of the experiment now. Here are a bunch of random observations about the experience so far:<\/p>\n<p><!--more--><\/p>\n<h3>Minecraft<\/h3>\n<p><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/linux_minecraft.jpg' class='insetimage'   alt='linux_minecraft.jpg' title='linux_minecraft.jpg'\/><\/td><\/tr><\/table><\/p>\n<p>I have reached a point in my life where using a computer that can&#8217;t run Minecraft is simply not an option. I&#8217;ve disqualified Minecraft from all future GOTY awards, because otherwise it would just keep winning. Forever. It&#8217;s more than just a game, it&#8217;s part of how I relax and think. If I get stuck on a bit of code or want to listen to an audiobook, I do it while Minecraft-ing. <\/p>\n<p>I&#8217;m happy to say that Minecraft worked more or less flawlessly for me, right from the start. In fact, the <a href=\"http:\/\/www.technicpack.net\/\" title=\"Technic Pack for Minecraft!\">Technic pack<\/a> also worked flawlessly, which is good since that&#8217;s my double-favorite collection of Minecraft mods. <\/p>\n<h3>FTP<\/h3>\n<p><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/linux_ftp.jpg' class='insetimage'   alt='linux_ftp.jpg' title='linux_ftp.jpg'\/><\/td><\/tr><\/table><\/p>\n<p>I used FileZilla on Windows for all my my FTP needs, which includes uploading every single image you&#8217;ve ever seen on this site. FileZilla is available on Linux, and looks and operates just as before. Nice, sensible, stable, lovely software.<\/p>\n<h3>Games<\/h3>\n<p><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/linux_steam.jpg' class='insetimage'   alt='linux_steam.jpg' title='linux_steam.jpg'\/><\/td><\/tr><\/table><\/p>\n<p>Long-term, this is probably a deal-breaker. Linux support for games has been improving by leaps and bounds, and Steam for Linux is looking very promising. But we&#8217;re not quite there yet. I managed to get into the Steam on Linux beta, and under Linux my games library drops from 174 games to 16. That&#8217;s not Steam&#8217;s fault.  That&#8217;s just the simple, understandable fact that less than ten percent of all developers bother making a Linux port. I was actually surprised to find the number was that high.  (Most of my Linux games are indies. I&#8217;m sure the ratio would be even more depressing if I stuck to AAA games.)<\/p>\n<p>I&#8217;ve installed WINE, but I haven&#8217;t actually used it yet. <\/p>\n<p>Some interesting notes on performance:<\/p>\n<p>In using the Technic pack in Minecraft, my framerate seems slightly lower than it was on Windows. Under windows, I could use the (Technic) mod to increase the view distance above the normal Minecraft maximum and still enjoy a smooth experience. Under Linux, I have to lower the view distance down to Minecraft standard, and even then I get occasional hitches if I turn around quickly. <\/p>\n<p>HOWEVER:<\/p>\n<p>The Technic pack also has a mod where sleeping in a bed will drop the game into a high-speed simulation mode. (This is so that crops can grow and furnaces can cook while you sleep.) In Windows, the game usually ran at ~7x speed while sleeping, so that one minute of sleep was the equivalent of simply standing beside the bed for seven minutes. Under Linux, the sim runs at ~11x speed. <\/p>\n<p>Note that the first issue (visibility and framerate) is related more to graphics card and memory, while this latter issue (simulation speed) is mostly CPU bound.<\/p>\n<p>I can&#8217;t really draw any firm conclusions about this. The framerate problems could be an issue with the Java environment on Linux, or a problem with graphics driver throughput, or a problem with something the OS itself is doing. It&#8217;s impossible for me to say. Still, I find the discrepancy interesting.<\/p>\n<h3>Programming<\/h3>\n<p><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/octant_ide3.jpg' class='insetimage'   alt='octant_ide3.jpg' title='octant_ide3.jpg'\/><\/td><\/tr><\/table><\/p>\n<p>This is the big one. I&#8217;ve used Developer Studio for years. I love it. I don&#8217;t often love software, particularly from Microsoft, but if there&#8217;s a better development environment then I have yet to see it. Even the <a href=\"http:\/\/www.microsoft.com\/visualstudio\/eng\/products\/visual-studio-express-products\" title=\"Visual Studio Express\">Hippie Freeloader Edition<\/a> is excellent. <\/p>\n<p>More to the point, when my computer died I was in the middle of working on some very Windows-centric code. I&#8217;ve been trying to make portable code (or at least <em>theoretically<\/em> portable code) over the last couple of years, and leaning away from Microsoft-specific interfaces. But for this project I had thrown away this forward-thinking attitude and just embraced the Microsoft Windows API with reckless sloth. <\/p>\n<p>See, when you want to write some code to make a window, you want to use some pre-made code. API stands for <a href=\"http:\/\/en.wikipedia.org\/wiki\/Application_programming_interface\" title=\"Application programming interface\">Application programming interface<\/a>, which is the system you use to talk to code that someone else has written. Assuming you don&#8217;t want to re-invent the wheel and make your own code to draw Windows with beveled edges, track low-level data coming from input devices, and re-implement all the logic behind minimizing, maximizing, resizing, closing, overlapping, clicking, dragging, copying, pasting, highlighting, focusing, and disabling windows, then you want to use some existing code. <\/p>\n<p>The problem is that for Linux, Apple, and Microsoft, the code to do this is completely different. Not just different in the way that the code is written, but different in the way that the code is used. When the user clicks maximize, one GUI sends your application a <tt>Maximize<\/tt> message. Another one sends a resize message with a footnote that &#8220;this resize happened as a result of the user maximizing the window&#8221;. Perhaps the other one sends the application a notification that the window position has changed, and the program has to ask for more details if it wants to know the particulars.<\/p>\n<p>The upshot is that a programmer who wants to port a project from one operating system to another can&#8217;t just do Find &#038; Replace on their code to replace <tt>CreateMicrosoftWindow ()<\/tt> with <tt>CreateLinuxWindow ()<\/tt> and call it a day. The programmer is going to need to re-write huge sections of the program.  The more Windows code you use, the more re-writing you need to do and the more complex porting it will be. At some point the changes are so extensive that you&#8217;re basically starting over.<\/p>\n<p>In this project, I had used a LOT of VERY specific windows code. For the record, I&#8217;ve been working on the software that I used to make my <a href=\"http:\/\/www.youtube.com\/user\/drawntoknowledge\" title=\"Drawn to Knowledge - YouTube\">Drawn To Knowledge<\/a> videos. The interface is very complicated. (I&#8217;d show you a screenshot, but I can&#8217;t run it right now, because I&#8217;m on Linux.) There are many edit boxes, sliders, buttons, drop-down boxes, color pickers, and all kinds of other fussy little controls. <\/p>\n<p>Now I&#8217;m on Linux and cut off from my Microsoft development tools. I have a few options:<\/p>\n<ol>\n<li><strong>I could port to Linux.<\/strong> It might be good to learn how coding works here in Linux land. Porting my project would take a long time, and if I ever decided to move back to Windows then I&#8217;d have to port it again. This would be good for educational purposes, but not good for the project itself.<\/li>\n<li><strong>I could port to Qt.<\/strong> This is exactly the sort of situation Qt was made for: A platform-independent, interface-heavy application. On the other hand, <a href=\"?p=15758\" title=\"Project Octant Part 3: Using Qt\">I am not a fan of the Qt development environment<\/a>. When <a href=\"?p=15904\" title=\"Project Octant Part 8: The Time-Hole\">I ported Project Octant from Qt to Visual Studio<\/a>, it was like being given a hammer after spending all day pounding nails with a brick. You can grow accustomed to a clunky interface, but that&#8217;s not the same thing as having a good interface to begin with.\n<p>I could use Qt and it would be The Right Thing To Do for the purposes of portability. (My speed problems with Qt wouldn&#8217;t really be an issue. I wouldn&#8217;t be rendering interface elements into a 3D window, and speed is not as critical on this project.) But I really dislike the Qt environment and what it does to my workflow. Bleh. But maybe.<\/li>\n<li><strong>I could look for some other third-party solution.<\/strong>  In the past, my search for interface code has been focused on looking for things that will render interface stuff into a 3D window. Here, I just need generic window controls. Something like <a href=\"http:\/\/www.wxwidgets.org\/\" title=\"wxWidgets Cross Platform GUI Library\">wxWidgets<\/a> could get the job done. I&#8217;d still need to pick a development environment for Linux. But in theory once I was done with this port I ought to be able to go back to Windows if I wanted.\n<\/li>\n<\/ol>\n<p>I dunno. It&#8217;s a big decision and I don&#8217;t really know enough to make it yet. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I&#8217;m using Linux Mint now. I&#8217;ve been installing Linux now and again over the years. It&#8217;s always interesting, but eventually I end up back on Windows after running into a problem with an unreasonably difficult solution, or discovering some bit of needed software just isn&#8217;t available. Each time I try Linux, I make it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[273],"class_list":["post-18110","post","type-post","status-publish","format-standard","hentry","category-personal","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/18110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18110"}],"version-history":[{"count":0,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/18110\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}