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 w

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

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] http:/

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 mail

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

[Haskell-cafe] greencard and callbacks

2004-05-06 Thread Vincenzo aka Nick Name
I realize that I myself might have already asked this question to some of you, but I am really confused now. Can I have some opinion on "what is the right way to implement callbacks from C to haskell"? Will I have to learn the FFI and stop it, or is there some tool to automate the process? I ne

[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 fuse_main(int

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 thi

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

Re: [Haskell-cafe] Path names (again?)

2004-02-05 Thread Vincenzo aka Nick Name
Alle 19:13, giovedì 5 febbraio 2004, Glynn Clements ha scritto: > > - concatenate file paths > > (concat . intersperse "/") > > Maybe you wanted something more, e.g. canonicalisation? > Yes, maybe an interface to realpath(3) is what I really need. > > - tell if a path is absolute or relat

[Haskell-cafe] Path names (again?)

2004-02-05 Thread Vincenzo aka Nick Name
Hi all, I am so often in need for this (I suppose, non-existing) module, that I am going crazy :) I have found discussions in the archives for haskell mailing lists, but is there any, even posix-only, even unix-only, but better portable, implementation of functions to - concatenate file path

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

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: Instance checking and phantom types

2003-09-15 Thread Nick Name
Alle 20:07, lunedì 15 settembre 2003, Sven Panne ha scritto: > IIRC the > reason for this design decision was that contexts in type signatures > should always be explicit. Got it ;) Thanks for prompt reply. What does "should always be explicit" mean? Is there a notion of "explicit context" that

Instance checking and phantom types

2003-09-15 Thread Nick Name
Hi all, I have an example wich I don't understand: ---begin class C t data T = T instance C T data C t => T1 t = T1 f1 :: T1 () f1 = T1 data C t => T2 t = T2 t f2 :: T2 () f2 = T2 () end The first function, f1, is accepted both by hugs and ghc, unlike the second w

Re: Simple IO Monad problem

2003-09-12 Thread Nick Name
Alle 00:08, sabato 13 settembre 2003, [EMAIL PROTECTED] ha scritto: > ERROR "./mailalias.lhs":5 - Type error in final generator > *** Term           : map putStrLn strs > *** Type           : [IO ()] > *** Does not match : IO a > > Can someone please explain what I'm doing wrong? This is a type e

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 ma

Re: Haskell for non-Haskell's sake

2003-08-30 Thread Nick Name
Alle 13:33, sabato 30 agosto 2003, Alastair Reid ha scritto: > - Knit (http://www.cs.utah.edu/flux/knit/) > > A component language for C Are there component languages wich work on multilanguage projects? Something like "my project has a module written in haskell, one in C and one in Ocaml, and

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 u

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

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

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

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 _

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

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

Re: Asynchronous exceptions and "resume"

2003-03-26 Thread Nick Name
On Wed, 26 Mar 2003 13:21:16 +0100 Nick Name <[EMAIL PROTECTED]> wrote: > suspend :: ThreadID -> IO () ^ Oh, yes, I meant suspend :: ThreadID -> IO (IO ()) V. ___ Haskell-Cafe mailing list [EMAIL

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 simpl

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

Re: Alternatives to finalization - the fourth child?

2003-03-11 Thread Nick Name
On Mon, 10 Mar 2003 11:30:01 + Alastair Reid <[EMAIL PROTECTED]> wrote: > Nick name says that a problem with the first is: > > The problem is that if no memory is allocated, no garbage collection > > happens; of course finalization is not guaranteed, as the manual >

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 wis

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

Re: instance declaration troubles

2003-03-07 Thread Nick Name
Yes, I usually RTFM before posting, but you have misunderstood my question (however, thanks for always reading and answering newbie questions like mine); what I want to do is the instance (Get a) => Functor a where fmap f x = mk (ls x >>= return . map f) Now, what I mean is: "any type in Ge

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

Re: modeling out of memory

2003-03-02 Thread Nick Name
On Sun, 2 Mar 2003 10:16:12 +0200 "Cagdas Ozgenc" <[EMAIL PROTECTED]> wrote: > Could you give an intutive description of data construction In some form of typed lambda-calculus, you have the sum and product types. An example is PCF; see for example: http://citeseer.nj.nec.com/howard90operational

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 make

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 teachi

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 so

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

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 sinchron

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 ope

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 abstr

A question about dynamic typing

2003-01-18 Thread Nick Name
Or maybe the subject has nothing to do with my question :) I was thinking of an "haskell desktop interface", i.e. just a desktop interface, but written in haskell. I thought this: one can define a type class with the "view" method: data Draw -- the drawing monad class Visible t where vi

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

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

Re: H98 copyright notice

2002-11-08 Thread Nick Name
I have answered to this post but by mistake I was looking at the older version of the report. Vincenzo ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

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 wh

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 e

Re: question about lazy io

2002-10-12 Thread Nick Name
On Sat, 12 Oct 2002 07:59:27 -0400 David Roundy <[EMAIL PROTECTED]> wrote: > unsafeIO, to lazily read a directory tree, I found the only way is to use unsafeInterleaveIO, I hope someone corrects me. This function is unsafe in the sense that IO is performed at a time unrelated to the main IO tr

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

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] http://www.haskell.org/mailman/listinfo/haske

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

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-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: "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] http://www.haskell.org/mailman/listinfo/haskel

"zipping" two streams in the IO monad

2002-09-19 Thread Nick Name
How could I "zip" two possibily infinite streams obtained by IO operations, for example to return the infinite list of pairs of values read both from channel a and from channel b with getChanContents? In general, how does one implement a function like "getChanContents" wich returns an infinite l

Re: (no subject)

2002-07-28 Thread Nick Name
On Sun, 28 Jul 2002 17:44:34 +0200 "Scott J." <[EMAIL PROTECTED]> wrote: > I think I am in the wrong pub. It seems I am alone here. ? Vincenzo ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

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] http://www.haskell.org/mailman/listinfo/haske

Re: A question

2002-07-23 Thread Nick Name
> Go to www.haskell.org, and look at Libraries and Tools. There you > will see HOpenGL, which is just what you seek. > > http://haskell.org/HOpenGL/ I am sorry, I did not specify that I am already using HOpenGL and I am subscribed to their ML. The matter is that there is no binding to a truety

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 C++,