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
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
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
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
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]
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
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
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
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
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?
___
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
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
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,
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
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]
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
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.
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
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
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.
___
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
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.
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
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
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
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.
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
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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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]
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
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
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
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
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.
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
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
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
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
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 è
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]
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
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
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,
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
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]
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]
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
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
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
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
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
___
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
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
86 matches
Mail list logo