<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: daveclarke</title>
    <description>The latest articles on DEV Community by daveclarke (@daveclarke).</description>
    <link>https://dev.to/daveclarke</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F20991%2F8e48eb3f-8188-40a3-8fde-781e99b4c2e5.jpeg</url>
      <title>DEV Community: daveclarke</title>
      <link>https://dev.to/daveclarke</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/daveclarke"/>
    <language>en</language>
    <item>
      <title>Going Rogue</title>
      <dc:creator>daveclarke</dc:creator>
      <pubDate>Wed, 16 Jun 2021 07:50:50 +0000</pubDate>
      <link>https://dev.to/daveclarke/going-rogue-5fc4</link>
      <guid>https://dev.to/daveclarke/going-rogue-5fc4</guid>
      <description>&lt;p&gt;Once upon a time I was at University doing a maths and computer science degree (and presumably provided subject matter for the &lt;a href="https://en.wikipedia.org/wiki/Bastard_Operator_From_Hell"&gt;BOFH&lt;/a&gt; but that's a different story). The University had a shiny &lt;a href="https://en.wikipedia.org/wiki/VAX"&gt;DEC VAX 11/780&lt;/a&gt; running VMS. The computer lab was an underground bunker with a bunch of physical terminals. Second year students were allowed a key to access it after hours. Yes a physical key. What did comp-sci students do after hours back in 1984? We played &lt;a href="https://en.wikipedia.org/wiki/Rogue_(video_game)"&gt;Rogue&lt;/a&gt; on a VAX 11/780. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;While Rogue was not the first dungeon-crawling game with procedural generation features, it introduced the subgenre of roguelike RPG procedurally generated dungeon crawlers with Dungeons-and-Dragons-like items (armor, weapons, potions, and magic scrolls) that also had permadeath (permanent death) and an overhead graphical view — albeit via ASCII drawings, as opposed to text descriptions in natural language such as can be seen in Adventure/Colossal Cave and the original Zork games.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A couple of years ago I was feeling a little nostalgic so I googled to see whether Rogue was still available. I started out looking for a Mac port but the only ones I could find were pre-osx. I did however find a &lt;a href="https://coredumpcentral.org/files/linrog37.zip"&gt;linux port download&lt;/a&gt; at &lt;a href="https://coredumpcentral.org/download.html"&gt;Rogue Central&lt;/a&gt;. Having downloaded the source to my mac I was then faced with the question of how to run it. Docker to the rescue. Fast forward and while I really like Docker, the most recent Docker Desktop for Mac update hosed all my containers and images. So here is the trivial process to at least get my Rogue container back.&lt;/p&gt;

&lt;p&gt;I subsequently discovered the Docker &lt;code&gt;gcc&lt;/code&gt; image now throws an error when compiling the original source (and a bunch of warnings). Not to worry, I loaded the source into &lt;a href="https://github.com/daveclarke/linuxrogue"&gt;github&lt;/a&gt;, removed the offending line of code, and added a script, &lt;code&gt;docker_run&lt;/code&gt; to create and run the container.&lt;/p&gt;

&lt;p&gt;The first step is to clone or download the source.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mkdir -p ~/Projects/linuxrogue-0.3.7-roguecentral
$ cd !$
$ git clone https://github.com/daveclarke/linuxrogue.git .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're already running Linux or have a Linux distro running under WSL you can just run &lt;code&gt;make&lt;/code&gt; and generate a working executable. Otherwise this needs to be run in a Linux container using the appropriately named image &lt;code&gt;gcc&lt;/code&gt;. Either run the &lt;code&gt;docker_run&lt;/code&gt; script or type the following in to the shell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ docker run \
  --name gcc \
  -v ~/Projects/linuxrogue-0.3.7-roguecentral:/src \
  -it \
  gcc /bin/bash 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The script creates a new container called &lt;code&gt;gcc&lt;/code&gt; and drops you into a bash shell in the container. Building the source is easy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# cd /src/linuxrogue-0.3.7
# make
# ./rogue
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For subsequent access if the &lt;code&gt;gcc&lt;/code&gt; container is already running, access the container via:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ docker exec -it gcc /bin/bash
# cd /src/linuxrogue-0.3.7
# ./rogue
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Press the ? key for a synopsis of the commands. Game on like it's 1984!&lt;/p&gt;

</description>
      <category>docker</category>
      <category>linux</category>
    </item>
    <item>
      <title>Hi, I'm daveclarke</title>
      <dc:creator>daveclarke</dc:creator>
      <pubDate>Mon, 05 Jun 2017 20:24:44 +0000</pubDate>
      <link>https://dev.to/daveclarke/hi-im-daveclarke</link>
      <guid>https://dev.to/daveclarke/hi-im-daveclarke</guid>
      <description>&lt;p&gt;I have been coding for 30 years.&lt;/p&gt;

&lt;p&gt;You can find me on GitHub as &lt;a href="https://github.com/daveclarke" rel="noopener noreferrer"&gt;daveclarke&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I live in Cambridge, New Zealand.&lt;/p&gt;

&lt;p&gt;I work for Zebra Crossing.&lt;/p&gt;

&lt;p&gt;I mostly program in these languages: C#.&lt;/p&gt;

&lt;p&gt;I am currently learning more about Vue.&lt;/p&gt;

&lt;p&gt;Nice to meet you.&lt;/p&gt;

</description>
      <category>introduction</category>
    </item>
  </channel>
</rss>
