Damien Doligez | 31 Jul 17:15 2015
Picon
Picon

OCaml Users and Developers Workshop: call for participation

==============================================================================

                              OCAML 2015
               The  OCaml Users and Developers Workshop
                http://ocaml.org/meetings/ocaml/2015/
                 Vancouver, British Columbia, Canada
                         September 4, 2015

                        CALL FOR PARTICIPATION

                      Co-located with ICFP 2015
                         Sponsored by SIGPLAN

          Early registration deadline: Monday 3 August 2015

==============================================================================

Register online: https://regmaster4.com/2015conf/ICFP15/register.php

The OCaml Users and Developers Workshop brings together industrial users of
OCaml with academics and hackers who are working on extending the language,
type system and tools.

OUD 2015 will be held in Vancouver on 4 September, immediately after
ICFP and ML 2015.

Programme
=========

8:40 - 8:45 Welcome
(Continue reading)

Ashish Agarwal | 31 Jul 15:48 2015
Picon

selecting GADT parameter

I have:

type _ t =
| Foo1 : 'a * int -> int t
| Foo2 : 'a * string -> 'a t

but I really want to merge these two cases. I want the return type to be based on the second arg when the second arg is int, and be based on the first arg otherwise. Any way to accomplish that?

immanuel litzroth | 31 Jul 11:49 2015
Picon

info files

A set of info files is distributed for use in emacs.
the are ocaml.info.gz and ocaml.info.body-??.gz which seem to be normal info
files but don't contain an complete index, only for keywords and the library...
then there are these file also packaged
ocaml.info.haux.gz  
ocaml.info.hocaml.info.hind.gz  
ocaml.info.hocaml.info.kwd.hind.gz
They don't look like info files -- what are they supposed to do?

I'm trying to get C-h C-S to work with ocaml if anyone has a decent setup for that
(s)he wants to share...
Best Wishes
Immanuel
Jorge A. Perez | 31 Jul 09:51 2015
Picon

Deadline extension: DCM 2015 (Cali, Colombia / Co-located with ICTAC 2015)

======================================================
FINAL CALL FOR PAPERS -- DCM 2015

11th International Workshop on Developments in Computational Models

October 28, 2015, Cali, Colombia
http://dcm-workshop.org.uk/2015/

A satellite event of ICTAC 2015 - http://www.ictac2015.co

DEADLINE FOR SUBMISSION OF EXTENDED ABSTRACTS (5 pages):
AUGUST 17, 2015
======================================================

Several new models of computation have emerged in the last few years, and
many developments of traditional computational models have been proposed
with the aim of taking into account the new demands of computer systems
users and the new capabilities of computation engines. A new computational
model, or a new feature in a traditional one, usually is reflected in a
new family of programming languages, and new paradigms of software
development.

DCM 2015 is the eleventh in a series of international workshops focusing
on new computational models. The aim of this workshop is to bring together
researchers who are currently developing new computational models or new
features for traditional computational models, in order to foster their
interaction, to provide a forum for presenting new ideas and work in
progress, and to enable newcomers to learn about current activities in
this area.

DCM 2015 will be a one-day satellite event of ICTAC 2015, the Twelfth
International Colloquium on Theoretical Aspects of Computing.

== TOPICS OF INTEREST
Topics of interest include all abstract models of computation and their
properties, and their applications to the development of programming
languages and systems:

- functional calculi: lambda-calculus, rho-calculus, term and graph
rewriting;
- quantum computation, including implementations and formal methods in
quantum protocols;
- probabilistic computation and verification in modeling situations;
- chemical, biological and bio-inspired computation, including spatial
models, self-assembly, growth models;
- models of concurrency, including the treatment of mobility, trust, and
security;
- infinitary models of computation;
- information-theoretic ideas in computing.

== IMPORTANT DATES
- Submission Deadline for Extended Abstracts: August 17 (extended)
- Notification: 13 September
- Pre-proceedings version due: 5 October
- Workshop: 28 October
- Submission Deadline for EPTCS Proceedings: 7 December

== INVITED SPEAKERS
Mauricio Ayala Rincón, Universidade de Brasilia (Brazil).
Gilles Dowek, INRIA (France).

== SUBMISSIONS
Submit your paper in PDF format via the conference EasyChair submission
page:
https://www.easychair.org/conferences/?conf=dcm2015

Submissions should be an abstract of at most 5 pages, written in English.
Simultaneous submission to journals, conferences or other workshops is not
permitted. Please use the EPTCS macro package and follow the instructions
of EPTCS, following the EPTCS style:
http://style.eptcs.org/

A submission may contain an appendix, but reading the appendix should not
be necessary to assess its merits. After the workshop authors are invited
to submit a full paper of their presentation. Accepted contributions will
appear in an issue of EPTCS.

== PROGRAM COMMITTEE:
Mario Benevides (Brazil)
Luís Caires (Portugal)
Ugo Dal Lago (Italy)
Nachum Dershowitz (Israel)
Jérôme Feret (France)
Marcelo Frias (Argentina)
Russ Harmer (France)
Ivan Lanese (Italy)
Radu Mardare (Denmark)
Elvira Mayordomo (Spain)
César A. Muñoz (USA) - chair
Jorge A. Pérez (The Netherlands) - chair
Andrés Sicard-Ramírez (Colombia)
Alexandra Silva (The Netherlands)
Daniele Varacca (France)

--
Jorge A. Pérez
Assistant Professor
Johann Bernoulli Institute for Mathematics and Computer Science
University of Groningen
Groningen, The Netherlands
URL: http://www.jorgeaperez.net

--

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
Daniel de Rauglaudre | 30 Jul 19:47 2015
Picon
Picon

Camlp5 6.14 compatible with OCaml 4.02.3 released

Hi,

Camlp5 6.14 released, compatible with all versions of OCaml up to 4.02.4.
Has been tested with coq v8.5.

Download sources at
  http://camlp5.gforge.inria.fr/

Thanks.

-- 
Daniel de Rauglaudre
http://pauillac.inria.fr/~ddr/

--

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Richard W.M. Jones | 30 Jul 16:25 2015

camlp5 for OCaml 4.02.3


I wonder if anyone has created a patch to make camlp5 work with
the most recent OCaml release?

Rich.

-- 
Richard Jones
Red Hat

--

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Evgeny Roubinchtein | 30 Jul 04:29 2015
Picon

Cannot compile ocamlrun on Windows with MSVC toolchain

Dear OCaml users and developers,

I am trying to compile a copy of OCaml on Windows 7 amd64, following instructions in README.win32, but "make -f Makefile.nt" world dies with the following error:

make[1]: Entering directory '/cygdrive/c/Users/me/src/ocaml/byterun'
flexlink -merge-manifest -stack 16777216 -exe -o ocamlrun.exe prims.obj ws2_32.lib \
          libcamlrun.lib
** Fatal error: Cannot find file "ws2_32.lib"
Makefile.nt:23: recipe for target 'ocamlrun.exe' failed
make[1]: *** [ocamlrun.exe] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/me/src/ocaml/byterun'

Initial set-up I tried compiling under was: cygwin64 command-line tools + Windows SDK 8.1; I have also tried cygwin32 command-line tools + Microsoft Windows SDK for Windows 7.

My ~/.msenv32 currently looks as follows:
VCPATH="`cygpath -p 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\bin;C:\WINDOWS\Microsoft.NET\Framework\;C:\WINDOWS\Microsoft.NET\Framework\\Microsoft .NET Framework 3.5 (Pre-Release Version);C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCPackages;C:\Program Files\Microsoft SDKs\Windows\v7.0\bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Imaging\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Git\cmd;C:\texlive\2015\bin\win32;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files (x86)\Quarantine\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Mercurial\;c:\usr\bin;C:\MinGW\bin;c:\Program Files\7-Zip;C:\Program Files (x86)\PuTTY'`"
LIBPATH="C:\WINDOWS\Microsoft.NET\Framework\;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB;"
INCLUDE="C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.0\include;;C:\Program Files (x86)\flexdll"
FLPATH="`cygpath 'C:\Program Files (x86)\flexdll'`"
PATH="$VCPATH:$FLPATH:$PATH"
export PATH LIB LIBPATH INCLUDE
export OCAMLBUILD_FIND=/usr/bin/find

,and here is me trying to run the failing flexlink command by hand passing in an extra -L argument:
 ~/src/ocaml/byterun$ flexlink -merge-manifest -L'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib' -stack 16777216 -exe -o ocamlrun.exe prims.obj ws2_32.lib  libcamlrun.lib  
 ** Fatal error: Cannot find file "OLDNAMES"



Dario Teixeira | 29 Jul 13:01 2015

Maps and folds over an AST

Hi everyone!

I have a library (Lambdoc) that exposes a document AST, and I want
to provide an AST mapper and an AST folder, using the same approach
used by the OCaml compiler's Ast_mapper.  Here's a simplified
version of the AST:

   type inline =
     | Text of string
     | Bold of seq
     | Emph of seq

   and seq = inline list

   type block =
     | Picture of string
     | Paragraph of seq
     | Quote of frag

   and frag = block list

Though I could offer separate APIs for mapping/folding, users will
often want to perform both on the same document, and it's kind
of silly to traverse the AST twice.  Now, I realise that clever
users could piggyback one on top of the other and avoid the double
traversing, but unless I'm missing something, this approach is not
very convenient.

Therefore, I'm thinking a providing a generic "transformer" that
handles both mapping and folding in a single pass (see code at the
end).  Anyway, I'm at bit of a loss concerning the terminology here.
Implementation-wise, I'm just doing a fold that also happens to
reconstruct the AST tree as it goes along.  However, as far as the
user is concerned, it seems as if I'm doing both a map and a fold
over the AST.  My question is about terminology: what is the proper
name for this operation?  (Note that for lack of a better word I've
called this a "morpher" in the code below).

Thanks in advance for your time!
Best regards,
Dario Teixeira

type 'a morpher =
     {
     text: 'a morpher -> 'a -> string -> 'a * inline;
     bold: 'a morpher -> 'a -> seq -> 'a * inline;
     emph: 'a morpher -> 'a -> seq -> 'a * inline;
     picture: 'a morpher -> 'a -> string -> 'a * block;
     paragraph: 'a morpher -> 'a -> seq -> 'a * block;
     quote: 'a morpher -> 'a -> frag -> 'a * block;
     }

let morph_inline morpher acc = function
     | Text str -> morpher.text morpher acc str
     | Bold seq -> morpher.bold morpher acc seq
     | Emph seq -> morpher.emph morpher acc seq

let morph_seq morpher acc seq =
     let f inline (acc_alpha, acc_seq) =
         let (acc_alpha', inline') = morph_inline morpher acc_alpha 
inline in
         (acc_alpha', inline' :: acc_seq) in
     List.fold_right f seq (acc, [])

let morph_block morpher acc = function
     | Picture str   -> morpher.picture morpher acc str
     | Paragraph seq -> morpher.paragraph morpher acc seq
     | Quote frag    -> morpher.quote morpher acc frag

(* Nearly identical to morph_seq; commonality can be factored out *)
let morph_frag morpher acc frag =
     let f block (acc_alpha, acc_frag) =
         let (acc_alpha', block') = morph_block morpher acc_alpha block 
in
         (acc_alpha', block' :: acc_frag) in
     List.fold_right f frag (acc, [])

let identity =
     {
     text = (fun morpher acc str -> (acc, Text str));
     bold = (fun morpher acc seq -> let (acc, seq') = morph_seq morpher 
acc seq in (acc, Bold seq'));
     emph = (fun morpher acc seq -> let (acc, seq') = morph_seq morpher 
acc seq in (acc, Emph seq'));
     picture = (fun morpher acc str -> (acc, Picture str));
     paragraph = (fun morpher acc seq -> let (acc, seq') = morph_seq 
morpher acc seq in (acc, Paragraph seq'));
     quote = (fun morpher acc frag -> let (acc, frag') = morph_frag 
morpher acc frag in (acc, Quote frag'));
     }

--

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Goswin von Brederlow | 28 Jul 20:40 2015
Picon

What's the best practice for bindings for c++ templates?

Hi,

I'm halfway done writing a c++ library for a network protocol and
considering writing some bindings for ocaml. The library uses
templates to make objects customizable and am wondering what the best
practice is there.

For a simple example say I have the following:

----------------------------------------------------------------------
template <typename T>
class Foo {
  public:
    Foo(T t);
    ~Foo();
    T swap(T t);
    T get();
};
----------------------------------------------------------------------
type 'a t

val make : 'a -> 'a t
val swap : 'a t -> 'a -> 'a
val get : 'a t -> 'a
----------------------------------------------------------------------

1) For the stub code I need to instantiate the template with 'a, which
obviously doesn't work since the C++ stub has no idea about what type
ocaml will use in the future.

So do I instantiate it with void *? uintptr_t? value?

2) I'm storing ocaml values in C++ structures and getting them back.
How do I make that play nice with the GC?

3) I have the option of changing the libraries API as it's not set in
stone yet. What would be beneficial to interfacing with ocaml (and
maybe python) without making the c++ API to horrible?

E.g. Foo could have:

    void set_T_destructor(void (*destructor)(T *t));

Then ~Foo() would call 'destructor(&t)' to "free" the stored T, which
would unregister it from the GC.

Does that make sense? Is it a bad idea?

Would it be better to add a second template parameter for an Allocator
class that handles interfacing with the GC in the stubs?

Any other little tricks to add to the c++ library to make writing
bindings and working with GCs easier?

What's your experience there?

MfG
	Goswin

--

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Sébastien Hinderer | 28 Jul 17:56 2015
Picon
Picon

updating position in an ocamllex lexer

Dear all,

I have to maintain a lexer which did not, so far, compute token
positions during the lexing step. The positions were computed
later, which was not very eficient. So I am now trying to compute
positions during the lexing and have a problem to figure out what
to do for one token:

  | ['\n'] [' ' '\t' '\r' '\011' '\012' ]* { ... }

When this token is met and contains just "\n", calling new_line on the
lexbuf is enough to keep further position information accurate.

However, if the recognized token is, say, "\n\t", then it seems that the
column for further tokens will be incorrect.

I assumed that I had to manually update the current position and added
code like so:

  let s = Lexing.lexeme lexbuf in
  let l = String.length s in
  let t = TCommentNewline (tokinfo lexbuf) in
  (* Adjust the column manually *)
  Lexing.new_line lexbuf;
  let lcp = lexbuf.lex_curr_p in
  lexbuf.lex_curr_p <- { lcp with
    pos_cnum = lcp.pos_bol + l - 1;
  };
  t

But that does not seem to work.

Does somebody know how such tokens should be handled, please?

Many thanks in advance for any help,

Sébastien.

--

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Peter Sewell | 28 Jul 17:44 2015
Picon
Picon

REMS postdoc researcher / research-engineer positions


Dear all,

we've just advertised for two postdoc researcher / research-engineer
positions, to work with the REMS semantic models of key
infrastructure interfaces (multiprocessor semantics, C, ELF,
filesystems, TCP, TLS ...), emulators and verification tools built
above those, and the semantic tools we use to express them (Lem, Ott,
Coq, HOL4, Isabelle/HOL). If you know of any good potential
candidates, please draw this to their attention:

http://www.jobs.cam.ac.uk/job/7576/

thanks,
Peter

--

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Gmane