caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Strange error w/ Mlgraph.make_font
@ 2003-07-14  3:38 Matt Gushee
  2003-07-14 14:32 ` Florian Hars
  2003-07-14 16:21 ` Manos Renieris
  0 siblings, 2 replies; 5+ messages in thread
From: Matt Gushee @ 2003-07-14  3:38 UTC (permalink / raw)
  To: caml-list

I have been doing some work with Mlgraph lately, and have noticed a
problem with the make_font function:

  bash-2.05a$ ocaml mlgraph.cma
          Objective Caml version 3.06
  
  # open Mlgraph;;
  # let f = make_font Helvetica 12.;;
  Exception: Failure "float_of_string".

This happens with proportional fonts (Helvetica, Times, and Symbol),
but not for fixed-width fonts (Courier). I tracked down the cause today:
it's because the function that loads the font definition files is 
attempting to apply 'float_of_string' to lines ending in semicolons.
So, for my own installation, I've added a 'strip_semicolon' function
to 'fonts.ml'.

However, I am planning to distribute a software package that may 
depend on MLgraph, so I'd like to make a patch available for this
error. But I'm wondering if my fix is really the right solution. 
What's strange about this is that it's almost certain that anyone
who tried to use MLgraph would have discovered this bug a long time
ago, so I can only think that, once upon a time, it wasn't a bug, but
something outside of Mlgraph changed to cause the error. For example:

  Older versions of Ghostscript didn't add semicolons to the ends
  of the problematic lines; or

  Older versions of OCaml had a float_of_string function that 
  ignored trailing semicolons.

Anybody know what the real reason might be?

While I'm at it, are the MLgraph developers still around? Would they
(you) be interested in accepting patches?

-- 
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] 5+ messages in thread

* Re: [Caml-list] Strange error w/ Mlgraph.make_font
  2003-07-14  3:38 [Caml-list] Strange error w/ Mlgraph.make_font Matt Gushee
@ 2003-07-14 14:32 ` Florian Hars
  2003-07-14 14:48   ` Matt Gushee
  2003-07-14 16:21 ` Manos Renieris
  1 sibling, 1 reply; 5+ messages in thread
From: Florian Hars @ 2003-07-14 14:32 UTC (permalink / raw)
  Cc: caml-list

Matt Gushee wrote:
> However, I am planning to distribute a software package that may 
> depend on MLgraph

How are you going to do that?
MLgraph doesn't come with a license that would allow you to look at the 
code, let alone use, fix or distribute it.

Yours, Florian Hars.






-------------------
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] 5+ messages in thread

* Re: [Caml-list] Strange error w/ Mlgraph.make_font
  2003-07-14 14:32 ` Florian Hars
@ 2003-07-14 14:48   ` Matt Gushee
  2003-07-14 15:19     ` Florian Hars
  0 siblings, 1 reply; 5+ messages in thread
From: Matt Gushee @ 2003-07-14 14:48 UTC (permalink / raw)
  To: caml-list

On Mon, Jul 14, 2003 at 04:32:15PM +0200, Florian Hars wrote:
> Matt Gushee wrote:
> >However, I am planning to distribute a software package that may 
> >depend on MLgraph
> 
> How are you going to do that?
> MLgraph doesn't come with a license that would allow you to look at the 
> code, let alone use, fix or distribute it.

Oh? Then what would you call this (contents of COPYING, from the MLgraph
source distribution)?



                       MLgraph version 2.1
    
                       License for free use
                       September 1st, 1997.
    
    MLgraph version 2.1 is free software. It is not public domain -- We
    retain copyright to all source code -- but it is free, and you have
    license to use it as you desire. This includes utilizing it as a
    complete system, adapting it to your purposes, building new
    applications using and incorporating it, etc. These things and more
    you can do free of charge.
    
    Also, note that MLgraph version 2.1 comes with ABSOLUTELY NO
    WARRANTY. Because it is free, and made available for your use with
    no compensation due, we cannot warrant it to be suitable to any
    purpose, to be free of defects, or to comply with any standard, etc.
    
    Given that, we hope you can enjoy and utilize it. 
    
    Emmanuel Chailloux, Guy Cousineau and Ascander Suarez.


This is obviously not very rigorous in a legal sense, but it looks like
an open source license to me. If you have reason to believe otherwise,
could you please explain?


-- 
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] 5+ messages in thread

* Re: [Caml-list] Strange error w/ Mlgraph.make_font
  2003-07-14 14:48   ` Matt Gushee
@ 2003-07-14 15:19     ` Florian Hars
  0 siblings, 0 replies; 5+ messages in thread
From: Florian Hars @ 2003-07-14 15:19 UTC (permalink / raw)
  To: Matt Gushee; +Cc: caml-list

Matt Gushee wrote:
> Oh? Then what would you call this (contents of COPYING, from the MLgraph
> source distribution)?

Interesting question :-). Seems I only looked into the actual source 
files for a copyright statement and didn't find anything in there. So I 
came to the conclusion that there is no copyright statement and no 
license statement for MLGraph without looking further, which may or may 
not be overly pessimistic on my part. Afeter all, there must be a reason 
why the FSF tells you to put a copyright and license statement into 
every source file of a program you want to release under the (L)GPL.

Yours, Florian Hars.

-------------------
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] 5+ messages in thread

* Re: [Caml-list] Strange error w/ Mlgraph.make_font
  2003-07-14  3:38 [Caml-list] Strange error w/ Mlgraph.make_font Matt Gushee
  2003-07-14 14:32 ` Florian Hars
@ 2003-07-14 16:21 ` Manos Renieris
  1 sibling, 0 replies; 5+ messages in thread
From: Manos Renieris @ 2003-07-14 16:21 UTC (permalink / raw)
  To: caml-list

On Sun, Jul 13, 2003 at 09:38:21PM -0600, Matt Gushee wrote:
> I have been doing some work with Mlgraph lately, and have noticed a
> problem with the make_font function:
> 
>   Exception: Failure "float_of_string".
> What's strange about this is that it's almost certain that anyone
> who tried to use MLgraph would have discovered this bug a long time
> ago, so I can only think that, once upon a time, it wasn't a bug, but
> something outside of Mlgraph changed to cause the error. For example:
> 
>   Older versions of OCaml had a float_of_string function that 
>   ignored trailing semicolons.
> 
> Anybody know what the real reason might be?

float_of_string used to ignore trailing characters, but not since 3.04.

http://camlcvs.inria.fr/cgi-bin/cvsweb.cgi/ocaml/byterun/floats.c.diff?r1=1.30&r2=1.31

-- Manos

-------------------
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] 5+ messages in thread

end of thread, other threads:[~2003-07-14 16:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-14  3:38 [Caml-list] Strange error w/ Mlgraph.make_font Matt Gushee
2003-07-14 14:32 ` Florian Hars
2003-07-14 14:48   ` Matt Gushee
2003-07-14 15:19     ` Florian Hars
2003-07-14 16:21 ` Manos Renieris

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