Re: Haskell MIME types?

1999-08-25 Thread Fritz K Ruehr

Koen wrote:

>  | I just convinced my local sysadmin to attach a new MIME type to
>  | outgoing Haskell programs sent by our web server, namely
>  | "application/x-haskell".
>  :
>  | My goal in this is to get a browser to launch Hugs/Winhugs on the
>  | podium machine where I make lectures whenever I click on a link to
>  | Haskell code.
> 
> I am not sure if this is such a good idea.
> 
> How about if I put the following Haskell program on my webpage:
> 
>   import System
>   main = system "rm *"

Actually, I only mean to have Hugs launch and *load* the code, not
actually *run* it. The intent is just to make it easier to demo 
bits of sample code by having the file load up automatically
(saves typing time, remembering file paths in the middle of lecture,
etc.).

Also, as some later follow-up (follower-up?) pointed out, I am not
suggesting that anyone else set their handling of the MIME type as
I am, much less to actually run the code (in fact, perhaps the latter
should be discouraged overtly if the MIME type info is publicized
somewhere).

On the other hand, this podium machine is newly loaded with
Windows 98, so perhaps the "rm *" would actually be an
improvement :) .

  --  Fritz Ruehr
  [EMAIL PROTECTED]





RE: Announce: Functional Graph Library

1999-08-25 Thread Brian Boutel

The link on this page to the paper "Functional Programming with Graphs"
is incorrect. The Erwig  directory is omitted.

-brian

On Wednesday, 25 August 1999 18:25, Martin Erwig [SMTP:[EMAIL PROTECTED]] 
wrote:
> 
> In response to several requests, I have put a
> preliminary Haskell version of the Functional
> Graph Library (FGL) on the Web:
> 
>   http://www.informatik.fernuni-hagen.de/pi4/erwig/fgl/
> 
> --
> Martin





Re: Haskell MIME types?

1999-08-25 Thread Christian Sievers

Alexander Jacobson wrote:

> Postscript interpreters also have the ability to execute rm *.
> The difference is that postscript interpreters have a command line option
> to turn off file system access capabilities.
> Is there a command line option in hugs to disallow import of System?

I don't think disallowing some imports is the way to go. For example,
you also have Directory.removeFile, but I'd rather not suggest to
disallow importing Directory. Instead, operations that an untrusted
code shouldn't execute could raise an exeption like isPermissionError
or isIllegalOperationError. In *nix-land, we might chose to just run
Hugs under its own UID, so it might even write its own files, and
delete them, but only them.

> > On Tue, 24 Aug 1999, Fritz K Ruehr wrote:
> > 
> >  | I just convinced my local sysadmin to attach a new MIME type to
> >  | outgoing Haskell programs sent by our web server, namely
> >  | "application/x-haskell".

Maybe the Haskell-Version should also go into the MIME type name, as
in "application/x-haskell98".


All the best,
Christian Sievers





As- and irrefutable- patterns

1999-08-25 Thread Keith Wansbrough

According to the Haskell 98 report, patterns have the following grammar:

apat ::= var [ @ apat ]
  |  ~ apat
  | ...etc...

Thus the following program should be legal (IMHO):

main = let foo@~(x,y) = (1,2)
   in  print foo

Instead, both Hugs and GHC report

  ERROR "TestAsPat.hs" (line 1): Undefined variable "foo"

What have I missed?

Replacing the lhs with foo@(~(x,y)) works, BTW.

Thanks..

--KW 8-)


-- 
: Keith Wansbrough, MSc, BSc(Hons) (Auckland) :
: PhD Student, Computer Laboratory, University of Cambridge, England. :
:  (and recently of the University of Glasgow, Scotland. [><] )   :
: Native of Antipodean Auckland, New Zealand: 174d47' E, 36d55' S.:
: http://www.cl.cam.ac.uk/users/kw217/  mailto:[EMAIL PROTECTED] :
:-:







Re: Haskell MIME types?

1999-08-25 Thread Keith Wansbrough

>  | I just convinced my local sysadmin to attach a new MIME type to
>  | outgoing Haskell programs sent by our web server, namely
>  | "application/x-haskell".
>  :
>  | My goal in this is to get a browser to launch Hugs/Winhugs on the
>  | podium machine where I make lectures whenever I click on a link to
>  | Haskell code.
> 
> I am not sure if this is such a good idea.

[.. system "rm *" example omitted ..]

I think this is an orthogonal issue.  If a particular user wants to 
bind application/x-haskell to runhugs, that's their own business, just 
as it is with application/octet-stream (.exe) or application/x-sh 
(Bourne shell script).  It is the job of the web server to be as 
informative as possible about what it is sending out, and the job of 
the browser to sensibly handle this information.

Thus, I think having a MIME type for Haskell programs is a good
idea...  maybe your browser will automatically syntax-highlight them,
or put them in your Haskell modules directory, or offer to run them,
or some other sensible action.  Information is a good thing.

OTOH, no browser should *by default* be set to execute 
application/x-haskell documents, any more than it should run Word on 
application/msword or exec on application/octet-stream.

My GBP 0.02.

--KW 8-)






Ph.D.-scholarships at the new IT University in Copenhagen

1999-08-25 Thread Henrik Reif Andersen

Vacant Ph.D.-scholarships at the IT University in Copenhagen


The IT University in Copenhagen now invites applications for 6
Ph.D.-scholarships within the following four areas: Software
Development; Internet Technologies; Multi-Media Technologies; and
Design, Communication, and Media. In addition, the IT University is
seeking one Ph.D.-student in the company-based project "Fertimorph."

The full announcement, further information, and application forms can
be downloaded from the web-page at http://www.itu.dk/phd. Deadline for
applications is September 7th, 1999.

If you have any questions to the application form or the Ph.D.-studies
in general, you are welcome to send an e-mail to [EMAIL PROTECTED]

Yours sincerely,

Henrik Reif Andersen
Associate Professor and Ph.D. Advisor at the IT University
[EMAIL PROTECTED]

=
The IT University in Copenhagen is a new university formed by the
Danish government for the increase and improvement of research and
education in information technology in the Copenhagen area. Studies
are at graduate level (Master and Ph.D.) and cover aspects of
information technology ranging from natural and technical sciences to
arts and business perspectives. September 1st 1999 the first 150
students are starting on the Master's programs. The aim is that in
five years, 800 students will start every year.

A Ph.D.-program at ITU is 3 or 4 years dependent on the educational
level of the student. For students having an education equivalent to a
Danish 5-years Master's degree, Ph.D.-studies will be 3 years. For
students having an equivalent of 4 years of Danish university studies,
the Ph.D.-program is 4 years. After two years, the succesful
completion of a qualifying examination will lead to a degree in Master
of Science in Information Technology. The scholarship is approximately
monthly 18,000 DKK (approx. $2500 taxable) for students on the 3 year
program. For students on the 4 year program the scholarship is
approximately monthly 11,000 DKK (approx. $1500 taxable) the first 2
years with a possible increment from a personal stipend (Danish SU) if
the student qualify. The conditions in the remaining two years
correspond to the 3 year program. Students on the 3 year program, and
students that have passed the qualifying examination will be employed
according to the relevant agreements of November 25th, 1997 between
the Ministry of Finance and AC. To be awarded a scholarship requires
enrollment as a Ph.D.-student.

The Ph.D.-scholarships must be applied for on the application form
available at www.itu.dk. The application should be attached
documentation for previous studies and degrees, a brief CV, copies of
publications or theses, and a proposed research program. Contact to a
prospective supervisor prior to application is encouraged via e-mail
[EMAIL PROTECTED] or phone +45 3816 .  Applications with
enclosures must be received in two copies at the IT University no
later than 12 pm, September 7th, 1999.







Graph library. Reply

1999-08-25 Thread S.D.Mechveliani

Martin Erwig  <[EMAIL PROTECTED]>  writes

> In response to several requests, I have put a
> preliminary Haskell version of the Functional
> Graph Library (FGL) on the Web:
> [..]


Is it on  graphics  or on  graphs - binary relations?


--
Sergey Mechveliani
[EMAIL PROTECTED]






Re: Haskell MIME types?

1999-08-25 Thread S. Alexander Jacobson

On Wed, 25 Aug 1999, Christian Sievers wrote:

> Alexander Jacobson wrote:
> 
> > Postscript interpreters also have the ability to execute rm *.
> > The difference is that postscript interpreters have a command line option
> > to turn off file system access capabilities.
> > Is there a command line option in hugs to disallow import of System?
> 
> I don't think disallowing some imports is the way to go. For example,
> you also have Directory.removeFile, but I'd rather not suggest to
> disallow importing Directory. Instead, operations that an untrusted
> code shouldn't execute could raise an exeption like isPermissionError
> or isIllegalOperationError. In *nix-land, we might chose to just run
> Hugs under its own UID, so it might even write its own files, and
> delete them, but only them.

I agree with you about restricting imports.   
I think the way to go is to disable access to filedescriptors (the file
system and sockets) within hugs. 

Or you reproduce the whole securityManager/capabilityClass regime from
Java/Netscape (see
http://developer.netscape.com/docs/manuals/signedobj/capabilities/index.html).
whish would be great...it would be great to define a whole Haskell
applet infrastructure, but that is a really big job.

> > > On Tue, 24 Aug 1999, Fritz K Ruehr wrote:
> > > 
> > >  | I just convinced my local sysadmin to attach a new MIME type to
> > >  | outgoing Haskell programs sent by our web server, namely
> > >  | "application/x-haskell".
> 
> Maybe the Haskell-Version should also go into the MIME type name, as
> in "application/x-haskell98".

Yes.  OTOH, if you use, active-x (I am assuming windows here) then you can
avoid the whole mime-type issue.  You simply specify the OID of the
interpreter you want and download the code.

-Alex-
___
S. Alexander Jacobson   Shop.Com
1-212-697-0184 voiceThe Easiest Way To Shop






Re: FFIs

1999-08-25 Thread Malcolm Wallace

There is already a Haskell FFI mailing list, [EMAIL PROTECTED]  However,
its most recent message was in Sept 1998, and I can't remember the
subscription instructions.  Can anyone enlighten us further?

Regards,
Malcolm






Re: As- and irrefutable- patterns

1999-08-25 Thread S. Alexander Jacobson

Presumably @~ is an undefined operator, but haskell tries to resolve the
type of foo before resolving the type of @~.

-Alex-

On Wed, 25 Aug 1999, Keith Wansbrough wrote:

> According to the Haskell 98 report, patterns have the following grammar:
> 
> apat ::= var [ @ apat ]
>   |  ~ apat
>   | ...etc...
> 
> Thus the following program should be legal (IMHO):
> 
> main = let foo@~(x,y) = (1,2)
>in  print foo
> 
> Instead, both Hugs and GHC report
> 
>   ERROR "TestAsPat.hs" (line 1): Undefined variable "foo"
> 
> What have I missed?
> 
> Replacing the lhs with foo@(~(x,y)) works, BTW.
> 
> Thanks..
> 
> --KW 8-)
> 
> 
> -- 
> : Keith Wansbrough, MSc, BSc(Hons) (Auckland) :
> : PhD Student, Computer Laboratory, University of Cambridge, England. :
> :  (and recently of the University of Glasgow, Scotland. [><] )   :
> : Native of Antipodean Auckland, New Zealand: 174d47' E, 36d55' S.:
> : http://www.cl.cam.ac.uk/users/kw217/  mailto:[EMAIL PROTECTED] :
> :-:
> 
> 

___
S. Alexander Jacobson   Shop.Com
1-212-697-0184 voiceThe Easiest Way To Shop






Re: Haskell MIME types?

1999-08-25 Thread Koen Claessen

On Tue, 24 Aug 1999, Fritz K Ruehr wrote:

 | I just convinced my local sysadmin to attach a new MIME type to
 | outgoing Haskell programs sent by our web server, namely
 | "application/x-haskell".
 :
 | My goal in this is to get a browser to launch Hugs/Winhugs on the
 | podium machine where I make lectures whenever I click on a link to
 | Haskell code.

I am not sure if this is such a good idea.

How about if I put the following Haskell program on my webpage:

  import System
  main = system "rm *"

I don't think you really want to click on that one...

Microsoft has already allowed for introduction of lots of
"viruses" because their web applications allow starting up
arbitrary MS Word scripts...

Regards,
Koen.

--
Koen Claessen http://www.cs.chalmers.se/~koen 
phone:+46-31-772 5424  e-mail:[EMAIL PROTECTED]
-
Chalmers University of Technology, Gothenburg, Sweden






Re: Q: hugs behavior...

1999-08-25 Thread D. Tweed

On 25 Aug 1999, Marko Schuetz wrote:

> What I would like to know is: wouldn't it make sense to have the
> transformation
> 
> f x = e where e does not mention x
> 
> -->
> 
> f x = f'
> f' = e
> 
> in hugs? Did I miss anything?

What if e if huge (maybe an infinte list of primes) and f x is used only
very rarely during the evaluation? Doesn't this force as much of f' as has
ever been evaluated due to functions using f x to be constantly in
memory, or is that a wrong reading of the situation? 

___cheers,_dave__
email: [EMAIL PROTECTED]   "He'd stay up all night inventing an
www.cs.bris.ac.uk/~tweed/pi.htm   alarm clock to ensure he woke early
work tel: (0117) 954-5253 the next morning"-- Terry Pratchett






Re: opposite of (:)

1999-08-25 Thread Viktor Kuncak


Marcin 'Qrczak' Kowalczyk wrote:

> How would you define the semantics of matching on functions? This is
> like computing the inverse of arbitrary functions or solving arbitrary
> equations! For example,

I think a limmited form of function pattern mathing could be introduced in the form of
lambda patterns. This would be just a syntactic sugar for a let expression. Programs 
would
have to be `desugared ' prior to transforming pattern mathing to case expressions. 
Consider
a queue implementation via catenable lists of the type [a] -> [a].

head (\s-> x : xs) = x
tail (\s -> x : xs) = \s -> xs
snoc (\s -> xs) = \s -> x : xs

which would be equivalent to

head q = let (x : xs) = q x in x
tail q = \s -> (let (x : xs) = q s in xs)
snoc q = \s -> (let xs = q s in x : xs)

The additional benefit of this approach would be easier optimization: unique (unshared)
functions could than easily be compiled into direct graph update. This way we can 
implement
data structures with pointers to various parts of the object as functions with 
appropriate
number of arguments. Functional update would be just pointer update (this direct 
functional
update can, of course,  be implemented without ``lambda pattern mathing'', but I think 
they
fit together well).

I think I managed to define a precise semantics for lambda pattern mathing. Basicly it
amounts to replacing lambda pattern (\s->e) on LHS with a variable q and then replacing
occurence of part e1 of lambda body e with ``let e = q s in e''. From this we conclude 
that
variable s in a lambda pattern has to be bound on RHS. We could inforce this by 
putting the
whole RHS in a let expression:

RHS':  let s = error in RHS

This can be expanded to the case of (\p -> e) pattern where p is a pattern (with zero 
or
more free variables).

As another example, the definition of join for state transformer monad becomes

join (\s -> (\s' -> (x, s''), s')) = \s -> (x, s'')

which after performing transformation and some simplifications, becomes

join q = \s -> (let (u, s') = qs
(x, s'') = u s'
in (x, s''))

I stress that this is just a syntactic sugar. There is no way we can tell the way the
argument function was defined by this pattern mathing, as it always succeeds (being
replaced by a type variable).







RE: Question

1999-08-25 Thread Manuel M. T. Chakravarty

Simon Marlow <[EMAIL PROTECTED]> wrote,

> > Out of curiosity, how big is the user community?  How many 
> > downloads of
> > the software?  How many are on this list?
> 
> There are ~700 people on the Haskell list, ~200 on glasgow-haskell-users and
> ~150 on hugs-users.  About 160 people downloaded ghc-4.02 for Linux last
> month, I'm waiting to find out how many people downloaded the new ghc-4.04
> binaries which were released this month.

Alone my Linux rpm package of GHC 4.04 was already
donwloaded 156 times from my ftp server (note that this is
only useful for people having a glibc 2.0/1 rpm-based Linux
system installed) - the package is on the server since 31
July.  I have no idea how any people downloaded GHC 4.02,
because I don't have the logfiles anymore - but I remember
that the majority of ftp traffic over my machine was for
GHC.

Cheers,
Manuel

PS: Non-GHC users should probably know that the above
mentioned package is hyperlinked from the "official" GHC
page - I doubt that it would get as many hits otherwise.





Q: hugs behavior...

1999-08-25 Thread Marko Schuetz

A student asked me why the following happens. In explaining I thought
that it may be easy to avoid the observed behavior.

In hugs98, when you input

> paired f (x,y) = (f x, f y)
> pair x = (x,x)
> test1 = paired f $ pair 42
>   where f x = length [1..1]
> test2 = paired (\x -> y) $ pair 42
>   where y = length [1..1]

Running test1 evaluates `length [1..1]` twice, running test2
evaluates it only once. 

The reason is of course that in test2 there is a heap node that can be
updated with an indirection to the result of `length [1..1]` and
which is shared among the two applications whereas in test1, the root
of the applications are updated, but they are not shared.

In 

> test3 = paired f $ pair 42
> f x = fNewName
> fNewName = length [1..1]

we have that sharing again.

What I would like to know is: wouldn't it make sense to have the
transformation

f x = e where e does not mention x

-->

f x = f'
f' = e

in hugs? Did I miss anything?

Comments?

Marko

-- 
Marko Schütz[EMAIL PROTECTED]
http://www.ki.informatik.uni-frankfurt.de/~marko/





CORBA and COM

1999-08-25 Thread trb

Tyson Dowd writes:
 > Of course you'll need to check on the exact status of ORBit.  When
 > we started work on MCORBA it was very very rough.

Given that GNOME is coming into use, it has presumably advanced a lot. From the
FAQ at http://www.sanger.ac.uk/Users/birney/orbit-html/book1.htm :

   Is ORBit stable?

   ORBit is used in pretty much any GNOME application, which gives quite some
   testing for the features used.
   Other features have seen little or no testing. 

   Does ORBit work with other ORBs?

   Yes. This is one of the primary features of CORBA, and available through the
   Internet Inter-ORB Protocol (IIOP).  There is one pitfall: ORBit has a
   proprietary security mechanism to authenticate clients. If interoperability
   is desired then you might have to figure out a work around for this

I've got GNOME on my laptop, and it seems to work very nicely.

 > If enough people are interested (say 5 or more) in starting a mailing
 > list on the topic of FFIs, component interfaces, etc for declarative
 > languages (Haskell and Mercury come to mind) then I would be interested.
 > (I chose 5 because I think I already know 5 people who might be
 > interested in the topic).

I'm interested in seeing a CORBA binding for Haskell. I've had some thoughts
along the lines of what you described for Mercury (letting a C/C++ wrapper do
most of the CORBA work). But I don't have time to contribute much to such a
project at the moment.

If enough people are interested, I would be happy to host the mailing list. I
can also provide www, remote CVS and GNATS, should the need arise.

Tim





FFI mailing list (ffi@cs.yale.edu)

1999-08-25 Thread John Peterson


This list has dead for a year or so - I'm sure many interested parties
are not on it.  This is the sort of thing that we ought to be able to
handle more easily when we install some mailing list software at
haskell.org - I can think of a number of topics that could be split
off from the Haskell list.  

  John






Re: Haskell MIME types?

1999-08-25 Thread S. Alexander Jacobson

Postscript interpreters also have the ability to execute rm *.
The difference is that postscript interpreters have a command line option
to turn off file system access capabilities.
Is there a command line option in hugs to disallow import of System?

-Alex-


On Wed, 25 Aug 1999, Koen Claessen wrote:

> On Tue, 24 Aug 1999, Fritz K Ruehr wrote:
> 
>  | I just convinced my local sysadmin to attach a new MIME type to
>  | outgoing Haskell programs sent by our web server, namely
>  | "application/x-haskell".
>  :
>  | My goal in this is to get a browser to launch Hugs/Winhugs on the
>  | podium machine where I make lectures whenever I click on a link to
>  | Haskell code.
> 
> I am not sure if this is such a good idea.
> 
> How about if I put the following Haskell program on my webpage:
> 
>   import System
>   main = system "rm *"
> 
> I don't think you really want to click on that one...
> 
> Microsoft has already allowed for introduction of lots of
> "viruses" because their web applications allow starting up
> arbitrary MS Word scripts...
> 
> Regards,
> Koen.
> 
> --
> Koen Claessen http://www.cs.chalmers.se/~koen 
> phone:+46-31-772 5424  e-mail:[EMAIL PROTECTED]
> -
> Chalmers University of Technology, Gothenburg, Sweden
> 

___
S. Alexander Jacobson   Shop.Com
1-212-697-0184 voiceThe Easiest Way To Shop






Announce: Functional Graph Library

1999-08-25 Thread Martin Erwig


In response to several requests, I have put a
preliminary Haskell version of the Functional
Graph Library (FGL) on the Web:

  http://www.informatik.fernuni-hagen.de/pi4/erwig/fgl/

--
Martin






Re: Licenses and Libraries

1999-08-25 Thread Fergus Henderson

On 22-Aug-1999, Erik Meijer <[EMAIL PROTECTED]> wrote:
> How many times do I have to repeat that H/DIRECT IS NOT TIED TO MS OR COM,
> once again H/DIRECT IS NOT TIED TO MS OR COM!

It would probably be more effective if you could list for us
the non-MS non-COM platforms that H/Direct supports.

Unless, of course, that list is empty.

-- 
Fergus Henderson <[EMAIL PROTECTED]>  |  "I have always known that the pursuit
WWW:   |  of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]| -- the last words of T. S. Garp.





Re: opposite of (:)

1999-08-25 Thread Fergus Henderson

On 24-Aug-1999, Ronald J. Legere <[EMAIL PROTECTED]> wrote:
> 
>   It WOULD be nice if you could match on functions and not just
> constructors. But I presume that the constructor/function dichotomy
> in Haskell is what allows it to be strongly typed? For example, in the
> untyped 'language' Mathematica employs, pattern matching is 
> allowed on both constructors and functions, and in fact, there is
> no seperate idea of 'constructor', constructors are just functions that
> dont do anything (they dont match any left hand side pattern by
> themselves). 
> 
>  Can someone confirm/deny that strong typing requires this dichotomy?

Strong typing does not prevent pattern matching on functions.
Mercury is strongly typed, but allows pattern matching on functions
(subject to certain restrictions).

-- 
Fergus Henderson <[EMAIL PROTECTED]>  |  "I have always known that the pursuit
WWW:   |  of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]| -- the last words of T. S. Garp.