<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:Calibri;
color:windowtext;}
span.msoIns
{mso-style-type:export-only;
mso-style-name:"";
text-decoration:underline;
color:teal;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:595.0pt 842.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body bgcolor="white" lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri;mso-fareast-language:EN-US">Agreed. The write-in-SML and compile-with-polyc experience is not so awful either.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri;mso-fareast-language:EN-US">Michael<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-family:Calibri;color:black">From: </span>
</b><span style="font-family:Calibri;color:black">Ramana Kumar <Ramana.Kumar@cl.cam.ac.uk><br>
<b>Date: </b>Friday, 11 November 2016 at 16:43<br>
<b>To: </b>Magnus Myreen <magnus.myreen@gmail.com><br>
<b>Cc: </b>"Norrish, Michael (Data61, Canberra City)" <Michael.Norrish@data61.csiro.au>, "developers@cakeml.org" <developers@cakeml.org><br>
<b>Subject: </b>Re: FW: Holmakefile hacking<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">By the way, even if you write the initial version of this in Python, I think it should eventually be written in ML (standard or preferably cake). Our verified libraries should eventually become good enough to support such applications easily.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 11 November 2016 at 16:33, Ramana Kumar <<a href="mailto:Ramana.Kumar@cl.cam.ac.uk" target="_blank">Ramana.Kumar@cl.cam.ac.uk</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal">I think this should have been sent to <a href="mailto:developers@cakeml.org" target="_blank">
developers@cakeml.org</a> by the way - was it dev on purpose?<o:p></o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 11 November 2016 at 16:17, Magnus Myreen <<a href="mailto:magnus.myreen@gmail.com" target="_blank">magnus.myreen@gmail.com</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Thanks! <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Fri, 11 Nov 2016 at 06:14, <<a href="mailto:Michael.Norrish@data61.csiro.au" target="_blank">Michael.Norrish@data61.csiro.au</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">(Realised that my original reply only went to Magnus.)<br>
<br>
As with all Makefiles, the indentation in the Makefile rules has to be a TAB character.<br>
<br>
Michael<br>
<br>
On 11/11/16, 16:12, "Norrish, Michael (Data61, Canberra City)" <<a href="mailto:Michael.Norrish@data61.csiro.au" target="_blank">Michael.Norrish@data61.csiro.au</a>> wrote:<br>
<br>
Sure. One approach would be to add something like<br>
<br>
Foo.doc: FooScript.sml<br>
python ../../dev/generate_readme.py < $< > $@<br>
<br>
for every script file in the directory.<br>
<br>
Alternatively, it might be slightly annoying to have to write one such rule for every such script file, so you could also do the slightly hacky:<br>
<br>
DOC_SOURCES = $(wildcard *Script.sml)<br>
DOC_TARGETS = $(patsubst %Script.sml,%.doc,$(DOC_SOURCES))<br>
<br>
all: $(DOC_TARGETS)<br>
.PHONY: all<br>
<br>
<br>
$(DOC_TARGETS): $(DOC_SOURCES)<br>
python ../../dev/generate_readme.py < $(patsubst %.doc,%Script.sml,$@) > $@<br>
<br>
the hackiness here comes from the fact that every .doc file is held to depend on all the scripts, so that if you change 1 script file, all of the doc-files will get rebuilt. (Using wildcard isn’t great style either.) Assuming the doc-generator is quick,
this shouldn’t be a practical issue though.<br>
<br>
I hope this helps. I’ve tested it (using head -10 instead of a python program), and it seems to behave the right way.<br>
<br>
Michael<br>
<br>
On 11/11/16, 15:52, "Magnus Myreen" <<a href="mailto:magnus.myreen@gmail.com" target="_blank">magnus.myreen@gmail.com</a>> wrote:<br>
<br>
Hi Michael,<br>
<br>
Quick question, you wrote the following under<br>
<a href="https://github.com/CakeML/cakeml/issues/71" target="_blank">https://github.com/CakeML/cakeml/issues/71</a><br>
<br>
The right way to do this would be to write a tool that<br>
generates these from the script files, and to then have the<br>
directory's Holmakefile try to generate one such in every<br>
directory.<br>
<br>
I might write the tool during one of my flights, and I wonder<br>
what the right rule looks like in the Holmakefile.<br>
<br>
Could you provide me with a snippet of Holmakefile code that runs<br>
my tool, say, invoked by python ../../dev/generate_readme.py ?<br>
<br>
Thanks!<br>
<br>
Cheers,<br>
Magnus<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Dev mailing list<br>
<a href="mailto:Dev@cakeml.org" target="_blank">Dev@cakeml.org</a><br>
<a href="https://lists.cakeml.org/listinfo/dev" target="_blank">https://lists.cakeml.org/listinfo/dev</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
Dev mailing list<br>
<a href="mailto:Dev@cakeml.org" target="_blank">Dev@cakeml.org</a><br>
<a href="https://lists.cakeml.org/listinfo/dev" target="_blank">https://lists.cakeml.org/listinfo/dev</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>