ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Functional MetaPost?
@ 2001-04-17 15:11 Henning Hraban Ramm
  2001-04-17 15:33 ` Marc van Dongen
  0 siblings, 1 reply; 11+ messages in thread
From: Henning Hraban Ramm @ 2001-04-17 15:11 UTC (permalink / raw)


Heigh ho! Happy Eastereggs! ;-)

I just read in the german TeX-D-L about something named
"Functional MetaPost", written in a never-heard language named 
Haskell. Perhaps someone is interested:

http://www.informatik.uni-bonn.de/~ralf/FuncMP.ps.gz

There is already a LaTeX-package named fmp on CTAN to integrate it with
LaTeX. I don't know if it can more or other things than MetaFun.

-- 
Grüßlis vom Hraban!
---
http://www.fiee.net/     (Formelsammlung)
http://angerweit.tikon.ch/        (Musik)
http://www.drucktechniker2001.de/ (Leute)


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

* Re: Functional MetaPost?
  2001-04-17 15:11 Functional MetaPost? Henning Hraban Ramm
@ 2001-04-17 15:33 ` Marc van Dongen
  2001-04-17 16:43   ` Hans Hagen
  2001-04-17 20:44   ` Johannes Huesing
  0 siblings, 2 replies; 11+ messages in thread
From: Marc van Dongen @ 2001-04-17 15:33 UTC (permalink / raw)
  Cc: ntg-context

Henning Hraban Ramm (hraban@fiee.net) wrote:

: I just read in the german TeX-D-L about something named
: "Functional MetaPost", written in a never-heard language named 
: Haskell. Perhaps someone is interested:

Haskell is extremely cool. Check it out.
The integration seems very promising.

Thanks for the pointer.

Regards,

Marc
-- 
     Marc van Dongen, CS Dept | phone:  +353 21 4903578
University College Cork, NUIC | Fax:    +353 21 4903113
  College Road, Cork, Ireland | Email: dongen@cs.ucc.ie


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

* Re: Functional MetaPost?
  2001-04-17 15:33 ` Marc van Dongen
@ 2001-04-17 16:43   ` Hans Hagen
  2001-04-17 17:01     ` Marc van Dongen
  2001-04-17 20:44   ` Johannes Huesing
  1 sibling, 1 reply; 11+ messages in thread
From: Hans Hagen @ 2001-04-17 16:43 UTC (permalink / raw)
  Cc: Henning Hraban Ramm, ntg-context

At 04:33 PM 4/17/01 +0100, Marc van Dongen wrote:
>Henning Hraban Ramm (hraban@fiee.net) wrote:
>
>: I just read in the german TeX-D-L about something named
>: "Functional MetaPost", written in a never-heard language named 
>: Haskell. Perhaps someone is interested:
>
>Haskell is extremely cool. Check it out.
>The integration seems very promising.

i have no problem with supporting it from within context, given that i can
find the specs -) 

hans
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: Functional MetaPost?
  2001-04-17 16:43   ` Hans Hagen
@ 2001-04-17 17:01     ` Marc van Dongen
  0 siblings, 0 replies; 11+ messages in thread
From: Marc van Dongen @ 2001-04-17 17:01 UTC (permalink / raw)
  Cc: Henning Hraban Ramm, ntg-context

Hans Hagen (pragma@wxs.nl) wrote:

: i have no problem with supporting it from within context, given that i can
: find the specs -) 

For Haskell, see http://www.haskell.org/.
You probably want to use hugs (a Haskell interpreter).
You can find info about hugs via haskell.org as well.
As a haskell compiler, I would like to reccomend ghc%
---the Glasgow Haskell compiler.

I haven't checked out the specs of the functional
metapost package, yet. I probably won't have time for
that for a long time (I'm a bit busy) but I'll
definitely will give it a try later.

Regards,

Marc


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

* Re: Functional MetaPost?
  2001-04-17 15:33 ` Marc van Dongen
  2001-04-17 16:43   ` Hans Hagen
@ 2001-04-17 20:44   ` Johannes Huesing
  2001-04-18  7:24     ` Hans Hagen
  1 sibling, 1 reply; 11+ messages in thread
From: Johannes Huesing @ 2001-04-17 20:44 UTC (permalink / raw)


On Tue, Apr 17, 2001 at 04:33:34PM +0100, Marc van Dongen wrote:
> Henning Hraban Ramm (hraban@fiee.net) wrote:
> 
> : I just read in the german TeX-D-L about something named
> : "Functional MetaPost", written in a never-heard language named 
> : Haskell. Perhaps someone is interested:
> 
> Haskell is extremely cool. Check it out.

This recommendation definitely does not extend to Henning :-)

I haven't seriously dealt with Haskell but it looks like it has 
an extremely steep learning curve. 

Groet

Johannes
-- 
Johannes Hüsing | Domain: Adresse im Internet. Besteht aus einem 
hannes@ruhrau.de| technischen Teil (http://www.), einem Namen 
                | (erwin_meier) und einer Endung  (zum Beispiel 
                | .de für Deutschland) [J. Albrecht, "Zeit" 12/2001]


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

* Re: Functional MetaPost?
  2001-04-17 20:44   ` Johannes Huesing
@ 2001-04-18  7:24     ` Hans Hagen
  2001-04-18  8:37       ` S2P development
  2001-04-18  8:44       ` Marc van Dongen
  0 siblings, 2 replies; 11+ messages in thread
From: Hans Hagen @ 2001-04-18  7:24 UTC (permalink / raw)
  Cc: ntg-context

At 10:44 PM 4/17/01 +0200, Johannes Huesing wrote:
>On Tue, Apr 17, 2001 at 04:33:34PM +0100, Marc van Dongen wrote:
>> Henning Hraban Ramm (hraban@fiee.net) wrote:
>> 
>> : I just read in the german TeX-D-L about something named
>> : "Functional MetaPost", written in a never-heard language named 
>> : Haskell. Perhaps someone is interested:
>> 
>> Haskell is extremely cool. Check it out.
>
>This recommendation definitely does not extend to Henning :-)
>
>I haven't seriously dealt with Haskell but it looks like it has 
>an extremely steep learning curve. 

A quick look at the paper [describes an alternative for the boxit package]
makes me wonder is another language on top of mpost makes live easier at
all. Is the mp language really that bad? A complex problem remains a
complex problem and it's more the features of a language (i.e. mp) than the
wrapper around it that help us there. Interesting general question: how far
does abstraction go? Another one: a computer language [and mp and tex are
actually more application languages] is used to build an interface an dnot
so much to be the interface itself, but i may be wrong here.   

Hans 
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: Functional MetaPost?
  2001-04-18  7:24     ` Hans Hagen
@ 2001-04-18  8:37       ` S2P development
  2001-04-18 14:06         ` Hans Hagen
  2001-04-18  8:44       ` Marc van Dongen
  1 sibling, 1 reply; 11+ messages in thread
From: S2P development @ 2001-04-18  8:37 UTC (permalink / raw)


Hans Hagen wrote:
> 
> At 10:44 PM 4/17/01 +0200, Johannes Huesing wrote:
> >On Tue, Apr 17, 2001 at 04:33:34PM +0100, Marc van Dongen wrote:
> >> Henning Hraban Ramm (hraban@fiee.net) wrote:
> >>
> >> : I just read in the german TeX-D-L about something named
> >> : "Functional MetaPost", written in a never-heard language named
> >> : Haskell. Perhaps someone is interested:
> >>
> >> Haskell is extremely cool. Check it out.
> >
> >This recommendation definitely does not extend to Henning :-)
> >
> >I haven't seriously dealt with Haskell but it looks like it has
> >an extremely steep learning curve.
> 
> A quick look at the paper [describes an alternative for the boxit package]

I'm a bit disappointed by the paper, actually. I was hoping for a
haskell 
reimplementation of metapost, which is certainly doable and quite
probably 
a good idea(tm). 

There is a definate upper limit to the amount of abstraction you can
apply
to an image; statements like

	picture := landscape.pretty;

are not particularly useful. At least partially, this is why the
metafont
language allows you to invent your own idiom. It looks like the author
of
the package did not really understand the mp language *or* felt the need
to do something in Haskell, period. The package described in the paper
is
not so different from other wrappers around mp, and the implementation 
language appears irrelevant except for the fact that it uses Haskell 
syntax/idiom. I've got another wrapper that uses Perl (privately), Hans
has
a wrapper that uses TeX (metafun), etc. etc.

Side note:
The metafont language interpreter allows you to do rather wild things,
and 
I wouldn't be surprised if it turns out that you can write an
interpreter 
for functional metapost in traditional metapost ;)

Greetings, Taco


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

* Re: Functional MetaPost?
  2001-04-18  7:24     ` Hans Hagen
  2001-04-18  8:37       ` S2P development
@ 2001-04-18  8:44       ` Marc van Dongen
  2001-04-18 15:08         ` Berend de Boer
  1 sibling, 1 reply; 11+ messages in thread
From: Marc van Dongen @ 2001-04-18  8:44 UTC (permalink / raw)
  Cc: Johannes Huesing, ntg-context

Hans Hagen (pragma@wxs.nl) wrote:

: A quick look at the paper [describes an alternative for the boxit package]
: makes me wonder is another language on top of mpost makes live easier at
: all. Is the mp language really that bad? A complex problem remains a

I had a look at the date when the thisis was defended (1998)
which is about two years ago. I was very surprised yesterday
about the existence of the package (I read Haskell mailing
lists on a dayly basis). It also wasn't mentioned in the
Graphics library/tools section of the Haskell pages. Perhaps
it didn't add that much to metapost at all.

I still think that someday I'll have a look at the package
and see what it's really worth.

: complex problem and it's more the features of a language (i.e. mp) than the
: wrapper around it that help us there. Interesting general question: how far

Hmmm. Why not program in assembler?

: does abstraction go? Another one: a computer language [and mp and tex are
: actually more application languages] is used to build an interface an dnot
: so much to be the interface itself, but i may be wrong here.   

Regards,

Marc


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

* Re: Functional MetaPost?
  2001-04-18  8:37       ` S2P development
@ 2001-04-18 14:06         ` Hans Hagen
  2001-04-18 14:41           ` S2P development
  0 siblings, 1 reply; 11+ messages in thread
From: Hans Hagen @ 2001-04-18 14:06 UTC (permalink / raw)
  Cc: ntg-context

At 10:37 AM 4/18/01 +0200, S2P development wrote:

>I'm a bit disappointed by the paper, actually. I was hoping for a
>haskell 
>reimplementation of metapost, which is certainly doable and quite
>probably 
>a good idea(tm). 
>
>There is a definate upper limit to the amount of abstraction you can
>apply
>to an image; statements like
>
>	picture := landscape.pretty;
>
>are not particularly useful. At least partially, this is why the
>metafont
>language allows you to invent your own idiom. It looks like the author
>of
>the package did not really understand the mp language *or* felt the need
>to do something in Haskell, period. The package described in the paper
>is
>not so different from other wrappers around mp, and the implementation 
>language appears irrelevant except for the fact that it uses Haskell 
>syntax/idiom. I've got another wrapper that uses Perl (privately), Hans
>has
>a wrapper that uses TeX (metafun), etc. etc.

After browsing the document, I tend to agree with that. In his table where
he compares the ease of mp definitions with others he even rates mp lower
than some fuzzy tex based macro collection which proves that he never
really used the mp language himself. This is more a library approach than a
new language. 

actually, the mp language is rather well suited for a specific kind of
graphics, while support in another language (ml, c, whatever) does not on
forehand leads to something better, and maybe even worse: now the z1 .. z2
.. z3 is strangely mapped onto something less readable; this kind of
abstraction only works if you want to limit the scope / usage  

on the other hand, we should not be to harsh since it's graduate work and
not something based on years of experience / usage / encountering problems
/ hitting the extremes of mp etc.  

And in general: using another language does not change the problems that we
have to deal with -) 

Hans  

>Side note:
>The metafont language interpreter allows you to do rather wild things,
>and 
>I wouldn't be surprised if it turns out that you can write an
>interpreter 
>for functional metapost in traditional metapost ;)

now that would be interesting (i think that some kind of lisp would be
doable too). 

Hans

-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: Functional MetaPost?
  2001-04-18 14:06         ` Hans Hagen
@ 2001-04-18 14:41           ` S2P development
  0 siblings, 0 replies; 11+ messages in thread
From: S2P development @ 2001-04-18 14:41 UTC (permalink / raw)


Hans Hagen wrote:
> 
> After browsing the document, I tend to agree with that. In his table where
> he compares the ease of mp definitions with others he even rates mp lower
> than some fuzzy tex based macro collection which proves that he never
> really used the mp language himself. This is more a library approach than a
> new language.

Unf.
I'd really have liked metapost in haskell. Functional programming
languages
are very well suited to deal with the kind of problems that metapost 
internally has to deal with (e.g. equation solving).

> actually, the mp language is rather well suited for a specific kind of
> graphics, while support in another language (ml, c, whatever) does not on
> forehand leads to something better, and maybe even worse: now the z1 .. z2
> .. z3 is strangely mapped onto something less readable; this kind of
> abstraction only works if you want to limit the scope / usage

If you want to make the language more flexible, probably the best course
of 
action would be to define new primitives/operations, perhaps using some
sort
of plug-in interface. Something like

	path p,q,r;
	r = p intersectionarea q;

would be a big help, at least for a certain kind of picture. Downside:
you
cannot do this in current (pascal) mp. 

Greetings, Taco


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

* Re: Functional MetaPost?
  2001-04-18  8:44       ` Marc van Dongen
@ 2001-04-18 15:08         ` Berend de Boer
  0 siblings, 0 replies; 11+ messages in thread
From: Berend de Boer @ 2001-04-18 15:08 UTC (permalink / raw)
  Cc: Hans Hagen, Johannes Huesing, ntg-context

Marc van Dongen <dongen@cs.ucc.ie> writes:

> : complex problem and it's more the features of a language (i.e. mp) than the
> : wrapper around it that help us there. Interesting general question: how far
> 
> Hmmm. Why not program in assembler?

There probably is an optimal solution between a problem and a
programming language. 4GL's have never taken off, although they make
some tasks more easier.

Also recognize the beginner/professional phases, each having different
requirements.

So assembler probably not, but Haskell neither. Perhaps mp is more or
less perfect for its job. Perhaps like TeX is. Beginners frustrations
should not be confused with a bad language: it might be written for
experts, not for beginners.

Groetjes,

Berend. (-:


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

end of thread, other threads:[~2001-04-18 15:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-17 15:11 Functional MetaPost? Henning Hraban Ramm
2001-04-17 15:33 ` Marc van Dongen
2001-04-17 16:43   ` Hans Hagen
2001-04-17 17:01     ` Marc van Dongen
2001-04-17 20:44   ` Johannes Huesing
2001-04-18  7:24     ` Hans Hagen
2001-04-18  8:37       ` S2P development
2001-04-18 14:06         ` Hans Hagen
2001-04-18 14:41           ` S2P development
2001-04-18  8:44       ` Marc van Dongen
2001-04-18 15:08         ` Berend de Boer

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