Previous week Up Next week

Hello

Here is the latest Caml Weekly News, for the week of February 27 to March 06, 2007.

  1. OCamlODBC 2.12 is available
  2. Some labltk widgets missing
  3. ocamlscript 2.0.0

OCamlODBC 2.12 is available

Archive: http://groups.google.com/group/fa.caml/browse_frm/thread/a1055b9008fc5a8c/fd899517039f0c6a#fd899517039f0c6a

Maxence Guesdon announced:
A new release of OCamlODBC is available from the OCamlODBC web site: 
  http://home.gna.org/ocamlodbc/ 

OCamlODBC offers bindings to various ODBC drivers. 

* Changes: column values of record are now of type string option to 
distinguish between "no value" and the "NULL" string. The TINYINT type is 
now recognized. 

* Fix: a bug which resulted in truncated fields and so incorrect values. 

Thanks to Christophe Troestler for this contributions. 

The toy application Biniki now uses LablGtk2. Examples and Biniki were fixed 
according to the small change in interface.
			

Some labltk widgets missing

Archive: http://groups.google.com/group/fa.caml/browse_frm/thread/4ad5f9a1fabe245d/3a9c367677a86ae2#3a9c367677a86ae2

Satoshi Fujiwara asked and Jacques Garrigue answered:
> Now I'm using 'labltk' with ocaml-3.09.3, and realized that 
> some widgets such as 'labelframe', 'spinbox', etc are missing. 
> I like to using 'labltk' because it's easy to use, but 
> when I check the tk8.4's demo, I found many functions are 
> not supported in 'labltk'. 

The widgets supported in camltk/labltk are those of tk8.0. 
New widgets were not added to keep compatibility, but since Tcl/Tk 
seems to have finally converged on 8.4, this might be a good idea to 
add the new widgets now. This is easy to do: mainly editing the 
Widgets.src file. But this is time consuming: one has to check by hand 
the Tcl/Tk documentation to find all the missing functions and 
parameters... So this will probably not be in 3.10.0, but could be 
done in a reasonably close future. 

> Is there any plan to upgrading 'labltk'? 
> Should I use 'lablgtk2' or something instead of 'labltk'? 

Use the one that fits your needs. There are more widgets in gtk2, but 
they can be harder to use.
			
Jacques Garrigue then asked and Jacques Garrigue answered:
> Let me ask another question. 
> # Maybe it's a FAQ... 
> Why camltk and labltk both exists? 
> These look like twins for me. 
> What is the role of these two libraries? 
> (I think if there is no need to use the camltk...) 

The original library was CamlTk, and LablTk was actually created by 
hacking the automatic generation tool included in CamlTk. 
As a result, for a long time only CamlTk was available, and for 
instance the MMM web browser was developped using CamlTk. Many 
examples are available, and CamlTk is described in one of the rare 
books on OCaml written in English. 

For all these reasons, it is necessary to continue supporting it, and 
the current implementation does it at a very low cost, by using the 
same backend.
			

ocamlscript 2.0.0

Archive: http://groups.google.com/group/fa.caml/browse_frm/thread/632fa2869b2c8ea1/bda053a986ecea0c#bda053a986ecea0c

Martin Jambon announced:
ocamlscript version 2.0.0 was just released. It is considered stable, and 
there is no big change since the previous release 1.99.5 except for the 
packaging and the web page: 
  http://martin.jambon.free.fr/ocamlscript.html 

Ocamlscript 2 derives from David Mentre's original implementation and adds 
support for findlib packages, camlp4 syntax extensions, ocamllex, 
ocamllyacc, input from stdin, script on the command-line, and some support 
for compilation and linking with other source files. In theory it can also 
be configured to support any compiled programming language other than 
OCaml. 

Description: 
=========== 

ocamlscript compiles scripts, i.e. one-file programs, into 
natively-compiled binaries, and executes them. 

Basically, a script named alpha is compiled into alpha.exe. If alpha.exe 
is more recent than alpha, then alpha.exe is executed directly, otherwise 
alpha is recompiled first. 

Compilation commands reside in the first section of the script. They are 
written in OCaml and consist normally in setting one or two variables. 

Example: 
======== 

The following "getpage" script fetches a web page using the HTTP client 
provided by the netclient library/findlib package: 

#! /usr/bin/env ocamlscript 
Ocaml.packs := [ "netclient" ] 
-- 
match Sys.argv with 
    [| _; url |] -> print_string (Http_client.Convenience.http_get url) 
  | _ -> prerr_string "Usage: getpage URL\n"; exit 1 

For instance, executing "getpage http://caml.inria.fr" creates a 
getpage.exe file in the same directory as "getpage", runs it and prints 
the web page that was requested.
			

Using folding to read the cwn in vim 6+

Here is a quick trick to help you read this CWN if you are viewing it using vim (version 6 or greater).

:set foldmethod=expr
:set foldexpr=getline(v:lnum)=~'^=\\{78}$'?'<1':1
zM

If you know of a better way, please let me know.


Old cwn

If you happen to miss a CWN, you can send me a message and I'll mail it to you, or go take a look at the archive or the RSS feed of the archives.

If you also wish to receive it every week by mail, you may subscribe online.


Alan Schmitt