Re: [Haskell] Haskell in industry?

2004-09-15 Thread Vincenzo aka Nick Name
On Wednesday 15 September 2004 08:44, Krasimir Angelov wrote: > The Sigbjorn Finne's .NET integration is also ported > to GHC but I am not sure whether it is efficient > enough. The bridge uses reflection to call .NET > methods and each time when the method is called it is > located by its name. W

Re: [Haskell] Haskell in industry?

2004-09-14 Thread Vincenzo aka Nick Name
On Tuesday 14 September 2004 18:18, [EMAIL PROTECTED] wrote: > *   Can't much of the simplicity of the Haskell code also be > reached by just switching from C++ to something like Java or C#? > (Probably an example from the application domain will be most > convincing. So I probably have to bit

Re: [Haskell] Announcing Pan# 1.0

2004-03-31 Thread Vincenzo aka Nick Name
On Thursday 01 April 2004 00:47, John Peterson wrote: >   * Movie making capabilities Do you describe animation as in fran, or do you just describe each frame separately? V. -- A: Top posting! Q: What is the most irritating thing on Usenet? ___ Has

Re: [Haskell] Implicit return values

2004-01-25 Thread Vincenzo aka Nick Name
Alle 00:57, lunedì 26 gennaio 2004, Ben Rudiak-Gould ha scritto: > Here's a possible syntax. An expression like (123, ^x = "foo") would > have the type (Integer, ^x :: String), which is like a tuple but with > all but one of the elements having a name. An expression like > > (123, ^x="foo") - (45

Re: ANNOUNCE: Hugs98 November 2003 release

2003-11-25 Thread Vincenzo aka Nick Name
Alle 17:51, martedì 25 novembre 2003, Ross Paterson ha scritto: > - Integrated .NET support (on Windows). What does this exactly mean? And, besides, is there any hope of supporting mono? V. -- Money for nothing, that's the way you do it [Dire Straits]

Re: how to do lazy IO like getContents?

2003-10-18 Thread Nick Name
Alle 01:50, domenica 19 ottobre 2003, Ben Escoto ha scritto: > which only reads one character.  So how do you write getContents in > haskell?  Thanks for any insight. You have to use unsafeInterleaveIO, wich lazily defers the IO action passed as an argument. Look for this function in your documen

Re: pretty newby

2003-09-23 Thread Nick Name
Alle 16:05, martedì 23 settembre 2003, Luc Taesch ha scritto: > are there any facility to pretty print an haskell program ? If what you need is an external program and not a library, have a look at GNU a2ps. Vincenzo ___ Haskell mailing list [EMAIL PR

Re: File reading question

2003-09-12 Thread Nick Name
Alle 18:50, venerdì 12 settembre 2003, Hal Daume III ha scritto: > Lists is easier. > > (transpose . map (map read . words) . lines) `liftM` readFile "file" > > should do it (untested code, though). This man has begun thinking in haskell, folks :) V. _

Re: Haskell for non-Haskell's sake

2003-08-30 Thread Nick Name
I use haskell when I have to write a program myself and quickly. So I was very happy when I saw wxwindows bindings, because I wrote a frontend for mame with it, and it took three days to get something satisfying. We need some "ordinary people" use for haskell sometimes ;) V. __

Re: Need some help please

2003-08-27 Thread Nick Name
On Wed, 27 Aug 2003 15:08:32 +0100 "Rajiv Patel" <[EMAIL PROTECTED]> wrote: > 1.a conditional expression This one uses "case" so it should solve your homework; moreover it uses an orthogonal matrix (as long as you pay attention to the value assigned to f, of course) so it is safe. cut

Re: Stupid wuestion about Monads :)

2003-06-11 Thread Nick Name
On Wed, 11 Jun 2003 20:00:00 +0200 Filip <[EMAIL PROTECTED]> wrote: > What should I do if I have something like "IO Bool" and I need "Bool" IO Bool means "an action that can perform IO and returns a Bool". You can't get a Bool without performing IO with that function, so you can't get a Bool from

Re: ANNOUNCE: GHC version 6.0

2003-05-30 Thread Nick Name
On Thu, 29 May 2003 16:06:20 +0100 "Simon Marlow" <[EMAIL PROTECTED]> wrote: > > We are pleased to announce a new major release of the Glasgow Haskell > Compiler (GHC), version 6.0. The release notes make me very happy :) There is a broken link: http://www.haskell.org/ghc/docs/latest/html/bas

Re: How to force UNIX text files as output instead of DOS text files??

2003-03-03 Thread Nick Name
On Mon, 3 Mar 2003 11:03:48 +0100 "Alexandre Weffort Thenorio" <[EMAIL PROTECTED]> wrote: > > OK I fixed the IOExts not found problem (-package lang) but my > problem now is that I never worked with handles. How can I write the > string to the file and so on?? Where can I find more info on han

Re: How to force UNIX text files as output instead of DOS text files??

2003-03-02 Thread Nick Name
On Mon, 3 Mar 2003 00:35:47 +0100 "Alexandre Weffort Thenorio" <[EMAIL PROTECTED]> wrote: > the output file tends to be in DSO format. Is there anyway that I can > force it to create the file in UNIX format??? I am not an expert on the subject, but ... maybe you just have to use a string constant

Re: escape from existential quantification

2003-02-27 Thread Nick Name
On Thu, 27 Feb 2003 18:26:31 + Keith Wansbrough <[EMAIL PROTECTED]> wrote: > > The idea is to use a type more like this: > > data Foo = forall a. Foo Int a (a -> (Int,Bool)) (a -> Int) (a -> > Foo) > > where the functions are the operations you want to use on the data Or else one can u

Re: Question about How use the ports in haskell

2003-02-26 Thread Nick Name
On Wed, 26 Feb 2003 00:54:13 + "Cesar Augusto Acosta Minoli" <[EMAIL PROTECTED]> wrote: > > ¿There's a way to input/output data from the computers' port in > Haskell? ¿What about LPT1 or Com? I guess the fastest way is to create a C library and use the FFI. If you are on linux, you can

Re: About "class Coerce a b" - errata

2003-02-20 Thread Nick Name
On Fri, 21 Feb 2003 08:05:37 +0100 Nick Name <[EMAIL PROTECTED]> wrote: > -- Does not type if overlapping instances are allowed > -- > --instance Functor SList where > --fmap f End = End > --fmap f (a:::as) = (call f a):::(fmap f as) I skipped the declaration o

About "class Coerce a b"

2003-02-20 Thread Nick Name
Reading the paper "Type Classes with Functional Dependencies" by Mark P. Jones, I noticed he mentions the "Coerce" class as a way to model the subtyping relation. I have looked at the article there referred, "How to make ad-hoc polymorphism less ad-hoc" by Wadler and Blott. By now, I can't find mo

Re: effect of order of function arguments

2003-02-19 Thread Nick Name
On Tue, 18 Feb 2003 21:59:36 -0800 Aaron Denney <[EMAIL PROTECTED]> wrote: > > With a recursive function of more than one argument, does it make > sense to keep the arguments that tend to remain constant closer to > the front? At least it is easier to use: if the list argument in foldr was th

Re: seeking ideas for short lecture on type classes

2003-01-26 Thread Nick Name
On Sun, 26 Jan 2003 19:07:01 -0500 (EST) Dean Herington <[EMAIL PROTECTED]> wrote: > What may distinguish Haskell from typical OO languages (I'm not an > expert on them) is that in Haskell such polymorphic functions could > (always or at least nearly so) be specialized statically for their > u

Re: Lazy evaluation alternative

2003-01-24 Thread Nick Name
On Fri, 24 Jan 2003 09:18:47 -0600 "Kevin S. Millikin" <[EMAIL PROTECTED]> wrote: > > So your trick *is* used to implement lazy evaluation in other > languages. It's not very pleasant if you write a lot of lazy code, > because you have to explicitly suspend evaluation of values using > delay

Re: Proposal Proposal: haskell-gui addendum to haskell standard

2003-01-22 Thread Nick Name
I ask everyone to discuss this subject onto the GUI mailing list, because there are already replies there. Thanks Vincenzo ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: A problem about hGetContents

2003-01-19 Thread Nick Name
On Sun, 19 Jan 2003 17:19:52 + Glynn Clements <[EMAIL PROTECTED]> wrote: > > > Just omit the hClose; hGetContents will automatically close the > handle once all of the data has actually been read. See §11.2.1 of > the library report for details. Thanks for this pointer. Quoting from the

Re: A problem about hGetContents -- with another question

2003-01-19 Thread Nick Name
On Sun, 19 Jan 2003 08:51:31 -0800 "Mark P Jones" <[EMAIL PROTECTED]> wrote: > >linesFromFile = fmap lines . readFile Nice :) BTW, is readFile implemented with some strict evaluation construct ? I got another trouble: I need to build a record type like Package { name :: String, version ::

A problem about hGetContents

2003-01-19 Thread Nick Name
I would like to use hGetContents just to retrieve the list of the lines of a file, but if I code a function like: linesFromFile :: FilePath -> IO [String] linesFromFile f = do h <- openFile f ReadMode l <- hGetContents h hClose h return (lines l) I obviously alway

Re: Gtk and Object I/O

2003-01-17 Thread Nick Name
On Fri, 17 Jan 2003 21:12:51 +0100 Nick Name <[EMAIL PROTECTED]> wrote: > (this is an argument for the Haskell > mailing list) I didn't notice that this discussion wasn't already on the haskell mailing list, and tought that it was on gtk2hs, in case someone is

Re: Gtk and Object I/O

2003-01-17 Thread Nick Name
On Fri, 17 Jan 2003 15:12:55 + Axel Simon <[EMAIL PROTECTED]> wrote: > Two answers: "Me too." and "I am.". But how can we proceed from here? > > I think we should all be more flexible and communicate more openly > and earlier. The latter probably would have avoided that I went off > and di

Re: Constant space infinite itteration ... solution?

2002-12-12 Thread Nick Name
On Fri, 13 Dec 2002 11:41:23 +1300 [EMAIL PROTECTED] wrote: > I've got the Farari out of the garage Ferrari (perhaps) ? ^___^ I am Italian I did a small program to find duplicates of .deb archives with older version, and it was impressingly fast if interpreted with ghci, and impressingly slow wi

Re: AW: slide: useful function?

2002-12-02 Thread Nick Name
> As a reader but not an expert, I recommend > http://www.cse.ogi.edu/~mpj/pubs/springschool.html It seems also a good summary of everything haskell-related :) Thanks, it is useful to me. Vincenzo ___ Haskell mailing list [EMAIL PROTECTED] http://www.

Re: AW: slide: useful function?

2002-12-02 Thread Nick Name
On Mon, 2 Dec 2002 13:05:27 -0500 "David Bergman" <[EMAIL PROTECTED]> wrote: > or using highly formal language, > with terms such as "catamorphisms". Ok I can't resist longer. It's ages I have been wondering what's a catamorphism, and an anamorphism, and what the hell does it mean "data is expre

Re: You can finally run your Chameleon programs!

2002-11-29 Thread Nick Name
On 27 Nov 2002 23:22:31 + Alastair Reid <[EMAIL PROTECTED]> wrote: > > I think you've been spoilt by the availability of 4 good compilers, > lots of libraries, an active research community, etc. for the Haskell > "research language". I don't know what "to spoil" means in this contests

Re: You can finally run your Chameleon programs!

2002-11-29 Thread Nick Name
On Wed, 27 Nov 2002 15:46:56 -0500 "David Bergman" <[EMAIL PROTECTED]> wrote: > Vincenzo, > > I agree with your feeling of the expressive superiority of functional > programming compared to C and even C++, although I would not use the > word "hell" ;-) Just because you are not using wxwin and PR

Re: You can finally run your Chameleon programs!

2002-11-27 Thread Nick Name
On Wed, 27 Nov 2002 17:00:36 +0800 (GMT-8) Martin Sulzmann <[EMAIL PROTECTED]> wrote: > However, because > Chameleon gets translated to Haskell, you can in theory use > all of the FFI and other stuff. I know that it's a research language, but for example it would be nice to be able to experime

Re: You can finally run your Chameleon programs!

2002-11-26 Thread Nick Name
On Tue, 26 Nov 2002 23:08:50 +0800 (GMT-8) Martin Sulzmann <[EMAIL PROTECTED]> wrote: > Let me know what you think > would be useful and we try to make it available in the next release. Maybe "extensions" was an excess :) I just want to point out, in my little student experience, that a new lang

Re: You can finally run your Chameleon programs!

2002-11-26 Thread Nick Name
On Tue, 26 Nov 2002 13:54:08 +0800 (GMT-8) Martin Sulzmann <[EMAIL PROTECTED]> wrote: > > The latest Chamleon release includes a compiler. Chameleon programs > are translated into plain Haskell (= Hindley/Milner subset plus > polymorphic recursion). Do this mean I can use all of the ghc exten

Re: how to convert IO String to string---- still have questions

2002-11-24 Thread Nick Name
On Sun, 24 Nov 2002 20:42:31 + Glynn Clements <[EMAIL PROTECTED]> wrote: > Even if Haskell were strict, you still wouldn't be able to treat I/O > operations as functions without discarding referential transparency. Yes, but if haskell were strict, it wouldn't really need referential transpar

Re: how to convert IO String to string---- still have questions

2002-11-24 Thread Nick Name
On Sun, 24 Nov 2002 09:05:17 -0900 "Lu Mudong" <[EMAIL PROTECTED]> wrote: > Thanks a lot for you guys' help. > > I am very new to haskell and tried some methods you guys advised, > doesn't seem to work, i think i didn't do it properly, here's my code > and result, hope you can point out what's wr

Re: class Function ?

2002-10-28 Thread Nick Name
On Mon, 28 Oct 2002 16:16:16 -0800 (PST) Hal Daume III <[EMAIL PROTECTED]> wrote: > You can't have "invisible functions". The only thing that should be done is to invent a special name for the juxtaposition operator (or just to use $), and to let (->) become an instance of the "Function" class.

Re: Haskell2LaTeX

2002-10-27 Thread Nick Name
On Sat, 26 Oct 2002 20:35:34 +0100 Ian Lynagh <[EMAIL PROTECTED]> wrote: > This is just a quick note to let you know that Haskell2LaTeX, my > undergraduate project, is available from > http://web.comlab.ox.ac.uk/oucl/work/ian.lynagh/Haskell2LaTeX/ The output is wonderful. I really needed such

Re: ANN: H98 FFI Addendum 1.0, Release Candidate 7

2002-09-22 Thread Nick Name
On Thu, 19 Sep 2002 14:23:02 +0100 Ross Paterson <[EMAIL PROTECTED]> wrote: > If the FFI stuff were available with ST variants, and foreign > functions of this sort could be declared with ST return types, would > it be possible to replace unsafePerformIO in such cases with runST? Even runST wou

Re: still random number problem

2002-07-24 Thread Nick Name
On Wed, 24 Jul 2002 19:13:22 +0100 (BST) Junjie Xu <[EMAIL PROTECTED]> wrote: > uni :: IO () -> Float > uni = do > xs <- newStdGen > let > m = (head (randoms xs) :: Float ) let x = expr in something You miss the "in something" part... quite that simple. Vincenzo ___

Re: Need help

2002-07-24 Thread Nick Name
On Wed, 24 Jul 2002 10:44:51 +0100 (BST) "D. Tweed" <[EMAIL PROTECTED]> wrote: > It wasn't clear to me whether Vincenzo's e-mail was saying that you > just needed to be in IO to generate the seed or that you need to be in > IO to do anything that involves generating random numbers __after > you'v

Re: Need Help

2002-07-23 Thread Nick Name
Hm. No smilies on that answer ;) Well, I didn't want to be polemic :) ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: Need Help

2002-07-23 Thread Nick Name
> > One possible solution under Linux is to use Haskell's lazy file I/O > with/dev/urandom (or /dev/random if you're doing cryptography). Why *lazy* file IO? Couldn't just IO do the thing? It's probably the solution of newStdGen Vincenzo ___ Hask

Re: Need help

2002-07-23 Thread Nick Name
On Tue, 23 Jul 2002 16:46:37 +0100 (BST) "D. Tweed" <[EMAIL PROTECTED]> wrote: > which I believe you can use either to get the seed within the IO monad > directly or via unsafePerformIO if you don't want the IO monad > around. That's true. I just prefer to have the IO monad around, for the pur

Re: Need help

2002-07-23 Thread Nick Name
It's relatively simple. The random number generator is a pure function, so it cannot be nondeterministic. So, you have a way to build this function with a seed, since the author wanted you to be able to do so, I could say for completeness, or reuse sake. But what you want is nondeterminism. How