Re: [Haskell-cafe] Interoperability with other languages and haskell in industry

2004-09-17 Thread Vincenzo aka Nick Name
On Thursday 16 September 2004 20:27, Andy Moran wrote: I'd like to say that this approach has worked for us time and time again, but, to date, we've never had to rewrite a slow component in C :-)  For us, C interoperability has always been a case of linking to third party software, or for

[Haskell-cafe] Interoperability with other languages and haskell in industry

2004-09-16 Thread Vincenzo aka Nick Name
Again, I will try to take benefit of the thread on the senior list to ask a question to everybody who uses haskell in industry (so you people at Galois Connection can't avoid to answer, I know you are there :D ): are your solutions entierely written in haskell, or are there parts written in

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

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 bite

Re: [Haskell-cafe] Re: Haskell and sound

2004-05-09 Thread Vincenzo aka Nick Name
On Saturday 08 May 2004 13:16, Sven Panne wrote: Apart from that, having a binding for SDL would be nice, too, and somebody is already working on it, IIRC. I would like to try these bindings. V. ___ Haskell-Cafe mailing list [EMAIL PROTECTED]

[Haskell-cafe] Is hdirect just broken?

2004-05-06 Thread Vincenzo aka Nick Name
On Thursday 06 May 2004 13:36, Vincenzo aka Nick Name wrote: Can greencard support callbacks? If yes, can someone provide a simple example? Ok, I finally found Alistair Reid's tutorial, which I forgot to read again, and well, I see that greencard does not support callbacks. My alternatives

Re: [Haskell-cafe] Is hdirect just broken?

2004-05-06 Thread Vincenzo aka Nick Name
On Thursday 06 May 2004 16:10, Vincenzo aka Nick Name wrote: [hide] unsigned oh yes, I know, [hide] does not exist in hdirect but this does not change things :) V. -- Non so chi colpire perciò non posso agire [Afterhours] ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Toy application advice wanted

2004-05-05 Thread Vincenzo aka Nick Name
On Wednesday 05 May 2004 04:46, Ben Lippmeier wrote: http://www.haskell.org/libraries and look at how many seperate GUI libraries there are - I counted 16 - then ask what made the developer for the 16th one choose to start over. The fact that the 16th one is a wxwindows binding justifies this

[Haskell-cafe] HDirect, [unique], troubles again!

2004-05-05 Thread Vincenzo aka Nick Name
In my quest for a fuse binding for Haskell, which I really need at the moment, I have the following definition working: module HSFuse { interface stat{}; typedef int getattrT([string] char *,stat); typedef struct fuseOps { [ref] getattrT * getattr; } fuseOps; void

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? ___

[Haskell-cafe] Trouble with [in,string]char* with hdirect

2004-03-02 Thread Vincenzo aka Nick Name
Hi all, I am experimenting with hdirect for the first time, and I can't figure out how to call an haskell function of type String - IO Int from C. I already can compile and use a function of type Char - IO Int, so I assume to be using the right command line arguments. I have, in Math.idl

[Haskell-cafe] Producing fortran/C code with haskell?

2004-01-30 Thread Vincenzo aka Nick Name
I seem to recall a discussion, don't know if it was here or on comp.lang.functional, where somebody said he uses haskell to generate fortran code. That fascinated me a lot, because that would mean being able to generate a program already specialized for a specific input, by first reading

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,

Trace and loop examples?

2003-12-16 Thread Vincenzo aka Nick Name
Hi all, I am trying to lear more about arrows in haskell, so I am reading the paper at: http://www.soi.city.ac.uk/~ross/papers/fop.html However, I can't understand how to produce a working and meaningful example of the trace function, or the loop arrow (I am using the automata example). The

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

Re: Bug compiling with -fglasgow-exts

2003-10-17 Thread Nick Name
Alle 15:33, giovedì 9 ottobre 2003, Simon Peyton-Jones ha scritto: I wish there was a smaller example of this error!  you couldn't cut it down, could you? Yes, I had to do this from the beginning but was under exams, sorry. I attach a cutdown of the source tree of the time, wich is very short.

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

Bug compiling with -fglasgow-exts

2003-09-17 Thread Nick Name
I have a bug, here's the error from the compiler. ghc -fglasgow-exts -o build/Graphics/UI/GIO/Bitmap.o -package-name gio -ohi build/Graphics/UI/GIO/Bitmap.hi -odir build/Graphics/UI/GIO -c src/Graphics/UI/GIO/Bitmap.hs -package port -O2 -ibuild ghc-6.0.1: panic! (the `impossible' happened, GHC

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

Why not haskell?

2003-09-03 Thread Nick Name
Inspired by the various replies to the haskell for non-haskell sake I wonder why so much people uses haskell only for prototipying or producing code in other languages. I am just curios to hear from people who do not use haskell for project releases, or just think it's not suitable for a

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 here

Re: Another typing question

2003-08-06 Thread Nick Name
On Tue, 5 Aug 2003 15:30:44 +0200 Wolfgang Jeltsch [EMAIL PROTECTED] wrote: What negative consequences does their implementation have? I think, sometimes they could be quite handy. That you have to solve a constraint system to compile your program, AFAIK. But I guess that a brave GHC user

Re: Another typing question

2003-08-05 Thread Nick Name
On Tue, 5 Aug 2003 12:23:06 +0200 Konrad Hinsen [EMAIL PROTECTED] wrote: 3 Is there any way to parametrize a type by a value, rather than another type? What I would like to do is to define list of length 3 and list of length 4 as separate parametrization of the same type, such that I

Re: Another typing question

2003-08-05 Thread Nick Name
On Tue, 5 Aug 2003 15:23:09 +0200 Wolfgang Jeltsch [EMAIL PROTECTED] wrote: You could define different types for different natural numbers: data Zero = Zero data Succ number = Succ number This resembles http://www.brics.dk/RS/01/10/ V.

Parsec allocating a lot of memory

2003-08-04 Thread Nick Name
Hi all, I am using parsec to parse the output from xmame -listinfo wich is a list of records of the form game ( attr1 value1 ... attrN valueN ) and for approx. 3500 records I got ~250 mb of RSS memory during parsing, wich takes 20 seconds on my athlon 1400. I think that I must have

Persistent storage

2003-08-04 Thread Nick Name
Is there someone who has implemented some limited form of persistency in haskell? I don't mean the longly-debated persistence of functional values, but something rough, like a persistent MVar with a thread saving modified values every n seconds or so. Vincenzo

Re: Persistent storage

2003-08-04 Thread Nick Name
On Mon, 4 Aug 2003 14:55:18 -0700 John Meacham [EMAIL PROTECTED] wrote: an MVar contains the current puff history, which s dumped to disk periodically if it has changed since the last dump, it relys on using DrIFT to derive a Binary instance for [Puff] and concurrency to spawn off a

Re: Multiple pointers to objects

2003-07-12 Thread Nick Name
On Sat, 12 Jul 2003 07:47:02 -0700 (PDT) Ron de Bruijn [EMAIL PROTECTED] wrote: It's ofcourse possible to put a list of Subjects that a Teacher teaches in the data declaration of the teacher. But then there is no way of saying efficiently (O(1) Just a pointer or index):Give me a list

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 a IO

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:

Asynchronous exceptions and resume

2003-03-26 Thread Nick Name
Hi all, is there a way, or is it planned to, or has anyone published articles on... resuming from asynchronous exceptions? I mean: it would be useful there was a suspend :: ThreadID - IO () where the result is the remaining computation of the other thread, wich one could forkIO again, or

Problem with hugs, concurrency and unsafeInterleaveIO (maybe a bug?)

2003-03-15 Thread Nick Name
I am trying to lazily wait an MVar in hugs, in conjunction with concurrent haskell: - import Concurrent import IOExts f = do v - newEmptyMVar c - getContents forkIO (putMVar v (head c)) r - unsafeInterleaveIO (takeMVar v) return v f2 = f = unsafeInterleaveIO . takeMVar

Alternatives to finalization

2003-03-09 Thread Nick Name
As the result of a conversation on haskell-gui, I have tried to implement the disallocation of resources when a stream is garbage collected. To explain myself: I have a function f :: IO [a] which returns a lazy stream after allocating some resource to feed it (say installing a callback). I

Re: instance declaration troubles

2003-03-07 Thread Nick Name
On Fri, 7 Mar 2003 07:47:09 -0800 (PST) Hal Daume III [EMAIL PROTECTED] wrote: That said, undecidable instances sound very scary, but they're really not. You can google around for a conversation I had with SPJ about this a while back, but something being an und instance is a compile

instance declaration troubles

2003-03-06 Thread Nick Name
I want to declare the following: class Get a where ls :: a b - IO [b] mk :: IO [b] - a b instance (Get a) = Functor a where fmap f x = mk (ls x = return . map f) But to have ghc type everything, I have to turn on -fglasgow-exts -fallow-undecidable-instances

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 use type

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 as

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 more

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 of SList, which is the coolest

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 the

Re: Global variables?

2003-01-31 Thread Nick Name
On Fri, 31 Jan 2003 07:47:43 + Glynn Clements [EMAIL PROTECTED] wrote: The usual fudge is: import IORef import IOExts globalVar :: IORef Int globalVar = unsafePerformIO $ newIORef 0 I see in the documentation of unsafePerformIO that no one makes

Re: Haskell and professional aspirations.

2003-01-28 Thread Nick Name
On Tue, 28 Jan 2003 09:32:02 - [EMAIL PROTECTED] wrote: Although this question is essentially personal in nature, I consider it to be (and tried to make it) broad enough to justify its presence here, propped up by Haskell being used around the world for teaching

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 uses

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 and

Re: A question about dynamic typing

2003-01-23 Thread Nick Name
On Sun, 19 Jan 2003 16:02:41 -0600 Jon Cast [EMAIL PROTECTED] wrote: But, to fully exploit the power of a functionally-programmed desktop, the interface should allow the user to map an operation onto all the objects of the panel; in this case the allowed operations should be those that

Re: A question about dynamic typing

2003-01-23 Thread Nick Name
On Thu, 23 Jan 2003 15:38:31 -0600 Jon Cast [EMAIL PROTECTED] wrote: Another idea: if I allow the list of objects in the panel to be infinite, Sorry, but I'm having difficulty figuring out where you'd get an infinite list of objects to put in the panel. I suspect any solution

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: IORefs, MVars und CVars

2003-01-21 Thread Nick Name
On Tue, 21 Jan 2003 08:56:55 +0100 Martin Huschenbett [EMAIL PROTECTED] wrote: I just started some multithreaded programming and as I am a newbie, I've gat a question. 1.) What are the differences between IORefs and MVars? Mvars ensure mutual exclusion, and they can be used as sinchronyzing

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 always

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 :: Int

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 question about dynamic typing

2003-01-19 Thread Nick Name
On Sun, 19 Jan 2003 12:50:16 -0600 Jon Cast [EMAIL PROTECTED] wrote: Short version: if Typeable is a super-class of Visible or mentioned in your existential type (i.e., forall a. (Visible a, Typeable a) = Con) you can use (fromDynamic . toDyn) to safely (attempt to) convert the abstract

Re: A question about dynamic typing

2003-01-19 Thread Nick Name
On Sun, 19 Jan 2003 16:02:41 -0600 Jon Cast [EMAIL PROTECTED] wrote: So, I would attach a list of named operations of type (Dynamic - Result) to each type, and offer the operations for a given type to the user. Thanks for your answer, it's interesting. What do you mean with named

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 did my own

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 wondering :) Vincenzo

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

Re: AW: Editor Tab Expansion

2002-12-06 Thread Nick Name
On Thu, 5 Dec 2002 21:49:27 +0100 Ingo Wechsung [EMAIL PROTECTED] wrote: So I will write the braces and semicolons. It's better anyway in my opinion. I am not going to change my editing habits just to make hugs or ghc happy. What about using untabified files? Or an haskell-aware

Re: actions

2002-12-04 Thread Nick Name
On Wed, 4 Dec 2002 05:54:43 -0800 (PST) Nuno Silva [EMAIL PROTECTED] wrote: descodificador = do c1 - gera c2 - gera c3 - gera c4 - gera code in the middle to

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 expressed by

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]

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 PREPROCESSOR

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 but I'm

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 extensions

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 language

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

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

Re: H98 copyright notice

2002-11-08 Thread Nick Name
On Fri, 8 Nov 2002 10:35:33 + Ross Paterson [EMAIL PROTECTED] wrote: The new copyright notice is inconsistent. If it is not otherwise changed, I suggest that the first clause, The publisher intends this Report to belong to the entire Haskell community, ... be deleted. May I know where I

Re: GUI Library for Visualizing Data

2002-11-04 Thread Nick Name
On 04 Nov 2002 12:16:01 +0100 Peter Simons [EMAIL PROTECTED] wrote: Unfortunately, the diagrams would have to be displayed and updated in real-time, sort of, because I'm writing a status monitor that will display useful information about your system, network, etc. You can replot data each

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 a

Re: infinite (fractional) precision

2002-10-10 Thread Nick Name
On 10 Oct 2002 10:29:24 +0200 [EMAIL PROTECTED] (Ketil Z. Malde) wrote: I realize it's probably far from trivial, e.g. comparing two equal numbers could easily not terminate, you should compare into a given precision V. -- Fedeli alla linea, anche quando non c'è Quando l'imperatore è

Re: how to debug?

2002-10-05 Thread Nick Name
On Sat, 5 Oct 2002 18:41:06 -0400 David Roundy [EMAIL PROTECTED] wrote: How does one debug in haskell? http://www.haskell.org/libraries/#tracing Vincenzo ___ Haskell-Cafe mailing list [EMAIL PROTECTED]

Re: Dealing with configuration data

2002-09-26 Thread Nick Name
I just wrote a long and clear answer, but my e-mail client has crashed. I am going to change it (or to rewrite one in Haskell, grrr) but the answer will be shorter, I apologize. On Wed, 25 Sep 2002 16:34:02 -0700 (PDT) Hal Daume III [EMAIL PROTECTED] wrote: I don't mean to troll, but this

Re: Dealing with configuration data

2002-09-26 Thread Nick Name
On Thu, 26 Sep 2002 16:02:01 +0200 (MET DST) Koen Claessen [EMAIL PROTECTED] wrote: In general, when using unsafePerformIO in this way, one wants to tell the compiler that it is not allowed to inline the expression. This can be done in most compilers by giving compiler pragma's. In the

Re: Dealing with configuration data

2002-09-25 Thread Nick Name
On Wed, 25 Sep 2002 16:06:29 -0700 (PDT) Hal Daume III [EMAIL PROTECTED] wrote: I don't feel bad about doing this because GHC does this itself for its own configuration :). I am going to show you that using unsafePerformIO where there really are side effects leads to unpredictable results,

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 would

Re: zipping two streams in the IO monad

2002-09-19 Thread Nick Name
On Thu, 19 Sep 2002 21:28:31 +0100 Duncan Coutts [EMAIL PROTECTED] wrote: See unsafeInterleaveIO: Thanks for help, I'm going to look at it. Vincenzo ___ Haskell-Cafe mailing list [EMAIL PROTECTED]

Re: converting capital letters into small letters

2002-07-25 Thread Nick Name
Are we sure that Karen didn't mean I don't care of unicode, just want some example with ASCII code? In that case, well... Karen, what did you mean? Vincenzo ___ Haskell-Cafe mailing list [EMAIL PROTECTED]

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've got

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

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 purposes

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 ___

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

A question

2002-07-23 Thread Nick Name
First, hi all. I am an haskeller newbie looking forward to conquer the world with a functional language. Part of this conquer involves IMHO writing a nice desktop, using modern features of opengl, to make it portable. But, a question arises: all opengl true type font renderers are written in