<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OCaml on CyberSpy</title>
    <link>https://cyberspy.io/tags/ocaml/</link>
    <description>Recent content in OCaml on CyberSpy</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 13 Mar 2018 14:41:15 -0400</lastBuildDate>
    <atom:link href="https://cyberspy.io/tags/ocaml/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>OCaml OpenGL - Get into Gear!</title>
      <link>https://cyberspy.io/articles/ocamlopengl/</link>
      <pubDate>Tue, 13 Mar 2018 14:41:15 -0400</pubDate>
      <guid>https://cyberspy.io/articles/ocamlopengl/</guid>
      <description>&lt;h2 id=&#34;ocaml-and-opengl---getting-our-functional-programming-into-gear&#34;&gt;OCaml and OpenGL - Getting our Functional Programming into Gear!&lt;/h2&gt;&#xA;&lt;p&gt;In my blog post for this day, I thought I&amp;rsquo;d take a look at the OCaml OpenGL library, &lt;a href=&#34;https://opam.ocaml.org/packages/lablgl/lablgl.1.05/&#34;&gt;lablgl&lt;/a&gt;. If you&amp;rsquo;re not already familair with openGL, I strongly suggest that you take a look at one of the tutorials available online. One that I found to be very informative; although written in &lt;strong&gt;c++&lt;/strong&gt;, is &lt;a href=&#34;http://www.opengl-tutorial.org&#34;&gt;opengl-tutorial&lt;/a&gt;. Nonetheless, in this post, we&amp;rsquo;ll look at some simple, and not so simple examples written in OCaml. But before we can do that, we need to install the requisite &lt;strong&gt;opam&lt;/strong&gt; dependencies. To install &lt;code&gt;lablgl&lt;/code&gt;, simply:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Exercism - Get your Code Deamons Out! Heal Your Body!</title>
      <link>https://cyberspy.io/code/exercism/</link>
      <pubDate>Wed, 28 Feb 2018 15:12:36 -0500</pubDate>
      <guid>https://cyberspy.io/code/exercism/</guid>
      <description>&lt;h2 id=&#34;exercism&#34;&gt;Exercis(m)&lt;/h2&gt;&#xA;&lt;p&gt;The best way to keep the mind, body, and soul sharp is to &lt;strong&gt;exercise&lt;/strong&gt;! No better way to learn new programming paradigms than following this same precept when learning new concepts in an unfamiliar programming language. There are several sites online that afford noobs practice problems - &lt;a href=&#34;https://www.hackerrank.com&#34;&gt;Hackerrank&lt;/a&gt;, &lt;a href=&#34;https://www.kaggle.com&#34;&gt;kaggle&lt;/a&gt; to name a few. But one that I recently  came across, &lt;a href=&#34;http://exercism.io&#34;&gt;exercism.io&lt;/a&gt;, aims to provide not just programming exercises, but a community of folks committed to commenting and sharing both code and criticism on implementations to problem sets across many languages.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Riding the Camel Deeper into the Desert of Code: Records and Variants</title>
      <link>https://cyberspy.io/articles/ocaml-rec-var/</link>
      <pubDate>Sun, 11 Feb 2018 12:41:10 -0500</pubDate>
      <guid>https://cyberspy.io/articles/ocaml-rec-var/</guid>
      <description>&lt;h3 id=&#34;extending-and-encapsulating-data---records-and-variants&#34;&gt;Extending and Encapsulating Data - Records and Variants&lt;/h3&gt;&#xA;&lt;p&gt;Up next on our tour of OCaml are &lt;strong&gt;records&lt;/strong&gt; and &lt;strong&gt;variants&lt;/strong&gt;. If you are familiar with &lt;code&gt;typedef&lt;/code&gt;, &lt;code&gt;struct&lt;/code&gt;, and &lt;code&gt;union&lt;/code&gt; in &lt;strong&gt;c/c++&lt;/strong&gt;, you&amp;rsquo;ll quickly come to understand how to use records and variants in OCaml. We&amp;rsquo;ll start off looking at records, how to define them, use them in functions, and automatically generate common functions from our type definitions. There&amp;rsquo;s more to the eye than what you get in a language like &lt;strong&gt;c&lt;/strong&gt;, so pay close attention as we move through the descriptions below. We&amp;rsquo;ll break it down one at a time so you&amp;rsquo;ll have no problems!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Let&#39;s Get Funky with the Camel</title>
      <link>https://cyberspy.io/articles/ocaml-func/</link>
      <pubDate>Fri, 09 Feb 2018 16:17:20 -0500</pubDate>
      <guid>https://cyberspy.io/articles/ocaml-func/</guid>
      <description>&lt;h2 id=&#34;how-many-ways-can-we-get-funky&#34;&gt;How many ways can we get Fun(ky)&lt;/h2&gt;&#xA;&lt;p&gt;In any programming paradigm, it&amp;rsquo;s critical to understand how we write functions - be they traditional imperative , anonymous , recursive, or functional. In this post, I will break down the different types of functions that you can write in &lt;strong&gt;OCaml&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s start by examining the imperative function. Here&amp;rsquo;s a simple function that prints out the phrase &lt;em&gt;Hello World!&lt;/em&gt; $n$ times, once on each line, and returns the value $n$ as its result.&lt;/p&gt;</description>
    </item>
    <item>
      <title>OCaml Hello World and more</title>
      <link>https://cyberspy.io/articles/ocaml-hw/</link>
      <pubDate>Tue, 06 Feb 2018 11:28:00 -0500</pubDate>
      <guid>https://cyberspy.io/articles/ocaml-hw/</guid>
      <description>&lt;h3 id=&#34;well-hello-there&#34;&gt;Well Hello There!&lt;/h3&gt;&#xA;&lt;p&gt;As tradition has it, every new programming language experience must begin with the basic &lt;em&gt;Hello World&lt;/em&gt;. Let&amp;rsquo;s walk the the basics of how to set up our development environment specifically for OCaml and demonstrate how to compile our basic program.&lt;/p&gt;&#xA;&lt;h3 id=&#34;warming-up-our-environment&#34;&gt;Warming up our Environment&lt;/h3&gt;&#xA;&lt;p&gt;Of course we could just use our vanilla editor to enter our OCaml programs, but a more efficient work environment leverages an extensible editor that is &lt;em&gt;aware&lt;/em&gt; of our programming language. Editors like &lt;a href=&#34;*&#34;&gt;sublime&lt;/a&gt;, &lt;a href=&#34;*&#34;&gt;Atom&lt;/a&gt;, and &lt;a href=&#34;*&#34;&gt;Visual Studio Code&lt;/a&gt; are some of the more popular selections. &lt;a href=&#34;*&#34;&gt;Vim&lt;/a&gt; and &lt;a href=&#34;*&#34;&gt;Emacs&lt;/a&gt; are also options, but the new tools tend to support vi/emacs style editing while offering more extensive and expansive features.&lt;/p&gt;</description>
    </item>
    <item>
      <title>OCaml Intro: You can have it all: Object-Oriented, Imperative, and Functional</title>
      <link>https://cyberspy.io/articles/ocaml-intro/</link>
      <pubDate>Thu, 01 Feb 2018 11:27:47 -0500</pubDate>
      <guid>https://cyberspy.io/articles/ocaml-intro/</guid>
      <description>&lt;h2 id=&#34;yapl&#34;&gt;YAPL&lt;/h2&gt;&#xA;&lt;p&gt;So why take the time to delve into yet another programming language? I find at worst, one can expands one&amp;rsquo;s knowledge of existing programming paradigms by studying the language design choices of other languages not used on a daily-basis. Best case, one discovers a new language that is rich in expression and productivity; thereby refining the productivity of the user.&lt;/p&gt;&#xA;&lt;h3 id=&#34;ocaml&#34;&gt;&lt;a href=&#34;https://OCaml.org&#34;&gt;OCaml&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;So, I tripped over this programming language in a rather random and circuitous path. I was watching a super-cool video visualizing how the &lt;a href=&#34;https://www.youtube.com/watch?v=spUNpyF58BY&#34;&gt;Fourier Transform integral&lt;/a&gt; is constructed (by &lt;a href=&#34;https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw&#34;&gt;3Blue1Brown&lt;/a&gt;). At the end of the video, the sponsor was a well-known, prestigious wall-street boutique, &lt;a href=&#34;https://OCaml.org/docs/cheat_sheets.html&#34;&gt;Jane Street&lt;/a&gt;, famous for hiring the best of the best in mathematics and computer science. So, naturally, I thought I&amp;rsquo;d take a closer peek at their website and discovered that they were big sponsors in OCaml as it underlies their trading and production environments. And down the rabbit hole I went.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
