<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bambang Purnomosidi D. P. on Medium]]></title>
        <description><![CDATA[Stories by Bambang Purnomosidi D. P. on Medium]]></description>
        <link>https://medium.com/@bpdp?source=rss-f42ea1563730------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*tId2SiPPJWBmP-Uc.jpeg</url>
            <title>Stories by Bambang Purnomosidi D. P. on Medium</title>
            <link>https://medium.com/@bpdp?source=rss-f42ea1563730------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 22:11:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bpdp/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Getting Started with F# for Linux]]></title>
            <link>https://medium.com/@bpdp/getting-started-with-f-for-linux-d142a2161eb9?source=rss-f42ea1563730------2</link>
            <guid isPermaLink="false">https://medium.com/p/d142a2161eb9</guid>
            <category><![CDATA[vim]]></category>
            <category><![CDATA[fsharp]]></category>
            <category><![CDATA[arch-linux]]></category>
            <dc:creator><![CDATA[Bambang Purnomosidi D. P.]]></dc:creator>
            <pubDate>Fri, 13 Jul 2018 04:42:18 GMT</pubDate>
            <atom:updated>2018-07-14T14:51:11.813Z</atom:updated>
            <content:encoded><![CDATA[<p>It turns out that preparing Linux for F# development environment is not trivial, especially for old-skool person like myself. Here’s the steps that I took (I am a lucky person to have Arch Linux):</p><ol><li>Install mono, it’s already available in most Linux distribution. In Arch Linux, just <strong>pacman -S mono</strong> (as root, or use sudo). I also downloaded <a href="https://www.microsoft.com/net/download/linux">.NET Core SDK</a> and extracted them to /opt/software/dotnet-dev-tools/. This location becomes the value of DOTNET_ROOT environment variable. If you use <a href="https://fishshell.com/">Fish</a> like me, put this in $HOME/.config/fish/config.fish: <em>set -x DOTNET_ROOT /opt/software/dotnet-dev-tools/dotnet-sdk</em>. If you use put this in $HOME/.bashrc: <em>export DOTNET_ROOT=/opt/software/dotnet-dev-tools/dotnet-sdk</em></li><li>Install <strong>nuget</strong>, get “Windows x86 Commandline” version. Don’t worry, it will run in <strong>mono</strong>. Put that in $PATH after creating <em>symlink</em> so that you get <strong>nuget</strong> — not <strong>nuget.exe</strong> (this one is a matter of subjective preferences).</li><li>Using <strong>nuget</strong>, install <strong>FSharp.Compiler.Tools</strong>: <em>nuget install </em>FSharp.Compiler.Tools — choose whatever directory to do this install. I put all of <strong>dotnet development tools </strong>in <em>/opt/software/dotnet-dev-tools</em>, so just <strong>cd </strong>into that dir and do that command inside.</li><li>Have some symlinks in FSharp.Compilter.Tools.<em>version/tools</em> directory. There are four symlinks which should be created: fsc for fsc.exe, fsi for fsi.exe, fsharpi for fsi.exe, fsiAnyCpu for fsiAnyCpu.exe. The fsharpi symlink in used by <strong>vim-fsharp</strong>. Put that <em>tools </em>directory in $PATH.</li><li>Install <a href="https://fake.build/">Fake</a> using <strong>dotnet </strong>as follow: dotnet tool install fake-cli --tool-path /opt/software/dotnet-dev-tools/</li><li>Set the PATH. Here’s mine:</li></ol><blockquote><em>set -x PATH $PATH /opt/software/dotnet-dev-tools/nuget/ /opt/software/dotnet-dev-tools/fsharp/tools/ /opt/software/dotnet-dev-tools/fake /opt/software/dotnet-dev-tools/dotnet-sdk/</em></blockquote><p>To make things simple, all of those environment variables can be set into a file and just <em>source</em> it whenever needed. Here’s mine in $HOME/env-fish/dotnet/dotnet-sdk:</p><blockquote>set -x PATH $PATH /opt/software/dotnet-dev-tools/nuget/ /opt/software/dotnet-dev-tools/fsharp/tools/ /opt/software/dotnet-dev-tools/fake /opt/software/dotnet-dev-tools/dotnet-sdk/</blockquote><blockquote>set -x DOTNET_ROOT /opt/software/dotnet-dev-tools/dotnet-sdk</blockquote><p>I use <strong>vim </strong>so I need to fetch the plugin. Install <a href="https://github.com/fsharp/vim-fsharp"><strong>vim-sharp</strong></a><strong> </strong>plugin. I use <strong>pathogen<em> </em></strong>for vim package manager. If you don’t create <em>fsharpi</em> symlink, chances are <strong>vim </strong>will complain.</p><p>Done!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d142a2161eb9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Membandingkan Stellar dengan Ethereum]]></title>
            <link>https://medium.com/@bpdp/membandingkan-stellar-dengan-ethereum-d4284bde10c?source=rss-f42ea1563730------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4284bde10c</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[stellar]]></category>
            <category><![CDATA[ico]]></category>
            <dc:creator><![CDATA[Bambang Purnomosidi D. P.]]></dc:creator>
            <pubDate>Thu, 24 May 2018 22:29:33 GMT</pubDate>
            <atom:updated>2018-05-24T22:29:33.339Z</atom:updated>
            <content:encoded><![CDATA[<p>Berikut ini saya tuliskan beberapa perbandingan antara platform blockchain Stellar dengan Ethereum. Mungkin bermanfaat jika anda ingin memilih platform untuk ICO (<em>Initial Coin Offering</em>).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a993ef4861126cfbfb76f6206a0f0e12/href">https://medium.com/media/a993ef4861126cfbfb76f6206a0f0e12/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4284bde10c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Welcome Changing Requirements?]]></title>
            <link>https://medium.com/@bpdp/welcome-changing-requirements-193a20841c5d?source=rss-f42ea1563730------2</link>
            <guid isPermaLink="false">https://medium.com/p/193a20841c5d</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[agile]]></category>
            <dc:creator><![CDATA[Bambang Purnomosidi D. P.]]></dc:creator>
            <pubDate>Mon, 11 Dec 2017 01:04:55 GMT</pubDate>
            <atom:updated>2017-12-11T01:04:55.121Z</atom:updated>
            <content:encoded><![CDATA[<p>This is the complete statement:</p><blockquote>Welcome changing requirements, even late in <br>development. Agile processes harness change for <br>the customer’s competitive advantage.</blockquote><p>Now you know where the statement come from: <a href="http://agilemanifesto.org/principles.html">Principles behind the Agile Manifesto</a>. Reminder first: YMMV. I don’t usually consider what I write is the right one, the more human involves in the subject, the more it usually “depends on context”.</p><p>I used to be a believer in the Agile Manifesto but looks like things are not going as initially intended. In practice, changing requirements always has negative impact. It shows incompetencies. The statement embrace chaos in software development and chaos is not good for developers. What I prefer is somewhat using semantic versioning to manage (changing) requirements.</p><p>The problem in the statement is rooted from client (product owner) who may feel that they may change their requirements and because they don’t have knowledge in software technology (usually), request for changes can vary from minor into major as they don’t know the impact of changes to software process. This is not good. Agile should not blatantly advertised that statement without proper explanation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=193a20841c5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Latest Pony Compiler in Arch Linux]]></title>
            <link>https://medium.com/@bpdp/latest-pony-in-arch-linux-dea6427bd77f?source=rss-f42ea1563730------2</link>
            <guid isPermaLink="false">https://medium.com/p/dea6427bd77f</guid>
            <category><![CDATA[ponylang]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[arch-linux]]></category>
            <dc:creator><![CDATA[Bambang Purnomosidi D. P.]]></dc:creator>
            <pubDate>Mon, 02 Oct 2017 00:22:14 GMT</pubDate>
            <atom:updated>2017-10-02T03:19:11.623Z</atom:updated>
            <content:encoded><![CDATA[<p>There’s a problem if you want to play around with <a href="https://www.ponylang.org/">Pony</a> in Arch Linux. Latest official package in Arch Linux is <a href="https://www.archlinux.org/packages/community/x86_64/ponyc/">0.18.1</a>, while upstream release is 0.19.2. You may think that you can compile from the source but this is problematic. As a distro with rolling-release and bleeding edge reputation, Arch uses LLVM 5.0.0 as the default, and yes while you still can use 3.9.1, you have to choose between those two since Pony can not be compiled with LLVM 5.0.0. If you are not LLVM addict, just choose 3.9.1 package and everything runs smoothly. What if you use LLVM 5.0.0 and don’t want to change LLVM into 3.9.1? What if you also don’t want to use <a href="https://hub.docker.com/r/ponylang/ponyc/">Docker</a>?</p><p>What I did was simple. I use RPM package, extract them, and then put some env variables. Here’s the details. In Arch Linux, install <a href="https://www.archlinux.org/packages/extra/any/rpmextract/">rpmextract</a> first. Get the <a href="https://bintray.com/pony-language/ponyc-rpm/ponyc#files">latest RPM package</a>, extract the package:</p><blockquote>rpmextract.sh ponyc-0.19.2–3934.d2f03bc.x86_64.rpm</blockquote><p>You will have usr dir as the result. Pony compiler and its files are in <em>usr/lib/pony/0.19.2–3934.d2f03bc</em>. Copy all files in that directory to <em>$HOME/software/pony/</em> (or wherever you want). Make a file to be sourced (I use <a href="http://fishshell.com/">fish</a>), ex in <em>$HOME/env/ponyc</em>:</p><blockquote>set -x PATH $PATH $HOME/software/pony/bin</blockquote><p>Here’s what you need if you use Bash:</p><blockquote>export PATH=$PATH: $HOME/software/pony/bin</blockquote><p>Now, source the file:</p><blockquote>$ source ~/env/ponyc</blockquote><p>compile <a href="https://tutorial.ponylang.org/getting-started/hello-world.html">Hello World</a>, don’t forget to use PIC and you are good to go.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dea6427bd77f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fighting Against Development Tools Complexities]]></title>
            <link>https://medium.com/@bpdp/fighting-against-development-tools-complexities-790d395d9ef1?source=rss-f42ea1563730------2</link>
            <guid isPermaLink="false">https://medium.com/p/790d395d9ef1</guid>
            <category><![CDATA[opam]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[rustlang]]></category>
            <category><![CDATA[ocaml]]></category>
            <category><![CDATA[development-tools]]></category>
            <dc:creator><![CDATA[Bambang Purnomosidi D. P.]]></dc:creator>
            <pubDate>Thu, 07 Sep 2017 03:58:31 GMT</pubDate>
            <atom:updated>2017-09-07T03:59:44.960Z</atom:updated>
            <content:encoded><![CDATA[<p>As a software developer, you may realize that to get started is not easy. You may need to setup your box before to do any development tasks. How do you usually get them configured for your computer? Using OS package manager you say. Yes, I usually get that answer from someone (or anyone) who are maybe still a bit new in this field: use pacman (you archer), use apt-get (you *buntu baby), use whatever package manager. This maybe right only for trivial code, but not for bigger projects. Why? You may need libraries with more than one version for your projects, different environment variables / configuration, different compiler version, etc. Imagine, you have Node.js 8.x.x from your package manager, but your other projecs need Node.js 6.x.x. Now you get the problems. Other problems might be related with <strong>redundancy</strong>. Below is the result of Arch Linux package manager — pacman when I try to install <strong>pandoc</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3FX9XbA7mS5mH6MilyYPJg.jpeg" /></figure><p>See? All I need is pandoc but all those dependencies are installed also. Then, what will happen if I also use <strong>cabal</strong> to install? the packages will go to <strong>$HOME/.cabal/packages</strong> which is redundant with all of those packages from OS package manager.</p><p>So, instead of living in complexities, I personally like the idea of Rust and OCaml (with OCaml has more options). Both only need their own package manager (<strong>rustup</strong> for Rust, <strong>opam</strong> for OCaml) to even install the compiler with the version up to you, for example, you may use <strong>rustup</strong> to install <strong>stable, beta, nightly </strong>version of Rust compiler (<strong>nightly </strong>can also be installed at the specific time). In <strong>opam</strong>, you may use that to install whatever version and have them living inside <strong>$HOME/.opam</strong> peacefully — all you need to do is <strong>switch </strong>if you need to change to another version.</p><p>Bottom line is, there is no need for OS packager to install compiler and its libraries, let the development tools package manager handle that well. I myself now do not have any packages from OS package manager. All I need is something like <strong>rustup </strong>or <strong>opam</strong> and my life is a bit simpler.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=790d395d9ef1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick Hack: Expose Web API on Top of Docker]]></title>
            <link>https://medium.com/@bpdp/quick-hack-expose-web-api-on-top-of-docker-19fdf2352017?source=rss-f42ea1563730------2</link>
            <guid isPermaLink="false">https://medium.com/p/19fdf2352017</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Bambang Purnomosidi D. P.]]></dc:creator>
            <pubDate>Tue, 31 Jan 2017 04:42:38 GMT</pubDate>
            <atom:updated>2017-01-31T06:07:41.607Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently need to expose some JSON resources for mobile clients. Here’s a quick hack — and step by step — to expose Web API on top of Docker. The service is exposed using Express, so I need to build my service on top of <strong>node:latest</strong> image. Details follow.</p><p>0. Open 2 terminal / shell. In one terminal, activate dockerd as root. The next commands are done in another terminal.<br>1. Create application first (see: <a href="https://github.com/bpdp/all-things-docker/tree/master/images/expressjs-restful">https://github.com/bpdp/all-things-docker/tree/master/images/expressjs-restful</a>)<br>2. Create Dockerfile: see Dockerfile inside the repo<br>3. Build docker image:</p><pre>$ docker build -t bpdp/express-web-api .</pre><p>You may see a bunch of messages as the result of build process:</p><pre>Sending build context to Docker daemon 7.68 kB<br>Step 1/8 : FROM node:latest<br>latest: Pulling from library/node<br>5040bd298390: Pull complete<br>fce5728aad85: Pull complete<br>76610ec20bf5: Pull complete<br>52f3db4b5710: Pull complete<br>7e5867712a67: Pull complete<br>563b602246dd: Pull complete<br>b63b7336ef88: Pull complete<br>Digest: sha256:aa90bf69be3b6c29d7c877a2a12414ec908272eaa91422732b9270a3e19b3421<br>Status: Downloaded newer image for node:latest<br> — -&gt; b554dc4860d7<br>Step 2/8 : RUN mkdir -p /usr/src/app<br> — -&gt; Running in b1c1cb7e3774<br> — -&gt; 95bc1f9227ea<br>Removing intermediate container b1c1cb7e3774<br>Step 3/8 : WORKDIR /usr/src/app<br> — -&gt; a9b3046ecb21<br>Removing intermediate container 6282e4041346<br>Step 4/8 : COPY package.json /usr/src/app/<br> — -&gt; ac5c4f018d05<br>Removing intermediate container 00144f4d66dc<br>Step 5/8 : RUN npm install<br>-&gt; Running in ebff082215ac<br>…. &lt; installation message &gt;<br>npm WARN expressjs-restful@1.0.0 No repository field.<br>npm info ok<br> — -&gt; d0270459b5c9<br>Removing intermediate container ebff082215ac<br>Step 6/8 : COPY . /usr/src/app<br> — -&gt; 6380ae399088<br>Removing intermediate container fdecaacbdd1d<br>Step 7/8 : EXPOSE 8080<br> — -&gt; Running in 9b126dc5ff31<br> — -&gt; bac6efa53f37<br>Removing intermediate container 9b126dc5ff31<br>Step 8/8 : CMD node index.js<br> — -&gt; Running in 9bd5ed9fb7e7<br> — -&gt; bf0167e88692<br>Removing intermediate container 9bd5ed9fb7e7<br>Successfully built bf0167e88692</pre><p>4. Image has been build, use this command to see the result:</p><pre>$ docker images<br>REPOSITORY TAG IMAGE ID CREATED SIZE<br>bpdp/express-web-api latest bf0167e88692 About a minute ago 663 MB<br>node latest b554dc4860d7 11 days ago 660 MB</pre><p>5. Run service:</p><pre>$ docker run -p 49160:8080 -d bpdp/express-web-api5f256434c6b2a05075d6647c56345702d0ad04df9b64960e9bacd891beef5420</pre><p>6. See docker process:</p><pre>$ docker ps<br>CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES<br>5f256434c6b2 bpdp/express-web-api “node index.js” 56 seconds ago Up 52 seconds 0.0.0.0:49160-&gt;8080/tcp keen_fermat</pre><p>7. If you want to see log from service:</p><pre>$ docker logs 5f256434c6b2<br>Running on <a href="http://localhost:8080/">http://localhost:8080</a></pre><p>8. Test the service:</p><p><em>Root service:</em></p><pre>$ curl -i localhost:49160 </pre><pre>HTTP/1.1 200 OK<br>X-Powered-By: Express<br>Content-Type: text/html; charset=utf-8<br>Content-Length: 268<br>ETag: W/”10c-hwhEZGfr800ouK/RU2Bmug”<br>Date: Sun, 29 Jan 2017 11:11:31 GMT<br>Connection: keep-alive</pre><pre>URI HTTP Method POST body Result<br> 1 listProducts GET empty Show list of all the products.<br> 2 show/:id GET empty Show details of a product.<br> 3 / GET service available</pre><p><em>List products:</em></p><pre>$ curl -i localhost:49160/listProducts</pre><pre>HTTP/1.1 200 OK<br>X-Powered-By: Express<br>Content-Type: application/json; charset=utf-8<br>Content-Length: 327<br>ETag: W/”147-hvM6C347UQoOIgHb8LCc3Q”<br>Date: Sun, 29 Jan 2017 11:12:02 GMT<br>Connection: keep-alive</pre><pre>[{“id”:2,”name”:”An ice sculpture”,”price”:12.5,”tags”:[“cold”,”ice”],”dimensions”:{“length”:7,”width”:12,”height”:9.5},”warehouseLocation”:{“latitude”:-78.75,”longitude”:20.4}},{“id”:3,”name”:”A blue mouse”,”price”:25.5,”dimensions”:{“length”:3.1,”width”:1,”height”:1},”warehouseLocation”:{“latitude”:54.4,”longitude”:-32.7}}]</pre><p><em>Show product</em></p><pre>$ curl -i localhost:49160/show/2</pre><pre>HTTP/1.1 200 OK<br>X-Powered-By: Express<br>Content-Type: application/json; charset=utf-8<br>Content-Length: 178<br>ETag: W/”b2-ir5Cps7qLLfUyxO/QbW2Gg”<br>Date: Sun, 29 Jan 2017 11:13:23 GMT<br>Connection: keep-alive</pre><pre>[{“id”:2,”name”:”An ice sculpture”,”price”:12.5,”tags”:[“cold”,”ice”],”dimensions”:{“length”:7,”width”:12,”height”:9.5},”warehouseLocation”:{“latitude”:-78.75,”longitude”:20.4}}]</pre><p>Now, you may study Dockerfile and .dockerignore which I already shared in my repo. Try to make your service run first, then dockerized the service using the steps above. Good luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19fdf2352017" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bash Script to Manage Atom IDE for Many Dev Tools]]></title>
            <link>https://medium.com/@bpdp/bash-script-to-manage-atom-ide-for-many-dev-tools-7a26d1b8e5ab?source=rss-f42ea1563730------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a26d1b8e5ab</guid>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[atom]]></category>
            <category><![CDATA[devtools]]></category>
            <dc:creator><![CDATA[Bambang Purnomosidi D. P.]]></dc:creator>
            <pubDate>Wed, 28 Dec 2016 00:50:21 GMT</pubDate>
            <atom:updated>2016-12-28T00:50:21.519Z</atom:updated>
            <content:encoded><![CDATA[<p>I usually use <a href="http://www.vim.org/">vim</a> for my development activities but <a href="http://atom.io/">Atom</a> gives me more choices towards IDE. Atom has many packages for many compiler/interpreter and their tooling. For dev tools freak like me, having only one or some packages for one programming language compiler / interpreter is not enough. For example, currently I manage to use Atom for Go, Rust, Nuclide, Julia, Crystal, Pony, and OCaml. Surely I can use apm to manage all packages for them but that would be too crowded when I enter Atom. Therefore, I intend to group them based on their primary programming language. What I do is (for example — using Nuclide), to install nuclide package, delete $HOME/.atom then apm install nuclide then mv $HOME/.atom $HOME/.atom-nuclide. Next, I will do the same with other dev tools. In the end, I have $HOME/.atom-go, $HOME/.atom-nuclide, etc. Then I created this Bash script to manage them:</p><pre>#!/usr/bin/bash</pre><pre># If you use Atom and you have too many packages based on <br># your dev tools, probably easier to group them into dir <br># based on your dev tools. Ex:<br># <br># you want to install nuclide package, delete $HOME/.atom<br># then &quot;apm install nuclide&quot;, mv $HOME/.atom $HOME/.atom-nuclide, <br># <br># Do that for other dev tools, then use this script to manage them<br>#</pre><pre>if [ -e &quot;$HOME/.atom&quot; ]; then<br>  rm &quot;$HOME/.atom&quot;<br>fi<br>echo &quot;Do you want to check and upgrade all packages [y/n, Enter=no]?&quot;<br>read wantcheck<br>if [ &quot;$wantcheck&quot; == &quot;y&quot; ]; then<br>  echo &quot;Check and update all packages ...&quot;<br>  echo &quot;Go ...&quot;<br>  ln -s $HOME/.atom-go $HOME/.atom<br>  apm update<br>  rm &quot;$HOME/.atom&quot;<br>  echo &quot;Rust ...&quot;<br>  ln -s $HOME/.atom-rust $HOME/.atom<br>  apm update<br>  rm &quot;$HOME/.atom&quot;<br>  echo &quot;Nuclide ...&quot;<br>  ln -s $HOME/.atom-nuclide $HOME/.atom<br>  apm update<br>  rm &quot;$HOME/.atom&quot;<br>  echo &quot;Julia ...&quot;<br>  ln -s $HOME/.atom-julia $HOME/.atom<br>  apm update<br>  rm &quot;$HOME/.atom&quot;<br>  echo &quot;Crystal ...&quot;<br>  ln -s $HOME/.atom-crystal $HOME/.atom<br>  apm update<br>  rm &quot;$HOME/.atom&quot;<br>  echo &quot;Pony ...&quot;<br>  ln -s $HOME/.atom-pony $HOME/.atom<br>  apm update<br>  rm &quot;$HOME/.atom&quot;<br>  echo &quot;OCaml ...&quot;<br>  ln -s $HOME/.atom-ocaml $HOME/.atom<br>  apm update<br>fi<br>if [ -e &quot;$HOME/.atom&quot; ]; then<br>  rm &quot;$HOME/.atom&quot;<br>fi</pre><pre>echo<br>echo &quot;Current choice:&quot;<br>echo<br>if [ -e &quot;$HOME/.atom&quot; ]; then<br>  ls -la $HOME | grep &quot;\-&gt;&quot; | grep &quot;atom&quot;<br>  echo<br>else<br>  echo &quot;Atom packages have not been activated yet&quot;<br>  echo<br>fi</pre><pre>echo &quot;Choose your Atom IDE package:&quot;<br>echo &quot;[1] Go&quot;<br>echo &quot;[2] Rust&quot;<br>echo &quot;[3] Nuclide (React Native)&quot;<br>echo &quot;[4] Julia&quot;<br>echo &quot;[5] Crystal&quot;<br>echo &quot;[6] Pony&quot;<br>echo &quot;[7] OCaml&quot;<br>echo &quot;[8] Delete symlink $HOME/.atom&quot;<br>echo &quot;[x] Exit&quot;<br>echo<br>echo &quot;Your choice: &quot;<br>read pil</pre><pre>if [ &quot;$pil&quot; == 1 ]; then<br>  echo &quot;Proceed with Go ...&quot;<br>  if [ -e &quot;$HOME/.atom&quot; ]; then<br>    rm &quot;$HOME/.atom&quot;<br>  fi<br>  ln -s $HOME/.atom-go $HOME/.atom<br>elif [ &quot;$pil&quot; == 2 ]; then<br>  echo &quot;Proceed with Rust ...&quot;<br>  if [ -e &quot;$HOME/.atom&quot; ]; then<br>    rm &quot;$HOME/.atom&quot;<br>  fi<br>  ln -s $HOME/.atom-rust $HOME/.atom<br>elif [ &quot;$pil&quot; == 3 ]; then<br>  echo &quot;Proceed with Nuclide ...&quot;<br>  if [ -e &quot;$HOME/.atom&quot; ]; then<br>    rm &quot;$HOME/.atom&quot;<br>  fi<br>  ln -s $HOME/.atom-nuclide $HOME/.atom<br>elif [ &quot;$pil&quot; == 4 ]; then<br>  echo &quot;Proceed with Julia&quot;<br>  if [ -e &quot;$HOME/.atom&quot; ]; then<br>    rm &quot;$HOME/.atom&quot;<br>  fi<br>  ln -s $HOME/.atom-julia $HOME/.atom<br>elif [ &quot;$pil&quot; == 5 ]; then<br>  echo &quot;Proceed with Crystal&quot;<br>  if [ -e &quot;$HOME/.atom&quot; ]; then<br>    rm &quot;$HOME/.atom&quot;<br>  fi<br>  ln -s $HOME/.atom-crystal $HOME/.atom<br>elif [ &quot;$pil&quot; == 6 ]; then<br>  echo &quot;Proceed with Pony&quot;<br>  if [ -e &quot;$HOME/.atom&quot; ]; then<br>    rm &quot;$HOME/.atom&quot;<br>  fi<br>  ln -s $HOME/.atom-pony $HOME/.atom<br>elif [ &quot;$pil&quot; == 7 ]; then<br>  echo &quot;Proceed with OCaml&quot;<br>  if [ -e &quot;$HOME/.atom&quot; ]; then<br>    rm &quot;$HOME/.atom&quot;<br>  fi<br>  ln -s $HOME/.atom-ocaml $HOME/.atom<br>elif [ &quot;$pil&quot; == 8 ]; then<br>  echo &quot;Delete $HOME/.atom symlink&quot;<br>  rm &quot;$HOME/.atom&quot;<br>else<br>  echo &quot;Finish&quot;<br>fi</pre><p>Put the script somewhere and let the $PATH point to that location (mine is $HOME/bin/choose-atom-IDE.sh).</p><p>Now, let’s say I want to do dev tasks using nuclide, what I need to do is:</p><blockquote>$ choose-atom-IDE.sh <br>Do you want to check and upgrade all packages [y/n, Enter=no]?</blockquote><blockquote>Current choice:</blockquote><blockquote>Atom packages have not been activated yet</blockquote><blockquote>Choose your Atom IDE package:<br>[1] Go<br>[2] Rust<br>[3] Nuclide (React Native)<br>[4] Julia<br>[5] Crystal<br>[6] Pony<br>[7] OCaml<br>[8] Delete symlink /home/bpdp/.atom<br>[x] Exit</blockquote><blockquote>Your choice: <br>3<br>Proceed with Nuclide …<br>$ atom</blockquote><p>Sometimes, I want to check all packages for the dev tools that exist on my box. What I do is simple:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*8TcwdFh_cCDWq8zjo6-zXA.png" /></figure><p>Now I can comfortably use Atom for many development tools.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a26d1b8e5ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rust Compilation Target to JS with Emscripten]]></title>
            <link>https://medium.com/@bpdp/rust-compilation-target-to-js-with-emscripten-39d548766cc0?source=rss-f42ea1563730------2</link>
            <guid isPermaLink="false">https://medium.com/p/39d548766cc0</guid>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[webassembly]]></category>
            <category><![CDATA[emscripten]]></category>
            <category><![CDATA[rustup]]></category>
            <dc:creator><![CDATA[Bambang Purnomosidi D. P.]]></dc:creator>
            <pubDate>Fri, 23 Dec 2016 12:52:02 GMT</pubDate>
            <atom:updated>2016-12-23T12:53:19.336Z</atom:updated>
            <content:encoded><![CDATA[<p>Just for the record, I am trying to cross compile Rust source code to JavaScript (asmjs and WebAssembly) but could not get them compiled. Later on I realize from Rustup manual that I need to install target for both asmjs and WebAssembly first. So, since I already got my Emscripten installed, just install those two targets:</p><blockquote>rustup target add wasm32-unknown-emscripten</blockquote><p>for WebAssembly, and:</p><blockquote>rustup target add wasm32-unknown-emscripten</blockquote><p>for asmjs.</p><p>Now I can compile Rust to js:</p><blockquote>rustc — target=asmjs-unknown-emscripten hello.rs</blockquote><p>Here’s the result from hello.rs:</p><blockquote>fn main() { println!(“Hello, Emscripten!”); }</blockquote><p>hello.js:</p><blockquote>$ ls<br>total 1048<br>drwxr-xr-x 1 bpdp users 32 Dec 23 19:28 .<br>drwxr-xr-x 1 bpdp users 54 Dec 23 16:16 ..<br>-rw-r — r — 1 bpdp users 1066117 Dec 23 19:28 hello.js<br>-rw-r — r — 1 bpdp users 46 Dec 23 16:16 hello.rs<br>$ node hello.js <br>Hello, Emscripten!<br>$</blockquote><p>1,066,117 bytes. Quite big, compared with C++ source code which is compiled directly by Emscripten using <strong>emcc hello.cpp</strong></p><blockquote>#include &lt;stdio.h&gt;</blockquote><blockquote>class Test {}; // This will fail in C mode</blockquote><blockquote>int main() {<br> printf(“hello, world!\n”);<br> return 0;<br>}</blockquote><p>Here’s the result:</p><blockquote>$ ls<br>total 300<br>drwxr-xr-x 1 bpdp users 54 Dec 23 16:16 .<br>drwxr-xr-x 1 bpdp users 414 Dec 23 15:57 ..<br>-rw-r — r — 1 bpdp users 301027 Dec 23 16:13 a.out.js<br>-rw-r — r — 1 bpdp users 121 Dec 23 15:57 hello_world.cpp<br>drwxr-xr-x 1 bpdp users 32 Dec 23 19:28 rust<br>$</blockquote><p>C++ version: 301,027 bytes. Since this compilation target is still experimental, I hope things will get better.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39d548766cc0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Development Tools Installer — The Next Episode]]></title>
            <link>https://medium.com/@bpdp/development-tools-installer-the-next-episode-2358b162527f?source=rss-f42ea1563730------2</link>
            <guid isPermaLink="false">https://medium.com/p/2358b162527f</guid>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[ocaml]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[rustup]]></category>
            <category><![CDATA[opam]]></category>
            <dc:creator><![CDATA[Bambang Purnomosidi D. P.]]></dc:creator>
            <pubDate>Wed, 21 Dec 2016 04:37:47 GMT</pubDate>
            <atom:updated>2016-12-21T04:48:15.681Z</atom:updated>
            <content:encoded><![CDATA[<p>I surely don’t want to predict but what I think I am going to tell you is things that maybe changed in the future towards how developers install their development tools. Note that this post is only for installation inside full blown OS, not PaaS or toolchain as a service or other similar situation.</p><p>To those of you who use <a href="https://nixos.org/">NixOS</a> with its <a href="https://nixos.org/nix/">Nix</a> package manager, things are seem ideal for many kind of software installation, we may even install more than one version for one software inside one OS. I sense that this kind of things are getting more fans in software development world, including myself. Two of 2 development tools and its toolchain which have the same abilities are <a href="http://ocaml.org/">OCaml</a> and <a href="https://www.rust-lang.org/en-US/">Rust</a>.</p><p>OCaml and Rust use the same installation method although “traditional method” will still be maintained — you use your package manager from your OS (like mine, “pacman — S rust” for example) or extract from binary distribution (tar and then run install.sh inside Rust bin dist for example). I do not prefer those installation method anymore. The reason why I don’t want to use that method is simple. There are many versions of development tools (you see, Rust always come with stable, beta, and nightly — OCaml has 4.02, 4.03, 4.04, and maybe more) and using one version is not enough (example: you want to install Reason from facebook, you need OCaml 4.02.3, but your OS has 4.04).</p><p>What I see now is that more and more development tools create one installer to install and manage toolchain version. For Rust, you have <a href="http://www.rustup.rs/">rustup</a>, for OCaml you have <a href="https://github.com/ocaml/opam">opam</a>. Here’s a shapshot of my Rust toolchain installed in my OS:</p><blockquote>$ rustup show<br>Default host: x86_64-unknown-linux-gnu</blockquote><blockquote>installed toolchains<br> — — — — — — — — — —</blockquote><blockquote>stable-x86_64-unknown-linux-gnu (default)<br>beta-x86_64-unknown-linux-gnu<br>nightly-x86_64-unknown-linux-gnu</blockquote><blockquote>active toolchain<br> — — — — — — — —</blockquote><blockquote>stable-x86_64-unknown-linux-gnu (default)<br>rustc 1.13.0 (2c6933acc 2016–11–07)</blockquote><blockquote>$</blockquote><p>What if I want to update them? very simple:</p><blockquote>$ rustup update<br>info: syncing channel updates for ‘stable-x86_64-unknown-linux-gnu’<br>info: syncing channel updates for ‘beta-x86_64-unknown-linux-gnu’<br>info: downloading component ‘rustc’<br> 48.0 MiB / 48.0 MiB (100 %) 246.4 KiB/s ETA: 0 s <br>info: downloading component ‘rust-std’<br> 61.6 MiB / 61.6 MiB (100 %) 1.8 MiB/s ETA: 0 s <br>info: downloading component ‘cargo’<br> 4.0 MiB / 4.0 MiB (100 %) 554.2 KiB/s ETA: 0 s <br>info: installing component ‘rustc’<br>info: installing component ‘rust-std’<br>info: installing component ‘cargo’<br>info: syncing channel updates for ‘nightly-x86_64-unknown-linux-gnu’<br>info: checking for self-updates</blockquote><blockquote>stable-x86_64-unknown-linux-gnu unchanged — rustc 1.13.0 (2c6933acc 2016–11–07)<br> beta-x86_64-unknown-linux-gnu updated — rustc 1.15.0-beta.1 (d9a0f0df7 2016–12–19)<br> nightly-x86_64-unknown-linux-gnu unchanged — rustc 1.15.0-nightly (71c06a56a 2016–12–18)</blockquote><blockquote>$</blockquote><p>Similar situation also happen in OCaml world. Here’s a snapshot of opam operation:</p><blockquote>$ opam switch<br># switch compiler description<br>default ocaml-base-compiler.4.04.0 default<br>$</blockquote><p>Do I need to have OCaml and Rust prior to installation? Nop. OCaml and Rust provide binary version of opam and rustup which you can execute directly, but if you feel that you are brave enough, you may install them by yourself from source code.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2358b162527f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OCaml and Its Tooling System — Don’t Use Your Distro Package Manager]]></title>
            <link>https://medium.com/@bpdp/ocaml-and-its-tooling-system-dont-use-your-distro-package-manager-9e9ffce842bb?source=rss-f42ea1563730------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e9ffce842bb</guid>
            <category><![CDATA[ocaml]]></category>
            <category><![CDATA[eliom]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[opam]]></category>
            <dc:creator><![CDATA[Bambang Purnomosidi D. P.]]></dc:creator>
            <pubDate>Fri, 16 Dec 2016 06:33:46 GMT</pubDate>
            <atom:updated>2016-12-16T06:36:47.531Z</atom:updated>
            <content:encoded><![CDATA[<p>I maybe wrong, but installing package using <a href="https://github.com/ocaml/opam">Opam</a> is never easy for me. Opam 1.x and Opam 2.x is quite difficult to cooperate (not to mention that 1.3.0 is broken and 2.x is still in development and its src_ext Makefile also needs to be edited by hand). It was so many broken packages when I want to install <a href="http://ocsigen.org/eliom/">Eliom</a>. I tried to use OCaml which was installed from Arch Linux package manager (at that time, it only provides obsolete OCaml — when OCaml latest version is 4.03, the package is 4.02, when the OCaml latest version is 4.04, the package is 4.03, and so on. In other words, to make OCaml and Opam work flawlessly is proved to be difficult for me. Now, all OCaml-related packages in Arch Linux are already bleeding edge (except for Opam), are they work? yes and no. For OCaml only development, yes, but for more complex situation, not at all. Still so many broken packages.</p><p>Give up? Sorry, I don’t have that words in my dictionary. :p</p><p>Today, I tried again to install Eliom after seeing its advertisement that the Eliom team has just released version 6.0.0. Now that I can have them installed properly and OCaml/Opam work life a charm. How do I did that? It was so simple. What I did is just remove all OCaml-related packages from Arch Linux official repository:</p><blockquote>$ pacman -Ss ocaml<br>extra/llvm-ocaml 3.9.0–3<br> OCaml bindings for LLVM<br>extra/ocaml 4.04.0–1<br> A functional language with OO extensions<br>extra/ocaml-compiler-libs 4.04.0–1<br> Several modules used internally by the OCaml compiler<br>extra/ocaml-ctypes 0.10.2–1<br> Library for binding to C libraries using pure OCaml<br>extra/ocamlbuild 0.9.3–1<br> Build tool, that has built-in rules for building OCaml library and programs<br>community/ocaml-findlib 1.7.1–1<br> OCaml package manager<br>community/opam 1.2.2–2<br> OCaml package manager<br>$</blockquote><p>Look ma! no OCaml packages installed.</p><p>Then I realize that Opam can be used to bootstrap OCaml development tools completely without ever needed OCaml from OS package manager. So, what I did is just installed <a href="https://github.com/ocaml/opam/releases">Opam from binary package release</a> and have it initialized <strong>$HOME/.opam </strong>(use <strong>opam init </strong>if you forget the command). When it’s over, just <strong>opam install eliom</strong> and watch miracle happens.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e9ffce842bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>