Job Vranish job.vran...@gmail.com wrote:
Its main advantages are:
Very easy to use.
Almost entirely Haskell98 (the non Haskell98 pieces are not critical, just
nice)
The datatype is a member of Foldable, Traverable, Applicative, Monad,
etc...
Then length of the list is encoded in the
You may want to use a mutable array.
The performance may suffer from the memory allocation for the list. I
wonder if it's possible to make Haskell implementation work faster
without changing the algorithm (there's are actually a few tricks to
make it work faster, but neither implementations have
You might express the algorithm more directly in Haskell, without the reverse
calls:
bubblesort :: (Ord a) = [a] - [a]
bubblesort [] = []
bubblesort (x0:xs) = case bubble x0 xs of
(xs', True) - bubblesort xs'
(xs', False) - xs'
where bubble x1 (x2:xs) | x1 = x2 = merge x1
From the ZuriHac hackathon, I am happy to announce the first release of the
regular-web package [1]. The package contains functions for generic web
programming: generating HTML, JSON and Formlets. It is based on the regular
generic programming library [2].
Generic HTML and forms are often not
boblettoj bobletto...@msn.com writes:
newStdGen results in IO Ints whereas i need normal Ints and it seems theres
no easy way to convert them without a lot more knowledge of haskell. I have
tried using a where clause instead of using do but this is giving me the
occurs check error again!
Haha, much better now!
Thanks for all your help, it's working great!
--
View this message in context:
http://old.nabble.com/Occurs-check-error%2C-help%21-tp27966341p27975606.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
В сообщении от 21 марта 2010 09:37:26 Casey McCann написал:
Using head and tail on longer lists fails likewise. I expect there's
some way to make it work without simply increasing the stack depth,
but I'm not sure how. Any thoughts?
It's possible to use binary encoding for natural numbers.
Using PostgreSQL on my computer, your code executes in 3.5 seconds
with GHCi, while compiled it executes in 16.2 seconds! Clearly
something is wrong, although I don't yet know enough about Takusen
enough to be able to say what.
I tried hoisting the preparation of the statement out of the
-Ursprüngliche Nachricht-
Von: Simon Marlow marlo...@gmail.com
Gesendet: 19.03.2010 09:24:12
An: Daniel Fischer daniel.is.fisc...@web.de
Betreff: Re: Parallel Pi
On 18/03/10 22:52, Daniel Fischer wrote:
Am Donnerstag 18 März 2010 22:44:55 schrieb Simon Marlow:
On 17/03/10 21:30, Daniel
If you're making local changes against a library you don't own (with
the ultimate intention of sending those changes back upstream to the
library maintainer) it makes sense change the version number to avoid
clashes with the canonical version of the library.
Of course, it's easy to lose track and
Is there anything wrong with increasing the context stack? That's what I do
when I run into an overflow, and so far I haven't had any problems with it.
Generally my uses of FixedList involve relatively short lists (vectors and
such) so it usually isn't a problem.
I could implement a more
Hi all,
Straight from Zurihac: I'm very pleased to announce the 1.0.0 release of the
Salvia web server.
Salvia is a feature rich web server and web application framework that can be
used to write dynamic websites in Haskell. From the lower level protocol code
up to the high level application
Hi Dougal
Could you prefix or suffix the forked package name in the cabal file
instead, then choose the appropriate one when you use GHC with the
-package-name flag?
Best wishes
Stephen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
As somebody who's hacked on cabal-install a bit (but don't have a
worthwhile patch to contribute (yet?)), I can tell you that versions
support a tag structure, at least internally, but I haven't seen a
non-empty tags field and don't know how to make the tags field
non-empty. For that I'd
On Sun, Mar 21, 2010 at 5:15 PM, Leon Smith leon.p.sm...@gmail.com wrote:
As somebody who's hacked on cabal-install a bit (but don't have a
worthwhile patch to contribute (yet?)), I can tell you that versions
support a tag structure, at least internally, but I haven't seen a
non-empty tags
Hello,
With ghc-6.10.4 the following results are produced with numbers 2009.8.9:
(7e-3 :: BigFloat Prec50) (6e-4 :: BigFloat Prec50)
False
(7e-3 :: BigFloat Prec50) (8e-4 :: BigFloat Prec50)
True
where in the sourecode is written:
data BigFloat e = BF (Fixed e) Integer deriving (Eq, Ord)
Hi all,
Tried to use :break today, without success:
guestbook-session-bugghci -DMIN_VERSION_template_haskell(a,b,c)=1
-isrc Main -i../happstack/happstack-ixset/src
GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help
...
...
[10 of 13] Compiling Happstack.Data.IxSet (
I'm sorry, but is there a question in there?
H. h._h._...@hotmail.com writes:
(7e-3 :: BigFloat Prec50) (6e-4 :: BigFloat Prec50)
False
(7e-3 :: BigFloat Prec50) (8e-4 :: BigFloat Prec50)
True
where in the sourecode is written:
data BigFloat e = BF (Fixed e) Integer deriving (Eq, Ord)
On Mar 21, 2010, at 17:31 , Ivan Lazar Miljenovic wrote:
I'm sorry, but is there a question in there?
H. h._h._...@hotmail.com writes:
(7e-3 :: BigFloat Prec50) (6e-4 :: BigFloat Prec50)
False
0.007 0.0006?
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system
Ivan Lazar Miljenovic ivan.miljenovic at gmail.com writes:
I'm sorry, but is there a question in there?
H. h._h._h._ at hotmail.com writes:
(7e-3 :: BigFloat Prec50) (6e-4 :: BigFloat Prec50)
False
(7e-3 :: BigFloat Prec50) (8e-4 :: BigFloat Prec50)
True
7e-3 8e-4
The
On Sun, Mar 21, 2010 at 4:49 PM, H. h._h._...@hotmail.com wrote:
Ivan Lazar Miljenovic ivan.miljenovic at gmail.com writes:
I'm sorry, but is there a question in there?
H. h._h._h._ at hotmail.com writes:
(7e-3 :: BigFloat Prec50) (6e-4 :: BigFloat Prec50)
False
(7e-3 :: BigFloat
Antoine Latter aslatter at gmail.com writes:
On Sun, Mar 21, 2010 at 4:49 PM, H. h._h._h._ at hotmail.com wrote:
7e-3 8e-4
The result should be False, but it's True.
Basically I don't know where to report this bug.
Sending to the maintainer of the package, as listed on hackage.
On 22 March 2010 08:33, Brandon S. Allbery KF8NH allb...@ece.cmu.edu wrote:
On Mar 21, 2010, at 17:31 , Ivan Lazar Miljenovic wrote:
I'm sorry, but is there a question in there?
H. h._h._...@hotmail.com writes:
(7e-3 :: BigFloat Prec50) (6e-4 :: BigFloat Prec50)
False
0.007 0.0006?
Oh,
Hi,
Only think I can think of is having the constructors, as seperate data
types, introducing new type classes to group every possible subset of
[X,Y,Z] and [A,B,C,D] and use those type classes when defining the
functions.
Wouldn't it be possible to use Either?
You make the constructors
On 22 March 2010 03:05, Sebastiaan Visser sfvis...@cs.uu.nl wrote:
Straight from Zurihac: I'm very pleased to announce the 1.0.0 release of the
Salvia web server.
Salvia is a feature rich web server and web application framework that can be
used to write dynamic websites in Haskell. From
On 22 March 2010 10:57, Bernie Pope florbit...@gmail.com wrote:
Do you have minumum requirements for GHC? I tried to 'cabal install
salvia-demo', but with no luck:
Looking at the dependencies listed, they claim that GHC should work
with = 6.10.1.
cabal install salvia-demo
Resolving
Hello
I would like to discuss my idea for google summer of code. I'm an active
Haskell programmer . I have read the idea list . I think Improve Cabal's
test support really suit my ability of haskell. I would like to give me
advice about my idea . and how to improve my proposal . Thank you.
--
mujtaba.boori:
Hello
I would like to discuss my idea for google summer of code. I'm an active
Haskell programmer . I have read the idea list . I think Improve Cabal's test
support really suit my ability of haskell. I would like to give me advice
about
my idea . and how to improve my
On Sun, Mar 21, 2010 at 03:39:08PM +1000, Yasir Arsanukaev wrote:
I'm interested not in particular algorithm performance but rather in
performance of its implementations in various languages.
Is your C program using lists or arrays? These are different
algorithms.
--
Felipe.
Felipe Lessa felipe.lessa at gmail.com writes:
On Sun, Mar 21, 2010 at 03:39:08PM +1000, Yasir Arsanukaev wrote:
I'm interested not in particular algorithm performance but rather in
performance of its implementations in various languages.
Is your C program using lists or arrays? These
On Mon, Mar 22, 2010 at 01:08:39AM +, kingping wrote:
Here's my C implementation:
http://hpaste.org/fastcgi/hpaste.fcgi/view?id=24191#a24191
I don't know how much difference in time there would be, but you
should use lists in C and/or mutable arrays in Haskell, otherwise
you are comparing
boblettoj boblettoj99 at msn.com writes:
Haha, much better now!
Thanks for all your help, it's working great!
Just tried the code
shuffle :: Int - [a] - [a]
shuffle i [] = []
shuffle i cards = [(cards!!i) : shuffle (fst pair) (delete (cards!!i)
cards)]
where pair = randomR
On 22 March 2010 13:49, adamtheturtle kill2thr...@hotmail.com wrote:
Just tried the code
shuffle :: Int - [a] - [a]
shuffle i [] = []
shuffle i cards = [(cards!!i) : shuffle (fst pair) (delete (cards!!i)
cards)]
where pair = randomR (0, 51) (mkStdGen 42)
and I get:
Could not
So I have the code
shuffle :: Int - [a] - [a]
shuffle i [] = []
shuffle i cards = (cards!!i) : shuffle (fst pair) (delete (cards!!i) cards)
where pair = randomR (0, 51) (mkStdGen 42)
and it doesn't work, am I missing something?
Cards.hs:39:51:
Could not deduce (Eq a) from the context
On Sun, Mar 21, 2010 at 11:31 PM, adamtheturtle kill2thr...@hotmail.com wrote:
So I have the code
shuffle :: Int - [a] - [a]
shuffle i [] = []
shuffle i cards = (cards!!i) : shuffle (fst pair) (delete (cards!!i) cards)
where pair = randomR (0, 51) (mkStdGen 42)
and it doesn't work, am I
Since my answer before to your question obviously wasn't clear enough,
let me highlight the lines of the error message that summarise what
you have to do:
On 22 March 2010 14:31, adamtheturtle kill2thr...@hotmail.com wrote:
Possible fix:
add (Eq a) to the context of the type signature
Ivan Miljenovic ivan.miljenovic at gmail.com writes:
Since my answer before to your question obviously wasn't clear enough,
let me highlight the lines of the error message that summarise what
you have to do:
On 22 March 2010 14:31, adamtheturtle kill2thrill at hotmail.com
wrote:
On 22 March 2010 14:52, adamtheturtle kill2thr...@hotmail.com wrote:
So sorry to keep on going on about this but I have been set to start with
shuffle :: Int - [a] - [a] so I have to do that and can't use the given
code
and I
really don't know where to put (Eq a)
First of all, do a tutorial
I downloaded the new haskell-platform-2010.1.0.0-i386.dmg today... ran
the uninstaller, ghc installer and the platform installer. When I run
ghci, it seems to work fine, but when I try cabal, I get this crash:
$ cabal --version
dyld: unknown required load command 0x8022
Trace/BPT trap
Warren Harris warrensomeb...@gmail.com writes:
I downloaded the new haskell-platform-2010.1.0.0-i386.dmg today... ran the
uninstaller, ghc installer and the platform installer. When I run ghci, it
seems to work fine, but when I try cabal, I get this crash:
$ cabal --version
dyld: unknown
Felipe Lessa felipe.lessa at gmail.com writes:
On Mon, Mar 22, 2010 at 01:08:39AM +, kingping wrote:
Here's my C implementation:
http://hpaste.org/fastcgi/hpaste.fcgi/view?id=24191#a24191
I don't know how much difference in time there would be, but you
should use lists in C and/or
Gregory Collins wrote:
Warren Harris warrensomeb...@gmail.com writes:
I downloaded the new haskell-platform-2010.1.0.0-i386.dmg today... ran the
uninstaller, ghc installer and the platform installer. When I run ghci, it
seems to work fine, but when I try cabal, I get this crash:
$ cabal
You should file a bug on the Haskell Platform bug tracker.
http://haskell.org/haskellwiki/Haskell_Platform#Trouble_shooting
And I'm CC'ing the dmg maintainer -- it may also be a GHC issue as well.
-- Don
warrensomebody:
I downloaded the new haskell-platform-2010.1.0.0-i386.dmg today...
43 matches
Mail list logo