From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 9194980113 for ; Wed, 5 Apr 2017 01:43:17 +0200 (CEST) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jdh302@jdh302.plus.com; spf=None smtp.mailfrom=jdh302@jdh302.plus.com; spf=None smtp.helo=postmaster@rgout01.bt.lon5.cpcloud.co.uk Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jdh302@jdh302.plus.com) identity=pra; client-ip=65.20.0.124; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jdh302@jdh302.plus.com"; x-sender="jdh302@jdh302.plus.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jdh302@jdh302.plus.com) identity=mailfrom; client-ip=65.20.0.124; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jdh302@jdh302.plus.com"; x-sender="jdh302@jdh302.plus.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@rgout01.bt.lon5.cpcloud.co.uk) identity=helo; client-ip=65.20.0.124; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jdh302@jdh302.plus.com"; x-sender="postmaster@rgout01.bt.lon5.cpcloud.co.uk"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3A7Aw9ZhcEwQks/mw21Fzf1++UlGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxcW7bR7h7PlgxGXEQZ/co6odzbGH7+a4ASQp2tWoiDg6aptCVhsI24?= =?us-ascii?q?09vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7?= =?us-ascii?q?Ovr6Gp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/sgtMYHWcOvwo+V/DqhUaZUT9TYnayR7?= =?us-ascii?q?gz6is6CIKgF4fDR5qijKaP3CehTdVqYTUSAVmJFTLsdp6Yc/YKciObZMF7xG8+?= =?us-ascii?q?WKClWrMmgEWsswnSxbRsKezP5ykEvJToxZ5+4OiFxj8o8jkhReaa1SmtRntumX?= =?us-ascii?q?tCD2s00KAk+RZVyFuDivAixeRcCMcV7PRMBFRpfaXAxvB3XoihEjnKec2EHQr3?= =?us-ascii?q?Tw=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AwAQAqL+RYh3wAFEFdHRgHCwEXAQYBg?= =?us-ascii?q?jeBR4ELjmiPPQEBBpkEJYVEhEEUAQEBAQEBAQEBAQESAQEBCA0JCCgvgjMKgmc?= =?us-ascii?q?CI1kFaD8BBB4FiXENBAqcF4dyijuEaINtgkIFhgmMVAyDDQWBKwEBAZs1CAEBA?= =?us-ascii?q?YIKhHKLU5E8k3U2bDpbVmgyg1CBcHQBBIkWAQEB?= X-IPAS-Result: =?us-ascii?q?A0AwAQAqL+RYh3wAFEFdHRgHCwEXAQYBgjeBR4ELjmiPPQE?= =?us-ascii?q?BBpkEJYVEhEEUAQEBAQEBAQEBAQESAQEBCA0JCCgvgjMKgmcCI1kFaD8BBB4Fi?= =?us-ascii?q?XENBAqcF4dyijuEaINtgkIFhgmMVAyDDQWBKwEBAZs1CAEBAYIKhHKLU5E8k3U?= =?us-ascii?q?2bDpbVmgyg1CBcHQBBIkWAQEB?= X-IronPort-AV: E=Sophos;i="5.36,276,1486422000"; d="scan'208,217";a="219271638" Received: from rgout0104.bt.lon5.cpcloud.co.uk (HELO rgout01.bt.lon5.cpcloud.co.uk) ([65.20.0.124]) by mail3-smtp-sop.national.inria.fr with ESMTP; 05 Apr 2017 01:42:46 +0200 X-OWM-Source-IP: 86.185.244.136 (GB) X-OWM-Env-Sender: jonathandeanharrop@btinternet.com X-Junkmail-Premium-Raw: score=8/50,refid=2.7.2:2017.4.4.233618:17:8.907,ip=,rules=__HAS_REPLYTO, __HAS_FROM, __TO_MALFORMED_2, __TO_NO_NAME, __SUBJ_ALPHA_END, __HAS_MSGID, __SANE_MSGID, __MIME_VERSION, __CT, __CTYPE_MULTIPART_ALT, __CTYPE_HAS_BOUNDARY, __CTYPE_MULTIPART, __HAS_X_MAILER, __OUTLOOK_MUA_1, __USER_AGENT_MS_GENERIC, RCVD_FROM_IP_DATE, __MIME_TEXT_P2, __MIME_TEXT_H2, __KNOWN_FREEWEB_URI3[https://groups.google.com/ [groups.google.com] [groups.google.com]], __ANY_URI, __HTTPS_URI, __URI_WITH_PATH, URI_ENDS_IN_HTML, __URI_NO_MAILTO, __URI_NO_WWW, __CP_URI_IN_BODY, ECARD_KNOWN_DOMAINS, __MULTIPLE_URI_TEXT, __HTML_MSWORD, __URI_IN_BODY, __URI_NOT_IMG, __MULTIPLE_URI_HTML, __HTML_AHREF_TAG, __STYLE_RATWARE_NEG, __STYLE_TAG, __HAS_HTML, __HTML_TAG_DIV, BODYTEXTP_SIZE_3000_LESS, BODYTEXTH_SIZE_3000_MORE, BODY_SIZE_6000_6999, BODYTEXTH_SIZE_10000_LESS, __MIME_TEXT_H1, __MIME_TEXT_P1, __MIME_HTML, __TAG_EXISTS_HTML, __URI_NS, HTML_50_70, __OUTLOOK_MUA, KNOWN_FREEWEB_URI, __MIME_TEXT_H, __MIME_TEXT_P, FORGED_MUA_OUTLOOK, REPLYTO_FROM_DIFF_ADDY, BODY_SIZE_7000_LESS, URI_WITH_PATH_ONLY Received: from DESKTOPP9HQ56R (86.185.244.136) by rgout01.bt.lon5.cpcloud.co.uk (9.0.019.13-1) (authenticated as jonathandeanharrop@btinternet.com) id 58C6B8A3025B5A0C for caml-list@inria.fr; Wed, 5 Apr 2017 00:42:45 +0100 Reply-To: From: "Jon Harrop" To: Date: Wed, 5 Apr 2017 00:42:45 +0100 Organization: Flying Frog Consultancy Message-ID: <023a01d2ad9d$295a4c20$7c0ee460$@jdh302.plus.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_023B_01D2ADA5.8B1F5060" X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdKtmtn5gta56jhqQ6a6r45FrkkeHg== Content-Language: en-gb X-Validation-by: jdh302@jdh302.plus.com Subject: [Caml-list] 100-line compiler written in OCaml using LLVM reloaded This is a multipart message in MIME format. ------=_NextPart_000_023B_01D2ADA5.8B1F5060 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit About 10 years ago I wrote this 100-line compiler for fun: https://groups.google.com/forum/#!msg/fa.caml/i6IgSFX8XkY/4khF8z1V7loJ I thought it would be cool to bring it back from the dead but I quickly got stuck. I now have Opam, OCaml 4.03 and LLVM 4.0 installed on an Ubuntu box and (I assume) running. The first problem I hit is how I am supposed to build such things these days. I tried to look it up on the developer tools page: https://ocaml.org/learn/tutorials/dev_tools.html But I immediately hit a bug on that page: The "under construction" gif isn't properly animated. It should look like this, of course: https://camo.githubusercontent.com/4a7cf94aedbd23c13cc2d75fdc3b2af5c816c208/ 687474703a2f2f7374617469632e646967672e636f6d2f7374617469632f696d616765732f64 69676765722e676966 After the GIF I must say I found type is text data matches file from the section on Plumbimg really useful. Someone should really add an obituary for the author of the "Compilation tools" section who sadly passed away before completing it. I leafed through the section headings there, noted that Oasis is inspired by Cabal and quickly crossed it off my list and decided to go with "ocamlbuild" instead. If I do: ocamlbuild miniml.byte Then I get an error about my parser. I'm guessing this is because I used an inline parser courtesy of camlp4 (or camlp5, I forget which) which has been replaced with PPX which, I'm guessing, cannot do this. If so, what is the easiest way to get this code running and how should I be building it? Cheers, Jon. ------=_NextPart_000_023B_01D2ADA5.8B1F5060 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

About 10= years ago I wrote this 100-line compiler for fun:

 

https://grou= ps.google.com/forum/#!msg/fa.caml/i6IgSFX8XkY/4khF8z1V7loJ

 

I thought = it would be cool to bring it back from the dead but I quickly got stuck. I = now have Opam, OCaml 4.03 and LLVM 4.0 installed on an Ubuntu box and (I as= sume) running.

 

The first problem I hit is how I am supposed to build such= things these days. I tried to look it up on the developer tools page:=

 

https://ocaml.or= g/learn/tutorials/dev_tools.html

 

But I immediately hit a bug on that = page: The “under construction” gif isn’t properly animate= d. It should look like this, of course:

=  

= https://camo.githubusercontent.com/4a7cf94aedbd23c13cc2d75fdc3b2af5c816c208= /687474703a2f2f7374617469632e646967672e636f6d2f7374617469632f696d616765732f= 6469676765722e676966

 

After the GIF I must say I found type is text da= ta matches file from the section on Plumbimg really useful.

<= p class=3DMsoNormal> 

Someone shoul= d really add an obituary for the author of the “Compilation toolsR= 21; section who sadly passed away before completing it. I leafed through th= e section headings there, noted that Oasis is inspired by Cabal and quickly= crossed it off my list and decided to go with “ocamlbuild” ins= tead.

 

If I do:

 

ocamlbuild miniml.byte

 

Then I get an error about my pa= rser. I’m guessing this is because I used an inline parser courtesy o= f camlp4 (or camlp5, I forget which) which has been replaced with PPX which= , I’m guessing, cannot do this. If so, what is the easiest way to get= this code running and how should I be building it?

 

Cheers,

Jon.

 <= /o:p>

= ------=_NextPart_000_023B_01D2ADA5.8B1F5060--