Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-04 Thread Jake McArthur
I don't think I would quite say haskell-game is quite relevant. For that matter, the implementation on GitHub is not very good. It's too complicated to scale and too specialized. I've been starting a fresh implementation, since I learned a lot about what I really want to do writing that, but it is

Re: [Haskell-cafe] Identity of indiscernibles (Was: Alternative name for return)

2013-08-08 Thread Jake McArthur
I don't know what the denotation for this would be, but I can't think of any reasonable ones for which I can write (==) to respect the denotation. For example, is set A, then set B equal to set B, then set A? Maybe you could argue that they aren't operationally equivalent, but can you guarantee

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Jake McArthur
Ah! It seems that my wording was ambiguous. All I was trying to say is that there is nothing you can do with an IO action which will cause an otherwise pure expression to exhibit side effects during evaluation, *not* that an IO action is observable in pure code or that they are arbitrarily

Re: [Haskell-cafe] Alternative name for return

2013-08-06 Thread Jake McArthur
But IO actions *are* pure values. What side effects do they have? None! You can do whatever you want with them with no harmful effects in any Haskell expression. They only special thing about them is that they have a run function that is not itself provided in Haskell. The run function is actually

Re: [Haskell-cafe] Contravariant applicatives, monads and arrows (was ANN: rematch, an library for composable assertions with human readable failure messages)

2013-04-16 Thread Jake McArthur
The type looks similar to the denotation for sets, but implementing a covariant interface for it would not be straightforward and may also be inefficient. On Apr 16, 2013 11:17 AM, Alejandro Serrano Mena trup...@gmail.com wrote: Hi, First of all, let me say that this work on matchers is really

Re: [Haskell-cafe] Advice on type families and non-injectivity?

2013-01-13 Thread Jake McArthur
I have a trick that loses a little convenience, but may still be more convenient than data families. {-# LANGUAGE TypeFamilies #-} import Data.Tagged type family F a foo :: Tagged a (F a) foo = Tagged undefined bar :: Tagged a (F a) bar = foo This allows you to use the same newtype wrapper

Re: [Haskell-cafe] Navigating 'Strategic' programming babel

2012-12-17 Thread Jake McArthur
I won't compare and contrast all these, but I want to point out that there is a nicer version of uniplate in the lens package. On Dec 17, 2012 5:31 AM, Ravi Sahni ganeshsahn...@gmail.com wrote: Clearly Haskell has great possibilities in the field of language-processing. And the nuisances

Re: [Haskell-cafe] Problem with benchmarking FFI calls with Criterion

2012-11-27 Thread Jake McArthur
I once had a problem like this. It turned out that my laptop was stepping the cpu clock rate down whenever it got warm. Disabling that feature in my BIOS fixed it. Your problem might be similar. On Nov 27, 2012 7:23 AM, Janek S. fremenz...@poczta.onet.pl wrote: I tested the same code on my

Re: [Haskell-cafe] Optimal line length for haskell

2012-10-29 Thread Jake McArthur
I stick to 80 columns fairly rigidly. This is not only so that it fits into narrow windows, but also so that any two subexpressions in the same expression tend to be close together on my screen, which makes it easier for me to reason about it. If only it was easy for me to read and write code on a

Re: [Haskell-cafe] Building all possible element combinations from N lists.

2012-10-25 Thread Jake McArthur
I golfed a bit. :) sequence = filterM (const [False ..]) On Thu, Oct 25, 2012 at 6:11 PM, dokondr doko...@gmail.com wrote: On Fri, Oct 26, 2012 Alex Stangl wrote: combos [] = [[]] combos ([]:ls) = combos ls combos ((h:t):ls) = map (h:) (combos ls) ++ combos (t:ls) Excellent,

Re: [Haskell-cafe] Why Kleisli composition is not in the Monad signature?

2012-10-16 Thread Jake McArthur
On Mon, Oct 15, 2012 at 11:29 PM, Dan Doel dan.d...@gmail.com wrote: I'm uncertain where this, compositional means written as the composition of functions, thing started. But it is not what I, and I'm sure any others mean by the term, compositional. You're right. It's a rather recent, as far

Re: [Haskell-cafe] Why Kleisli composition is not in the Monad signature?

2012-10-15 Thread Jake McArthur
On Mon, Oct 15, 2012 at 7:59 AM, Ertugrul Söylemez e...@ertes.de wrote: Try to express do x - getLine y - getLine print (x, y) using only Kleisli composition (without cheating). In my opinion, this is not as nice as the do-notation version, but at least it's

Re: [Haskell-cafe] Why Kleisli composition is not in the Monad signature?

2012-10-15 Thread Jake McArthur
On Mon, Oct 15, 2012 at 11:33 AM, Jake McArthur jake.mcart...@gmail.com wrote: On Mon, Oct 15, 2012 at 7:59 AM, Ertugrul Söylemez e...@ertes.de wrote: Try to express do x - getLine y - getLine print (x, y) using only Kleisli composition (without cheating). My previous

Re: [Haskell-cafe] Image processing using Repa

2012-10-10 Thread Jake McArthur
You do not have to use computeIntoP. You can just use computeP followed by toForeignPtr (i don't remember the exact name for that and am on my phone so it would be awkward to look up). So Repa can create the buffer for you. Coincidentally, I didn't realize computeIntoP even existed, and I want it

Re: [Haskell-cafe] Monads

2012-09-30 Thread Jake McArthur
On Sep 30, 2012 10:56 AM, Albert Y. C. Lai tre...@vex.net wrote: On 12-09-29 09:57 PM, Vasili I. Galchin wrote: I would an examples of monads that are pure, i.e. no side-effects. What does side effect mean, to you? Definition? When discussing monads, at least, a side effect is an

Re: [Haskell-cafe] Fwd: [Haskell] ANNOUNCE: MFlow-0.1.5

2012-09-18 Thread Jake McArthur
invoked in the url requested. I don´t know if this answer your question Alberto 2012/9/18 Jake McArthur jake.mcart...@gmail.com: This sounds really cool. How do you handle users having multiple tabs? On Tue, Sep 18, 2012 at 11:26 AM, Alberto G. Corona agocor...@gmail.com wrote: Hi

Re: [Haskell-cafe] mutable arrays of tuples

2012-08-09 Thread Jake McArthur
In fact, unboxed arrays of tuples are represented in vector as tuples of unboxed arrays. On Aug 9, 2012 4:35 AM, Ketil Malde ke...@malde.org wrote: David Feuer david.fe...@gmail.com writes: So I was thinking about a mutable array of tuples, but to avoid allocating tuples to modify their

Re: [Haskell-cafe] Knight Capital debacle and software correctness

2012-08-04 Thread Jake McArthur
I feel like this thread is kind of surreal. Knight Capital's mistake was to use imperative programming styles? An entire industry is suffering because they haven't universally applied category theory to software engineering and live systems? Am I just a victim of a small troll/joke? - Jake On

Re: [Haskell-cafe] vector operations

2012-05-23 Thread Jake McArthur
Have you already verified that stream fusion won't just do this for you? On May 23, 2012 12:35 AM, Evan Laforge qdun...@gmail.com wrote: So I wanted to find the first index in a vector whose running sum is greater than a given number. The straightforward way is to create the running sum and

Re: [Haskell-cafe] Template Haskell vs Rewrite Rules?

2012-04-19 Thread Jake McArthur
I once experimented with something similar. This is a preprocessor. This was a long time ago, and I don't use it. https://patch-tag.com/r/jmcarthur/overloaded-whitespace/snapshot/current/content/pretty/Main.hs On Thu, Apr 19, 2012 at 8:40 AM, Ismael Figueroa Palet ifiguer...@gmail.com wrote: Hi

Re: [Haskell-cafe] adding the elements of two lists

2012-03-26 Thread Jake McArthur
This is interesting because it seems to be a counterexample to the claim that you can lift any Num through an Applicative (ZipList, in this case). It seems like maybe that only works in general for monoids instead of rings? On Mar 25, 2012 8:43 PM, Chris Smith cdsm...@gmail.com wrote: Jerzy

Re: [Haskell-cafe] adding the elements of two lists

2012-03-26 Thread Jake McArthur
/26/12 8:16 AM, Jake McArthur wrote: This is interesting because it seems to be a counterexample to the claim that you can lift any Num through an Applicative (ZipList, in this case). It seems like maybe that only works in general for monoids instead of rings? I'm not so sure about

Re: [Haskell-cafe] In an imperative language, commands fulling memory cells is easy, but gives the false impression that S/W engineering is easy.

2012-03-17 Thread Jake McArthur
This mailing list is not Twitter. Please stop sending emails without meaningful content. On Mar 17, 2012 12:42 PM, KC kc1...@gmail.com wrote: -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] puzzling polymorphism behavior (7.0.3 windows)

2012-03-15 Thread Jake McArthur
Just a little more interesting information: This is why impure languages like OCaml have the value restriction. Haskell doesn't need it because it is pure, but of course unsafePerformIO thwarts that. On Mar 15, 2012 1:34 PM, Tillmann Rendel ren...@informatik.uni-marburg.de wrote: Hi, this is

Re: [Haskell-cafe] types and number of evaluation steps

2012-02-21 Thread Jake McArthur
My understanding was that the reason is that CSE can cause things to be shared that take up a lot of space when normally they would be garbage collected sooner. On Feb 18, 2012 11:57 AM, Roman Cheplyaka r...@ro-che.info wrote: It doesn't matter. Laziness would be affected if, for instance,

Re: [Haskell-cafe] Memory usage with TVar?

2012-02-01 Thread Jake McArthur
First, see this question about space usage on Stack Overflow: http://stackoverflow.com/questions/3254758/memory-footprint-of-haskell-data-types Next, apply this knowledge not only to Ints, but also to tuples and lists. There's your memory usage. - Jake On Wed, Feb 1, 2012 at 10:29 AM, Johan

Re: [Haskell-cafe] Monads, do and strictness

2012-01-23 Thread Jake McArthur
On Mon, Jan 23, 2012 at 10:45 AM, David Barbour dmbarb...@gmail.com wrote: the repeated failures of attempting to model stream processing with infinite lists, I'm curious about what failures you're talking about. - Jake ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Generating Code

2011-12-09 Thread Jake McArthur
On Dec 9, 2011 4:48 PM, Stephen Tetley stephen.tet...@gmail.com wrote: For the specific problem of OpenGL - as the package already exists I'm not sure a generative approach would actually pay its way I strongly disagree. OpenGLRaw is in pretty bad shape right now. It's not up to date with the

Re: [Haskell-cafe] Lists concatenation being O(n)

2011-10-13 Thread Jake McArthur
On Thu, Oct 13, 2011 at 3:32 PM, Yves Parès limestr...@gmail.com wrote: The number of new cons cells created in due course is Θ(length xs). These cons cells would not have been created if we printed length xs and printed length ys separately. Okay, so the major problem comes from memory

Re: [Haskell-cafe] Trouble using State Monad.

2011-10-10 Thread Jake McArthur
On Oct 9, 2011 11:17 PM, David Barbour dmbarb...@gmail.com wrote: If you really want the input type to be part of the Filter type definition, you'll need to use arrows instead of monads. I wouldn't say that. You just need an extra type parameter. That doesn't mean it can't be a monad. In fact,

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-22 Thread Jake McArthur
On Thu, Sep 22, 2011 at 7:02 PM, Richard O'Keefe o...@cs.otago.ac.nz wrote: On 21/09/2011, at 11:42 PM, Jake McArthur wrote: With fixed point numbers, it makes sense to have an Enum instance. What is the use case? I'm not quite sure how to answer this. I'm speaking in a fairly general sense

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-21 Thread Jake McArthur
On Tue, Sep 20, 2011 at 11:29 PM, Richard O'Keefe o...@cs.otago.ac.nz wrote: On 21/09/2011, at 2:59 AM, Chris Smith wrote: On Mon, 2011-09-19 at 22:09 -0700, Evan Laforge wrote: Then I tried switching to a fixed point format, and discovered my mistake.  Enum is supposed to enumerate every

Re: [Haskell-cafe] Proposal: Subcomputations in arrow notation

2011-09-21 Thread Jake McArthur
I think this proposal makes so much sense that I'm surprised it didn't already work this way. - Jake ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-20 Thread Jake McArthur
On Tue, Sep 20, 2011 at 10:59 AM, Chris Smith cdsm...@gmail.com wrote: I certainly hope not.  Instead, perhaps the issue should be brought up with the fixed-point number library you're using, and they could fix their Enum instance to be more helpful. I'm the author of the library in question.

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-20 Thread Jake McArthur
On Tue, Sep 20, 2011 at 10:59 AM, Chris Smith cdsm...@gmail.com wrote: The better way to look at this is that the notion of `succ` and `pred` is dependent on the type, much like `mappend` has no particular meaning until a Monoid instance is given for the type.  It's fairly well established,

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-20 Thread Jake McArthur
On Tue, Sep 20, 2011 at 3:48 PM, Chris Smith cdsm...@gmail.com wrote: But it would be the *wrong* thing to use as a desugaring for list range notation.  List ranges are very unlikely to be useful or even meaningful for most such enumerations (what is [ Red, Green .. LightPurple]?); and

Re: [Haskell-cafe] Slightly tangential topic about functional programming (specifically, Lambda-Calculus)

2011-07-23 Thread Jake McArthur
I highly recommend that you check out #haskell on freenode. In my opinion its the best channel on freenode, and there are always tons of helpful people and a lot of stimulating conversation. Hope to see you there! ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] OpenGL vs OpenGLRaw

2011-07-23 Thread Jake McArthur
Translation from c is much more straightforward with openglraw compared with OpenGL. Also, many of the design decisions behind OpenGL are arbitrary or limiting, and some features aren't even exposed in its interface. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Why not Darcs?

2011-04-21 Thread Jake McArthur
unrecording. % darcs amend -a -p 'Feature X' Thu Apr 21 19:11:54 CDT 2011 Jake McArthur jake.mcart...@gmail.com * Feature X Shall I amend this patch? [yN...], or ? for more options: y Finished amending patch: Thu Apr 21 19:14:41 CDT 2011 Jake McArthur jake.mcart...@gmail.com * Feature X % darcs

Re: [Haskell-cafe] Why not Darcs?

2011-04-21 Thread Jake McArthur
On Thu, Apr 21, 2011 at 7:31 PM, Maciej Marcin Piechotka uzytkown...@gmail.com wrote: Last time I checked it disallowed my as 5 depended on 4 which depended on 3 which depended on 2 which depended on 1 as all changed x.hs Merely changing the same file is not sufficient for that. In order for

Re: [Haskell-cafe] Haskell from SML - referrential Transparency?!

2011-04-19 Thread Jake McArthur
You can think of IO actions as values (which don't change) representing imperative programs to execute (which may have different results each time you execute them). So, `fa fb fc` represents the exact same value as `fa fb fc`, but if you execute that value multiple times you may get different

Re: [Haskell-cafe] WANTED: Compensated Haskell Hacker for Language Project

2011-03-27 Thread Jake McArthur
I share your dream of being able to write high-level code for soft real time software, so while I'm not interested in working on your project directly at this time, it's still in my best interest for it to be successful. My only question is this: what does your language offer that others do

Re: [Haskell-cafe] STM, newArray, and a stack overflow?

2011-03-23 Thread Jake McArthur
On 03/23/2011 10:34 AM, Ketil Malde wrote: It works (calling the same function) from GHCi, but breaks when compiled. Also when compiling with -O0. Confirmed for GHC 7.0.2. Works fine in GHCi, but compiling it (in my case, with -O) and running the executable causes a stack overflow unless I

Re: [Haskell-cafe] Custom monad using ST

2011-03-09 Thread Jake McArthur
Try `return x = MyST (return x)`. It's (.) that throws it off. - Jake ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] How large is the Haskell community ?

2011-02-12 Thread Jake McArthur
On 02/12/2011 02:22 PM, Christopher Done wrote: IRC channel has 600~ users in at any one time. At this moment it has 720! And this seems to be roughly the norm recently. - Jake McArthur ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Byte Histogram

2011-02-04 Thread Jake McArthur
On 02/03/2011 03:10 PM, Andrew Coppin wrote: (Unless you're seriously going to suggest that GHC's native code generator is any match for the might of a half-decent C compiler...) I don't know enough about the native code generator to make a claim like that, but we're not comparing the native

Re: [Haskell-cafe] Guy Steele's Praise For Haskell @ Strange Loop Keynote

2011-01-15 Thread Jake McArthur
So everybody doesn't have to go watch it, here is a shortened version of what Steele said in the video: Although Fortress is originally designed as an object-oriented framework in which to build an array-style scientific programming language, [...] as we've experimented with it and tried to

Re: [Haskell-cafe] Type System vs Test Driven Development

2011-01-05 Thread Jake McArthur
On 01/05/2011 03:44 AM, Jonathan Geddes wrote: When I write Haskell code, I write functions (and monadic actions) that are either a) so trivial that writing any kind of unit/property test seems silly, or are b) composed of other trivial functions using equally-trivial combinators. There are

Re: [Haskell-cafe] Polymorphic function over pairs of maybes.

2010-12-28 Thread Jake McArthur
FromMaybe String where type Maybe' String = Maybe String fromMaybe = Data.Maybe.fromMaybe instance (FromMaybe a, FromMaybe b) = FromMaybe (a, b) where type Maybe' (a, b) = (Maybe' a, Maybe' b) fromMaybe (x, y) (a, b) = (fromMaybe x a, fromMaybe y b) - Jake McArthur

Re: [Haskell-cafe] Offer to mirror Hackage

2010-12-04 Thread Jake McArthur
I am no decision maker regarding Hackage, but I would like to echo my support for this offer. Hackage is a vital part of my workflow, and I'm sure I'm not the only one. Its importance to the Haskell community has grown quickly and is continuing to do so. Each time it goes down, the impact is

Re: [Haskell-cafe] DPH and GHC 7.0.1

2010-11-19 Thread Jake McArthur
On 11/19/2010 05:24 PM, Gregory Propf wrote: I was hoping to play around with Data.Parallel.Haskell (dph) but noticed that it seems to have been exiled from ghc 7.0.1 which I just installed. It also doesn't seem to be in cabal. Anybody know how to use dph with 7.0.1 or has it been abandoned or

Re: [Haskell-cafe] Haskell Weekly News: Issue 159 - November 17, 2010

2010-11-17 Thread Jake McArthur
On 11/17/2010 09:56 PM, Daniel Santa Cruz wrote: Curious about the most active members of the #haskell IRC channel? Out of around 28K utterances in the channel this week, 24% of them where spoken by the top 5 most active members. Not suprisingly, the dear lambdabot is at the top

Re: [Haskell-cafe] Layered maps

2010-10-09 Thread Jake McArthur
What you describe sounds like a perfect job for a trie, so that's what I think you should look into. - Jake ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Layered maps

2010-10-08 Thread Jake McArthur
On 10/08/2010 04:23 PM, Alex Rozenshteyn wrote: Does there exist a library which allows me to have maps whose elements are maps whose elements ... with a convenient syntax. It sounds like you might be looking for a trie of some sort. Would something like the TrieMap package suit your needs?

Re: [Haskell-cafe] Ultra-newbie Question

2010-09-18 Thread Jake McArthur
On 09/18/2010 02:51 AM, Christopher Tauss wrote: I am trying to write a function that takes a list and returns the last n elements. This may just be for the sake of learning, in which case this is fine, but usually, needing to do this would be a sign that you are using lists improperly

[Haskell-cafe] Google AI Challenge: Planet Wars - Accepting Haskell Submissions

2010-09-10 Thread Jake McArthur
Just wanted to let everybody know that there is an AI contest [1] that started today. Everybody has about two months to create bots that compete against each other 1-on-1 in a game based on Galcon [2]. A couple issues to mention for full disclosure: There is some sponsorship by Google, but

Re: [Haskell-cafe] MonadLib usage

2010-07-18 Thread Jake McArthur
On 07/18/2010 08:27 AM, Ivan Lazar Miljenovic wrote: When discussing a similar issue with Manuel Chakravarty, he convinced me that cunning newtype deriving is actually rather bad in practice and shouldn't be used as there's a lack of proofs or some such (I can't remember the arguments, but I

Re: [Haskell-cafe] trees and pointers

2010-07-15 Thread Jake McArthur
On 07/15/2010 02:30 AM, Stephen Tetley wrote: 2010/7/15 Jake McArthurjake.mcart...@gmail.com: On 07/14/2010 05:01 PM, Victor Gorokhov wrote: You can implement pure pointers on top of Data.Map with O(log n) time Or on top of Data.IntMap with O(1) time. ;) Unlikely... From the docs,

Re: [Haskell-cafe] trees and pointers

2010-07-15 Thread Jake McArthur
On 07/15/2010 05:33 PM, Victor Gorokhov wrote: Thanks for an example! Probably, one can think about using Arrays instead of Map or IntMap in order to achieve 'true' O(1) in pure. But I suppose that there are some trouble with array expanding. Or somebody would already make it. Pure arrays

Re: [Haskell-cafe] trees and pointers

2010-07-14 Thread Jake McArthur
On 07/14/2010 05:01 PM, Victor Gorokhov wrote: You can implement pure pointers on top of Data.Map with O(log n) time Or on top of Data.IntMap with O(1) time. ;) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] [C Binding] Turning the mutable to immutable?

2010-07-05 Thread Jake McArthur
On 07/05/2010 04:48 PM, Yves Parès wrote: 3) Is there another library on hackage that handles images in a functional way? (I mean not /all in IO/) Check out graphics-drawingcombinators. - Jake ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Construction of short vectors

2010-06-28 Thread Jake McArthur
On Sun, Jun 27, 2010 at 4:44 PM, Alexey Khudyakov alexey.sklad...@gmail.com wrote: Dependent types would be nice but there isn't anything usable out there. Newtype wrapper parametrized by type level number works fine so far. If you interested sources are available here:

Fwd: [Haskell-cafe] Rewriting a famous library and using the same name: pros and cons

2010-06-08 Thread Jake McArthur
Sorry, I hit Reply instead of Reply To All. -- Forwarded message -- From: Jake McArthur jake.mcart...@gmail.com Date: Tue, Jun 8, 2010 at 6:16 PM Subject: Re: [Haskell-cafe] Rewriting a famous library and using the same name: pros and cons To: Don Stewart d...@galois.com Making

Re: [Haskell-cafe] Proposal: Sum type branches as extended types (as Type!Constructor)

2010-06-03 Thread Jake McArthur
On 06/03/2010 10:14 AM, Gabriel Riba wrote: No need for runtime errors or exception control hd :: List!Cons a - a hd (Cons x _) = x This is already doable using GADTs: data Z data S n data List a n where Nil :: List a Z Cons :: a - List a n - List a (S n)

Re: [Haskell-cafe] [reactive] A pong and integrate

2010-05-23 Thread Jake McArthur
On 05/23/2010 02:17 PM, Peter Verswyvelen wrote: IMO: For AAA game programming? Definitely not. Why not? I suppose it may depend on your definition of AAA, since there doesn't seem to be any consensus on it. I have seen it mean various combinations of the following, but rarely, if ever, all

Re: [Haskell-cafe] Re: Hackage accounts and real names

2010-04-06 Thread Jake McArthur
On Tue, Apr 6, 2010 at 6:08 AM, Serguey Zefirov sergu...@gmail.com wrote: http://lambda-the-ultimate.org is one lovely community that has that restriction: http://lambda-the-ultimate.org/policies#Policies I quote the policy in full here: Many of us here post with our real, full names.

Re: [Haskell-cafe] Re: Hackage accounts and real names

2010-04-05 Thread Jake McArthur
On 04/05/2010 11:32 PM, Ivan Miljenovic wrote: 4) The people who support the policy don't see why anyone has a problem with it. I have seen no logical explanation of *why* anybody supports this policy. I've only seen vague hand-wavy statements like people who use real names are more

Re: [Haskell-cafe] Hackage accounts and real names

2010-04-04 Thread Jake McArthur
On 04/04/2010 06:35 PM, Ivan Miljenovic wrote: I would wonder _why_ anyone would refuse to do so. Are they that ashamed of their own software that they wouldn't want to be associated with it, or is there some legal reason that they don't want to be associated with it? This seems to be

Re: [Haskell-cafe] vector stream fusion, inlining and compilation time

2010-03-10 Thread Jake McArthur
Here's a transcript from a conversation I had with Conal on IRC. tl;dr: conal cross-module inlining is only possible because ghc stashes a definition in a .hi, iuuc. i'm suggesting that the stashed definition either (a) never include further inlinings, or (b) be augmented by such a definition.

Re: [Haskell-cafe] vector stream fusion, inlining and compilation time

2010-03-07 Thread Jake McArthur
I've run into an issue with inlining that I'm not sure how to work around. I am instantiating some pre-existing type classes with Vector-based types. There already exist generic functions in modules I do not control that use this type class, and they are not tagged with the INLINE pragma. I am

Re: [Haskell-cafe] Re: ANN: bindings-SDL 1.0.2, the domain specific language for FFI description

2009-11-20 Thread Jake McArthur
Maurí­cio CA wrote: I believe I forgot to write a section with that information, as well as others one would like to know from start. I wrote a new section trying to fix that in 'how to use it' topic. http://bitbucket.org/mauricio/bindings-dsl/wiki/HowToUseIt Very nice. I think that is clear

Re: [Haskell-cafe] ANN: bindings-SDL 1.0.2, the domain specific language for FFI description

2009-11-19 Thread Jake McArthur
I did not notice when this was released, but I saw it on Hackage yesterday and, with it, wrote some of the easiest bindings to a fairly complex C API I've written in a while. This package is excellent! Thank you for sharing it. My only complaint is that the macros get confused if you use a

Re: [Haskell-cafe] Re: ANN: bindings-SDL 1.0.2, the domain specific language for FFI description

2009-11-19 Thread Jake McArthur
Maurí­cio CA wrote: My only complaint is that the macros get confused if you use a Haskell type that has a single quote in it. Can you give me an example? It turns out that I read the documentation incorrectly, but here is what I was trying to do. I had two structs, one of which used

[Haskell-cafe] Calling all Haskellers in Huntsville, Alabama, or surrounding areas!

2009-11-10 Thread Jake McArthur
Shae Errisson, myself, Greg Bacon, and some other locals who I think might not have as big a presence online are starting a user's group in Huntsville, AL. Please join the Google group / mailing list [1] if you are interested! [1] http://groups.google.com/group/alabamahaskell - Jake McArthur

Re: [Haskell-cafe] What does :*: mean again?

2009-10-23 Thread Jake McArthur
Nothing by itself. It's just a definable constructor of some sort. - Jake ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] newtype deriving Alternative

2009-10-14 Thread Jake McArthur
Martijn van Steenbergen wrote: It doesn't work for this one: newtype Split a = Split { runSplit :: [Either a (Char, Split a) ]} But my handwritten instance remains identical. The instance has the form [], not the form [Either _ (Char, Split _)]. Since they don't match exactly, it won't

Re: [Haskell-cafe] GPipe example and screenshot

2009-10-08 Thread Jake McArthur
Tobias Bexelius wrote: I've put a simple GPipe example (including a screenshot) on the haskellwiki now, showing off an animated spinning box. Nice to see Data.Vec.LinAlg.Transform3D! That will be a big help. I'm having fun with GPipe. Thanks for the library! - Jake

Re: [Haskell-cafe] dsl and gui toolkit

2009-10-05 Thread Jake McArthur
If you could throw it on Hackage or a public repo you will get more exposure. :) - Jake ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Designing a DSL?

2009-10-02 Thread Jake McArthur
Günther Schmidt wrote: And that I find to be the really tricky part, how do I *design* a DSL? My favorite approach is something like as described in these: http://lukepalmer.wordpress.com/2008/07/18/semantic-design/ http://conal.net/papers/type-class-morphisms/ It takes a little bit of

Re: [Haskell-cafe] (no subject)

2009-08-22 Thread Jake McArthur
staafmeister wrote: Yes I know but there are a lot of problems requiring O(1) array updates so then you are stuck with IO again Or use ST. Or use IntMap (which is O(log n), but n is going to max out on the integer size for your architecture, so it's really just O(32) or O(64), which is

Re: [Haskell-cafe] Planning for a website

2009-08-18 Thread Jake McArthur
Colin Paul Adams wrote: One problem will be to get GHC ported to DragonFly BSD, but that can wait until I have a test version of the site working on Linux. I would love to see this. It's the biggest thing blocking me from trying Dragonfly more seriously. WASH attracts me, with it's

Re: [Haskell-cafe] Planning for a website

2009-08-18 Thread Jake McArthur
I forgot to also mention this somewhat recent announcement for a pedantically type safe HTML library: http://www.haskell.org/pipermail/haskell-cafe/2009-August/064907.html - Jake ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] containers and maps

2009-08-13 Thread Jake McArthur
John Lato wrote: This looks to be essentially the same as the 'map' function in ListLike, and suffers from the same problem. It won't have the performance characteristics of the native map functions. Using e.g. ByteStrings, you're recreating a ByteString by snoc'ing elements. Oh, I see now

Re: [Haskell-cafe] containers and maps

2009-08-12 Thread Jake McArthur
The monoids package offers something similar to this: mapReduce :: (Generator c, Reducer e m) = (Elem c - e) - c - m If we take (Elem c) to be (item), (e) to be (item'), (c) to be (full), and (m) to be (full'), it's basically the same thing, and offers the same advantages as the ones you

Re: [Haskell-cafe] containers and maps

2009-08-12 Thread Jake McArthur
Jake McArthur wrote: The monoids package offers something similar to this: mapReduce :: (Generator c, Reducer e m) = (Elem c - e) - c - m If we take (Elem c) to be (item), (e) to be (item'), (c) to be (full), and (m) to be (full'), it's basically the same thing, and offers the same

Re: [Haskell-cafe] unsafeDestructiveAssign?

2009-08-11 Thread Jake McArthur
Job Vranish wrote: What I am trying to do is hyper unusual and I really do need an unsafeHorribleThings to do it. Normally when I really, honestly think this, I'm wrong anyway. - Jake ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] A mistake in haskellwiki

2009-08-06 Thread Jake McArthur
Don Stewart wrote: leaveye.guo: Hi haskellers: There is a mistake in http://www.haskell.org/haskellwiki/State_Monad It post two functions like this : evalState :: State s a - s - a evalState act = fst $ runState act execState :: State s a - s - s execState act = snd $ runState act

Re: [Haskell-cafe] n00b question: defining datatype

2009-07-23 Thread Jake McArthur
Iain Barnett wrote: data Task = Task { title :: String, completed :: Bool, subtasks :: [Task] } This one looks the best to me. Remember, you can just use an empty list if the task has no subtasks. - Jake ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] n00b question: defining datatype

2009-07-23 Thread Jake McArthur
Actually, how about this? import Data.Tree newtype Task = Task (Tree (String, Bool)) Now you already have that tree structure you wanted. - Jake ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Why is there no Zippable class? Would this work?

2009-07-16 Thread Jake McArthur
I think there are some basic equivalents in the TypeCompose and category-extras packages, for the record, but a standalone version wouldn't hurt either! - Jake ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] RE: Haskell as a first language?

2009-07-14 Thread Jake McArthur
Michael Vanier wrote: Haskell is a wonderful language (my favorite language by far) but it is pretty difficult for a beginner. In fact, it is pretty difficult for anyone to learn in my experience, because it has so many advanced concepts that simply don't exist in other languages, and trying

Re: [Haskell-cafe] Which one is right?

2009-06-24 Thread Jake McArthur
Linker wrote: Hugs [0,0.1..1] [0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0] Prelude [0,0.1..1] [0.0,0.1,0.2,0.30004,0.4,0.5,0.6,0.7,0.7999,0.8999,0.] Just floating point errors. In this case, you may be able to get away with something

Re: [Haskell-cafe] Installing agda through cabal

2009-06-19 Thread Jake McArthur
Paulo J. Matos wrote: As you can see, I had just finished installing alex 2.3.1, so why does cabal still request alex =2.0.1 3? Probably you don't have alex in your PATH. - Jake ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Confusion on the third monad law when using lambda abstractions

2009-06-18 Thread Jake McArthur
Hans van Thiel wrote: The only place I've ever seen Kleisli composition, or its flip, used is in demonstrating the monad laws. Yet it is so elegant and, even having its own name, it must have some practical use. Do you, or anybody else, have some pointers? I only just started finding places to

Re: [Haskell-cafe] Confusion on the third monad law when using lambda abstractions

2009-06-18 Thread Jake McArthur
Jake McArthur wrote: Generally, you can transform anything of the form: baz x1 = a = b = ... = z x1 into: baz = a = b = ... = z I was just looking through the source for the recently announced Hyena library and decided to give a more concrete example from a real-world project

Re: [Haskell-cafe] Confusion on the third monad law when using lambda abstractions

2009-06-18 Thread Jake McArthur
Hans van Thiel wrote: Just to show I'm paying attention, there's an arrow missing, right? (.) ::(b - c) - (a - b) - (a - c) Correct. I noticed that after I sent it but I figured that it would be noticed. I also used () where I meant (=) at the bottom. They are

Re: [Haskell-cafe] Tree Semantics and efficiency

2009-06-17 Thread Jake McArthur
Rouan van Dalen wrote: It is important to store only a reference to the parent and not a copy of the entire parent for efficiency. Others have already recommended the rosezipper package, which gives you what you want, but I want to address one thing. foo = stuff bar = foo In most

Re: [Haskell-cafe] Confusion on the third monad law when using lambda abstractions

2009-06-17 Thread Jake McArthur
Jon Strait wrote: I'm reading the third (bind associativity) law for monads in this form: m = (\x - k x = h) = (m = k) = h Arguably, that law would be better stated as: (h = k) = m = h = (k = m) This wouldn't be so unintuitive. - Jake ___

Re: [Haskell-cafe] curious about sum

2009-06-13 Thread Jake McArthur
Keith Sheppard wrote: Is there any reason that sum isn't strict? I can't think of any case where that is a good thing. Prelude sum [0 .. 100] *** Exception: stack overflow As others have said, there are cases where non-strictness is what you want. And if you are using a type that is

Re: [Haskell-cafe] Non Empty List?

2009-06-04 Thread Jake McArthur
GüŸnther Schmidt wrote: data Container a = Single a | Many a [a] but the problem above is that the data structure would allow to construct a Many 5 [] :: Container Int. I think you meant to do either data Container a = Single a | Many a (Container a) or data Container a =

  1   2   3   >