caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] possible typechecker bug
@ 2003-09-18 16:11 Fernando Alegre
  2003-09-19  2:00 ` malc
  0 siblings, 1 reply; 32+ messages in thread
From: Fernando Alegre @ 2003-09-18 16:11 UTC (permalink / raw)
  To: caml-list


Hi,

We are puzzled by what we think is possiby a typechecker bug, as the only
difference between Tbool and Tfloat below is the specific type (either bool
or float). Is there any other explanation? I would like to get some
confirmation that this is indeed a bug before submitting it as a bug
report.

Here is the content of test.ml:

module Test (A: sig type t end) (B: sig type x = {f:A.t} end) = struct end

module Abool = struct type t = bool end
module Bbool = struct type x = {f:bool} end

module Afloat = struct type t = float end
module Bfloat = struct type x = {f:float} end

module Tbool  = Test(Abool) (Bbool)
module Tfloat = Test(Afloat)(Bfloat)


And here is the output (both in Ocaml-3.06 and 3.07beta):

$ ocamlc -c test.ml
File "test.ml", line 11, characters 29-35:
Signature mismatch:
Modules do not match:
  sig type x = Bfloat.x = { f : float; }  end
is not included in
  sig type x = { f : Afloat.t; }  end
Type declarations do not match:
  type x = Bfloat.x = { f : float; }
is not included in
  type x = { f : Afloat.t; }

-- 
					
			-Fernando Alegre (fernando@cc.gatech.edu)

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] possible typechecker bug
  2003-09-18 16:11 [Caml-list] possible typechecker bug Fernando Alegre
@ 2003-09-19  2:00 ` malc
  2003-09-19  2:06   ` Fernando Alegre
  0 siblings, 1 reply; 32+ messages in thread
From: malc @ 2003-09-19  2:00 UTC (permalink / raw)
  To: Fernando Alegre; +Cc: caml-list

On Thu, 18 Sep 2003, Fernando Alegre wrote:

>
> Hi,
>
> We are puzzled by what we think is possiby a typechecker bug, as the only
> difference between Tbool and Tfloat below is the specific type (either bool
> or float). Is there any other explanation? I would like to get some
> confirmation that this is indeed a bug before submitting it as a bug
> report.
>
http://caml.inria.fr/archives/200211/msg00058.html

-- 
mailto:malc@pulsesoft.com

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] possible typechecker bug
  2003-09-19  2:00 ` malc
@ 2003-09-19  2:06   ` Fernando Alegre
  2003-09-19  6:57     ` Julien Signoles
  0 siblings, 1 reply; 32+ messages in thread
From: Fernando Alegre @ 2003-09-19  2:06 UTC (permalink / raw)
  To: malc; +Cc: Fernando Alegre, caml-list

On Fri, Sep 19, 2003 at 06:00:35AM +0400, malc wrote:

> http://caml.inria.fr/archives/200211/msg00058.html

Yes. This seems to be another instance of possibly the same bug. The
workaround suggested in your case was to add "and" between the types...

However, in our case, there is only one type, so I cannot add an "and"...
Can anyone suggest another workaround?

Thanks,
	Fernando

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] possible typechecker bug
  2003-09-19  2:06   ` Fernando Alegre
@ 2003-09-19  6:57     ` Julien Signoles
  2003-09-19  8:01       ` [Caml-list] Commercial application written in O'Caml: ExcelEverywhere Mattias Waldau
  0 siblings, 1 reply; 32+ messages in thread
From: Julien Signoles @ 2003-09-19  6:57 UTC (permalink / raw)
  To: Fernando Alegre; +Cc: malc, caml-list

On Thu, 18 Sep 2003, Fernando Alegre wrote:

> On Fri, Sep 19, 2003 at 06:00:35AM +0400, malc wrote:
>
> > http://caml.inria.fr/archives/200211/msg00058.html
>
> Yes. This seems to be another instance of possibly the same bug. The
> workaround suggested in your case was to add "and" between the types...
>
> However, in our case, there is only one type, so I cannot add an "and"...
> Can anyone suggest another workaround?

Inspired from the above message, you can rewrite the module BFloat as
follow :

module Bfloat = struct
  type t = Afloat.t  (* introduce a new manifest type... *)
  and x = {f:t}      (* ... so you can use "and"         *)
end

Julien.
-- 
mailto:Julien.Signoles@lri.fr ; http://www.lri.fr/~signoles
"In theory, practice and theory are the same,
but in practice they are different" (Larry McVoy)

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-19  6:57     ` Julien Signoles
@ 2003-09-19  8:01       ` Mattias Waldau
  2003-09-19  9:26         ` Benjamin Geer
                           ` (4 more replies)
  0 siblings, 5 replies; 32+ messages in thread
From: Mattias Waldau @ 2003-09-19  8:01 UTC (permalink / raw)
  To: caml-list

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.

-- Mattias


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-19  8:01       ` [Caml-list] Commercial application written in O'Caml: ExcelEverywhere Mattias Waldau
@ 2003-09-19  9:26         ` Benjamin Geer
  2003-09-20  8:12           ` Damien Doligez
  2003-09-19 11:10         ` skaller
                           ` (3 subsequent siblings)
  4 siblings, 1 reply; 32+ messages in thread
From: Benjamin Geer @ 2003-09-19  9:26 UTC (permalink / raw)
  To: Mattias Waldau; +Cc: caml-list

Mattias Waldau wrote:
> My wishes [snip]
> - More BSD-licensed libraries  (LGPL acceptable but not good,

My wish: that developers of proprietary software would stop asking 
people to work for them for nothing.

If you want to use a copylefted library in your commercial product, you 
can always ask the developers if they would be willing to sell you a 
special licence (as is done for Qt and MySQL).

See also:

http://www.gnu.org/philosophy/x.html

Ben

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-19  8:01       ` [Caml-list] Commercial application written in O'Caml: ExcelEverywhere Mattias Waldau
  2003-09-19  9:26         ` Benjamin Geer
@ 2003-09-19 11:10         ` skaller
  2003-09-19 14:49           ` Richard Jones
  2003-09-19 22:29           ` [Caml-list] Commercial application written in O'Caml: ExcelEverywhere Oleg Trott
  2003-09-19 11:48         ` Ville-Pertti Keinonen
                           ` (2 subsequent siblings)
  4 siblings, 2 replies; 32+ messages in thread
From: skaller @ 2003-09-19 11:10 UTC (permalink / raw)
  To: Mattias Waldau; +Cc: caml-list

On Fri, 2003-09-19 at 18:01, Mattias Waldau wrote:
> 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.
> 

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

Java and Windows and Solaris all jumped the gun and 
use 16 bit (UCS-2/UTF-16) encoding. That encoding should not
be supported in any new system, except for a 
codec UTF-16 <--> UCS-4 to allow UTF-16 strings to be
converted for use with UCS-4 facilities (and the results
converted back).


> - Few libraries that can be used freely in non-open-source
>    commercial software

Agree. Too many LGPL contributions, which I can't
use in my open source project because it has a 
public domain licence -- I *desire* to encourage
commercial use of my code: the more users the better.


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-19  8:01       ` [Caml-list] Commercial application written in O'Caml: ExcelEverywhere Mattias Waldau
  2003-09-19  9:26         ` Benjamin Geer
  2003-09-19 11:10         ` skaller
@ 2003-09-19 11:48         ` Ville-Pertti Keinonen
  2003-09-20 18:53           ` skaller
  2003-09-19 14:47         ` Richard Jones
  2003-09-19 16:23         ` kknowles
  4 siblings, 1 reply; 32+ messages in thread
From: Ville-Pertti Keinonen @ 2003-09-19 11:48 UTC (permalink / raw)
  To: Mattias Waldau; +Cc: caml-list

On Fri, Sep 19, 2003 at 10:01:15AM +0200, Mattias Waldau wrote:

> 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 (camomile.sourceforge.net).

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-19  8:01       ` [Caml-list] Commercial application written in O'Caml: ExcelEverywhere Mattias Waldau
                           ` (2 preceding siblings ...)
  2003-09-19 11:48         ` Ville-Pertti Keinonen
@ 2003-09-19 14:47         ` Richard Jones
  2003-09-20 19:32           ` skaller
  2003-09-19 16:23         ` kknowles
  4 siblings, 1 reply; 32+ messages in thread
From: Richard Jones @ 2003-09-19 14:47 UTC (permalink / raw)
  To: Mattias Waldau; +Cc: caml-list

On Fri, Sep 19, 2003 at 10:01:15AM +0200, Mattias Waldau wrote:
> Disadvantage
> - 8-bits strings.
>   UNICODE is needed and the standard for .NET, Java, Ruby...

Yeah, UTF-8 is a real necessity for us too.

> - Few libraries

Yup. If there's one thing which Perl/Java have taught us, it's that
you can NEVER, EVER have a large enough standard library! It'd be
great if OCaml came with a really comprehensive library.

> - Do not drop the Win32-support

Definitely not!

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj
Merjis Ltd. http://www.merjis.com/ - all your business data are belong to you.
 All new technology is irrelevant until it is taken up by the public.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-19 11:10         ` skaller
@ 2003-09-19 14:49           ` Richard Jones
  2003-09-19 15:02             ` Remi Vanicat
  2003-09-20 19:25             ` skaller
  2003-09-19 22:29           ` [Caml-list] Commercial application written in O'Caml: ExcelEverywhere Oleg Trott
  1 sibling, 2 replies; 32+ messages in thread
From: Richard Jones @ 2003-09-19 14:49 UTC (permalink / raw)
  To: skaller; +Cc: caml-list

On Fri, Sep 19, 2003 at 09:10:49PM +1000, skaller wrote:
> Agree. Too many LGPL contributions, which I can't
> use in my open source project because it has a 
> public domain licence -- I *desire* to encourage
> commercial use of my code: the more users the better.

Are you sure LGPL is a problem in this case? LGPL is a great
compromise license because you get the changes to your library back,
but commercial (and other) users can always use the library. I prefer
it over GPL most of the time.

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj
Merjis Ltd. http://www.merjis.com/ - all your business data are belong to you.
NET::FTPSERVER is a full-featured, secure, configurable, database-backed
FTP server written in Perl: http://www.annexia.org/freeware/netftpserver/

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-19 14:49           ` Richard Jones
@ 2003-09-19 15:02             ` Remi Vanicat
  2003-09-19 17:20               ` Karl Zilles
  2003-09-20 19:25             ` skaller
  1 sibling, 1 reply; 32+ messages in thread
From: Remi Vanicat @ 2003-09-19 15:02 UTC (permalink / raw)
  To: caml-list

Richard Jones <rich@annexia.org> writes:

> On Fri, Sep 19, 2003 at 09:10:49PM +1000, skaller wrote:
>> Agree. Too many LGPL contributions, which I can't
>> use in my open source project because it has a 
>> public domain licence -- I *desire* to encourage
>> commercial use of my code: the more users the better.
>
> Are you sure LGPL is a problem in this case? LGPL is a great
> compromise license because you get the changes to your library back,
> but commercial (and other) users can always use the library. I prefer
> it over GPL most of the time.

You need the special exception that you will find into the Objective
Caml License, because LGPL only give you the right to link with non
free only dynamically, and ocaml link statically.


-- 
Rémi Vanicat
remi.vanicat@laposte.net

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-19  8:01       ` [Caml-list] Commercial application written in O'Caml: ExcelEverywhere Mattias Waldau
                           ` (3 preceding siblings ...)
  2003-09-19 14:47         ` Richard Jones
@ 2003-09-19 16:23         ` kknowles
  4 siblings, 0 replies; 32+ messages in thread
From: kknowles @ 2003-09-19 16:23 UTC (permalink / raw)
  To: Mattias Waldau; +Cc: caml-list

On Fri, Sep 19, 2003 at 10:01:15AM +0200, Mattias Waldau wrote:
> - More BSD-licensed libraries (LGPL acceptable but not good,
>   search in the archives to see why.)

I have a framed preamble to the GPL on my wall :-)  'Commercial' and 
'proprietary' are not mutually exclusive.  It is precisely because of the
licenses you dislike that there are so many excellent free software platforms to
work with.  In fact, to anyone thinking of releasing a library, I recommend the
follwing reading with regards to licensing:

http://www.gnu.org/licenses/why-not-lgpl.html

-Kenn
http://kenn.frap.net

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-19 15:02             ` Remi Vanicat
@ 2003-09-19 17:20               ` Karl Zilles
  0 siblings, 0 replies; 32+ messages in thread
From: Karl Zilles @ 2003-09-19 17:20 UTC (permalink / raw)
  To: Remi Vanicat; +Cc: caml-list

Remi Vanicat wrote:
> Richard Jones <rich@annexia.org> writes:
>>On Fri, Sep 19, 2003 at 09:10:49PM +1000, skaller wrote:
>>
>>>Agree. Too many LGPL contributions, which I can't
>>>use in my open source project because it has a 
>>>public domain licence -- I *desire* to encourage
>>>commercial use of my code: the more users the better.
>>
>>Are you sure LGPL is a problem in this case? LGPL is a great
>>compromise license because you get the changes to your library back,
>>but commercial (and other) users can always use the library. I prefer
>>it over GPL most of the time.
> 
> 
> You need the special exception that you will find into the Objective
> Caml License, because LGPL only give you the right to link with non
> free only dynamically, and ocaml link statically.
> 

Well, you can link statically under the lgpl, but it's a pain in the 
ass, because you then have to

"Accompany the work with [...] the complete machine-readable "work that 
uses the Library", as object code and/or source code, so that the user 
can modify the Library and then relink to produce a modified executable 
containing the modified Library. (It is understood that the user who 
changes the contents of definitions files in the Library will not 
necessarily be able to recompile the application to use the modified 
definitions."

So you have to distribute your object files as well as your executable.
This is going to make your application a lot easier to reverse engineer, 
and saddles you with obligations that I'm not really happy with.

This is the clause that wasn't in precious versions of the LGPL, and is 
the one that the OCAML license throws out.



-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-19 11:10         ` skaller
  2003-09-19 14:49           ` Richard Jones
@ 2003-09-19 22:29           ` Oleg Trott
  2003-09-20  9:09             ` Mattias Waldau
  2003-09-20 19:58             ` skaller
  1 sibling, 2 replies; 32+ messages in thread
From: Oleg Trott @ 2003-09-19 22:29 UTC (permalink / raw)
  To: skaller, Mattias Waldau; +Cc: caml-list

On Friday 19 September 2003 07:10 am, skaller wrote:
> Agree. Too many LGPL contributions, which I can't
> use in my open source project because it has a
> public domain licence -- I *desire* to encourage
> commercial use of my code: the more users the better.

Does it make sense to give your library a license any more permissive than 
OCaml runtime (LGPL with static linking) ? Applications using your library 
will have to use OCaml runtime anyway. The difference comes up only when the 
user changes your library. On the other hand, having LGPL license may 
encourage open-source advocates to contribute.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-19  9:26         ` Benjamin Geer
@ 2003-09-20  8:12           ` Damien Doligez
  0 siblings, 0 replies; 32+ messages in thread
From: Damien Doligez @ 2003-09-20  8:12 UTC (permalink / raw)
  To: caml-list


On Friday, September 19, 2003, at 11:26 AM, Benjamin Geer wrote:

> Mattias Waldau wrote:
>> My wishes [snip]
>> - More BSD-licensed libraries  (LGPL acceptable but not good,
>
> My wish: that developers of proprietary software would stop asking 
> people to work for them for nothing.

My wish: that endless license flame-wars would disappear from the
face of the Earth, and especially from this mailing list.

-- Damien

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-19 22:29           ` [Caml-list] Commercial application written in O'Caml: ExcelEverywhere Oleg Trott
@ 2003-09-20  9:09             ` Mattias Waldau
  2003-09-20  9:25               ` Jean-Marc Eber
  2003-09-20 20:01               ` skaller
  2003-09-20 19:58             ` skaller
  1 sibling, 2 replies; 32+ messages in thread
From: Mattias Waldau @ 2003-09-20  9:09 UTC (permalink / raw)
  To: Oleg Trott; +Cc: skaller, caml-list

I thank the Ocaml team at INRIA for making Ocaml, a really remarkable 
programming language. I thank all users of Ocaml who contribute to 
Ocaml's success by enhancing the language, reporting bugs etc.

I wrote the posting to show an example of a commercial application 
written in Ocaml, and maybe make other users to try the same. I also 
wrote down a few things that, if fixed, might attract more commercial 
developers who like me write shring-wrap-software.

Commercial developers are good for the Ocaml community, since if 
successful, they can contribute money to the development of Ocaml. It 
will also be easier for Inria to get EU-research grants, if they can 
show commercial benefits of modern programming languages. Also, there 
might even be Ocaml-programmers jobs out there.

-- Mattias



-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-20  9:09             ` Mattias Waldau
@ 2003-09-20  9:25               ` Jean-Marc Eber
  2003-09-21  9:38                 ` Xavier Leroy
  2003-09-20 20:01               ` skaller
  1 sibling, 1 reply; 32+ messages in thread
From: Jean-Marc Eber @ 2003-09-20  9:25 UTC (permalink / raw)
  To: Mattias Waldau, Oleg Trott; +Cc: skaller, caml-list

> I wrote the posting to show an example of a commercial application
> written in Ocaml, and maybe make other users to try the same. I also
> wrote down a few things that, if fixed, might attract more commercial
> developers who like me write shring-wrap-software.
>
> Commercial developers are good for the Ocaml community, since if
> successful, they can contribute money to the development of Ocaml. It
> will also be easier for Inria to get EU-research grants, if they can
> show commercial benefits of modern programming languages. Also, there
> might even be Ocaml-programmers jobs out there.

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.

Jean-Marc Eber
LexiFi


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-19 11:48         ` Ville-Pertti Keinonen
@ 2003-09-20 18:53           ` skaller
  2003-09-20 19:31             ` Alain.Frisch
  0 siblings, 1 reply; 32+ messages in thread
From: skaller @ 2003-09-20 18:53 UTC (permalink / raw)
  To: caml-list

On Fri, 2003-09-19 at 21:48, Ville-Pertti Keinonen wrote:
> On Fri, Sep 19, 2003 at 10:01:15AM +0200, Mattias Waldau wrote:
> 
> > Disadvantage
> > - 8-bits strings.
> >   UNICODE is needed and the standard for .NET, Java, Ruby...

> 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 (camomile.sourceforge.net).

Except it's a third party product with a restrictive LGPL
licence which makes it useless to me :(

I can use an LGPL library only if it is part of the standard
distribution, otherwise I have to be able to make
it part of my own source tree (I will not require end 
users to download X packages from all over the place
that don't come with any kind of support assurance) 
-- and I happen to provide a FFAU (free for any use) licence,
which excludes including said sources in my source tree.
Sane for PCRE: it might as well not exist.

So I agree with Mattias: it's needed in the standard
distribution since they're no FFAU alternative.

I also think, quite separately, that the Ocaml compiler
itself ought to be upgraded to modern i18n concepts.
Some pain there (since Latin-1 is supported, but that
code set is unsuitable).


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-19 14:49           ` Richard Jones
  2003-09-19 15:02             ` Remi Vanicat
@ 2003-09-20 19:25             ` skaller
  2003-09-20 20:28               ` Benjamin Geer
  1 sibling, 1 reply; 32+ messages in thread
From: skaller @ 2003-09-20 19:25 UTC (permalink / raw)
  To: Richard Jones; +Cc: caml-list

On Sat, 2003-09-20 at 00:49, Richard Jones wrote:
> On Fri, Sep 19, 2003 at 09:10:49PM +1000, skaller wrote:
> > Agree. Too many LGPL contributions, which I can't
> > use in my open source project because it has a 
> > public domain licence -- I *desire* to encourage
> > commercial use of my code: the more users the better.
> 
> Are you sure LGPL is a problem in this case? LGPL is a great
> compromise license because you get the changes to your library back,
> but commercial (and other) users can always use the library. I prefer
> it over GPL most of the time.

Yes:

LGPL is not a problem for Ocaml Standard Libraries.
I am happy to require my clients to download and
build the Ocaml standard distribution (or obtain
some prebuilt version, eg for Windows).

But I am not willing to require they download
a fourth party library (unless it is in heavy use).
In the case I need some library functionality,
I have to take responsibility for it myself,
and I can't do that for LGPL libraries because
my sources are FFAU (free for any use).

In particular FFAU permits a commercial developer
to take my source codes -- including any included
fourth party library -- and do whatever they want
to with them (provided they don't lie about who
is responsible).

In particular, I would like my product to
be ISO Standardised, and that requires
unequivocable unencumberance: there is no way
an ISO committee can standardise something they're
not free to modify, and whose interface
specification cannot be owned by ISO.

In the case of C++, for example, a sort algorithm
in STL had a performance requirement which 
some vendors feared would require using a 
particular patented algorithm (since it is 
the only sort known meeting the requirements).
To proceed a letter was required from the patent
owner relinquishing all ownership (the owner
was Hewlett Packard and the permission was given).

For this reason C++ boost required all contributions
to be FFAU. In particular, LGPL codes were not
acceptable. 

You will see then that I CANNOT make my codes
LGPL, because 200 people might contribute,
and it is very hard to get 200 people to all
agree to a change of licence conditions :-)

I can tell you my experience in commerical organisations
is that whilst they're happy to use GPL'd products as
tools in-house, they won't risk distributing anything
with such a woefully complex licence as LGPL, no matter
what the actual implications of the licence are, or are
intended to be (unless they're very big and have lots of
lawyers :-)

I had this problem myself with Ocaml, where I was only
using it to build a product to be sold (but that product
would contain library codes from the standard distribution).
That company didn't have any lawyers, and the issue was considered
by a technical product manager who was a C++ devotee.

As an example, they already used some open source code
in their product, and modified it. No way it would make
ANY sense at all to give back the changes, since they
were related to their particular needs, and the result
would not built without proprietary parts of their product.
Had *that* library been LGPL, they would not have been
able to use it.

Whilst its doubtful GPL or any other software licence
has any legal standard whatsoever, most companies
don't want to risk litigation. They'd rather pay
someone or someones to develop an equivalent they
have unequivocable ownership of: this is true even
if they're willing to make the sources publically
available (they still have to sell the product built
on those sources, and thus need to claim ownership
thereof).

There are exceptions, for example specialist open source
companies such as RedHat or VA Linux.


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-20 18:53           ` skaller
@ 2003-09-20 19:31             ` Alain.Frisch
  0 siblings, 0 replies; 32+ messages in thread
From: Alain.Frisch @ 2003-09-20 19:31 UTC (permalink / raw)
  To: skaller; +Cc: caml-list

On 21 Sep 2003, skaller wrote:

> > library available for OCaml (camomile.sourceforge.net).
>
> Except it's a third party product with a restrictive LGPL
> licence which makes it useless to me :(

I don't understand your approach. You don't like a licence, you need
something else for a given project. Why don't you ask to library author
for a specific authorization, explaining your arguments and motivations,
instead of discarding the possiblility of using the library?

As the author of LPGL'd OCaml libraries, I wouln't object giving special
licences for open source or commercial projects, if I agree with their own
licensing conditions. The licence is not attached to the software, but to
a given distribution; it is always possible to provide (give/sell)
different licences for different users.

-- Alain

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-19 14:47         ` Richard Jones
@ 2003-09-20 19:32           ` skaller
  0 siblings, 0 replies; 32+ messages in thread
From: skaller @ 2003-09-20 19:32 UTC (permalink / raw)
  To: Richard Jones; +Cc: Mattias Waldau, caml-list

On Sat, 2003-09-20 at 00:47, Richard Jones wrote:
> On Fri, Sep 19, 2003 at 10:01:15AM +0200, Mattias Waldau wrote:
> > Disadvantage
> > - 8-bits strings.
> >   UNICODE is needed and the standard for .NET, Java, Ruby...
> 
> Yeah, UTF-8 is a real necessity for us too.
> 
> > - Few libraries
> 
> Yup. If there's one thing which Perl/Java have taught us, it's that
> you can NEVER, EVER have a large enough standard library! It'd be
> great if OCaml came with a really comprehensive library.

I don't agree entirely. As a member of the C++ Standardisation
Committee I can tell you that one aim is to keep the C++ Standard
Library sensibly sized. A library which is too large becomes 
unmaintable, too daunting for users .. and demonstrates that the
language fails to support simplicity.

One virtue of the Ocaml library at the moment is that after
certain 'weird' libraries are removed from consideration,
the data-structures and algorithms part is quite small,
the core language support is tiny, and the external functionality
wrappers (such as Unix) are modest and sensible in their scope.

What Ocaml lacks, in my opinion, isn't a 'larger library' so much
as a suitable packaging mechanism to make it easy to obtain
and install add-on libraries. And whilst the Hump is a nice 
source of codes, it isn't quite the same as CPAN :)


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-19 22:29           ` [Caml-list] Commercial application written in O'Caml: ExcelEverywhere Oleg Trott
  2003-09-20  9:09             ` Mattias Waldau
@ 2003-09-20 19:58             ` skaller
  1 sibling, 0 replies; 32+ messages in thread
From: skaller @ 2003-09-20 19:58 UTC (permalink / raw)
  To: Oleg Trott; +Cc: Mattias Waldau, caml-list

On Sat, 2003-09-20 at 08:29, Oleg Trott wrote:
> On Friday 19 September 2003 07:10 am, skaller wrote:
> > Agree. Too many LGPL contributions, which I can't
> > use in my open source project because it has a
> > public domain licence -- I *desire* to encourage
> > commercial use of my code: the more users the better.
> 
> Does it make sense to give your library a license any more permissive than 
> OCaml runtime (LGPL with static linking) ? Applications using your library 
> will have to use OCaml runtime anyway. The difference comes up only when the 
> user changes your library. On the other hand, having LGPL license may 
> encourage open-source advocates to contribute.
> 

My work isn't a library, its a program. A compiler in fact.
When the client uses the compiler, they're using Ocaml run time,
but I don't provide it -- they have to download it themselves
and build the compiler using Ocaml. As such, my codes
can have any licence I want: Ocaml can surely be used
to build an run any program, no matter what the licence
of the sources of the program.

It is quite true that LGPL might encourage some people
to contribute. But it would discourage others. 

In particular, the product takes that woeful 
propietary system Java head on, and I do not
wish to alienate potential commerical users
by risking their enterprise  by preventing
them modifying my sources if necessary to adapt
to their requirements (or fix a bug).

I believe such users will contribute anyhow, without
any recourse to legalism, simply because cooperation
is in their own interest on this kind of product.

Note that my product *is* Open Source: I'd hope 
open source people will contribute even though it
is FFAU, rather than GPL -- I want
those people to be USERS of the system too,
and hope they'll contribute for the same reason
as commerical developers -- because it is in 
their own interest (and not some altruistic goal).


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-20  9:09             ` Mattias Waldau
  2003-09-20  9:25               ` Jean-Marc Eber
@ 2003-09-20 20:01               ` skaller
  1 sibling, 0 replies; 32+ messages in thread
From: skaller @ 2003-09-20 20:01 UTC (permalink / raw)
  To: Mattias Waldau; +Cc: Oleg Trott, caml-list

On Sat, 2003-09-20 at 19:09, Mattias Waldau wrote:
> 
> Commercial developers are good for the Ocaml community, 


> . Also, there 
> might even be Ocaml-programmers jobs out there.

Which might encourage Universities to actually
teach functional programming ..


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-20 19:25             ` skaller
@ 2003-09-20 20:28               ` Benjamin Geer
  2003-09-21 11:55                 ` skaller
  0 siblings, 1 reply; 32+ messages in thread
From: Benjamin Geer @ 2003-09-20 20:28 UTC (permalink / raw)
  Cc: caml-list

skaller wrote:
 > In particular, I would like my product to
 > be ISO Standardised,

IANAL, but it seems to me that the ISO standardises specifications, not 
implementations.  Patents are an issue for specifications, because they 
affect all possible implementations (as in the case you mentioned), but 
source-code copyrights aren't, because only affect one particular 
implementation; anyone is free to make their own implementation of the 
same spec.

Ben

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-20  9:25               ` Jean-Marc Eber
@ 2003-09-21  9:38                 ` Xavier Leroy
  0 siblings, 0 replies; 32+ messages in thread
From: Xavier Leroy @ 2003-09-21  9:38 UTC (permalink / raw)
  To: caml-list

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

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.

This said, I agree with Damien that this discussion is getting
off-topic for this mailing list.  If you wish to discuss htmlc's
licence, John Max Skaller's views on software, or INRIA's position on
OSI licenses this week, please do that ELSEWHERE.  Thank you.

- Xavier Leroy

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] Commercial application written in O'Caml: ExcelEverywhere
  2003-09-20 20:28               ` Benjamin Geer
@ 2003-09-21 11:55                 ` skaller
  2003-09-21 15:01                   ` [Caml-list] how can I print graphics on my local printer under Linux? PL
  0 siblings, 1 reply; 32+ messages in thread
From: skaller @ 2003-09-21 11:55 UTC (permalink / raw)
  To: Benjamin Geer; +Cc: caml-list

On Sun, 2003-09-21 at 06:28, Benjamin Geer wrote:
> skaller wrote:
>  > In particular, I would like my product to
>  > be ISO Standardised,
> 
> IANAL, but it seems to me that the ISO standardises specifications, not 
> implementations.  Patents are an issue for specifications, because they 
> affect all possible implementations (as in the case you mentioned), but 
> source-code copyrights aren't, because only affect one particular 
> implementation; anyone is free to make their own implementation of the 
> same spec.

It isn't quite that simple. As I'm sure you know
programming languages contain facilities for defining
interfaces, for example, for libraries.

In addition, libraries contain definitions.

In both cases, the library codes being copyright
can't be standardised. Often the actual source
definitions/interface specifications are best given
as a precise way of formulating a requirement.

Therefore, the existence of copyrighted codes may
actually hamper standardisation, and even if it doesn't,
the encumberance is not encouraging to a standardisation
body. See a similar comment from Pierre Weiss about
INRIA's licencing policy -- it isn't the Ocaml team
but INRIA lawyers that vet the terms by which Ocaml
is released. Meaning: it is useful to simplify administrative
and legal issues to get the job done.

In addition, all my sources are literate programmed,
and contain human script stating specifications,
as well as the source codes, so the specifications
I provide cannot be distinguished from the programming
language sources: both are physically embodied in the
same source files. Thus, to release the specifications
for standardisation I have to release the language
source codes as well (both are 'derived' from the
LP source files, and so are derived works covered by
the same copyright)


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Caml-list] how can I print graphics on my local printer under Linux?
  2003-09-21 11:55                 ` skaller
@ 2003-09-21 15:01                   ` PL
       [not found]                     ` <20030921161556.GA451@swordfish>
  0 siblings, 1 reply; 32+ messages in thread
From: PL @ 2003-09-21 15:01 UTC (permalink / raw)
  To: caml-list

thnx for your response.

Pierre

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] how can I print graphics on my local printer under Linux?
       [not found]                     ` <20030921161556.GA451@swordfish>
@ 2003-09-22  8:10                       ` PL
  2003-09-22  8:38                         ` Basile Starynkevitch
  2003-09-22  9:21                         ` Olivier Andrieu
  0 siblings, 2 replies; 32+ messages in thread
From: PL @ 2003-09-22  8:10 UTC (permalink / raw)
  To: caml-list



Thank you for your response.

I confess my question is very vague.

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.

I have troubles understanding the #install_printer intruction of Caml.

Regards.

Pierre



----- Original Message ----- 
From: "Matt Gushee" <matt@gushee.net>
To: "PL" <Pierre.Laffitte@wanadoo.fr>
Sent: Sunday, September 21, 2003 6:15 PM
Subject: Re: [Caml-list] how can I print graphics on my local printer under
Linux?


> On Sun, Sep 21, 2003 at 05:01:52PM +0200, PL wrote:
> > thnx for your response.
>
> Hi, Pierre--
>
> That question belongs on a Linux mailing list, and it is also too vague
> for anyone to be able to give a useful answer, but you may find some
> useful information at
>
>   http://www.linuxprinting.org/
>
> Hope that helps.
>
> -- 
> Matt Gushee                 When a nation follows the Way,
> Englewood, Colorado, USA    Horses bear manure through
> mgushee@havenrock.com           its fields;
> http://www.havenrock.com/   When a nation ignores the Way,
>                             Horses bear soldiers through
>                                 its streets.
>
>                             --Lao Tzu (Peter Merel, trans.)
>


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] how can I print graphics on my local printer under Linux?
  2003-09-22  8:10                       ` PL
@ 2003-09-22  8:38                         ` Basile Starynkevitch
  2003-09-23 20:24                           ` Christophe TROESTLER
  2003-09-23 21:48                           ` Pierre Weis
  2003-09-22  9:21                         ` Olivier Andrieu
  1 sibling, 2 replies; 32+ messages in thread
From: Basile Starynkevitch @ 2003-09-22  8:38 UTC (permalink / raw)
  To: PL; +Cc: caml-list

PL wrote:
> 
> 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

Hope above will help you

-- 
Basile STARYNKEVITCH -- basile dot starynkevitch at inria dot fr
Project cristal.inria.fr - phone +33 1 3963 5197 - mobile 6 8501 2359
home email: basile at starynkevitch dot net
all opinions are only mine

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] how can I print graphics on my local printer under Linux?
  2003-09-22  8:10                       ` PL
  2003-09-22  8:38                         ` Basile Starynkevitch
@ 2003-09-22  9:21                         ` Olivier Andrieu
  1 sibling, 0 replies; 32+ messages in thread
From: Olivier Andrieu @ 2003-09-22  9:21 UTC (permalink / raw)
  To: PL; +Cc: caml-list

 PL [Monday 22 September 2003] :
 > 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.

Then GraphPS is probably what you want :

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

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

It's completely unrelated to hardcopy printing.

-- 
   Olivier

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] how can I print graphics on my local printer under Linux?
  2003-09-22  8:38                         ` Basile Starynkevitch
@ 2003-09-23 20:24                           ` Christophe TROESTLER
  2003-09-23 21:48                           ` Pierre Weis
  1 sibling, 0 replies; 32+ messages in thread
From: Christophe TROESTLER @ 2003-09-23 20:24 UTC (permalink / raw)
  To: basile.starynkevitch; +Cc: Pierre.Laffitte, caml-list

On Mon, 22 Sep 2003, Basile Starynkevitch <basile.starynkevitch@inria.fr> wrote:
> 
> > I am doing graphics with Caml.
> 
> [...] Another option would be (on unix or linux systems) to open a
> pipe to some software like gnuplot, [...]

If you are interested in such a solution (for windows as well), you
can use the following Gnuplot library:
http://www.umh.ac.be/math/an/software.php#x4-40003
It is considered beta because I would like to refine the interface and
to take into account some suggestions.

Have fun and do not hesitate to report problems and/or wishes.

ChriS

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [Caml-list] how can I print graphics on my local printer under Linux?
  2003-09-22  8:38                         ` Basile Starynkevitch
  2003-09-23 20:24                           ` Christophe TROESTLER
@ 2003-09-23 21:48                           ` Pierre Weis
  1 sibling, 0 replies; 32+ messages in thread
From: Pierre Weis @ 2003-09-23 21:48 UTC (permalink / raw)
  To: Basile Starynkevitch; +Cc: Pierre.Laffitte, caml-list

> PL wrote:
> > 
> > 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.

The graphps library (from the bazar-ocaml directory of the Caml
distribution) has been written exactly for that purpose: it generates
PostScript files from Caml graphics drawings. See the web site of the
software at:

http://pauillac.inria.fr/graphps/

If you cannot have access to a PostScript printer you may coerce the
resulting file to a suitable image format using GhostScript or
ImageMagick or any other image processing program.

Hope this helps,

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2003-09-23 21:48 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-18 16:11 [Caml-list] possible typechecker bug Fernando Alegre
2003-09-19  2:00 ` malc
2003-09-19  2:06   ` Fernando Alegre
2003-09-19  6:57     ` Julien Signoles
2003-09-19  8:01       ` [Caml-list] Commercial application written in O'Caml: ExcelEverywhere Mattias Waldau
2003-09-19  9:26         ` Benjamin Geer
2003-09-20  8:12           ` Damien Doligez
2003-09-19 11:10         ` skaller
2003-09-19 14:49           ` Richard Jones
2003-09-19 15:02             ` Remi Vanicat
2003-09-19 17:20               ` Karl Zilles
2003-09-20 19:25             ` skaller
2003-09-20 20:28               ` Benjamin Geer
2003-09-21 11:55                 ` skaller
2003-09-21 15:01                   ` [Caml-list] how can I print graphics on my local printer under Linux? PL
     [not found]                     ` <20030921161556.GA451@swordfish>
2003-09-22  8:10                       ` PL
2003-09-22  8:38                         ` Basile Starynkevitch
2003-09-23 20:24                           ` Christophe TROESTLER
2003-09-23 21:48                           ` Pierre Weis
2003-09-22  9:21                         ` Olivier Andrieu
2003-09-19 22:29           ` [Caml-list] Commercial application written in O'Caml: ExcelEverywhere Oleg Trott
2003-09-20  9:09             ` Mattias Waldau
2003-09-20  9:25               ` Jean-Marc Eber
2003-09-21  9:38                 ` Xavier Leroy
2003-09-20 20:01               ` skaller
2003-09-20 19:58             ` skaller
2003-09-19 11:48         ` Ville-Pertti Keinonen
2003-09-20 18:53           ` skaller
2003-09-20 19:31             ` Alain.Frisch
2003-09-19 14:47         ` Richard Jones
2003-09-20 19:32           ` skaller
2003-09-19 16:23         ` kknowles

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).