Christoph Höger | 31 Oct 15:42 2014
Picon

is it possible to embed an OCaml interpreter into an OCaml Module?


Dear all,

I already asked this on stackoverflow and was pointed to
compiler-libs.toplevel - indeed this API seems to be sufficient to run
an OCaml interpreter from inside an OCaml program (as that seems to be
what utop does).

But ist it also possible in some way to embed that interpreter safely
in an OCaml Module (so I can reuse it e.g. from within utop)?
Currently, it seems that there is exactly one dedicated toplevel for
every running bytecode interpreter and when running utop, it is
already in use.

So what I would need would be the ability to execute a phrase from
within a call of execute_phrase. I already clonded the toploop module
and for tehe time being I am fine with that. What I need is a way to

a) safe the already set ('outer') toplevel value bindings
b) restore the nested value bindings
c) execute the compiled bytecode
d) restore the 'outer' value bindings

is there someone who can point me to a solution?
--

-- 
Christoph Höger

Technische Universität Berlin
Fakultät IV - Elektrotechnik und Informatik
Übersetzerbau und Programmiersprachen
(Continue reading)

Hannes Mehnert | 30 Oct 22:15 2014

[ANN]: tls-0.2, nocrypto-0.2, x509-0.2, asn1-combinators-0.1.1


Dear OCaml hackers,

More than 3 months ago we announced the 0.1 release of our TLS library
pack (BSD licensed). Since then we fixed bugs based on user feedback
and also implemented new features.

Now we prepared a pre-halloween special release :)

Highlights (more details are in CHANGES.md of each repository):
nocrypto-0.2: uses ctypes, DSA, CCM, compiles on 4.02
tls-0.2: epoch exposes information about negotiated session, enum
cleanups (ciphersuites, protocol versions, hash algorithms)
asn1-0.1.1: stricter decoding of integers in tags and OIDs,
performance improvements
x509-0.2: information about used trust anchor, more utility
functions exported

Read our blog series about the initial release at
http://openmirage.org/blog/introducing-ocaml-tls
An https server in OCaml visualising the TLS handshake
https://tls.openmirage.org

The updated packages are already in opam, opam update && opam upgrade
(or opam install tls/nocrypto/x509/asn1-combinators) should be all you
need to do.

If you encounter any issues, please report these on GitHub
https://github.com/mirleft in the appropriate project.

(Continue reading)

Philippe Veber | 30 Oct 15:51 2014
Picon

Typing of a parameterized class where the type parameter is the type of self.

Dear list,

I'm not sure why the following class definition is typed the way it is:

        OCaml version 4.02.1

# class type ['a] c = object ('a) method m : 'b end;;
class type ['a] c = object ('a) constraint 'a = < m : 'b. 'b; .. > method m : 'b end


In particular I don't understand why the method m gets a polymorphic type. This bites me when I try to specialize the type :

# type 'a t = (< m : int ; .. > as 'a) c;;
Error: This type < m : int; .. > should be an instance of type 'a c as 'a
Types for method m are incompatible


Instead of the type with polymorphic methods, I would have expected the following type:

# class type ['a] c = object ('a) constraint 'a = < m : 'b; .. > method m : 'b end;;
class type ['a] c = object ('a) constraint 'a = < m : 'b; .. > method m : 'b end

And then have no problems doing what I wanted:

# type 'a t = (< m : int ; .. > as 'a) c;;
type 'a t = 'a constraint 'a = < m : int >


What did I get wrong?

Cheers,
  Philippe.


Jun Furuse | 30 Oct 13:53 2014
Picon

[ANN] OCamltter 3.0.0, a Twitter client and OAuth, Twitter and Flickr API library

Hi,

We have released OCamltter 3.0.0, an OAuth framework in OCaml. It
includes OAuth and some APIs for Twitter and Flickr, and OCamltter CLI
Twitter client.

Version 3.0.0 generalized OCamltter 2.x's Twitter OAuth library so
that now it can also support Flickr API access. Still only handful
APIs are implemented but I use it to upload my family photos to Flickr
quite nicely.

OCamltter 3.0.0 is now available via OPAM.
Its source repo is at: https://github.com/yoshihiro503/ocamltter

Enjoy,
Jun

--

-- 
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

Ramu Iyer | 29 Oct 14:49 2014
Picon

Learning OCaml

We are currently implementing a business process management solution by customizing an ERP application. Natural language requirements are entered as development work items in TFS.  There is an opportunity to increase the rigor of the formal specification.  

*  Is there an approach to reverse engineer a system specification of a tool (such as Dynamics AX)?
*  Is there a formal process to discover the accumulated technical debt in a given implementation? 

These questions are somewhat high-level and I'd be glad to obtain any inputs that will help me incrementally advance to the next step (using OCaml as a formal method). 

Thanks, 

Ramu

Sébastien Hinderer | 29 Oct 13:27 2014
Picon
Picon

Archives of the list in mbox format?

Dear all,

(sorry for the noise)

Is there a way to download the archives of the list in mbox format on a
per-month basis or so?

More specifically, I'd be interested in re-reading two threads of this
month, one about get_temp_dir_name and the other about String.create.

I tried to read them through the web but only found sites using
Javascritp I can't use.

Thanks!
Sébstien.

--

-- 
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

Jacques Garrigue | 29 Oct 11:10 2014
Picon

[Announce] LablGTK 2.18.3

Dear Camlers,

Due to a subtle incompatibility with ocaml 4.02, here is a new version of
LablGTK.

LablGTK is an interface for the Gtk+ toolkit, version 2. It also
wraps many extensions, such as libglade, for rapid prototyping,
or gtksourceview2, for programming editors.

	https://forge.ocamlcore.org/projects/lablgtk/

It should soon be available on opam.

Jacques Garrigue

LablGTK 2.18.3 changelog:

  * add Gdk.Window.create_foreign and set_transient_for functions (Tim Cuthbertson)
  * CAMLparam initializes with Val_unit rather than 0 since ocaml 4.02.
    Fix a related problem in ml_gobject.
    This caused random crashes with unison (Christopher Zimmermann, PR#1425) 
  * Also factorize some code to use Val_option_*
  * Replace XID by GdkNativeWindow where required.
    You may need to insert calls to Gdk.Window.native_of_xid in some places.

--

-- 
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
Maxence Guesdon | 28 Oct 17:41 2014
Picon
Picon

[ANN] Stog 0.14.0

Hello,

Stog is a static web site compiler. It is able to handle blog posts as
well are regular pages. It can be seen as a kind of Jekyll developed in
OCaml.

Since release 0.12.0, Stog can be used to compile a single file to
admittedly publish HTML files where PDF was used (think about math
articles, for example).

Since release 0.13.0, a preview server can be used, watching changes and
updating the page in your browser when you save source files. 

Release 0.14.0 is now available, with some improvements.

See here for details:
  https://zoggy.github.io/stog/posts/release-0.14.0.html

I made a demo video here:
  https://zoggy.github.io/stog/posts/2014-10-27-video.html

--
Maxence Guesdon

--

-- 
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

Sylvain Le Gall | 28 Oct 10:47 2014
Picon

Migration starting this evening, bzr disabled for now

Starting the migration, some services are down.

More information:
https://forge.ocamlcore.org/forum/forum.php?forum_id=914
Francois Berenger | 28 Oct 10:27 2014
Picon
Picon

Is it possible to define a Printf.sprintf-like that is lazy?

Hello,

I mean, the parameters are not formated unless the function is forced.

-- 
Regards,
Francois.

--

-- 
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

David Allsopp | 27 Oct 18:56 2014

Vagaries of Printf variants

Given:

let f fmt = Printf.printf fmt;;

[f] will have type ('a, out_channel, unit, unit) format4

Given:

let f fmt = Printf.ksprintf print_string fmt

[f] will have type ('a, unit, string, unit) format4

They do exactly the same thing (at least in terms of side effects) - what's
the fundamental reason for having to suffer their having incompatible format
types? It becomes excessively irritating when trying to switch between
different formatters (as a given format string cannot be used in a way in
which it appears to have more than one type, obviously), but I'm sure
there's a reason for its being that way!

David

--

-- 
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