<?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: Didik Supriadi</title>
    <description>The latest articles on DEV Community by Didik Supriadi (@didiksupriadi41).</description>
    <link>https://dev.to/didiksupriadi41</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F243480%2F70de7557-6fca-4a13-9d65-441e6f873b50.jpeg</url>
      <title>DEV Community: Didik Supriadi</title>
      <link>https://dev.to/didiksupriadi41</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/didiksupriadi41"/>
    <language>en</language>
    <item>
      <title>Set up OpenGL Utility Toolkit (GLUT) and Codeblocks on Linux</title>
      <dc:creator>Didik Supriadi</dc:creator>
      <pubDate>Mon, 27 Jan 2020 17:54:46 +0000</pubDate>
      <link>https://dev.to/didiksupriadi41/set-up-opengl-utility-toolkit-glut-and-codeblocks-on-linux-la3</link>
      <guid>https://dev.to/didiksupriadi41/set-up-opengl-utility-toolkit-glut-and-codeblocks-on-linux-la3</guid>
      <description>&lt;p&gt;Before we continue, let’s discuss something about GLUT and Codeblocks.&lt;/p&gt;

&lt;p&gt;Here we use &lt;a href="http://freeglut.sourceforge.net"&gt;FreeGLUT&lt;/a&gt; instead of the original &lt;a href="https://github.com/markkilgard/glut"&gt;GLUT&lt;/a&gt; written by &lt;a href="https://en.wikipedia.org/wiki/Mark_Kilgard"&gt;Mark Kilgard&lt;/a&gt;. FreeGLUT is an open source alternative to the OpenGL Utility Toolkit (GLUT) library with a free software license. FreeGLUT allows us to create and manage windows containing OpenGL contexts on a wide range of platforms and also read the mouse, keyboard, and joystick functions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codeblocks.org/"&gt;Codeblocks&lt;/a&gt; is a free C++ IDE that is extensible and configurable. Codeblocks can be extended with plug-in DLLs and even you can compile your own plug-ins.&lt;/p&gt;

&lt;p&gt;Before we begin to set up, let’s prepare some packages that need to be installed beforehand.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install Codeblocks
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;On &lt;strong&gt;Fedora&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo dnf install codeblocks
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;On &lt;strong&gt;Ubuntu&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install codeblocks
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Install FreeGLUT
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;On &lt;strong&gt;Fedora&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo dnf install freeglut-devel
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;On &lt;strong&gt;Ubuntu&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install freeglut3-dev
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Set up GLUT in Codeblocks
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open Codeblocks
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kZU0k_FL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i1.wp.com/i3.ninja/wp-content/uploads/2020/01/Screenshot-from-2020-01-27-23-48-46.png%3Fw%3D616%26ssl%3D1" alt=""&gt;
&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Settings&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Global variables…&lt;/strong&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q0_H78Eo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i1.wp.com/i3.ninja/wp-content/uploads/2020/01/Screenshot-from-2020-01-27-23-50-25.png%3Fw%3D616%26ssl%3D1" alt=""&gt;
&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Current variable&lt;/strong&gt; , click &lt;strong&gt;New&lt;/strong&gt; and create &lt;strong&gt;glut&lt;/strong&gt; variable
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LbnAfrzP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i1.wp.com/i3.ninja/wp-content/uploads/2020/01/Screenshot-from-2020-01-27-23-51-26.png%3Fw%3D616%26ssl%3D1" alt=""&gt;
&lt;/li&gt;
&lt;li&gt;Fill in each field as shown below, and click &lt;strong&gt;Close&lt;/strong&gt; when finish

&lt;ul&gt;
&lt;li&gt;On &lt;strong&gt;Ubuntu&lt;/strong&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nuNvF-4_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i1.wp.com/i3.ninja/wp-content/uploads/2020/01/Screenshot-from-2020-01-28-00-09-08.png%3Fw%3D616%26ssl%3D1" alt=""&gt;
&lt;/li&gt;
&lt;li&gt;On &lt;strong&gt;Fedora&lt;/strong&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--E3D6Rr-c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i2.wp.com/i3.ninja/wp-content/uploads/2020/01/Screenshot-from-2020-01-28-00-11-59.png%3Fw%3D616%26ssl%3D1" alt=""&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Let’s try to create a new project
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open the project wizard &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oKxp7ry3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i0.wp.com/i3.ninja/wp-content/uploads/2020/01/Screenshot-from-2020-01-28-00-14-13.png%3Fw%3D616%26ssl%3D1" alt=""&gt;
&lt;/li&gt;
&lt;li&gt;Create a “HelloWorld” Project
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7J71a_jB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i0.wp.com/i3.ninja/wp-content/uploads/2020/01/Screenshot-from-2020-01-28-00-15-22.png%3Fw%3D616%26ssl%3D1" alt=""&gt;
&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;glut&lt;/strong&gt; global variable
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--29shvvUf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i2.wp.com/i3.ninja/wp-content/uploads/2020/01/Screenshot-from-2020-01-28-00-15-51.png%3Fw%3D616%26ssl%3D1" alt=""&gt;
&lt;/li&gt;
&lt;li&gt;Leave the default compiler configuration as it is and then click &lt;strong&gt;Finish&lt;/strong&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KcZCbIs9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i0.wp.com/i3.ninja/wp-content/uploads/2020/01/Screenshot-from-2020-01-28-00-15-56.png%3Fw%3D616%26ssl%3D1" alt=""&gt;
&lt;/li&gt;
&lt;li&gt;A demo project will be created as shown in below
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1K3fsfH5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i2.wp.com/i3.ninja/wp-content/uploads/2020/01/Screenshot-from-2020-01-28-00-16-12.png%3Fw%3D616%26ssl%3D1" alt=""&gt;
&lt;/li&gt;
&lt;li&gt;Run the demo project, and we’ll see this wonderful objects
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RLXbqVMx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i0.wp.com/i3.ninja/wp-content/uploads/2020/01/Screenshot-from-2020-01-28-00-16-44.png%3Fw%3D616%26ssl%3D1" alt=""&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;Photo by &lt;a href="https://unsplash.com/@olia?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Olia Gozha&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/white?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>codeblocks</category>
      <category>fedora</category>
      <category>glut</category>
    </item>
    <item>
      <title>Packaging nanime in Fedora COPR</title>
      <dc:creator>Didik Supriadi</dc:creator>
      <pubDate>Thu, 16 Jan 2020 08:59:37 +0000</pubDate>
      <link>https://dev.to/didiksupriadi41/packaging-nanime-in-fedora-copr-5foa</link>
      <guid>https://dev.to/didiksupriadi41/packaging-nanime-in-fedora-copr-5foa</guid>
      <description>&lt;p&gt;Over the last summer of 2015, I’ve been watching anime as an enjoyable entertainment. To watch anime, it forces me to watch video by streaming “on browser”. I found it is very annoying since video player provided by video streaming services is very awful.&lt;/p&gt;

&lt;p&gt;Recently, I created &lt;a href="https://copr.fedorainfracloud.org/coprs/didiksupriadi41/nanime/"&gt;nanime&lt;/a&gt;. I named it “nanime” because it currently only serves anime links from &lt;a href="https://nanime.yt"&gt;nanime.yt&lt;/a&gt; and since there are no other programs using it. This program will fetch videos of each anime episodes, provided the anime URL from &lt;a href="https://nanime.yt"&gt;nanime.yt&lt;/a&gt; is given.&lt;/p&gt;

&lt;p&gt;In this article, I’ll cover and share how I…&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Created the RPM SPEC file&lt;/li&gt;
&lt;li&gt;Built the package in COPR&lt;/li&gt;
&lt;li&gt;Found mistakes&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Creating RPM SPEC file
&lt;/h2&gt;

&lt;p&gt;I read about rpm packaging in &lt;a href="https://docs.fedoraproject.org/en-US/packaging-guidelines/"&gt;Fedora Packaging Guidelines&lt;/a&gt;. It’s a good guide, though I end up reading &lt;a href="https://rpm-packaging-guide.github.io/rpm-packaging-guide.pdf"&gt;rpm-packaging-guide&lt;/a&gt; since it has PDF version. The reason is only because I have my phone everywhere so that I can easily read PDF without opening my browser.&lt;/p&gt;

&lt;p&gt;Since nanime is implemented with bash, I can easily implement the SPEC file. Anyway, it’s a very simple application at the first place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building package
&lt;/h2&gt;

&lt;p&gt;First, I create the source package from SPEC file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rpmbuild -bs ~/rpmbuild/SPECS/nanime.spec
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;And then, I create the binary package&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rpmbuild -bb ~/rpmbuild/SPECS/nanime.spec
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Actually, I can also create both of them simultaneously&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rpmbuild -ba ~/rpmbuild/SPECS/nanime.spec
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Lastly, I can build my package in COPR service&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;copr-cli build nanime ~/rpmbuild/SRPMS/nanime-0.1-1.fc31.src.rpm
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Finding mistakes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Fixing bugs
&lt;/h3&gt;

&lt;p&gt;I didn’t test my code thoroughly before building the project in COPR causing a very hurtful slap on my face.&lt;/p&gt;

&lt;h3&gt;
  
  
  Signing package
&lt;/h3&gt;

&lt;p&gt;Even though adding GPG sign to a package is not a must, It’s a good thing to do and nothing to lose anyway. &lt;a href="https://rpm-packaging-guide.github.io/rpm-packaging-guide.pdf"&gt;rpm-packaging-guide&lt;/a&gt; also gives a good case where Signed-package is very useful.&lt;/p&gt;

</description>
      <category>uncategorized</category>
      <category>anime</category>
      <category>copr</category>
      <category>fedora</category>
    </item>
    <item>
      <title>Starting to write articles</title>
      <dc:creator>Didik Supriadi</dc:creator>
      <pubDate>Tue, 07 Jan 2020 12:14:17 +0000</pubDate>
      <link>https://dev.to/didiksupriadi41/starting-to-write-articles-2b9h</link>
      <guid>https://dev.to/didiksupriadi41/starting-to-write-articles-2b9h</guid>
      <description>&lt;p&gt;I’ve been spending my time reading articles lately. I love reading them because they are written by people who cares about sharing. The more I read those articles, it builds my interest to write my own version, my original story.&lt;/p&gt;

&lt;p&gt;And that’s where I decide to create this site. I would like to share some experiences that I have been through, also some knowledge that I learn, and maybe some arbitrary thought to ponder. it’s all for the sake of my wish to tell all my experiences to the world.&lt;/p&gt;

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