<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wisdom and Wonder &#187; OCaml</title>
	<atom:link href="http://www.wisdomandwonder.com/tag/OCaml/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wisdomandwonder.com</link>
	<description>Science and Philosophy</description>
	<lastBuildDate>Wed, 22 May 2013 20:15:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Programming PIC microcontrollers with Objective Caml</title>
		<link>http://www.wisdomandwonder.com/link/5707/programming-pic-microcontrollers-with-objective-caml</link>
		<comments>http://www.wisdomandwonder.com/link/5707/programming-pic-microcontrollers-with-objective-caml#comments</comments>
		<pubDate>Wed, 01 Jun 2011 11:12:40 +0000</pubDate>
		<dc:creator>Grant</dc:creator>
				<category><![CDATA[Link]]></category>
		<category><![CDATA[ML]]></category>
		<category><![CDATA[OCaml]]></category>
		<category><![CDATA[Programming Language]]></category>

		<guid isPermaLink="false">http://www.wisdomandwonder.com/?p=5707</guid>
		<description><![CDATA[This project brings Objective Caml into the set of tools which allow to program PIC microcontrollers. (via Anil)]]></description>
				<content:encoded><![CDATA[<blockquote><p><a href="http://www.algo-prog.info/ocaml_for_pic/web/index.php">This</a> project brings Objective Caml into the set of tools which allow to program PIC microcontrollers.</p></blockquote>
<p>(via <a href="http://anil.recoil.org/2011/04/15/ocaml-users-group.html">Anil</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wisdomandwonder.com/link/5707/programming-pic-microcontrollers-with-objective-caml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stalin Scheme vs OCaml</title>
		<link>http://www.wisdomandwonder.com/link/5360/stalin-scheme-vs-ocaml</link>
		<comments>http://www.wisdomandwonder.com/link/5360/stalin-scheme-vs-ocaml#comments</comments>
		<pubDate>Sat, 06 Nov 2010 22:25:12 +0000</pubDate>
		<dc:creator>Grant</dc:creator>
				<category><![CDATA[Link]]></category>
		<category><![CDATA[ML]]></category>
		<category><![CDATA[OCaml]]></category>
		<category><![CDATA[Programming Language]]></category>
		<category><![CDATA[Scheme]]></category>

		<guid isPermaLink="false">http://www.wisdomandwonder.com/?p=5360</guid>
		<description><![CDATA[Here is an old post comparing Stalin Scheme to OCaml, among a few other languages. Here is the article on Jon&#8217;s page. Stalin seems pretty amazing.]]></description>
				<content:encoded><![CDATA[<p><a href="https://groups.google.com/group/comp.lang.scheme/browse_thread/thread/349c51b1d30d2b3e/34a7757985bd4b7b?hl=en">Here</a> is an old post comparing Stalin Scheme to OCaml, among a few other languages. <a href="http://www.ffconsultancy.com/languages/ray_tracer/performance.html">Here </a>is the article on Jon&#8217;s page.</p>
<p>Stalin seems pretty amazing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wisdomandwonder.com/link/5360/stalin-scheme-vs-ocaml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enhanced Ocaml Documentation Version 3.12</title>
		<link>http://www.wisdomandwonder.com/link/5310/enhanced-ocaml-documentation-version-3-12</link>
		<comments>http://www.wisdomandwonder.com/link/5310/enhanced-ocaml-documentation-version-3-12#comments</comments>
		<pubDate>Sat, 25 Sep 2010 02:47:28 +0000</pubDate>
		<dc:creator>Grant</dc:creator>
				<category><![CDATA[Link]]></category>
		<category><![CDATA[ML]]></category>
		<category><![CDATA[OCaml]]></category>
		<category><![CDATA[Programming Language]]></category>

		<guid isPermaLink="false">http://www.wisdomandwonder.com/?p=5310</guid>
		<description><![CDATA[The Enhanced Ocaml Documentation is provided by Hendrik Tews; basically it visually highlights any difference between the previous and current version of the documentation. Here is how he does it: I diff the txt versions of the reference manual and change the html version by hand. For the grammar rule index I use a tool [...]]]></description>
				<content:encoded><![CDATA[<p>The <a href="http://www.askra.de/ocaml-doc/3.12">Enhanced Ocaml Documentation</a> is provided by Hendrik Tews; basically it visually highlights any difference between the previous and current version of the documentation. Here is how he does it:</p>
<blockquote><p>
I diff the txt versions of the reference manual and change the html version by hand. For the grammar rule index I use a tool and manual editing.</p></blockquote>
<p>&#8211;Hendrik Tews</p>
<p>Wow. What a labor of love. Be sure to give him a hand!</p>
<p>(via <a href="http://caml.inria.fr/pub/ml-archives/caml-list/2010/09/1a6851c39a25cb011ac6a57ef3eda729.en.html">Caml-list</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wisdomandwonder.com/link/5310/enhanced-ocaml-documentation-version-3-12/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resources for Learning CamlP4</title>
		<link>http://www.wisdomandwonder.com/link/5302/resources-for-learning-camlp4</link>
		<comments>http://www.wisdomandwonder.com/link/5302/resources-for-learning-camlp4#comments</comments>
		<pubDate>Sat, 25 Sep 2010 02:42:51 +0000</pubDate>
		<dc:creator>Grant</dc:creator>
				<category><![CDATA[Link]]></category>
		<category><![CDATA[ML]]></category>
		<category><![CDATA[OCaml]]></category>
		<category><![CDATA[Programming Language]]></category>

		<guid isPermaLink="false">http://www.wisdomandwonder.com/?p=5302</guid>
		<description><![CDATA[For an accessible introduction to modern (>= 3.10) Camlp4, you may be interested in Jake Donham&#8217;s blog post series &#8220;Reading Camlp4&#8243; : http://ambassadortothecomputers.blogspot.com/search/label/camlp4 You will also find valuable (though incomplete) information on the camlp4 wiki : http://brion.inria.fr/gallium/index.php/Camlp4 The older version of camlp4 (< 3.10, now called camlp5) also provides a documentation http://caml.inria.fr/pub/docs/tutorial-camlp4/index.html , and you [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p>For an accessible introduction to modern (>= 3.10) Camlp4, you may be interested in Jake Donham&#8217;s blog post series &#8220;Reading Camlp4&#8243; : <a href="http://ambassadortothecomputers.blogspot.com/search/label/camlp4">http://ambassadortothecomputers.blogspot.com/search/label/camlp4</a><br />
You will also find valuable (though incomplete) information on the camlp4 wiki : <a href="http://brion.inria.fr/gallium/index.php/Camlp4">http://brion.inria.fr/gallium/index.php/Camlp4</a></p>
<p>The older version of camlp4 (< 3.10, now called camlp5) also provides a documentation<br />
<a href="http://caml.inria.fr/pub/docs/tutorial-camlp4/index.html">http://caml.inria.fr/pub/docs/tutorial-camlp4/index.html</a> , and you can also use to Martin Jambon&#8217;s tutorial<br />
<a href="http://martin.jambon.free.fr/extend-ocaml-syntax.html">http://martin.jambon.free.fr/extend-ocaml-syntax.html</a> (for the older camlp4).</p></blockquote>
<p>&#8211; bluestorm</p>
<blockquote><p>You can also see the articles in sequence at</p>
<p> <a href="http://ambassadortothecomputers.blogspot.com/p/reading-camlp4.html">http://ambassadortothecomputers.blogspot.com/p/reading-camlp4.html<br />
</a><br />
which I recommend since later articles depend on earlier material.</p></blockquote>
<p>&#8211; Jake Donham</p>
<blockquote><p>Shameless self-plug, but I wrote a blog post this summer about my experience figuring out how to do it.  I provide a walk-through and explanation of a minimal syntax extension which adds lazy list pattern matching support based on Batteries.  The URL:</p>
<p><a href="http://www.elehack.net/michael/blog/2010/06/ocaml-syntax-extension">http://www.elehack.net/michael/blog/2010/06/ocaml-syntax-extension</a></p>
<p>I do assume a basic knowledge of parsing context-free grammars, but a generic tutorial on parsing with a tool such as Yacc can fill in that gap.  The Wikipedia article[1] may also be helpful.</p>
<p>Once you&#8217;ve lept the hurdle of figuring out what pieces you need to write and build a syntax extension, the remaining tricky part is to figure out what pieces of the grammar you need to extend to accomplish your objective.  For that, I consult the definition of the OCaml parser in Camlp4OCamlParser.ml in the OCaml source tree.<br />
1. <a href="http://en.wikipedia.org/wiki/Context-free_grammar">http://en.wikipedia.org/wiki/Context-free_grammar</a>
</p></blockquote>
<p>&#8211; Michael Ekstrand</p>
<blockquote><p>If you consider yourself as a n00b, don&#8217;t start by camlp4. This is probably the most difficult part of OCaml &#8212; and to program camlp4 you need to use OCaml standard syntax (or revised syntax, it depends if you<br />
use antiquotations).</p>
<p>If you still want to follow the hard path, as suggested elsewhere, Jake Donham&#8217;s blog posts are very good:</p>
<p> <a href="http://ambassadortothecomputers.blogspot.com/p/reading-camlp4.html">http://ambassadortothecomputers.blogspot.com/p/reading-camlp4.html</a></p>
<p>Or if you are around, there is a tutorial session at CUFP:<br />
<a href="http://cufp.org/conference/sessions/2010/camlp4-and-template-haskell">http://cufp.org/conference/sessions/2010/camlp4-and-template-haskell</a>.<br />
(but you need to subscribe).
</p></blockquote>
<p>&#8211; Sylvain Le Gall</p>
<p>(via <a href="http://groups.google.com/group/fa.caml/browse_thread/thread/1751a2c308742ac3/9868366e281f02c1?lnk=gst&#038;q=what+do+I+need+to+know+to+understand+camlp">Caml-list</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wisdomandwonder.com/link/5302/resources-for-learning-camlp4/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Objective Caml for Multicore Architectures</title>
		<link>http://www.wisdomandwonder.com/link/5238/objective-caml-for-multicore-architectures</link>
		<comments>http://www.wisdomandwonder.com/link/5238/objective-caml-for-multicore-architectures#comments</comments>
		<pubDate>Mon, 13 Sep 2010 12:31:25 +0000</pubDate>
		<dc:creator>Grant</dc:creator>
				<category><![CDATA[Link]]></category>
		<category><![CDATA[ML]]></category>
		<category><![CDATA[OCaml]]></category>
		<category><![CDATA[Programming Language]]></category>

		<guid isPermaLink="false">http://www.wisdomandwonder.com/?p=5238</guid>
		<description><![CDATA[Efforts being made on one of the biggest criticisms of OCaml. (via Caml-list)]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.algo-prog.info/ocmc/web/">Efforts</a> being made on one of the biggest criticisms of OCaml.</p>
<p>(via Caml-list)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wisdomandwonder.com/link/5238/objective-caml-for-multicore-architectures/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unison on the iPhone</title>
		<link>http://www.wisdomandwonder.com/link/5208/unison-on-the-iphone</link>
		<comments>http://www.wisdomandwonder.com/link/5208/unison-on-the-iphone#comments</comments>
		<pubDate>Sat, 11 Sep 2010 20:13:37 +0000</pubDate>
		<dc:creator>Grant</dc:creator>
				<category><![CDATA[Link]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[ML]]></category>
		<category><![CDATA[OCaml]]></category>
		<category><![CDATA[Programming Language]]></category>

		<guid isPermaLink="false">http://www.wisdomandwonder.com/?p=5208</guid>
		<description><![CDATA[Here is how to get Unison running on the iPhone. Nice. Via Sylvain via LinkedIn-Ocaml Developers.]]></description>
				<content:encoded><![CDATA[<p><a href="http://web.yl.is.s.u-tokyo.ac.jp/~tosh/ocaml-on-iphone/unison-on-iphone/">Here </a>is how to get <a href="http://www.cis.upenn.edu/~bcpierce/unison/">Unison </a>running on the iPhone. Nice.</p>
<p>Via Sylvain via LinkedIn-Ocaml Developers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wisdomandwonder.com/link/5208/unison-on-the-iphone/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ocamlnet-3.0.0</title>
		<link>http://www.wisdomandwonder.com/link/5120/ocamlnet-3-0-0</link>
		<comments>http://www.wisdomandwonder.com/link/5120/ocamlnet-3-0-0#comments</comments>
		<pubDate>Wed, 01 Sep 2010 21:55:33 +0000</pubDate>
		<dc:creator>Grant</dc:creator>
				<category><![CDATA[Link]]></category>
		<category><![CDATA[ML]]></category>
		<category><![CDATA[OCaml]]></category>
		<category><![CDATA[Programming Language]]></category>

		<guid isPermaLink="false">http://www.wisdomandwonder.com/?p=5120</guid>
		<description><![CDATA[I&#8217;m very proud to announce Ocamlnet 3.0.0, a completely overhauled version of Ocamlnet. Wish I had some problems that needed solving with ocamlnet! (via caml-list)]]></description>
				<content:encoded><![CDATA[<blockquote><p>I&#8217;m very proud to announce Ocamlnet 3.0.0, a completely overhauled version of <a href="http://projects.camlcity.org/projects/dl/ocamlnet-3.0.0/doc/html-main/index.html">Ocamlnet</a>.</p></blockquote>
<p>Wish I had some problems that needed solving with ocamlnet!</p>
<p>(via caml-list)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wisdomandwonder.com/link/5120/ocamlnet-3-0-0/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delimited continuations on OCaml</title>
		<link>http://www.wisdomandwonder.com/link/5041/delimited-continuations-on-ocaml</link>
		<comments>http://www.wisdomandwonder.com/link/5041/delimited-continuations-on-ocaml#comments</comments>
		<pubDate>Sat, 21 Aug 2010 15:20:43 +0000</pubDate>
		<dc:creator>Grant</dc:creator>
				<category><![CDATA[Link]]></category>
		<category><![CDATA[ML]]></category>
		<category><![CDATA[OCaml]]></category>
		<category><![CDATA[Programming Language]]></category>

		<guid isPermaLink="false">http://www.wisdomandwonder.com/?p=5041</guid>
		<description><![CDATA[Via Oleg: The library delimcc directly implementing delimited continuations on OCaml now supports native code (ocamlopt) on selected platforms. http://okmij.org/ftp/continuations/caml-shift.tar.gz The library delimcc implements shift/reset, prompt/control, shift0, control0 delimited continuation operators with multiple, arbitrarily typed prompts. The delimcc implementation is direct: it copies only the relevant fragment of the OCaml stack. The implementation is fully [...]]]></description>
				<content:encoded><![CDATA[<p><span id="more-5041"></span><br />
Via <a href="oleg@okmij.org">Oleg</a>:</p>
<blockquote><p>The library delimcc directly implementing <a href="http://en.wikipedia.org/wiki/Delimited_continuation">delimited continuations</a> on<br />
OCaml now supports native code (ocamlopt) on selected platforms.</p>
<p>     <a href="http://okmij.org/ftp/continuations/caml-shift.tar.gz">http://okmij.org/ftp/continuations/caml-shift.tar.gz</a></p>
<p>The library delimcc implements shift/reset, prompt/control, shift0,<br />
control0 delimited continuation operators with multiple, arbitrarily<br />
typed prompts. The delimcc implementation is direct: it copies only<br />
the relevant fragment of the OCaml stack. The implementation is fully<br />
integrated with OCaml exceptions: exception handlers may be captured<br />
in delimited continuations (and re-instated when the captured<br />
continuation is installed); exceptions remove the prompts along the<br />
way. The implementation has no typing problems, no bizarre &#8216;a cont<br />
types, and no use for magic.</p>
<p>The library delimcc does *no* patching of the OCaml system and is a<br />
regular (static or dynamically-loaded) library.  The library is<br />
therefore _perfectly_ compatible with any existing OCaml code, source<br />
or binary.</p>
<p>The native- and byte-code versions of the library implement the<br />
identical interface, described in delimcc.mli. Furthermore, the OCaml<br />
code for the two versions is identical. Only the C code files,<br />
implementing scAPI, differ for native-code.</p>
<p>Using the native-code version is identical to the byte-code version of<br />
delimcc. No source code has to be changed; it has to be compiled using<br />
ocamlopt rather than ocamlc.</p>
<p>This is the first release of the library, for OCaml 3.11.  It has been<br />
tested on i386 (x86_32) platform, on FreeBSD and Linux.  The library<br />
could perhaps be used on other platforms (on which stack grows<br />
downwards); x86_32 is the only platform available to me. At any write,<br />
the library contains no custom-written assembly code (although I<br />
couldn&#8217;t avoid reading a lot of assembly code).</p>
<p>This is the first release of the native-code version, hence stressing<br />
correctness at the expense of performance. A notable performance drain<br />
is emulating data types with a custom GC scanning<br />
function. Custom-scanned data types are possible without any changes<br />
to OCaml, thanks to the provided GC hooks. Alas, the emulation doesn&#8217;t<br />
seem to be efficient. A co-operation from the OCaml system would be<br />
greatly appreciated. I have a hunch that custom-scan data types could<br />
be useful for many other applications, for heap-allocating structures<br />
with OCaml values intermixed with unboxed data.</p>
<p>It should be noted that the very operation of capturing and<br />
reinstalling a delimited continuations will always be faster in<br />
byte-code than in the native code. First of all, the byte-code<br />
delimited continuation is smaller. Second, it is a uniform a sequence<br />
of values or code pointers. In contrast, the corresponding captured<br />
native-code delimited continuation &#8212; the portion of the C stack &#8212; is<br />
not only bigger, but also contains unboxed values. We have to use<br />
frame tables to figure out which stack slots contain live heap<br />
pointers. Saving native-code delimited continuation is inherently more<br />
complex.  In fact, all the complexity of the native-code delimcc was<br />
tidying the stack to please GC.</p>
<p>One should keep in mind the fundamental limitation of native-code<br />
delimited continuations &#8212; the limitation that also holds for Scheme<br />
and other systems with delimited control. The limitation concerns<br />
capturing continuations in the OCaml code invoked as a call-back from<br />
C code, which was, in turn, called from OCaml. It is safe to capture a<br />
delimited continuation in the callback _provided_ the extent of the<br />
captured continuation is limited to the call-back. The continuation<br />
captured in the callback may be resumed within the call-back or after<br />
the call-back has exited.  One must not capture the continuation<br />
through the C code that invoked the call-back. In short, no C frames<br />
may be captured in delimited continuations. The library detects C<br />
frames in captured continuations, and throws a run-time error. Such a<br />
behavior of delimcc is consistent with the behavior of native-code<br />
Scheme systems.
</p></blockquote>
<p>(via Caml-list)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wisdomandwonder.com/link/5041/delimited-continuations-on-ocaml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yaron&#8217;s Effective ML Lessons</title>
		<link>http://www.wisdomandwonder.com/link/5037/yarons-effective-ml-lessons</link>
		<comments>http://www.wisdomandwonder.com/link/5037/yarons-effective-ml-lessons#comments</comments>
		<pubDate>Sat, 21 Aug 2010 05:28:54 +0000</pubDate>
		<dc:creator>Grant</dc:creator>
				<category><![CDATA[Link]]></category>
		<category><![CDATA[ML]]></category>
		<category><![CDATA[OCaml]]></category>
		<category><![CDATA[Programming Language]]></category>

		<guid isPermaLink="false">http://www.wisdomandwonder.com/?p=5037</guid>
		<description><![CDATA[* Favor readers over writers * Create uniform interfaces * Make illegal states unrepresentable * Code for exhaustiveness * Open few modules * Make common errors obvious * Avoid boilerplate * Avoid complex type-hackery * Don&#8217;t be puritanical about purity (via janestreet)]]></description>
				<content:encoded><![CDATA[<blockquote><p>
    * Favor readers over writers<br />
    * Create uniform interfaces<br />
    * Make illegal states unrepresentable<br />
    * Code for exhaustiveness<br />
    * Open few modules<br />
    * Make common errors obvious<br />
    * Avoid boilerplate<br />
    * Avoid complex type-hackery<br />
    * Don&#8217;t be puritanical about purity
</p></blockquote>
<p>(via <a href="http://ocaml.janestcapital.com/?q=node/75">janestreet</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wisdomandwonder.com/link/5037/yarons-effective-ml-lessons/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Caml Trading talk at CMU</title>
		<link>http://www.wisdomandwonder.com/link/4900/caml-trading-talk-at-cmu</link>
		<comments>http://www.wisdomandwonder.com/link/4900/caml-trading-talk-at-cmu#comments</comments>
		<pubDate>Tue, 01 Jun 2010 01:11:25 +0000</pubDate>
		<dc:creator>Grant</dc:creator>
				<category><![CDATA[Link]]></category>
		<category><![CDATA[ML]]></category>
		<category><![CDATA[OCaml]]></category>
		<category><![CDATA[Programming Language]]></category>

		<guid isPermaLink="false">http://www.wisdomandwonder.com/?p=4900</guid>
		<description><![CDATA[Here is an old but good presentation about Janestreet, with a discussion of why OCaml fits in the company. When asked how they deal with the inevitable difficulty in hiring OCaml programmers, Yaron replied something to the effect that: If you don&#8217;t hire bad programmers, many things become easier.]]></description>
				<content:encoded><![CDATA[<p><a href="http://ocaml.janestreet.com/?q=node/61">Here</a> is an old but good presentation about Janestreet, with a discussion of why OCaml fits in the company.</p>
<p>When asked how they deal with the inevitable difficulty in hiring OCaml programmers, Yaron replied something to the effect that:</p>
<blockquote><p>If you don&#8217;t hire bad programmers, many things become easier.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.wisdomandwonder.com/link/4900/caml-trading-talk-at-cmu/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
