<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>The Blag</title>
    <subtitle>Logic, Computer Graphics, OCaml, Rust, etc.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://blag.cedeela.fr/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://blag.cedeela.fr"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2024-02-20T00:00:00+00:00</updated>
    <id>https://blag.cedeela.fr/atom.xml</id>
    <entry xml:lang="en">
        <title>On Moonpool</title>
        <published>2024-02-20T00:00:00+00:00</published>
        <updated>2024-02-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/on-moonpool/"/>
        <id>https://blag.cedeela.fr/on-moonpool/</id>
        
        <summary type="html">&lt;p&gt;I&#x27;ve been working a fair amount on &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-cube&#x2F;moonpool&quot;&gt;Moonpool&lt;&#x2F;a&gt;.
I think it occupies a fairly unique place in the new, vibrant OCaml 5 ecosystem and
I&#x27;d like to explain why I think that. I&#x27;ll compare it to generalist schedulers like
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;robur-coop&#x2F;miou&quot;&gt;Miou&lt;&#x2F;a&gt; or &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ocaml-multicore&#x2F;eio&quot;&gt;Eio&lt;&#x2F;a&gt;,
to process-based parallelism libraries like &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;UnixJunkie&#x2F;parany&quot;&gt;Parany&lt;&#x2F;a&gt;,
and to domain parallelism libraries
like &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ocaml-multicore&#x2F;domainslib&quot;&gt;Domainslib&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Sidekick project overview</title>
        <published>2022-11-14T00:00:00+00:00</published>
        <updated>2022-11-14T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/sidekick-project-overview/"/>
        <id>https://blag.cedeela.fr/sidekick-project-overview/</id>
        
        <summary type="html">&lt;p&gt;I&#x27;ve been working for years on 
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-cube&#x2F;sidekick&#x2F;&quot;&gt;sidekick&lt;&#x2F;a&gt;, on my free time.
It&#x27;s getting tiresome to put so much effort into a project in the dark, so here&#x27;s some basic journaling&#x2F;rambles about it.&lt;&#x2F;p&gt;
&lt;p&gt;So what&#x27;s Sidekick? At first, and for a while, it was an attempt at writing a
&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Satisfiability_modulo_theories&quot;&gt;SMT&lt;&#x2F;a&gt; solver, in OCaml,
following the CDCL(T) paradigm, and in a &lt;em&gt;functorized&lt;&#x2F;em&gt; way. I&#x27;ve gone back on at
least the last point, and the CDCL(T) part might be revisited soon.&lt;&#x2F;p&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Curry-Howard is overrated</title>
        <published>2021-02-23T00:00:00+00:00</published>
        <updated>2021-02-23T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/curry-howard-scam/"/>
        <id>https://blag.cedeela.fr/curry-howard-scam/</id>
        
        <summary type="html">&lt;p&gt;(&lt;em&gt;original title&lt;&#x2F;em&gt;: &amp;quot;Curry Howard is a scam&amp;quot;. See below.)&lt;&#x2F;p&gt;
&lt;p&gt;The
&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Curry%E2%80%93Howard_correspondence&quot;&gt;Curry-Howard correspondence&lt;&#x2F;a&gt;
has been talked about a lot recently, not only in Haskell circles, but also
among CiC-based proof assistant practitioners (Coq, Lean, etc.).
In a nutshell, it makes a deep parallel between &amp;quot;programs&amp;quot; (terms of some flavor
of lambda calculus, typically), and &amp;quot;proofs&amp;quot; (these programs are a proof of their type,
or more precisely they are witnesses that their types are inhabited).
The most basic example is &lt;code&gt;id x = x&lt;&#x2F;code&gt; which, in Haskell, would be a proof of
$ \forall a. a \rightarrow a $, a trivial theorem of propositional logic.&lt;&#x2F;p&gt;
&lt;p&gt;That&#x27;s all good and well, but my point here is that &lt;em&gt;in practice&lt;&#x2F;em&gt;, the equivalence is
not as interesting as it first looks.&lt;&#x2F;p&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Benchpress hacking: log 1</title>
        <published>2020-06-06T00:00:00+00:00</published>
        <updated>2020-06-06T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/benchpress-hacking-log1/"/>
        <id>https://blag.cedeela.fr/benchpress-hacking-log1/</id>
        
        <summary type="html">&lt;link rel=&quot;stylesheet&quot; type=&quot;text&#x2F;css&quot; href=&quot;&#x2F;asciinema-player.css&quot;&#x2F;&gt;
&lt;p&gt;I&#x27;ve decided I want to resume blogging. So without further ado,
here&#x27;s a short piece about one of my side projects:
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;sneeuwballen&#x2F;benchpress&quot;&gt;benchpress&lt;&#x2F;a&gt;
(with a live hosting &lt;a href=&quot;https:&#x2F;&#x2F;benchpress.cedeela.fr&#x2F;&quot;&gt;of the web ui&lt;&#x2F;a&gt;).&lt;&#x2F;p&gt;
&lt;p&gt;In short, benchpress is a tool I use for running &lt;em&gt;provers&lt;&#x2F;em&gt;, by which I mean, generally,
command-line tools that take a logic problem as input, and output something
about the file such as &amp;quot;it&#x27;s a valid theorem&amp;quot; or &amp;quot;it typechecks&amp;quot; or some
sort of failure or timeout. The idea is to make it easy to run a tool you&#x27;re
developing (e.g. &lt;a href=&quot;https:&#x2F;&#x2F;blag.cedeela.fr&#x2F;benchpress-hacking-log1&#x2F;eprover.org&#x2F;&quot;&gt;E&lt;&#x2F;a&gt;,
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;sneeuwballen&#x2F;zipperposition&quot;&gt;Zipperposition&lt;&#x2F;a&gt;,
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-cube&#x2F;batsat&#x2F;&quot;&gt;Batsat&lt;&#x2F;a&gt;, &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;Gbury&#x2F;archsat&#x2F;&quot;&gt;Archsat&lt;&#x2F;a&gt;, etc.)
on a large set of benchmarks, and analyze the results.&lt;&#x2F;p&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Solving Sudokus with msat</title>
        <published>2019-02-26T00:00:00+00:00</published>
        <updated>2019-02-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/sudoku-msat/"/>
        <id>https://blag.cedeela.fr/sudoku-msat/</id>
        
        <summary type="html">&lt;p&gt;The glamorous world of &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;SAT_solver&quot;&gt;SAT&lt;&#x2F;a&gt;
and &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Satisfiability_modulo_theories&quot;&gt;SMT solvers&lt;&#x2F;a&gt;
is usually preoccupied with proving theorems, searching for software bugs,
verifying hardware, and other similarly serious business.&lt;&#x2F;p&gt;
&lt;p&gt;But today, we&#x27;re going to solve &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Sudoku&quot;&gt;Sudoku&lt;&#x2F;a&gt; grids. My goal is to showcase
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;Gbury&#x2F;mSAT&quot;&gt;mSAT&lt;&#x2F;a&gt;, a parametrized SAT solver written
in OCaml
by my good friend &lt;a href=&quot;https:&#x2F;&#x2F;gbury.eu&#x2F;&quot;&gt;Guillaume Bury&lt;&#x2F;a&gt; and myself.
The solver&#x27;s code can be found
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;Gbury&#x2F;mSAT&#x2F;blob&#x2F;c39431315fb678789eb244704cda78eb45c7e6af&#x2F;src&#x2F;sudoku&#x2F;sudoku_solve.ml&quot;&gt;on github&lt;&#x2F;a&gt;,
but I&#x27;m going to detail the most salient parts here.&lt;&#x2F;p&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Format All the Data Structures</title>
        <published>2016-03-20T00:00:00+00:00</published>
        <updated>2016-03-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/format-all-the-data-structures/"/>
        <id>https://blag.cedeela.fr/format-all-the-data-structures/</id>
        
        <summary type="html">&lt;p&gt;Last October, I moved in Nancy to start working as an engineer with
&lt;a href=&quot;https:&#x2F;&#x2F;www.cs.vu.nl&#x2F;~jbe248&#x2F;&quot;&gt;Jasmin Blanchette&lt;&#x2F;a&gt; on an exciting
project called &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;nunchaku-inria&#x2F;nunchaku&#x2F;&quot;&gt;Nunchaku&lt;&#x2F;a&gt;.
Since my domain is formal logic, I spend a lot of time manipulating,
transforming, and traversing ASTs (abstract syntax trees). My primary
method for debugging is pretty-printing structures; in nunchaku,
I even have a &lt;code&gt;--print-all&lt;&#x2F;code&gt; flag to print the AST after each transformation,
since the tool is basically a bidirectional pipeline that composes
transformations. I will certainly blog on the design of Nunchaku
later, but today I want to present the
standard
&lt;a href=&quot;http:&#x2F;&#x2F;caml.inria.fr&#x2F;pub&#x2F;docs&#x2F;manual-ocaml&#x2F;libref&#x2F;Format.html&quot;&gt;Format&lt;&#x2F;a&gt;
module from OCaml, that I use for pretty-printing all my data structures.&lt;&#x2F;p&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Maki: on-disk memoization for (deterministic) fun and profit</title>
        <published>2016-02-05T00:00:00+00:00</published>
        <updated>2016-02-05T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/maki/"/>
        <id>https://blag.cedeela.fr/maki/</id>
        
        <summary type="html">&lt;p&gt;Greating, earthlings! Today I will present an exciting new OCaml library
called &lt;strong&gt;maki&lt;&#x2F;strong&gt;. This post will be longer as usual, because it is actually
two posts in one:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;first, I&#x27;ll present the goals of Maki, sketch its design, and present the
most salient parts of its API;&lt;&#x2F;li&gt;
&lt;li&gt;then I will demonstrate how to use it to quickly build a (very naive) OCaml build
system, featuring parallel build and cached computations thanks to Maki.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Tooling is Awesome</title>
        <published>2015-10-16T00:00:00+00:00</published>
        <updated>2015-10-16T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/tooling-is-awesome/"/>
        <id>https://blag.cedeela.fr/tooling-is-awesome/</id>
        
        <summary type="html">&lt;p&gt;A quick note about my current OCaml setup, in my last project, &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;nunchaku-inria&#x2F;nunchaku&#x2F;&quot;&gt;Nunchaku&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>OCaml Compiler Hacking: how to add a primitive</title>
        <published>2015-08-06T00:00:00+00:00</published>
        <updated>2015-08-06T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/compiler-hacking-add-primitives/"/>
        <id>https://blag.cedeela.fr/compiler-hacking-add-primitives/</id>
        
        <summary type="html">&lt;p&gt;I have been hacking on the OCaml compiler recently; in particular, I added &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ocaml&#x2F;ocaml&#x2F;pull&#x2F;207&quot;&gt;some support for coloring warning&#x2F;error messages&lt;&#x2F;a&gt;. At some point during the discussion over this pull request, it became clear that colored output should only be enabled if &lt;code&gt;stderr&lt;&#x2F;code&gt; was an interactive terminal (in opposition to a regular file handle or whatnot). The compiler does not link with the &lt;code&gt;Unix&lt;&#x2F;code&gt; library, so I finally decided to add a primitive &lt;code&gt;caml_sys_is_interactive&lt;&#x2F;code&gt;. My purpose here is to explain how it works (from what I gathered) and how to do it.&lt;&#x2F;p&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Simple Refinement Types for OCaml</title>
        <published>2015-03-10T00:00:00+00:00</published>
        <updated>2015-03-10T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/simple-refinement-types-for-ocaml/"/>
        <id>https://blag.cedeela.fr/simple-refinement-types-for-ocaml/</id>
        
        <summary type="html">&lt;p&gt;For more than one year, vulnerabilies in software (especially pervasive C software) have been disclosed at an alarmingly high rate. I love OCaml, which is definitely safer, but still has gaps left open. I believe formal verification, albeit a very powerful tool, is not mature enough for most programmers (too difficult to use, requires too much efforts), so I&#x27;m thinking about alternative solutions that would be more lightweight to define and use, but would still increase the confidence in source code.&lt;&#x2F;p&gt;
&lt;p&gt;So here is a draft of a relatively simple extension to OCaml, that allows to specify more invariants in types without requiring a full-fledged proof system. It&#x27;s purely hypothetical and I did not implement it (nor don&#x27;t I plan to do it, not before the end of my PhD). The purpose is to propose a conservative extension of OCaml with a type system that can represent more complex invariants, without putting too much of a burden on the user, in a way so adding annotations to existing programs incrementally is feasible and even easy.&lt;&#x2F;p&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Introduction to Automated Theorem Proving with Logtk</title>
        <published>2014-07-24T00:00:00+00:00</published>
        <updated>2014-07-24T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/resolution1/"/>
        <id>https://blag.cedeela.fr/resolution1/</id>
        
        <summary type="html">&lt;p&gt;My PhD work is centered around &lt;a href=&quot;http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Automated_theorem_proving&quot;&gt;automated theorem proving&lt;&#x2F;a&gt; in &lt;a href=&quot;http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;First-order_logic&quot;&gt;first-order logic&lt;&#x2F;a&gt;. This is obviously a very cool topic (otherwise I wouldn&#x27;t have focused on it), so this post is a crash course (but the program won&#x27;t crash because I use &lt;code&gt;OCaml&lt;&#x2F;code&gt;) on one of the most classic method to prove (some) theorems automatically. I named... &lt;em&gt;resolution&lt;&#x2F;em&gt;!&lt;&#x2F;p&gt;
&lt;p&gt;The goal is to prove some (not too complicated) theorems automatically. In other words, we want a program that reads a bunch of axioms and a formula that we conjectured is a theorem following from the axioms, and then tries to produce a proof of the theorem. In practice it&#x27;s almost always done by &lt;em&gt;refutation&lt;&#x2F;em&gt;: to prove that Γ ⊢ F (formula F is a theorem under axioms Γ), we try to deduce ⊥ (false) from Γ, ¬F). The applications for this kind of technology are multiple, but afaik the prominent one is &lt;em&gt;software verification&lt;&#x2F;em&gt; — aims at formally proving that a program satisfies a specification (&amp;quot;not crashing&amp;quot; is a good start). There has been a lot of research in this area for decades, but the problem is extremely hard (only &lt;em&gt;semi-decidable&lt;&#x2F;em&gt;: you will find a solution eventually if the problem is a theorem, but might run forever otherwise).&lt;&#x2F;p&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Batch Operations on Collections</title>
        <published>2014-06-11T00:00:00+00:00</published>
        <updated>2014-06-11T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/batch-operations-on-collections/"/>
        <id>https://blag.cedeela.fr/batch-operations-on-collections/</id>
        
        <summary type="html">&lt;p&gt;Some very common (and useful) operations, including the classic &lt;code&gt;map&lt;&#x2F;code&gt;, &lt;code&gt;filter&lt;&#x2F;code&gt;, and &lt;code&gt;flat_map&lt;&#x2F;code&gt;, traverse their whole argument and return another collection. When several such operations are composed, intermediate collections will be created and become useless immediately after. Languages like Haskell sometimes perform optimizations that &lt;em&gt;merge&lt;&#x2F;em&gt; together the operations so as to minimize the number of intermediate collections :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;ocaml&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-ocaml &quot;&gt;&lt;code class=&quot;language-ocaml&quot; data-lang=&quot;ocaml&quot;&gt;&lt;span&gt;map f . map g == map (f . g)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Sadly, the OCaml compiler performs very few optimizations (and in this case, the optimization would not be correct anyway, because it would change the order of evaluation and therefore side-effects).&lt;&#x2F;p&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Representing Lazy Values</title>
        <published>2014-05-02T00:00:00+00:00</published>
        <updated>2014-05-02T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/representing-lazy-values/"/>
        <id>https://blag.cedeela.fr/representing-lazy-values/</id>
        
        <summary type="html">&lt;h1 id=&quot;a-quick-survey-of-lazy-in-ocaml&quot;&gt;A quick survey of Lazy in OCaml&lt;&#x2F;h1&gt;
&lt;p&gt;I remember having heard that &lt;a href=&quot;https:&#x2F;&#x2F;www.janestreet.com&#x2F;&quot;&gt;Jane Street&lt;&#x2F;a&gt; had its own implementation of &lt;code&gt;Lazy&lt;&#x2F;code&gt; values, and that it was faster than the standard one. So I played a bit with several ways of managing lazy values in OCaml.&lt;&#x2F;p&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Universal Serialization and Deserialization</title>
        <published>2014-03-12T00:00:00+00:00</published>
        <updated>2014-03-12T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/universal-serialization-and-deserialization/"/>
        <id>https://blag.cedeela.fr/universal-serialization-and-deserialization/</id>
        
        <summary type="html">&lt;p&gt;&lt;strong&gt;TL;DR&lt;&#x2F;strong&gt;: combinators and GADTs allow to describe types in abstract enough a way that they can be converted into&#x2F;from various serialization formats.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Edit&lt;&#x2F;strong&gt;: the code is now available in its own repository on &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-cube&#x2F;cconv&quot;&gt;github&lt;&#x2F;a&gt;, and on my &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-cube&#x2F;yolopam-repository&quot;&gt;opam repository&lt;&#x2F;a&gt; under the name &lt;code&gt;CConv&lt;&#x2F;code&gt;. Optional interfaces to Yojson, Sexplib and Bencode are also provided.&lt;&#x2F;p&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>QuickCheck for OCaml</title>
        <published>2013-10-05T00:00:00+00:00</published>
        <updated>2013-10-05T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/quickcheck-for-ocaml/"/>
        <id>https://blag.cedeela.fr/quickcheck-for-ocaml/</id>
        
        <summary type="html">&lt;p&gt;I&#x27;ve written, and am using, an &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-cube&#x2F;qcheck&#x2F;blob&#x2F;767e455a81c6a8748f48e22194927e24aad4cd29&#x2F;src&#x2F;core&#x2F;QCheck.mli&quot;&gt;OCaml module&lt;&#x2F;a&gt; (see the &lt;a href=&quot;https:&#x2F;&#x2F;c-cube.github.io&#x2F;qcheck&#x2F;&quot;&gt;documentation&lt;&#x2F;a&gt;) that is heavily inspired from Haskell&#x27;s QuickCheck.&lt;&#x2F;p&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Go, C++!!</title>
        <published>2012-12-18T00:00:00+00:00</published>
        <updated>2012-12-18T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/go-cpp/"/>
        <id>https://blag.cedeela.fr/go-cpp/</id>
        
        <summary type="html">&lt;p&gt;I&#x27;ve recently read an &lt;a href=&quot;http:&#x2F;&#x2F;himmele.blogspot.fr&#x2F;2012&#x2F;11&#x2F;concurrent-hello-world-in-go-erlang.html&quot;&gt;interesting article&lt;&#x2F;a&gt; which shows an example of concurrency implemented in 3 differenet languages, namely Go, Erlang and C++. While the Erlang and Go examples seemed clear and concise, the C++ one looks long and hard to understand. The reason behind this complexity is that C++ does not provide a simple message passing primitive such as Go channels.&lt;&#x2F;p&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>And this...</title>
        <published>2012-12-10T00:00:00+00:00</published>
        <updated>2012-12-10T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/and-this/"/>
        <id>https://blag.cedeela.fr/and-this/</id>
        
        <content type="html" xml:base="https://blag.cedeela.fr/and-this/">&lt;h1 id=&quot;is-how-you-were-born&quot;&gt;... is how you were born&lt;&#x2F;h1&gt;
&lt;img src=&quot;..&#x2F;images&#x2F;rabbid_birth.jpg&quot; width=700&gt; 
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>The inside of a curve</title>
        <published>2012-12-05T00:00:00+00:00</published>
        <updated>2012-12-05T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/inside-a-curve/"/>
        <id>https://blag.cedeela.fr/inside-a-curve/</id>
        
        <summary type="html">&lt;p&gt;Hi, I am shuba, and I&#x27;ll be using this blog to dicuss various computer graphics topics I find interesting. I might also disgress on C++, which is my main programming language.&lt;&#x2F;p&gt;
&lt;p&gt;For my first article, I&#x27;ll try and answer a question that&#x27;s not as simple as it seems: &lt;em&gt;onto what did I click?&lt;&#x2F;em&gt; How did the program know what I clicked on? We&#x27;re used to be able to click on various kinds of button, rectangular or circular. But when using image editing software such as The Gimp or Inkscape, we want to select the freeform shapes we create.&lt;&#x2F;p&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Tail-recursive map in OCaml</title>
        <published>2012-12-03T00:00:00+00:00</published>
        <updated>2012-12-03T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/tail-recursive-map-in-ocaml/"/>
        <id>https://blag.cedeela.fr/tail-recursive-map-in-ocaml/</id>
        
        <summary type="html">&lt;p&gt;The &lt;code&gt;List.map&lt;&#x2F;code&gt; function of the OCaml standard lib is not implemented tail-recursively. The current version (as of 4.00 on my computer) is&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;ocaml&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-ocaml &quot;&gt;&lt;code class=&quot;language-ocaml&quot; data-lang=&quot;ocaml&quot;&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;let rec &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fa1b3;&quot;&gt;map &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;f &lt;&#x2F;span&gt;&lt;span&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;function
&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;[] &lt;&#x2F;span&gt;&lt;span&gt;-&amp;gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;[]
&lt;&#x2F;span&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;| &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;a&lt;&#x2F;span&gt;&lt;span&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;l &lt;&#x2F;span&gt;&lt;span&gt;-&amp;gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;let &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;r &lt;&#x2F;span&gt;&lt;span&gt;= f a &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;in&lt;&#x2F;span&gt;&lt;span&gt; r :: map f l
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Debugging with DOT</title>
        <published>2012-11-30T00:00:00+00:00</published>
        <updated>2012-11-30T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/debug-with-dot/"/>
        <id>https://blag.cedeela.fr/debug-with-dot/</id>
        
        <summary type="html">&lt;h1 id=&quot;rationale&quot;&gt;Rationale&lt;&#x2F;h1&gt;
&lt;p&gt;I&#x27;m starting a PhD on first-order automated theorem proving, which is the reason I&#x27;m writing an &lt;a href=&quot;http:&#x2F;&#x2F;github.com&#x2F;c-cube&#x2F;zipperposition&#x2F;&quot;&gt;experimental theorem prover&lt;&#x2F;a&gt; in OCaml. Theorem provers are full of complicated algorithms (that I plan to write on later), and my usual techniques for debugging are twofold:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Writing a lot of &lt;code&gt;assert&lt;&#x2F;code&gt; to make sure invariants are not broken&lt;&#x2F;li&gt;
&lt;li&gt;Printing debug information on stdout, if required, to get an idea of what the prover is doing. This allows me to choose the level of detail of what is printed, depending on which incorrect behavior I&#x27;m tracking.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;The second technique, also known as &lt;em&gt;printf debugging&lt;&#x2F;em&gt;, is quite powerful (especially since OCaml does not feature a great debugger as an alternative). However, text is not great for representing structured data, and especially &lt;strong&gt;graphs&lt;&#x2F;strong&gt;. Here is where I bring &lt;a href=&quot;http:&#x2F;&#x2F;graphviz.org&#x2F;&quot;&gt;DOT&lt;&#x2F;a&gt; into play.&lt;&#x2F;p&gt;
</summary>
        
    </entry>
    <entry xml:lang="en">
        <title>Frist post</title>
        <published>2012-11-29T00:00:00+00:00</published>
        <updated>2012-11-29T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blag.cedeela.fr/frist-post/"/>
        <id>https://blag.cedeela.fr/frist-post/</id>
        
        <content type="html" xml:base="https://blag.cedeela.fr/frist-post/">&lt;p&gt;Hi there, here is the first post on this &lt;a href=&quot;http:&#x2F;&#x2F;xkcd.com&#x2F;148&#x2F;&quot;&gt;blag&lt;&#x2F;a&gt;! There will (or should, at least) be posts on technical subjects by several authors :&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http:&#x2F;&#x2F;shuba.cedeela.fr&#x2F;&quot;&gt;shuba&lt;&#x2F;a&gt;;&lt;&#x2F;li&gt;
&lt;li&gt;Vincent Doba;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;http:&#x2F;&#x2F;simon.cedeela.fr&#x2F;&quot;&gt;Simon Cruanes&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;We expect to write on C++ programming, functional programming, logic, graphics, etc.&lt;&#x2F;p&gt;
&lt;p&gt;Cheers!&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
