On Sat, Feb 06, 2010 at 09:16:35AM +0100, Bardur Arantsson wrote:
> Brandon S. Allbery KF8NH wrote:
> >On Feb 5, 2010, at 02:56 , Bardur Arantsson wrote:
> [--snip--]
> >
> >"Broken pipe" is normally handled as a signal, and is only mapped
> >to an error if SIGPIPE is set to SIG_IGN. I can well im
On Sat, Feb 06, 2010 at 11:12:40PM +1030, Mark Spezzano wrote:
> -- Function: joinLines
> -- Joins the Words within Lines together with whitespace and newline
> characters
> -- Argument: Lines to pad with whitespace and newlines
> -- Evaluate: The processed and concatenated String
> joinLines :: [
On Mon, Feb 08, 2010 at 12:54:03PM +0300, Victor Nazarov wrote:
> As I understand Gtk2hs still don't run in -threaded environment.
It does run, just use unsafeInitGUIForThreadedRTS.
--
Felipe.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http:
On Mon, Feb 08, 2010 at 11:25:13AM -0600, Hong Yang wrote:
> Can we make GHC a little bit more intelligent to automatically exclude
> unused modules at compile time as in case 4)? (Am I just too lazy to add
> several dashes?)
Did you use -split-objs? Does it help?
--
Felipe.
On Tue, Feb 09, 2010 at 04:27:57PM -0800, Bryan O'Sullivan wrote:
> It creates and returns a vector, so if you ask it to give you a billion
> items, it's going to require north of 8 gigabytes of memory. This should not
> come as a surprise, I'd hope :-) Assuming that's not what you actually
> want
On Fri, Feb 12, 2010 at 02:56:56PM +0100, Alberto Ruiz wrote:
> I have released a new version of hmatrix, a library for numeric
> computation based on LAPACK, BLAS and GSL. Recent developments
> include improved SVD functions, a simple ODE solver, easier OS/X
> installation (thanks to H. Apfelmus),
On Sat, Feb 13, 2010 at 09:49:53PM +0100, Henk-Jan van Tuyl wrote:
> I tried it, but after briefly displaying a window, the program
> terminates with the message:
> dow: user error (unknown OpenGL extension entry glTexParameteri,
> check for OpenGL 3.1)
>
> I suppose the program needs a newer ver
On Sun, Feb 14, 2010 at 09:00:14AM -0500, MightyByte wrote:
> At any rate, they still don't help for things like '~', so
> there's definitely a use for a wiki page like this.
Of course, Hoogle and Hayoo could be modified to show the docs
when such symbols are searched as a special condition.
--
F
On Tue, Feb 16, 2010 at 07:52:51PM +0900, iquiw wrote:
> Is there any efficient way to convert M-length ByteString, Text or
> Vector into N-length one?
This is just a guess, but in vector at least it should be
possible to use sized[1] to tell how much space should be
allocated on the final vector.
On Tue, Feb 16, 2010 at 09:00:08AM -0800, Yves Parès wrote:
> I was wondering: is the Haskell default runtime (that which uses only one
> processor) scheduler able to interrupt a thread which is currently calling
> to a C function in order to enable another haskell thread to progress?
> I think it
On Tue, Feb 16, 2010 at 01:37:54PM -0600, Louis Wasserman wrote:
> Is there a nice package out there somewhere with a linear programming
> implementation? Preferably with a nicely functional interface?
hmatrix?
Cheers,
--
Felipe.
___
Haskell-Cafe mail
On Tue, Feb 16, 2010 at 03:12:53PM -0500, Daniel Peebles wrote:
> How would you use hmatrix? By linear programming I assume he means systems
> of linear inequalities, as typically solved by the simplex algorithm. I too
> am interested in this question (and the more general one of nonlinear
> optimi
Hello,
Thanks for the release!
On Wed, Feb 17, 2010 at 03:10:38PM +0100, Roel van Dijk wrote:
> * RLock: A lock which can be acquired multiple times by the same
> thread. Also known as a reentrant mutex.
In acquire (l. 111), if the lock was already acquired it goes by
| otherwise →
On Wed, Feb 17, 2010 at 05:11:45PM +0100, Roel van Dijk wrote:
> On Wed, Feb 17, 2010 at 3:27 PM, Felipe Lessa wrote:
> > In release (l. 142) Nothing is put into mv
> >
> > then do Lock.release lock
> > putMVar mv
On Sun, Feb 21, 2010 at 05:45:22PM +0200, Artyom Kazak wrote:
> Hello everybody!
> I want to write a little program, that will receive a string as command-line
> argument and write it in the file. But if this string contains '+RTS', GHC
> runtime won't pass the rest of the string to my program.
> W
On Wed, Feb 24, 2010 at 01:28:56PM -0500, Edward Kmett wrote:
> > * GHC/LLVM bytecode with JIT-option?
>
> There is little preventing this one.
Oh, what a great idea! C code being inlined into Haskell
functions! :D
If clang were used to compile the C code into LLVM IR, and
everything were linked
On Sat, Feb 27, 2010 at 01:56:34AM +0100, Daniel Fischer wrote:
> Trying to access http://hackage.haskell.org/trac/hackage I land in a
> redirection loop no matter which page or which browser I try. It worked
> earlier today. Has anybody an idea what the heck might be going on?
> Is it just me?
Wo
On Sat, Feb 27, 2010 at 05:08:18PM -0800, zaxis wrote:
> Then can i change it to :
> case timeout of
> Just str -> do
> [(t, _)] <- reads str
> addTimeout t (hPutStrLn stderr "*** TIMEOUT" >> _exit 1)
> return ()
> _ -> return ()
No, that's diffe
On Tue, Mar 02, 2010 at 08:20:30PM +0100, Sean Leather wrote:
> There are numerous threads on the Haskell Café involving rewriting,
> refactoring, refining, and in general improving code (for some definition of
> improve). I am interested in seeing examples of how Haskell code can be
> rewritten to
On Wed, Mar 03, 2010 at 10:45:12PM -0600, Derek Elkins wrote:
> The main features of this release are:
> - the performance should be much better and comparable to Parsec 2
Great! Will we finally be able to convert everyone to Parsec 3?
Cheers,
--
Felipe.
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.
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
I'd guess that the LLVM backend could generate code that is at least
as fast as gcc. It would be nice if you could test it.
--
Felipe.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Fri, Apr 09, 2010 at 01:38:21PM -0400, Aran Donohue wrote:
> Have you seen anything like this before? Any tips or things to try? I can't
> think of what magic setting I'm missing.
Do you have llvm-config on your path?
$ llvm-config
I have in the past installed the LLVM bindings with a $HOME
=On Mon, Apr 19, 2010 at 06:24:25PM +0200, Henning Thielemann wrote:
> Christian Maeder schrieb:
> > Henning Thielemann schrieb:
> >
> >> The updated Haskell code might be written to a new file by default. Then
> >> I can interactively transfer the corrections I like to the original code
> >> using
On Wed, Apr 28, 2010 at 04:16:08PM -0700, Ben wrote:
> so i tried state machines of a sort
>
> newtype STAuto s a b = STAuto { unSTAuto : (a, s) -> (b, s) }
>
> where the interruptibility would come from being able to save out the
> state s. i was not successful, unfortunately, in this level of
>
On Thu, Apr 29, 2010 at 10:54:09AM +0200, Ketil Malde wrote:
> Anyway - it occurs to me that this can fairly simply be sped up by
> parallelizing: chunk the input, complement chunks in parallel, and
> reverse. Any takers?
Do you mean, something like this?
import Data.ByteString.Char8 as S
im
On Fri, Apr 30, 2010 at 11:09:05PM +0200, Daniel Fischer wrote:
> Hmm,
>
> Prelude> :t Data.Text.Lazy.IO.readFile
> Data.Text.Lazy.IO.readFile
> :: FilePath -> IO text-0.7.1.0:Data.Text.Lazy.Internal.Text
> Prelude> :t Data.Text.IO.readFile
> Data.Text.IO.readFile
> :: FilePath -> IO text-0.7.1
On Thu, May 06, 2010 at 09:30:50PM +0300, Sergei Trofimovich wrote:
> /me wonders if Miss lambdabot might like to have such functionality.
> What do you think?
Do the terms of use of Google Translate allow it?
Cheers,
--
Felipe.
___
Haskell-Cafe mailin
On Fri, May 14, 2010 at 08:57:42AM -0700, John Millikin wrote:
> Additionally, since the original bytestring is shared in your types,
> potentially very large buffers could be locked in memory due to
> references held by only a small portion of the document. Chopping a
> document up into events or
On Mon, May 24, 2010 at 03:20:41AM +0200, Günther Schmidt wrote:
> Hi all,
>
> is there anybody currently using Haskell to construct or implement a
> query language?
Do you mean, HaskellDB?
Cheers,
--
Felipe.
___
Haskell-Cafe mailing list
Haskell-Cafe@
On Thu, Jun 10, 2010 at 11:14:42PM +0200, Daniel Fischer wrote:
> Show can work (should with the constraint on Equ), Eq is hairy.
>
> instance Show t => Show (Obs t) where
> show (Equ a b) = show a ++ " `Equal` " ++ show b
> show (Plus a b) = ...
> show (Konst x) = "Konst " ++ show x
>
On Fri, Jun 11, 2010 at 04:17:25PM +0200, Christopher Done wrote:
> There are a lot of issues with string encoding type mismatches.
> Especially "automatic" conversions. This mailing list gets enough
> posts about encoding confusions.
>
> Would it make sense to make the string depend on its encodin
On Sat, Jun 12, 2010 at 12:13:14AM +0200, Dupont Corentin wrote:
> Thanks all, it works fine (see below).
>
> I lamentably try to make the same for show:
> > showTypeable :: (Typeable a) => a -> String
> > showTypeable x = case cast x of
> > Just x' -> show x'
> >
On Fri, Jun 11, 2010 at 08:12:43PM -0500, Antoine Latter wrote:
> > 1) Which extensions are required to make the code compile.
>
> OverlappingInstances (of course), and IncoherrentInstances, since
> neither instance is more specific than the other.
Well, I guess it can't be compiled at all :(
On Sun, Jun 13, 2010 at 01:09:24PM +0100, Andrew Coppin wrote:
> Does anybody have a less-insane way of doing this?
Did you take a look at happstack-ixset[1]?
[1] http://hackage.haskell.org/package/happstack-ixset
--
Felipe.
___
Haskell-Cafe mailing li
On Tue, Jun 22, 2010 at 09:33:22AM -0300, José Romildo Malaquias wrote:
> In the variable escaping analysis phase of the compiler, a function
> findEscape looks for escaping variables and record this information in
> the escape fields of the abstract syntax. To do this the entire abstract
> syntax
On Tue, Jun 22, 2010 at 08:54:26PM +0200, Henk-Jan van Tuyl wrote:
> I just read about Minix and found a discussion [1] about Andrew
> Tanenbaum (the creator of Minix) wanting to try drivers written in
> Haskell on Minix. It has been four years since, is there currently a
> way to (cross)compile Ha
On Thu, Jun 24, 2010 at 02:35:55AM +0200, Günther Schmidt wrote:
> Is that something that MonadFix is meant to be used for?
In current Gtk libraries, no. You'll do something like
do btns <- mapM createBtn [1..4]
mapM_ connect $ zip btns (tail $ cycle btns)
However, if some library requir
On Fri, Jun 25, 2010 at 12:41:48AM +0400, Alexey Khudyakov wrote:
> Then constructor like one below arise naturally. And I don't know how to write
> them properly. It's possible to use fromList but then list could be allocated
> which is obviously wasteful.
Did you see the generated core? I think
On Sat, Jun 26, 2010 at 09:29:29AM +0300, Roman Beslik wrote:
> Incorrect encoding of filepaths is common in e.g. Cyrillic Linux
> (because of multiple possible encodings --- CP1251, KOI8-R, UTF-8)
> and is solved by fiddling with the current locale and media mount
> options. No need to change a pr
On Sat, Jun 26, 2010 at 04:48:39PM +0400, Bulat Ziganshin wrote:
> Saturday, June 26, 2010, 4:44:20 PM, Felipe Lessa wrote:
> > Even if we said "we don't care", we at least should change
> > FilePath to be [Word8], and not [String]. Currently filepaths
>
On Sat, Jun 26, 2010 at 05:01:06PM +0400, Bulat Ziganshin wrote:
> >> > Even if we said "we don't care", we at least should change
> >> > FilePath to be [Word8], and not [String]. Currently filepaths
>
> > other OSs worked fine, should I use this API (i.e. type FilePath
> > = String) to its fulles
On Sat, Jun 26, 2010 at 05:34:49PM +0400, Alexey Khudyakov wrote:
> It should solve most of problems I believe. But such change will break
> a lot of programs maybe most of them. How could one introduce such a
> change? One variant is to create new hierarchy and gradually deprecate
> old.
>
> Also
On Sun, Jun 27, 2010 at 02:55:33AM +0300, Roman Beslik wrote:
> On 26.06.10 15:44, Felipe Lessa wrote:
> >However, suppose your program needs to create a file with a name
> >based on a database information. Your database is UTF-8. How do
> >you translate that UTF-8 data i
On Sun, Jun 27, 2010 at 02:52:54AM +0300, Roman Beslik wrote:
> On 26.06.10 16:34, Alexey Khudyakov wrote:
> >On Sat, 26 Jun 2010 10:14:50 -0300
> >Felipe Lessa wrote:
> >>On Sat, Jun 26, 2010 at 05:01:06PM +0400, Bulat Ziganshin wrote:
> >>>but what you prop
On Sat, Jun 26, 2010 at 10:01:57PM -0300, Felipe Lessa wrote:
> The types are:
>
> getArgs :: IO [String]
> writeFile :: FilePath -> String -> IO ()
On a similar note, getArgs probably suffers from the same
problem. Which should it be?
a) getArgs :: IO [String]
b) ge
On Sun, Jun 27, 2010 at 10:54:08AM +0100, Max Bolingbroke wrote:
> Example 2: Codensity is the mother of all Monads
I thought the continuation monad was the mother of all monads. :)
For example, see [1].
Cheers!
[1] http://blog.sigfpe.com/2008/12/mother-of-all-monads.html
--
Felipe.
___
On Wed, Apr 22, 2009 at 12:29:05AM +0300, Matti Niemenmaa wrote:
> Good to hear that it works for someone else, too. (I don't have a new
> enough version of containers installed myself, after upgrading to
> 6.10.2.) Just bear in mind that some functions won't work.
What exactly don't work? What is
On Sat, Apr 25, 2009 at 10:34:05AM -0400, Xiao-Yong Jin wrote:
> You don't write lisp, do you? Or probably it is just me.
> But I would prefer to write the line as
>
> newtype MyCoolMonad = MyCoolMonad (FirstTransformer
>(SecondTransformer
>
On Sat, Apr 25, 2009 at 07:38:59PM +0400, Miguel Mitrofanov wrote:
>> Also, I don't mistake the transformers as different
>> parameters because of the parenthesis
>
> You should really try Lisp. In my opinion, parenthesis are a kind of
> noise - too small, too many.
I don't try lisp because I don'
On Mon, Apr 27, 2009 at 06:00:52PM -0500, Vasili I. Galchin wrote:
> I feel that it has something to do with double quotes in Haskell ...
> probably something obviously silly that I am doing.
The problem is that ["-p blastn"] means that there's only one
argument, while ["-p", "blastn"] means what
On Mon, Apr 27, 2009 at 04:34:27PM +1200, Richard O'Keefe wrote:
> (5) A generator that generates native code to
> be called through FFI.
It may be interesting to see the LLVM package, it's pretty much
straightforward to use it with numerical calculations.
--
Felipe.
_
On Fri, May 01, 2009 at 01:08:26PM -0500, Thomas Hartman wrote:
> For quickchecking, the code below "cheats" by not defining the
> coarbitrary funciton, which I confess I don't really understand and
> never use.
FWIW, QuickCheck 2 separates 'coarbitrary' in a different class.
--
Felipe.
_
On Sat, May 02, 2009 at 05:31:03PM +0100, Paul Keir wrote:
> An example immediately follows that quotation on the wiki:
>
> do text <- getLine
>if null text
> then putStrLn "You refuse to enter something?"
> else putStrLn ("You entered " ++ text)
Then, how about
getMyLine = getL
Hi!
On Sat, May 02, 2009 at 01:00:23PM -0600, Duane Johnson wrote:
> Silkworm combines the Hipmunk binding to Chipmunk 2D Game
> Dynamics with OpenGL, and GLFW (an alternative to GLUT).
It's great to see Hipmunk being useful to someone :). I've
written the binding to turn some of my ideas into c
I don't know if I understood your intentions, but let's go. The
problem is that you're trying to combine different monads. We
have
mplus :: MonadPlus m => m a -> m a -> m a,
so you never leave 'm', but you want
mplus' :: ??? => n a -> m a -> m a
where 'n' could be a different monad. In s
On Sun, May 03, 2009 at 02:07:23PM +0200, Sven Panne wrote:
> As a side note, I get a very bad feeling when Hipmunk gets compiled on my
> x86_64 box:
[...]
> This can't be correct, but I'll probably have to take a look at that. Or is it
> a know bug that Hipmunk ist not 64bit-clean?
My machine is
On Mon, May 04, 2009 at 10:49:56PM +0100, Conor McBride wrote:
> The effect of
>
> iffy askPresident launchMissiles seekUNResolution
>
> is to ask the President, then launch the missiles, then lobby the
> UN, then decide that the result of seeking a UN resolution is
> preferable.
>
> Remember fol
On Sun, May 10, 2009 at 01:50:08PM +0200, Sven Panne wrote:
> Nevertheless, having a common set of (strict) data types for
> vector math will probably be very useful, even if it won't
> fulfill everybody's needs.
I can say that it would be useful at least for Hipmunk, specially
being able to pass
On Wed, May 20, 2009 at 08:40:15AM +0800, z_a...@163.com wrote:
> I know "length [1..33]" is Int not Word8, but Word8 is enough here.
Just saying '33' is enough here. :)
--
Felipe.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskel
On Tue, May 26, 2009 at 12:42:12PM -0300, Andrei Formiga wrote:
> I don't think there's one, but I would subscribe to it.
I would as well, but what would we gain with it? Wouldn't it rot
because every message one of us wanted to post was general enough
to just post on haskell-cafe? Would it be a
Hello!
Why isn't there an option to control whether HPC, the Haskell
Program Coverage, will consider derived instances "coverable".
I'm using it and my top level coverage is 52% while my expression
coverage is at 92%. Looking carefully we see that most
non-tested top level definitions are derived
How about...
*Main> bunch () [1..16]
[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]
*Main> bunch (8 :+: ()) [1..16]
[[1,2,3,4,5,6,7,8],[9,10,11,12,13,14,15,16]]
*Main> bunch (8 :+: 4 :+: ()) [1..16]
[[[1,2,3,4],[5,6,7,8]],[[9,10,11,12],[13,14,15,16]]]
*Main> bunch (8 :+: 4 :+: 2 :+: ()) [1..16]
1,2]
On Thu, Jun 04, 2009 at 05:09:29PM +0100, Paul Keir wrote:
> Thanks. I don't know Type Families, but take the point that
> the input can be parameterised with something something other
> than a list. i.e. (8 :+: 4 :+: 2 :+: ()) presumably has the
> same type as (4 :+: 2 :+: ()).
In fact, no.
(4 :
On Thu, Jun 11, 2009 at 06:56:01PM +0200, Sven Panne wrote:
> Version 1.0.0.0 covers the OpenGL 3.1 core, all ARB extensions
> and all EXT extensions.
What about OpenGL 2.1? As I understand, Linux won't have OpenGL
3.0 or 3.1 for at least some months,
$ glxinfo | grep 'OpenGL version'
OpenGL ver
On Thu, Jun 11, 2009 at 07:55:23PM +0200, Krzysztof Skrzętnicki wrote:
> On my machine I get:
>
> $ glxinfo | grep -i version
> server glx version string: 1.4
> client glx version string: 1.4
> GLX version: 1.3
> OpenGL version string: 3.0.0 NVIDIA 180.51
> OpenGL shading language version string: 1
On Fri, Jun 12, 2009 at 07:53:41PM +0200, Thomas ten Cate wrote:
> This runs on MediaWiki, right? How about adding a CAPTCHA for account
> registrations?
What do we avoid at all costs?
___
|___|
--
Felipe.
On Tue, Jun 23, 2009 at 02:02:25AM +0200, Eric wrote:
> It seems that an extension is required:
>
> Non type-variable argument in the constraint: MonadState [a] m
> (Use -XFlexibleContexts to permit this)
> In the type signature for `play3':
> play3 :: (MonadState [a] m, Eq a) =>
On Mon, Jun 22, 2009 at 10:31:34PM -0400, Leon Smith wrote:
> Also, a substantially revised draft of the associated paper, "Lloyd
> Allison's Corecursive Queues: Why Continuations Matter" is now available.
> [3] This paper will appear in the upcoming Monad Reader issue 14, and
> comments would
On Tue, Jun 16, 2009 at 10:48:19AM -0300, Maurício wrote:
> /*/
> struct ex {
> int x;
> int y;
> int z;
> };
>
> ex example_functions (ex p)
> {
> (...)
> }
> /*/
You may adopt the approach I used with Hipmunk[1] where there is
a wrapper library written in C. For your exam
On Sun, Jun 28, 2009 at 12:49:12AM -0700, Kim-Ee Yeoh wrote:
> This isn't really a shadowing/redefinition issue. Here's
> a perfectly legitimate snippet that compiles fine:
>
> f 0 = 0
> f otherwise = 1+otherwise
What? It is a redefinition issue *as well*, but this kind of
warning isn't active by
On Sun, Jun 28, 2009 at 02:24:30PM +0100, Andrew Coppin wrote:
> Now, the question is... Is this useful enough to be worth putting on
> Hackage?
Why not? :)
--
Felipe.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailma
On Sun, Jun 28, 2009 at 11:07:27AM +0100, Max Bolingbroke wrote:
> Awesome! I'm really glad to hear you are having success with the package!
BTW, thanks for fixing the spacing issue with nested tests! :)
--
Felipe.
___
Haskell-Cafe mailing list
Haskell-
On Mon, Jun 29, 2009 at 01:28:47PM +0400, Alexey Khudyakov wrote:
> I use wicd to manage wireless connections for about three month and
> I'm pretty happy with it. It seems to be much saner than network manager.
> Didn't any serious problems with it.
I second that. I've gone away from NM because
On Tue, Jun 30, 2009 at 03:29:45AM +1000, Alex Mason wrote:
> (being able to insert 230,000+ words, check that all those
> words are actually in the set, write the set out to disk using
> the Data.Binary instance, reading them back in, and checking
> the old and new sets are equal takes about 3.5 s
On Tue, Jun 30, 2009 at 03:25:26PM +0530, Hemanth Kapila wrote:
> Can some one please suggest something on simulating some sort of
> "object-Ids" in Haskell?
Data.Unique[1]?
[1]
http://hackage.haskell.org/packages/archive/base/latest/doc/html/Data-Unique.html
--
Felipe.
On Tue, Jun 30, 2009 at 07:57:07PM +0530, Hemanth Kapila wrote:
> Can't we come up with something like this staying within the
> limits of purity?
No, because that would break referential transparency :(. I.e.,
it would be possible to distinguish things that should be
"equal", such as '3' from '1
On Sat, Jul 04, 2009 at 12:37:21PM +0100, Andrew Coppin wrote:
> It's on Hackage:
>
> http://hackage.haskell.org/package/AC-HalfInteger-1.1.1
>
> It'll be interesting to see if I uploaded it right... o_O
I guess you did, congrats! :)
...on the Haddock comments of halve and double, it should be
On Sat, Jul 04, 2009 at 06:56:44PM +0100, Andrew Coppin wrote:
> http://hackage.haskell.org/package/AC-Colour-1.1.1
Why don't you use colour[1]?
[1] http://hackage.haskell.org/package/colour
--
Felipe.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell
I would also like some sort of "combo" mode for Hackage where the
docs are shown the same way that they are now but with a link to
"Internals" showing the view that you propose, perhaps showing
only internals or highlighting them. Then we would be able to
have the internal documentation on Hackage
On Tue, Jul 14, 2009 at 07:16:41PM +0200, Sven Panne wrote:
> To further modularize the OpenGL/OpenAL packages, a new
> StateVar package has been released to Hackage. It contains
> state variables, which are references in the IO monad, like
> IORefs or parts of the OpenGL state.
That's just great,
On Wed, Jul 15, 2009 at 08:27:04AM +1000, John Ky wrote:
> a :: Data
>
> let b = getNext a
> let c = getNext b
>
> c == a -- Gives True
What do you mean? This works
type Data = ()
getNext = id
but I guess this is not what you meant ;).
--
Felipe.
On Wed, Jul 15, 2009 at 08:09:37AM -0400, Andrew Wagner wrote:
> Err, technically, aren't functions and constructors mutually exclusive? So
> if something is a function, it's, by definition, not a constructor?
I guess what Eugene Kirpichov meant was that not being a function
(and being a construct
On Fri, Jul 17, 2009 at 06:31:20PM +0200, Cetin Sert wrote:
> How can I open and read colors of specific pixels of an image file in
> Haskell? Which packages, functions do you recommend?
You could try DevIL, SDL-image or Gtk, I guess.
--
Felipe.
___
Has
Nice library!
On Sun, Jul 19, 2009 at 11:35:34PM +0100, Robin Green wrote:
> A variant, writeFileWithBackup, also allows you to supply a custom
> backup computation to backup old copy(ies) of the destination file
It would be nice to have the backup action receive the file name
as a parameter, so
On Tue, Jul 21, 2009 at 08:11:47PM +0400, Bulat Ziganshin wrote:
> if you have any specific needs, we can discuss it. my own needs is
> mainly combination of first and third clauses of quoted list, so
> second claim is somewhat artificial :) it is possible but only
> partially implemented
I was j
On Tue, Jul 21, 2009 at 12:29:18PM -0700, Dan Weston wrote:
> This would mean that
>
> [ | c ] = concat $ do { c; return [] }
>
> The right is legal Haskell and gives []. The left is (not yet)
> legal. Should it be?
Please, please, do not allow that.
People wanting [] should write [].
Thanks!
On Wed, Jul 22, 2009 at 06:00:38PM +0200, Matthias Görgens wrote:
] I need to take some elements from the front of a list. However the
] criteria are somewhat complex.
]
] > walk f [] = []
] > walk f (x:xs) = case f x
] > of Just g -> x : walk g xs
] >Nothing ->
On Thu, Jul 23, 2009 at 07:28:55AM +0200, Matthias Görgens wrote:
] I often want to take one more element than takeWhile does, or only
> takeWhileMore n p x | p x = Just . F $ takeWhileMore n p
> | otherwise = Just . F $ takeN n
] start checking the predicate after takin
On Fri, Jul 24, 2009 at 08:11:12PM +0200, Tobias Olausson wrote:
> prop_schedule :: Ord t => [Interval a t] -> Bool
> prop_schedule []= True
> prop_schedule [a] = True
> prop_schedule (x:y:ys) = end x <= begin y && prop_schedule (y:ys)
[..]
> How come QuickCheck passes 100 tests of r
On Sat, Jul 25, 2009 at 10:08:20AM -0400, Matthew wrote:
> I'm working on defining a data type for representing game-trees
> for chess or other two-person board games. My plan is to
> memoize the evaluations of a game-state at each depth so that
> values don't need to be recomputed for future moves
On Sun, Jul 26, 2009 at 09:01:22PM -0700, Brian Troutwine wrote:
> Hello all.
>
> I would like to define a data type that is the super-set of several
> types and then each of the proper subset types. For example:
>
data Foo = O !Odd | E !Even
>data Odd = One | Three
>data Even = Two | Fou
On Tue, Jul 28, 2009 at 10:58:53AM +0200, Sebastian Fischer wrote:
> tails = dropWhileM (const [True,False])
Actually this should be
tails = dropWhileM (const [False, True])
--
Felipe.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://w
Small tips:
- Use swap and avoid those if's.
- [a] ++ b is the same as a : b.
- Factor out the first point that is always there.
- Factor out line' arguments that don't change with the recursion.
Untested:
> swap :: Bool -> (a,a) -> (a,a)
> swap False = id
> swap True = \(x,y) -> (y,x)
>
> li
On Wed, Jul 29, 2009 at 06:26:30PM +0200, Sven Panne wrote:
> Apart from that, a bug in vertexAttribPointer has been fixed.
...and the new ObjectName, StateVar and Tensor packages are being
used, and this is great! Thanks for the release.
--
Felipe.
__
On Wed, Jul 29, 2009 at 10:24:23PM -0300, Rafael Gustavo da Cunha Pereira Pinto
wrote:
> mapAccumL was added to Data.Traversable in package base-4. GHC 6.8.2 uses
> base-3...
But this means that Tensor's dependencies should be on base >= 4, not 3.
--
Felipe.
_
On Thu, Aug 06, 2009 at 04:27:56PM +0200, Joachim Breitner wrote:
> And cabal/hackage guys: Llease introduce a standard Changes format for
> cabal packages so that http://hackage.haskell.org/package/hlint readily
> lists (or links to) changes.
I second that! +1
--
Felipe.
On Thu, Aug 06, 2009 at 04:25:07PM -0700, Dan Weston wrote:
> > ghc --version
> The Glorious Glasgow Haskell Compilation System, version 6.10.4
Confirmed on Gento amd64 with custom-built GHC from Haskell overlay:
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.10.4
$ u
On Sat, Aug 08, 2009 at 04:14:15PM -0700, Thomas DuBuisson wrote:
> There exists a small but measurable performance hit for at least one
> test case (using Int as keys, obviously). Perhaps the bias would be
> the other way if we were comparing EnumMap to an IntMap wrapped with
> to/from Enum.
Per
1 - 100 of 402 matches
Mail list logo