Hello Tom,
Friday, February 8, 2008, 9:33:35 AM, you wrote:
The process of converting an expression tree to a graph uses either Eq
or Ord (either derived or a custom instance) to search and build a set
of unique nodes to be ordered for execution.
in similar situation, i've added hash field
On Fri, 8 Feb 2008, Tom Hawkins wrote:
I've been programming with Haskell for a few years and love it. One
of my favorite applications of Haskell is using for domain specific
languages. However, after designing a handful of DSLs, I continue to
hit what appears to be a fundamental hurdle --
On 07/02/2008, Benjamin L. Russell [EMAIL PROTECTED] wrote:
- text follows immediately after this line -
Haskell vs. Ada vs. C++ vs. Awk vs. ... An Experiment
in Software Prototyping Productivity (1994),
by Paul Hudak and Mark P. Jones:
http://citeseer.ist.psu.edu/41732.html
This
Hi,
(Warning: longish message!)
There is some concern, and rightly so, that observable sharing is
dangerous, and that your Haskell program will explode if you use it,
and perhaps even that anyone who uses it is dirty and should be sent
to matron's for a good scrubbing! However, when used
Am Donnerstag, 7. Februar 2008 18:33 schrieben Sie:
Interesting. Thanks for the reply.
It might be nice to have some performance benchmarks for all these
experimental systems, so we can compare them.
I think, the most important thing is the asymptotical time behavior, e.g.,
whether the time
David Roundy wrote:
I'm working on some new progress-reporting code for darcs, and am getting
segmentation faults! :( The code uses threads + an IORef global variable
to do this (with lots of unsafePerformIO). So my question for the gurus
who know more about this than I do: is this safe? I
Op 7-feb-2008, om 13:53 heeft Dave Bayer het volgende geschreven:
Under this extreme hypothesis, how do I embed a compressed tar file
into a single file command line tool written in Haskell and
compiled by GHC?
Hack up a shell script or a small Haskell program to automatically
generate a
On Feb 8, 2008 9:13 AM, Galchin Vasili [EMAIL PROTECTED] wrote:
Let's take a concrete but made up case .. suppose we want to call through
to pthread_create and pass the (void *) argument to pthread_create which in
turn gets interpreted by the pthread that is launched. How would one
populate
Let's take a concrete but made up case .. suppose we want to call through
to pthread_create and pass the (void *) argument to pthread_create which in
turn gets interpreted by the pthread that is launched. How would one
populate the C struct that is passed to the launched pthread keeping in mind
Am Donnerstag, 7. Februar 2008 16:31 schrieben Sie:
On Feb 7, 2008 4:16 PM, Wolfgang Jeltsch [EMAIL PROTECTED] wrote:
[…]
You seem to write 12 as 1 :+ 2 instead of () :+ 1 :+ 2. But I think, the
latter representation should probably be prefered. With it, :+ always
has a number as its
On Feb 8, 2008, at 11:14 , Stefan Monnier wrote:
You seem to write 12 as 1 :+ 2 instead of () :+ 1 :+ 2. But I
think, the
latter representation should probably be prefered.
(...)
How 'bout treating :+ as similar to `append' rather than similar to
`cons'?
Basically treat :+ as taking 2
a couple of concrete examples:
typedef struct {char a; int b; char str[8]} type1;
typedef struct {long c; char d} type2;
So to pthread_create (just an example function) we could be passing a struct
of type1 or a struct of type2 .. i.e. arbitrary length and content ... I am
trying to better
Hi Neil,
London HUG is not on the list because we're not meeting in the next
two weeks. Rest assured we are on the wiki page though.
On that note, I am looking again for topics and speaker for the next
full meeting at City University. It will likely be in the middle of
March. If anybody has
On Feb 8, 2008 9:55 AM, Simon Peyton-Jones [EMAIL PROTECTED] wrote:
I have not been following closely but if Don thinks there's a bug there
probably is. Can someone submit a bug report pls? Better still a patch! :-)
Simon
Ok, I filed a bug report.
basically I am trying to implement ioctl for the Posix library .. so a
possible signtaure would be:
fdIoctl :: Fd - Int - Ptr Word 8 - IO( Ptr Word8)
Vasili
On 2/8/08, Galchin Vasili [EMAIL PROTECTED] wrote:
a couple of concrete examples:
typedef struct {char a; int b; char str[8]}
On Fri, Feb 08, 2008 at 10:46:25AM +, Simon Marlow wrote:
(I'm a bit behind with haskell-cafe, sorry for not seeing this sooner...)
No problem!
Yes, that should all be fine, because the IORef is only modified from one
thread, and read from the other(s). If you were modifying the IORef
As noted, (Data.Set.toList . Data.Set.fromList) is the best traditional
solution if you don't care about order (or Data.Set.toAscList for a
sorted result).
If order is important, the new bijective Data.Bimap class
http://code.haskell.org/~scook0/haddock/bimap/Data-Bimap.html
may be your best
-- Forwarded message --
From: Igal Koshevoy [EMAIL PROTECTED]
Date: Feb 8, 2008 12:01 PM
Subject: [pdxfunc] pdxfunc meeting: Monday, February 11, 7pm, CubeSpace
To: Igal Koshevoy [EMAIL PROTECTED]
Join us at the next meeting of pdxfunc, the Portland Functional
Programming Study
Brandon S. Allbery KF8NH wrote:
On Feb 8, 2008, at 11:14 , Stefan Monnier wrote:
You seem to write 12 as 1 :+ 2 instead of () :+ 1 :+ 2. But I
think, the
latter representation should probably be prefered.
(...)
How 'bout treating :+ as similar to `append' rather than similar to
`cons'?
Dan Weston wrote:
Brandon S. Allbery KF8NH wrote:
On Feb 8, 2008, at 11:14 , Stefan Monnier wrote:
You seem to write 12 as 1 :+ 2 instead of () :+ 1 :+ 2. But I
think, the
latter representation should probably be prefered.
(...)
How 'bout treating :+ as similar to `append' rather than
On Feb 8, 2008 10:57 AM, Galchin Vasili [EMAIL PROTECTED] wrote:
basically I am trying to implement ioctl for the Posix library .. so a
possible signtaure would be:
fdIoctl :: Fd - Int - Ptr Word 8 - IO( Ptr Word8)
Ah, ok. You could cover many of the ioctls (the ones which only take a
Dan Weston wrote:
Meanwhile, here is a hand-rolled solution to order-preserving nubbing:
import Data.List(groupBy,sortBy,sort)
import Data.Maybe(listToMaybe)
efficientNub :: (Ord a) = [a] - [a]
efficientNub = flip zip [0..]-- carry along index
sort
Galchin Vasili wrote:
Let's take a concrete but made up case .. suppose we want to call
through to pthread_create and pass the (void *) argument to pthread_create
which in turn gets interpreted by the pthread that is launched. How would
one populate the C struct that is passed to the launched
Après avoir un peu manipulé la solution de John pour qu'elle fasse la même
chose que la mienne, je peux affirmer qu'elle est légèrement moins rapide
(c'est infime et normal vu que ses leftFold passent plus d'informations),
mais que les deux solutions ont au moins cet avantage d'être rapides (2s
Hallo!
Let's suppose I have a list [a,b,c,d,c,d]. I'd like to write
a function that returns a new list without duplicates (in
the example [a,b,c,d]). How can I do that? What is the most
general way? I'd like to use the same function for a list of
Int or String or some other user defined data
On 8 Feb 2008, [EMAIL PROTECTED] wrote:
Hallo!
Let's suppose I have a list [a,b,c,d,c,d]. I'd like to write
a function that returns a new list without duplicates (in
the example [a,b,c,d]). How can I do that? What is the most
general way? I'd like to use the same function for a list of
Hi
Yes, though testing stackGobbler with a large enough data set could
be problematic for the very reason we've been discsussing.
Yes you are sure, or yes you tested and the results show than
neilGobbler is x% slower and consume y% more memory on specific test
n?
But let's say your
2008/2/8 Jed Brown [EMAIL PROTECTED]:
Look at Data.List:
nub :: (Eq a) = [a] - [a]
nub = nubBy (==)
nubBy :: (a - a - Bool) - [a] - [a]
nubBy eq [] = []
nubBy eq (x:xs) = x : nubBy eq (filter (\ y - not (eq x y)) xs)
And then there's also
sort :: (Ord a) = [a] - [a]
which should
Hi
Fun in the afternoonLondon/UKFebruary 12
Fun in the afternoon is great, but its not really a user group - it is
still primarily an academic event, although is open to everyone. There
is LUG, which is the London Haskell Users Group, which should
definately be
You seem to write 12 as 1 :+ 2 instead of () :+ 1 :+ 2. But I think, the
latter representation should probably be prefered. With it, :+ always
has a number as its left argument and a digit as its right. Without the
() :+ we get ugly exceptional cases.
You can see this, for example, in
Sorry for the french, I was a little bit confused...
On 08/02/08, Chaddaï Fouché [EMAIL PROTECTED] wrote :
After I changed John's code so that it worked on the same dataset as mine, I
could benchmark both of them :
My solution is a bit faster (but that's a very tiny difference and to be
expected
On 2008-02-05, Alfonso Acosta [EMAIL PROTECTED] wrote:
On Feb 5, 2008 4:10 PM, Henning Thielemann
[EMAIL PROTECTED] wrote:
On Fri, 1 Feb 2008, Aaron Denney wrote:
On 2008-02-01, Bjorn Buckwalter [EMAIL PROTECTED] wrote:
If Naturals had been sufficient for me I wouldn't have done my own
On 2/8/08, Emil Axelsson [EMAIL PROTECTED] wrote:
I know of a few of ways to express sharing in a pure language:
1) Observable sharing, which, in general, is unsafe.
2) Using Template Haskell
3) Matthew Naylor has done some work on expressible sharing, which has
4) Use a monad (but I'm sure
Am Freitag, 8. Februar 2008 22:14 schrieb Ben Franksen:
If it's a bug then it is probably in 6.6.1 too, it just gets hidden by the
fact that in 6.6.1 the -fglasgow-exts extensions cannot be activated
separately. If you enable one of them, you get them all.
Thanks for the info, didn't know
On 2/8/08, Matthew Naylor [EMAIL PROTECTED] wrote:
it in for an efficient program. However, to my knowledge, it is an
unwritten rule of Haskell compilers that sharing *is* preserved, and
that they do perform *graph* reduction. Clean, a similar language to
I'm not sure that programmers ought
Daniel Fischer wrote:
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{- # LANGUAGE FlexibleInstances # -}
module Leandro where
data Abb a b = Branch a b (Abb a b) (Abb a b) | Leaf
data ListAssoc a b = Node a b (ListAssoc a b) | Empty
class Container c a
$ cat foo.c
#include stdio.h
int
main()
{
char s[1024];
printf(gsi );
gets(s);
printf(%s\n, s);
return 0;
}
$ make foo
cc gsi.c -o gsi
$ ./foo
warning: this program uses gets(), which is unsafe.
gsi hello
hello
$ cat foo.hs
main = do
putStr gsi
s - getLine
putStrLn s
$
On Feb 8, 2008, at 19:41 , Philip Weaver wrote:
Your gsi is buffered because there's no newline at the end. To
flush the buffer and force it to be printed immediately, use
'hFlush' from the System.IO library, or use 'hSetBuffering' from
that same library:
Your gsi is buffered because there's no newline at the end. To flush
the buffer and force it to be printed immediately, use 'hFlush' from the
System.IO library, or use 'hSetBuffering' from that same library:
http://haskell.org/ghc/docs/latest/html/libraries/base/System-IO.html
I believe you can
tomahawkins:
On 2/8/08, Emil Axelsson [EMAIL PROTECTED] wrote:
I know of a few of ways to express sharing in a pure language:
1) Observable sharing, which, in general, is unsafe.
2) Using Template Haskell
3) Matthew Naylor has done some work on expressible sharing, which has
4) Use a
On 8 Feb 2008, at 4:50 PM, Brandon S. Allbery KF8NH wrote:
On Feb 8, 2008, at 19:41 , Philip Weaver wrote:
Your gsi is buffered because there's no newline at the end.
To flush the buffer and force it to be printed immediately, use
'hFlush' from the System.IO library, or use
On Feb 6, 2008 8:47 PM, Alfonso Acosta [EMAIL PROTECTED] wrote:
On Feb 7, 2008 2:30 AM, Bjorn Buckwalter [EMAIL PROTECTED] wrote:
Ok. Is this what people want -- one big hold-all library with
everything, as opposed to smaller more specialized packages? I guess I
can see advantages (real or
Hi folks
The disjunction elimination rule:
I've been trying to make sense of it and I think I have had some
success; however, it's far from adequate. I wonder, is there a way of
demonstrating it in Haskell? A code frag with a jargon-free
explanation would be mucho appreciated.
Cheers, Paul
On 8 Feb 2008, at 5:29 PM, Philip Weaver wrote:
GHC certain *could* do this, but it's arguably not the right thing
to do. For performance, the operating system buffers writes until
it is ready to write large chunks at a time. If you do not want
this behavior, change the buffering mode
I'm assuming you mean the rule described in
http://en.wikibooks.org/wiki/Formal_Logic/Sentential_Logic/Inference_Rules
type Disj a b = Either a b
disj_elim :: Disj a b - (a - c) - (b - c) - c
disj_elim (Left a) a2c b2c = a2c a
disj_elim (Right b) a2c b2c = b2c b
If you know either a is
On 8 Feb 2008, at 6:34 PM, Ryan Ingram wrote:
import System.IO
myGetLine = hFlush stdout getLine
That fixes this issue, certainly (although it's superfluous; my
program really does contain only a single call to getLine)...
Nevertheless, it would be nice to at least have it in the
Out of context (am I missing some earlier part of this thread?) I'm not
entirely sure what you mean.
Are you're talking about the disjunction elim rule in intuitionistic
natural deduction:
Gamma |- A + B Gamma, A |- C Gamma, B |- C
--
On Fri, Feb 08, 2008 at 06:47:51PM -0800, Ryan Ingram wrote:
I'm assuming you mean the rule described in
http://en.wikibooks.org/wiki/Formal_Logic/Sentential_Logic/Inference_Rules
type Disj a b = Either a b
disj_elim :: Disj a b - (a - c) - (b - c) - c
disj_elim (Left a) a2c b2c = a2c
On 8 Feb 2008, at 6:50 PM, Jonathan Cast wrote:
On 8 Feb 2008, at 6:34 PM, Ryan Ingram wrote:
import System.IO
myGetLine = hFlush stdout getLine
That fixes this issue, certainly (although it's superfluous; my
program really does contain only a single call to getLine)...
Nevertheless,
import System.IO
myGetLine = hFlush stdout getLine
-- ryan
On 2/8/08, Jonathan Cast [EMAIL PROTECTED] wrote:
On 8 Feb 2008, at 5:29 PM, Philip Weaver wrote:
GHC certain *could* do this, but it's arguably not the right thing
to do. For performance, the operating system buffers writes
For more details, look for a function called orElim in the write-up
http://www.thenewsh.com/~newsham/formal/curryhoward/
Dan
Ryan Ingram wrote:
I'm assuming you mean the rule described in
http://en.wikibooks.org/wiki/Formal_Logic/Sentential_Logic/Inference_Rules
type Disj a b = Either a b
It should be emphasized that a type needs to be inhabited by (at least
one) *total* function to prove a theorem. Otherwise, you could have the
following partial function purporting to prove the phony theorem that A
or B implies A:
phony :: Either a b - a
phony (Left a) = a
Dan
Dan Weston
a new version of Finance-Quote-Yahoo has been uploaded to hackage that
breaks an api of the previous version for getting bulk historical
quote information.
specifically, notice this updated type signature:
getHistoricalQuote :: QuoteSymbol - Day - Day - QuoteFrequency -
IO (Maybe
53 matches
Mail list logo