Previous week   Up   Next week
Hello,

Here is the latest Caml Weekly News, for the week of 16 to 23 September, 2003.

1) calendar library: new release
2) Commercial application written in O'Caml: ExcelEverywhere
3) how can I print graphics on my local printer under Linux?
4) ulex: lexer generator for Unicode
5) OCamlWin improvements

==============================================================================
1) calendar library: new release
------------------------------------------------------------------------------
** Julien Signoles announced:

The last release (v1.05) of the calendar library is now available at
        http://www.lri.fr/~signoles/prog.en.html

The main adjunction is the module Printer as suggested by Stefano
Zacchiroli in a previous post (in the thread "date manipulation library").

For example:
# Printer.TimePrinter.print "Hey, what time is it ? %T" (Time.now ());;
Hey, what time is it ? 16:37:57- : unit = ()

==============================================================================
2) Commercial application written in O'Caml: ExcelEverywhere
------------------------------------------------------------------------------
** Mattias Waldau said:

Some of the readers of this list may have noticed that I use
the term "commercial" a lot. The reason is that I use Ocaml
to create commercial software.

ExcelEverywhere is shrink-wrap software.
A single license cost $99-$149.
All income comes from licenses.
Consulting is not a big source of income.


Why Ocaml?
- When it compiles, it works
- If it doesn't work, ocamldebug with back step will find the
  problem quickly
- Very few bugs in the implementation of Ocaml

Advantages
- Small run-time size and small memory foot-print
- Fast enough so that over-optimizations isn't needed.
  Good practices like using sets instead of lists etc is enough
- Runs on Windows 98 and upwards (There are a lot of Windows 98
  out there!)


Disadvantage
- 8-bits strings.
  UNICODE is needed and the standard for .NET, Java, Ruby...
- Few libraries
- Even fewer libraries that easily can be used on Win32
  In order to reduce Win32-related problems, only the standard
  distribution and libraries completely written in Ocaml are used.
- Few libraries that can be used freely in non-open-source
  commercial software

My wishes
- UNICODE
- Make ocamldebug print objects by default
- More BSD-licensed libraries (LGPL acceptable but not good,
  search in the archives to see why.)
- Do not drop the Win32-support

What does ExcelEverywhere do?

Good-looking calculating web page from Excel
140 functions supported. No Excel needed on server.
Use it for expense report, survey, order forms, reservation
forms, employment application, financial advisor,
ROI-calculator, engineering.

ExcelEverywhere currently exists in 4 flavors:

- ExcelEverywhere for HTML
  Convert it to HTML with embedded JavaScript to handle the calculations.
- ExcelEverywhere for Java/JSP
  Good-looking calculating JSP-page from Excel.
  Separate JavaBean with full source.
- ExcelEverywhere for ASP & ASP.NET
  Code-behind module in C# and VB.NET for backend-integration.
- ExcelEverywhere for Java phones
  Custom calculators in your mobile phone.


Is ExcelEverywhere a commercial success?

Not yet. Since October 2002, 500 licenses have been sold. However,
marketing is a big cost. Today, developing the application
is the easy part, finding customers is much harder and costlier.


Do we hire?

No, not right now. If you have programmed Ocaml or SML for a few years,
speak English, know HTML+JavaScript and either Java or .NET, send
me a short email and show me that you are talented.

** Ville-Pertti Keinonen said:

> Disadvantage
> - 8-bits strings.
>   UNICODE is needed and the standard for .NET, Java, Ruby...

8-bit strings can be used to represent Unicode just fine.  Better,
in fact, than the 16-bit wide characters found in some places, since
they support encoding up to 31 bits per character and don't have
byte order issues.  And for places where you need O(1) indexing, a
suitable Bigarray (or even just an int array) can be used as an
alternate string representation.

I think Unicode support should be a matter of library functionality,
not native string representation.  There is at least one Unicode
library available for OCaml (http://camomile.sourceforge.net).

** A micro flamewar erupted following the comment on licensing. Then
   Jean-Marc Eber said:

Commercial developers using Ocaml should also, I think, consider seriously
(becoming member of) the Caml Consortium.

The fact that this membership gives you access to a very "commercial"
license (of course this applies only to Inria's Caml compiler code, not
third party libraries provided by others) is perhaps not enough known or
publicized.

** Xavier Leroy added:

Thanks Jean-Marc for the plug.  Indeed, OCaml has a dual-licensing scheme:
members of the Caml consortium automatically benefit from very liberal
licensing conditions, roughly comparable to a BSD license.  This comes
in exchange for a 1000 Eur/year membership fee.  This fee is a real bargain
given the number of man.years that were invested in the development of
OCaml, and is peanuts for even the smallest company.

==============================================================================
3) how can I print graphics on my local printer under Linux?
------------------------------------------------------------------------------
** Pierre Laffitte asked and Basile Starynkevitch answered:

> I am doing graphics with Caml. These graphs are drawn in a new window on my 
> screen, opened by Caml. I would like to have these graphs printed on my 
> local printer.

May I suggest using the camlimages library (also used in advi)? See
http://pauillac.inria.fr/camlimages/ for more. Another option would be
(on unix or linux systems) to open a pipe to some software like gnuplot,
 latex, lout, troff, etc etc.... The Graphics library is portable, but
(IMHO) not very rich (because of the portability issue).

> I have troubles understanding the #install_printer intruction of Caml.

This question is (I suppose) unrelated to the previous one. The
#install_printer directive (only available with the interactive toplevel
-and perhaps in the debugger) tell the toplevel how to print your
datatypes (usually abstract ones). Here is a simplistic example (where
@. is a pretty printing indication, see the Format module documentation
of the stdlib

# type color_t = Blue | Red;;
type color_t = Blue | Red
# let color_printer ff col = match col with
  Blue -> Format.fprintf ff "Blue_Color@."
  | Red ->  Format.fprintf ff "Red_Color@."
  ;;
val color_printer : Format.formatter -> color_t -> unit = <fun>
# #install_printer color_printer;;
# Blue;;
- : color_t = Blue_Color

** Olivier Andrieu added:

Then GraphPS is probably what you want :

 http://pauillac.inria.fr/graphps/
 http://caml.inria.fr/distrib/bazar-ocaml/graphps-1.0.tar.gz

==============================================================================
4) ulex: lexer generator for Unicode
------------------------------------------------------------------------------
** Alain Frisch announced:

I started working on a lexer generator for Unicode. The architecture is
similar to ocamllex, except that ulex lexers use a new kind of lexbuf that
holds Unicode code points. It is possible to inject in these lexbufs any
Unicode stream (for the moment, adapters are provided only for Latin1/utf8
streams/strings/channels, but you can also pass Unicode code points as
integers).

Lexer specifications are embedded in OCaml code, and parsed with a Camlp4
syntax extension.

As several people showed interest in Unicode support for Caml, I thought I
could make a preliminary release to collect feedback on the design of
ulex. Here is the tarball:

http://www.cduce.org/download/ulex-0.1.tar.gz

==============================================================================
5) OCamlWin improvements
------------------------------------------------------------------------------
** Chris Watford announced:

        Recently I've taken to updating OCamlWin to a much more
functional source editor for my CS321 class at the University of
Illinois.  I've added a lot to it, and I'd be interested in getting it 
included in future releases of OCaml.  I'll have up a nice webpage and
README for it later on this week.

        For now here is a link to the exe and source:

http://dorm.tunkeymicket.com/OCamlWinPlus/Release/OCamlWinPlus.exe
http://dorm.tunkeymicket.com/OCamlWinPlus/Release/src

==============================================================================
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
(alan.schmitt@inria.fr) and I'll mail it to you, or go take a look at
the archive (http://pauillac.inria.fr/~aschmitt/cwn/) or the RSS feed of the 
archives (http://pauillac.inria.fr/~aschmitt/cwn/cwn.rss). If you also wish to 
receive it every week by mail, just tell me so.

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

Alan Schmitt