Re: [Haskell-cafe] An APL library for Haskell

2013-09-15 Thread Daniel Peebles
Interesting idea. It seems like building this on top of REPA would save a lot of work, since it has a native notion of "rank" encoded in the type system. I'd then see the APL-like combinators as a "niche" API for REPA, rather than as a library of their own. And of course, you'd get parallelization

Re: [Haskell-cafe] Rank N Kinds

2013-08-01 Thread Daniel Peebles
The higher universe levels are mostly "used" to stave off logical paradoxes in languages where you care about that kind of stuff. In a fundamentally impredicative language like Haskell I don't see much point, but I'd be happy to find there is one :) On Thu, Aug 1, 2013 at 4:55 PM, Wvv wrote: >

Re: [Haskell-cafe] closed world instances, closed type families

2013-04-02 Thread Daniel Peebles
It seems very similar to Ryan Ingram's post a few years back (pre-TypeNats): http://www.haskell.org/pipermail/haskell-cafe/2009-June/062690.html The main difference is that he introduces the "knowledge" about zero vs. suc as a constraint, and you introduce it as a parameter. In fact, his induction

Re: [Haskell-cafe] FunPtr to C function with #arguments determined atruntime?

2013-02-18 Thread Daniel Peebles
Considering that the GHC FFI is already built on libffi (I'm reasonably sure) it seems unnecessary for the Hackage library to depend on an external version. Is it not already getting linked in? On Sun, Feb 17, 2013 at 6:53 PM, Ryan Newton wrote: > > The scenario is pretty simple. I generate C

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

2012-10-16 Thread Daniel Peebles
Although I agree that Functor should be a superclass of Monad, the two methods of the Monad typeclass _are_ sufficient to make any instance into a Functor in a mechanical/automatic way. The language may not know it, but return/bind is equivalent in power to fmap/return/join. Apart from bind being e

Re: [Haskell-cafe] Question about type inference of a GADT term

2012-09-21 Thread Daniel Peebles
Shouldn't you have IxZero :: Ix (CtxCons ty ctx) ty instead of IxZero :: Ix ctx ty On Fri, Sep 21, 2012 at 8:34 AM, Florian Lorenzen < florian.loren...@tu-berlin.de> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hello cafe, > > I have the following GADT definitions capturing th

Re: [Haskell-cafe] What extension do I need to write "type Job = Map k a"?

2012-06-13 Thread Daniel Peebles
That doesn't require existential quantification, but it'll need Rank-2 types if you ever do anything with Job. Unfortunately, a universally quantified Job like what you wrote (or what Magicloud seems to want) is only inhabited by the empty Map. An existentially quantified Job, as you might get wit

Re: [Haskell-cafe] webcam library on github

2012-05-25 Thread Daniel Peebles
On Fri, May 25, 2012 at 3:07 AM, . wrote: > The gpl is sort of my default license. I know it is a little > restrictive, so if that keeps people (if any) from contributing, I will > change the license. As far as I can see, I would be able to change it to > lgpl then, but not to bsd. > > I'm no law

Re: [Haskell-cafe] Unit and pair

2012-05-08 Thread Daniel Peebles
given Iso a c and Iso b dusing your class. I'm not sure I'd bundle the two parts together, but I'd call your pairmethod (or the class it lives in) something like congruent or ProductsRespectThisRelation :) Dan On Tue, May 8, 2012 at 3:15 PM, Daniel Peebles wrote: > FullBinar

Re: [Haskell-cafe] Unit and pair

2012-05-08 Thread Daniel Peebles
FullBinaryTreeRelation? :P On Tue, May 8, 2012 at 1:36 PM, MigMit wrote: > Hi café, a quick question. > > Is there a somewhat standard class like this: > > class Something c where >unit :: c () () >pair :: c x y -> c u v -> c (x, u) (y, v) > > ? > > I'm using it heavily in my current pro

Re: [Haskell-cafe] I am having trouble with the type declaration for creating an identity matrix.

2012-04-24 Thread Daniel Peebles
Your problem is that you're including the (i, j) in your array element type, when you really only want it to be in your index type (I assume). This would not normally be an issue, but an unboxed array doesn't work on an element type of ((Int, Int), Double). You might consider instead making a new

Re: [Haskell-cafe] is this an arrow?

2012-04-13 Thread Daniel Peebles
On Fri, Apr 13, 2012 at 7:49 AM, Johannes Waldmann < waldm...@imn.htwk-leipzig.de> wrote: > type Computer a b = ( a -> IO ( Maybe b ) ) > type Transformer a b c d = Computer a ( b, c -> d ) Computer looks like Kleisli (MaybeT IO), which would be a valid instance of Arrow. _

Re: [Haskell-cafe] Category Theory Questions

2012-04-08 Thread Daniel Peebles
I doubt anyone will mind too much, but you probably want to stick to the category theory that is obviously applicable to Haskell (and ideally talk/ask about how it applies). Questions about initial algebras and Lambek's lemma will probably get decent responses, whereas globe categories and anafunct

Re: [Haskell-cafe] Generalizing (++) for monoids instead of using (<>)

2012-04-01 Thread Daniel Peebles
There are many reasons, but some of the more cited ones are that (<>) will break less code than (++) would, since (++) is ubiquitous and (<>) is most used in some pretty printers. Yes, mappend's type can be refined to that of the current list (++), but the increased polymorphism still has the poten

Re: [Haskell-cafe] Mathematics and Statistics libraries

2012-03-21 Thread Daniel Peebles
I'd like to see more statistics work, definitely. Bryan's statistics library is excellent, but Ed Kmett has been talking about some very interesting approaches to sampling from complicated distributions, which I'd like to see implemented eventually in a library. On Wed, Mar 21, 2012 at 1:24 PM, Be

Re: [Haskell-cafe] Haskell compilers targeting VMs

2012-02-23 Thread Daniel Peebles
A more subtle issue is that there's some sort of memory leak that arises when you can't instruct the GC to follow projection functions of data types. I believe the GHC heap representation has a built-in notion of these forwarding closures and the GC follows them when possible, but most VM GCs are j

Re: [Haskell-cafe] On the purity of Haskell

2012-01-01 Thread Daniel Peebles
This thread pretty much exemplifies why many people don't bother with this mailing list anymore. On Sun, Jan 1, 2012 at 7:00 PM, AUGER Cédric wrote: > Le Sun, 1 Jan 2012 16:31:51 -0500, > Dan Doel a écrit : > > > On Sun, Jan 1, 2012 at 3:26 PM, Ketil Malde wrote: > > > Chris Smith writes: > >

Re: [Haskell-cafe] smt solver bindings

2011-12-15 Thread Daniel Peebles
Not that I know of, but I would like them too. There are a few bindings to yices, but I don't think yices has the feature I want in it. On Thu, Dec 15, 2011 at 1:04 PM, Dimitrios Vytiniotis < dimit...@microsoft.com> wrote: > > I've a quick question: > > Are there Haskell wrappers for the Z3 C API

Re: [Haskell-cafe] A Mascot

2011-11-16 Thread Daniel Peebles
I like it! On Wed, Nov 16, 2011 at 1:01 AM, heathmatlock wrote: > I liked Go's mascot, and I figure it couldn't hurt to have our own. I > spent the past hour making this: > http://i.imgur.com/Mib6Q.png > > What do you think? > > -- > Heath Matlock > +1 256 274 4225 > > ___

Re: [Haskell-cafe] Data.Vector.Unboxed

2011-11-10 Thread Daniel Peebles
Yes, it does. You can only use members of the Elt class in repa arrays, and Elt has Unbox as a superclass. On Thu, Nov 10, 2011 at 5:03 PM, Yves Parès wrote: > Does Repa always use unboxed Vectors? > But a Repa array can store any element, so how does it handles types which > haven't an unboxed

Re: [Haskell-cafe] arr considered harmful

2011-10-31 Thread Daniel Peebles
Have you seen Adam Megacz's work on generalized arrows? I think he proposes to kill arr and has done a decent amount of work on it. On Mon, Oct 31, 2011 at 8:33 PM, Ryan Ingram wrote: > I know it's a bit of an 'intentionally provocative' title, but with the > recent discussions on Arrows I thoug

Re: [Haskell-cafe] Smarter do notation

2011-09-04 Thread Daniel Peebles
int out idiom brackets (an analog for > do-notation for Applicative functors) which have been introduced in > some Haskell-related languages. Examples are Idris > (http://www.cs.st-andrews.ac.uk/~eb/Idris/donotation.html) and SHE > (http://personal.cis.strath.ac.uk/~conor/pub/she/idio

Re: [Haskell-cafe] Smarter do notation

2011-09-04 Thread Daniel Peebles
Good idea! I'd forgotten about monad comprehensions. On Sun, Sep 4, 2011 at 3:11 AM, Shachaf Ben-Kiki wrote: > On Sat, Sep 3, 2011 at 19:34, Daniel Peebles wrote: > ... > > Of course, the fact that the return method is explicitly mentioned in my > > example suggests that

Re: [Haskell-cafe] Smarter do notation

2011-09-03 Thread Daniel Peebles
n 4 September 2011 12:34, Daniel Peebles wrote: > > Hi all, > > For example, if I write in a do block: > > x <- action1 > > y <- action2 > > z <- action3 > > return (f x y z) > > that doesn't require any of the context-sensitivty that Monads give

[Haskell-cafe] Smarter do notation

2011-09-03 Thread Daniel Peebles
Hi all, I was wondering what people thought of a smarter do notation. Currently, there's an almost trivial desugaring of do notation into (>>=), (>>), and fail (grr!) which seem to naturally imply Monads (although oddly enough, return is never used in the desugaring). The simplicity of the desugar

Re: [Haskell-cafe] bitSize

2011-08-25 Thread Daniel Peebles
And as Daniel mentioned earlier, it's not at all obvious what we mean by "bits used" when it comes to negative numbers. GMP pretends that any negative number has infinite bits in the two's-complement representation. Should we count the highest _unset_ bit when the number is negative? Or to put it

Re: [Haskell-cafe] Is there a program to check if a matrix is totally unimodular?

2011-08-08 Thread Daniel Peebles
I haven't come across unimodular matrices before, but according to the definition on wikipedia it seems fairly straightforward to implement a naive algorithm to decide it. Also, have you considered trying IRC for these sorts of short questions? The #haskell IRC channel on freenode is helpful and s

Re: [Haskell-cafe] Category theory as a design tool

2011-06-21 Thread Daniel Peebles
Hey, I think you forgo On Wed, Jun 22, 2011 at 12:20 AM, Arnaud Bailly wrote: > Hello, > I ha > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > ___

Re: [Haskell-cafe] Data.Map: Values to keys and keys to values

2011-06-16 Thread Daniel Peebles
Why not make it unlossy and have: trans :: (Ord k, Ord a) => Map k a -> Map a (Set k) On Thu, Jun 16, 2011 at 9:10 AM, Johan Tibell wrote: > On Thu, Jun 16, 2011 at 3:01 PM, Dmitri O.Kondratiev > wrote: > > Hi, > > Data.Map has many great functions, yet I could not find the one that > allows

Re: [Haskell-cafe] How to install GhC on a Mac without registering?

2011-06-06 Thread Daniel Peebles
Isn't gcc just used for its assembler and object file creation, these days, now that via-C is deprecated? Or are there other parts of it that are needed? On Mon, Jun 6, 2011 at 10:47 AM, Malcolm Wallace wrote: > > On 6 Jun 2011, at 13:49, Lyndon Maydwell wrote: > > > I would be fantastic if XCode

Re: [Haskell-cafe] How to install GhC on a Mac without registering?

2011-06-03 Thread Daniel Peebles
I thought Apple had stopped bundling the dev tools with installation DVDs? On Fri, Jun 3, 2011 at 4:32 PM, Judah Jacobson wrote: > Hi John, > > You should be able to install the Apple Developer Tools directly from > one of the software installation DVDs that come with the Mac. If > you're not do

Re: [Haskell-cafe] Extension for "Pearls of Functional Algorithm Design" by Richard Bird, 2010, page 25 #Haskell

2011-05-20 Thread Daniel Peebles
Do you have some sort of link aggregator that auto-posts to haskell-cafe? On Sat, May 21, 2011 at 12:09 AM, KC wrote: > Extension for "Pearls of Functional Algorithm Design" by Richard Bird, > 2010, page 25 #Haskell > > > --

Re: [Haskell-cafe] The Lisp Curse

2011-05-19 Thread Daniel Peebles
The way I understand it, you're saying not that we shouldn't be doing it this way (since it isn't centrally managed, it's the only possible way), but that we shouldn't be "bragging" (for lack of a better word) that we have lots of libraries that do a specific thing. Or if not that, then at least th

Re: [Haskell-cafe] Uncatchable error

2011-03-11 Thread Daniel Peebles
It's a hack by design, to work around libraries that do the wrong thing. On Fri, Mar 11, 2011 at 4:07 PM, Henning Thielemann < lemm...@henning-thielemann.de> wrote: > > On Fri, 11 Mar 2011, Daniel Peebles wrote: > > Check out the spoon package on hackage. It's

Re: [Haskell-cafe] Uncatchable error

2011-03-11 Thread Daniel Peebles
Check out the spoon package on hackage. It's designed for these kinds of situations, and will wrap up common user-generated "pure" exceptions into a Maybe (and will return Nothing in the cases you describe) -Dan On Fri, Mar 11, 2011 at 11:04 AM, Daniel Díaz wrote: > Hi, cafe, > > I'm working in

Re: [Haskell-cafe] ANN: hmpfr-0.3.2 (requires integer-simple, supports mpfr 3.0.0)

2011-03-04 Thread Daniel Peebles
3:09 PM, Daniel Peebles wrote: > Have you submitted a bug report to GHC of why it can't work with the > current integer-gmp binding? I know that GHC's collector is collecting > MPFR's temporary data, but maybe it'd be good to get a discussion going on > what can be

Re: [Haskell-cafe] ANN: hmpfr-0.3.2 (requires integer-simple, supports mpfr 3.0.0)

2011-03-04 Thread Daniel Peebles
Have you submitted a bug report to GHC of why it can't work with the current integer-gmp binding? I know that GHC's collector is collecting MPFR's temporary data, but maybe it'd be good to get a discussion going on what can be done to stop it from doing this even in the context of the existing inte

Re: [Haskell-cafe] ANN: theoremquest-0.0.0

2011-02-28 Thread Daniel Peebles
Have you tried it? It's completely addictive (and takes up a big chunk of my free time). I'm not sure it'll appeal to everyone, but I wouldn't dismiss it off-hand like that. On Mon, Feb 28, 2011 at 10:16 AM, Colin Adams wrote: > On 28 February 2011 14:59, Tom Hawkins wrote: > >> I have been wan

Re: [Haskell-cafe] AES on 32-bit system

2011-02-03 Thread Daniel Peebles
Knowing nothing about the package or its code, it looks like a typo to me. The stdint.h naming of types would have it be uint64_t, not uint_64t. Could that be it? On Fri, Feb 4, 2011 at 6:00 AM, Michael Snoyman wrote: > Hi everyone, > > Does anyone else have trouble installing the AES package on

Re: [Haskell-cafe] ($) not as transparent as it seems

2011-02-03 Thread Daniel Peebles
This is indeed very strange. On my latest GHC 7 (built a couple of days ago) it does the right thing when compiled, but in GHCi it behaves as you describe. I have no idea, frankly. On Thu, Feb 3, 2011 at 8:44 PM, Steffen Schuldenzucker < sschuldenzuc...@uni-bonn.de> wrote: > > Dear cafe, > > does

Re: [Haskell-cafe] Merry monad mixup?

2011-01-28 Thread Daniel Peebles
And by "works", I mean, ListT is is a monad only if the internal monad is commutative. On Fri, Jan 28, 2011 at 2:46 PM, Daniel Peebles wrote: > Beware of ListT. It only works if your internal monad is commutative, which > IO is not. (Maybe would work, for example) > > >

Re: [Haskell-cafe] Merry monad mixup?

2011-01-28 Thread Daniel Peebles
Beware of ListT. It only works if your internal monad is commutative, which IO is not. (Maybe would work, for example) On Fri, Jan 28, 2011 at 2:41 PM, Chris Smith wrote: > On Fri, 2011-01-28 at 11:20 -0800, michael rice wrote: > > The first and third work, but not the second. Why? > > When you

Re: [Haskell-cafe] global, modifiable variable for debugging

2010-12-26 Thread Daniel Peebles
Seems like you'd want x <- getArgs and x == ["debug"] rather than the irrefutable pattern match. On Sun, Dec 26, 2010 at 3:04 PM, Michael Snoyman wrote: > I think something like this would work: > > myFlag = unsafePerformIO $ do >[x] <- getArgs >return $ x == "debug" > > In general, unsaf

Re: [Haskell-cafe] (Co/Contra)Functor and Comonad

2010-12-24 Thread Daniel Peebles
I remember seeing this very discussion about pointed being disjoint from functor just recently on one of the various haskell mailing lists. But as for my opinion on it, because there's no real way of specifying any laws for pointed without functor. With functor and pointed, you can say that you exp

Re: [Haskell-cafe] (Co/Contra)Functor and Comonad

2010-12-23 Thread Daniel Peebles
For me, mostly naming. Cofunctor isn't the right name for it, and comap, while short, feels wrong. Contrafunctor feels better but is also cumbersome. No problems with Comonad, though. On Thu, Dec 23, 2010 at 9:16 PM, Mario Blažević wrote: > > On Thu, Dec 23, 2010 at 5:25 PM, Stephen Tetley > wr

Re: [Haskell-cafe] Proof in Haskell

2010-12-23 Thread Daniel Peebles
efully. On Thu, Dec 23, 2010 at 12:30 PM, Ryan Ingram wrote: > On Thu, Dec 23, 2010 at 8:19 AM, Daniel Peebles > wrote: > > Simulating bottoms wouldn't be too hard, but I don't think the statement > is > > even true in the presence of bottoms, is it? > > Isn&#

Re: [Haskell-cafe] Proof in Haskell

2010-12-23 Thread Daniel Peebles
I think it's pretty legit. You aren't actually making a claim about the values in the tree but I think parametricity handles that for you, especially since you have existential types for the payload at every tree level (so you can't go shuffling those around). The only thing missing (and that you

Re: [Haskell-cafe] Why is Haskell flagging this?

2010-12-18 Thread Daniel Peebles
Write out more types and it'll get more clear. f is [Int] -> IO [Int] lst is f applied to Num a => [a], so it is of type IO [Int] fmap is applied to lst, which means it's "stepping inside" the IO. That means it's applying +1 to [1,2,3,4,5], which doesn't make much sense unless you have a Num ins

Re: [Haskell-cafe] handling multiple versions of a data structure

2010-12-16 Thread Daniel Peebles
Have you considered moving these packages that are unrelated to web development into a separate namespace? I know that I never considered looking under the happstack namespace simply because I never do webapps. On Thu, Dec 16, 2010 at 5:09 PM, Jeremy Shaw wrote: > Hello, > > You should use happs

Re: [Haskell-cafe] handling multiple versions of a data structure

2010-12-16 Thread Daniel Peebles
I haven't tested this idea, but it occurred to me that this might be a good place for data families: data Z = Z newtype S n = S n -- Some nastiness to avoid having to see into the future? type family Pred n :: * type instance Pred (S n) = n type instance Pred Z = Z class MyDataClass ver where

Re: [Haskell-cafe] the beginning of the end

2010-12-05 Thread Daniel Peebles
Oh yeah, the 2.0 stuff that snobby techies love to hate :) hrrmpf back in my day we programmed in binary using a magnetized needle on the exposed tape! I don't need any of this newfangled bull. I kid! But I am curious to see why people are so opposed to this stuff? The attitude "I can't see an

Re: [Haskell-cafe] Musings on type systems

2010-11-19 Thread Daniel Peebles
There's a lot of interesting material on this stuff if you start poking around :) http://www.cs.kent.ac.uk/people/staff/sjt/TTFP/ might be a good introduction. I'd consider typeclasses to be "sets" of types, as you said, but more generally, a relation of types. In that view, an MPTC is just an n-a

Re: [Haskell-cafe] About "Fun with type functions" example

2010-11-19 Thread Daniel Peebles
ишет: > >> > >> Just after hitting the button send, it appeared to me that fromInt was > >> not obvious at all, and probably impossible. > >> Not sure I understand your answer though: What would be the second > >> parameter (forall n . (Nat n) => n

Re: [Haskell-cafe] About "Fun with type functions" example

2010-11-18 Thread Daniel Peebles
The best you can do with fromInt is something like Int -> (forall n. (Nat n) => n -> r) -> r, since the type isn't known at compile time. On Thu, Nov 18, 2010 at 2:52 PM, Arnaud Bailly wrote: > Thanks a lot, that works perfectly fine! > Did not know this one... > BTW, I would be interested in the

Re: [Haskell-cafe] Re: typeclass namespace rational?

2010-11-15 Thread Daniel Peebles
If I were to guess, I'd say it's because there are two major "spaces" in Haskell, the type level and the value level. They never interact directly (their terms are never juxtaposed) so there's not much chance for confusion. "Typeclass constructors" and type constructors do however live in the same

Re: [Haskell-cafe] Curious data family bug

2010-11-15 Thread Daniel Peebles
Hmm, strange. I have a project that uses data families with dozens of constructors per "clause"/instantiation of the type function. I use GADT syntax to define them though as they also refine one of the parameter type variables. Never had any issues with it, although I haven't tried building that p

Re: [Haskell-cafe] Benchmark

2010-11-03 Thread Daniel Peebles
Looks like http://www.haskell.org/cabal/FAQ.html has a description of your problem! 2010/11/3 André Batista Martins > Hi Johan, > i already try use Criterion but i couldn't install with cabal :S i get > error: > > > cabal install criterion > Resolving dependencies... > cabal: dependencies confl

Re: [Haskell-cafe] Re: Monads and Functions sequence and sequence_

2010-10-29 Thread Daniel Peebles
That is a result of the implementation of the specific Monad instance, and that does depend on the type, as you say (but it isn't determined for sequence(_) specifically). Nothing >>= f = Nothing Just x >>= f = f x is why a Nothing "pollutes" the sequenced lists of Maybes. If Maybe is a Monad rep

Re: [Haskell-cafe] Re: Current thinking on CompositionAsDot issue in haskell prime?

2010-10-29 Thread Daniel Peebles
Speaking of MagicHash, is it really necessary to take an operator with "potential" like (#) just to keep primitive symbols separate from the rest? At least from my 2010 Haskell learner perspective, it seems odd to create a whole language extension/lexical change just for that purpose. On Thu, Oct

Re: [Haskell-cafe] who's in charge?

2010-10-28 Thread Daniel Peebles
> > There is this one posters who likes to repeatedly point out how none of his > programs ever needed email, so how could it be a problem then. Well good for > him, but in my experience it's needed. This is the main issue I think people had with your original posts. You say "good for him, but I

Re: [Haskell-cafe] Need programming advice for Network Protocol Parsing

2010-10-27 Thread Daniel Peebles
I'm occasionally working on making a friendly yet performant library that simultaneously builds parsers and generators, but it's non-trivial. If you want to see the general idea, there's a Functional Pearl on pickler combinators from a few years back that you can probably play with. But for a real

Re: [Haskell-cafe] vector-space and standard API for vectors

2010-10-23 Thread Daniel Peebles
Just out of curiosity, why do you (and many others I've seen with similar proposals) talk about additive monoids? are they somehow fundamentally different from multiplicative monoids? Or is it just a matter of notation? When I was playing with building an algebraic hierarchy, I picked a "neutral" o

[Haskell-cafe] Haskellers.com skills list moderation?

2010-10-18 Thread Daniel Peebles
Hi all, Might it be worthwhile to take the elected "superusers" on haskellers.comand let them police the skills list? It's become rather messy, with overly broad terms like "Mathematics" in it, as well as overly specific ones like "Other languages I know: C# .NET, XSLT, Microsoft SQL Server, XML,

Re: [Haskell-cafe] Finite but not fixed length...

2010-10-13 Thread Daniel Peebles
One option could be something like: data Z data S n data Vec n a where Nil :: Vec Z a Cons :: a -> Vec n a -> Vec (S n) a data Length n where One :: Length (S Z) Two :: Length (S (S Z)) Seventeen :: Length (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S Z) data Fixe

Re: [Haskell-cafe] Haskell Helper

2010-10-03 Thread Daniel Peebles
Is the language secret? because I'm sure lots of people would like to help on this mailing list, but you'd need to tell us what help you need first :) On Sun, Oct 3, 2010 at 8:38 PM, Eduardo Ribeiro wrote: > Hello, > I 'm developing a new language in haskell and I need someone to help me. > Anyon

Re: [Haskell-cafe] Haskell list on Twitter?

2010-10-01 Thread Daniel Peebles
h I had a "list difference" feature in twitter to figure out who's on his list and isn't on mine (and maybe vice versa). On Fri, Oct 1, 2010 at 5:04 PM, Magnus Therning wrote: > On Fri, Oct 1, 2010 at 14:14, Daniel Peebles wrote: > > Several haskellers have lists of haskell

Re: [Haskell-cafe] Haskell list on Twitter?

2010-10-01 Thread Daniel Peebles
Also, it is possible to add yourself to your own twitter list :) On Fri, Oct 1, 2010 at 12:03 PM, Magnus Therning wrote: > Now that there are lists/groups on Twitter > (http://mashable.com/2009/11/02/twitter-lists-guide/) maybe one should > be created one for Haskellers? > > I would do it, but it

Re: [Haskell-cafe] Haskell list on Twitter?

2010-10-01 Thread Daniel Peebles
Several haskellers have lists of haskellers, and most of them include Don, I'd expect. I know my list does: http://twitter.com/#!/copumpkin/haskell Otherwise, there's a list of haskellers on the haskell wiki but I'm not usure it's very up to date: http://www.haskell.org/haskellwiki/Twitter On F

Re: [Haskell-cafe] Ultra-newbie Question

2010-09-20 Thread Daniel Peebles
Have we put off the ultra-newbie by derailing his simple question into a discussion on subtle issues he shouldn't care about this early on? On Mon, Sep 20, 2010 at 3:49 PM, Daniel Fischer wrote: > On Monday 20 September 2010 15:20:53, James Andrew Cook wrote: > > On Sep 20, 2010, at 5:10 AM, Jean

Re: [Haskell-cafe] Web development work

2010-09-16 Thread Daniel Peebles
Sounds awesome! Why not grab .org too? or was that taken? On Thu, Sep 16, 2010 at 2:35 PM, Michael Snoyman wrote: > On Thu, Sep 16, 2010 at 10:26 AM, Andrew Coppin > wrote: > > On 16/09/2010 08:52 AM, Michael Snoyman wrote: > >> > >> future it would be beneficial to the community to have this >

Re: [Haskell-cafe] Idea for hackage feature

2010-09-16 Thread Daniel Peebles
ne of this year's GSOC for example). I was just trying to show what this would get us one step closer to :P On Thu, Sep 16, 2010 at 11:47 AM, Ivan Lazar Miljenovic < ivan.miljeno...@gmail.com> wrote: > On 16 September 2010 17:00, Daniel Peebles wrote: > > But maybe one day

Re: [Haskell-cafe] Idea for hackage feature

2010-09-16 Thread Daniel Peebles
As we were discussing in #haskell, it would have to be more involved than just a taint bit. A listing showing the "taint sources" of a given package would give you confidence in its good behavior. For example, if my nice, pure package's taint list showed that my only taint sources were through my

Re: [Haskell-cafe] circular imports

2010-09-06 Thread Daniel Peebles
I was under the impression that the main reason GHC requires .hs-boot files is that nobody has had the time or inclination to make it resolve circular dependencies automatically, and not an intentional design decision to encourage "good design". On Tue, Sep 7, 2010 at 6:51 AM, Mathew de Detrich w

Re: [Haskell-cafe] Re: Crypto-API is stabilizing

2010-09-02 Thread Daniel Peebles
Is there a reason this belongs under the Data. prefix? Why not break it out into Crypto, so future implementers of algorithms can also put their stuff under there. Everything at some level can be seen as Data, and it would be nice to start moving out of the overcrowded module hierarchy. On Fri, S

Re: [Haskell-cafe] creating a type based on a string

2010-09-02 Thread Daniel Peebles
What you're asking for is essentially a dependent type (something where a type depends on a value). Haskell doesn't support these, but can approximate them with GADTs: {-# LANGUAGE GADTs, EmptyDataDecls, KindSignatures, Rank2Types #-} data A data B -- The data constructors refine the type index

Re: [Haskell-cafe] Higher-order algorithms

2010-08-24 Thread Daniel Peebles
Interesting. I've come across this general idea/algorithm the factor graph / sum-product algorithm papers[1] but I was wondering if you knew of any implementations of it in haskell? I wrote one a while back but it was fairly ugly and not as general as I'd have liked, so I never released it. Thanks

Re: [Haskell-cafe] GADT and problems with rigid type variables

2010-08-22 Thread Daniel Peebles
The problem is that you have an existential `t` there, and two values of the type Foo might not have the same `t` inside them. What do you want to happen if someone writes Foo True == Foo "yep"? The only real solution here is to parametrize your Foo type by the t that lives within it, so you can

Re: [Haskell-cafe] Re: String vs ByteString

2010-08-17 Thread Daniel Peebles
Sounds to me like we need a lazy Data.Text variation that allows UTF-8 and UTF-16 "segments" in it list of strict text elements :) Then big chunks of western text will be encoded efficiently, and same with CJK! Not sure what to do about strict Data.Text though :) On Tue, Aug 17, 2010 at 1:40 PM, K

Re: [Haskell-cafe] Question about memory usage

2010-08-16 Thread Daniel Peebles
There's a Fibonacci Heap: http://en.wikipedia.org/wiki/Fibonacci_heap Not sure what else though :) On Mon, Aug 16, 2010 at 11:14 PM, Antoine Latter wrote: > On Mon, Aug 16, 2010 at 1:37 PM, Andrew Coppin > wrote: > > > > This neatly leads us back to my second assertion: In all my years of > >

Re: [Haskell-cafe] Question about memory usage

2010-08-14 Thread Daniel Peebles
> > In the example above, fiblist is a global variable, so the answer to "when > does it get freed?" would be "never". (I believe it's called a CAF leak.) > Is that actually true? I've heard lots of references to this, but I'm not sure it is true. Sure, it's harder for it to get collected when eve

Re: [Haskell-cafe] universal quantification is to type instantiations as existential quantification is to what

2010-08-12 Thread Daniel Peebles
The existential is a pair where one component is a type, and the type of the second component depends on the value (i.e., which type went in the first component) of the first. It's often called a sigma type when you have full dependent types. So your exists a. (Int -> a) -> [Int] -> [a] type might

Re: [Haskell-cafe] iPhone/Android and Haskell [Was: Embedded funcional programming?]

2010-08-07 Thread Daniel Peebles
The Hummingbird is still ARM. ARM doesn't actually build any chips themselves, and just license the architecture design out to people who do make them. Most of the iPhone ARM chips are built by Samsung too. Almost all the mobile devices I know of run ARM, so I think having a native ARM generator w

Re: [Haskell-cafe] ANNOUNCE: DSTM 0.1.1

2010-08-06 Thread Daniel Peebles
Another interesting direction would be to use Matt Morrow's vaccum infrastructure to make a neat, almost completely general, serialization mechanism. It's not safe, and can traverse any value that doesn't contain functions or unevaluated thunks, but would be very helpful for sending values like `c

Re: [Haskell-cafe] Preview the new haddock look and take a short survey

2010-08-04 Thread Daniel Peebles
Great! I like it a lot, but a couple of minor suggestions regarding the "tree" view of modules. I think it would be more attractive (and space-efficient) to have them indent a little less and to provide some sort of visual link, in the form of even subtle branches, from parents to children. A bit l

Re: [Haskell-cafe] Why do "unsafe" foreign calls block other threads?

2010-08-03 Thread Daniel Peebles
It's a matter of perspective. Either the function you're FFI'ing to is safe/unsafe or your use of it is safe/unsafe. The FFI spec seems to be using the former, so if you think that the function you're calling is unsafe (i.e., can call back into Haskell) then it blocks the world. But I do think it'

Re: [Haskell] Re: [Haskell-cafe] Work on Video Games in Haskell

2010-05-26 Thread Daniel Peebles
Next up, binary obfuscation! Apple already uses these extensively in their Fairplay code. Surely it isn't against the rules (yet?) to apply them to your program before submitting it to the store? :P On Wed, May 26, 2010 at 11:01 PM, Ben Lippmeier wrote: > > On 27/05/2010, at 9:01 AM, Edward Kmet

Re: [Haskell] Re: [Haskell-cafe] Work on Video Games in Haskell

2010-05-26 Thread Daniel Peebles
Of course, given that they have no way of determining that short of asking for the source code (and hiring another thousand reviewers to read it) or applying static analysis tools with heuristics to the programs. I really doubt they do the latter, and the former is unrealistic. Most people seem to

Re: [Haskell-cafe] Re: currying combinators

2010-05-25 Thread Daniel Peebles
Djinn can't figure it out, and neither can I :P 2010/5/25 Günther Schmidt > Hi Yitz, > > embarrassingly I was unable to deduce the implementation from the type > signature, don't be tease man, show me what you got :) > > Günther > > Am 25.05.10 18:27, schrieb Yitzchak Gale: > > Günther Schmidt

Re: [Haskell-cafe] making the GHC Api not write to stderr

2010-05-21 Thread Daniel Peebles
Have you tried freopen on stderr? On Fri, May 21, 2010 at 8:43 AM, Phyx wrote: > Hi, > I tried that, setting it to (\_ _ _ _ -> return ()) and it still did the > same, also tried setting it to undefined to see whether the code that's > printing the error is using it, and it didn't crash > So I a

Re: [Haskell-cafe] Strict type system allows for a maximum number of programming errors to be caught at compile time.

2010-05-03 Thread Daniel Peebles
prefac is just a normal factorial function with recursion factored out. fix prefac 5 gives 120, for example. On Tue, May 4, 2010 at 12:13 AM, Ivan Miljenovic wrote: > On 4 May 2010 13:30, Luke Palmer wrote: > > Here is a contrived example of what I am referring to: > > > > prefac f 0 = 1 > > pre

Re: [Haskell-cafe] Getting used and available memory

2010-04-27 Thread Daniel Peebles
It's not an easy measurement to even define. There was a huge debacle recently about a windows program that reported misleading numbers about used memory. The fact that GHC has its own allocator and "hogs" OS memory (it never returns it to the OS) might complicate the definition further. But in gen

Re: [Haskell-cafe] Number of CPUs/cores?

2010-04-27 Thread Daniel Peebles
I believe numCapabilities (should be in IO, in my opinion, but that's another discussion) will tell you the number of capabilities (native threads) that have been given to the RTS. The measurement doesn't necessarily have any connection to the number of physical cores or processors in your machine.

Re: [Haskell-cafe] Re: Haskell.org re-design

2010-04-06 Thread Daniel Peebles
I'm definitely not a design/color person, but has anyone considered using kuler.adobe.com as a source of "nice" color schemes, since we seem to have an issue coming up with attractive combinations? On Tue, Apr 6, 2010 at 9:58 AM, Thomas Schilling wrote: > Well, they make the wannabe-designer mist

Re: [Haskell-cafe] Lists of Existential DT

2010-02-28 Thread Daniel Peebles
You can actually write that type with impredicative polymorphism, but it doesn't do what you seem to want: it makes a list of polymorphic values (i.e., universally quantified ones, not existentially). But that's going away soon, anyway... On Sun, Feb 28, 2010 at 1:49 PM, Yves Parès wrote: > > >

Re: [Haskell-cafe] What are "free" Monads?

2010-02-27 Thread Daniel Peebles
Given any functor you can get a monad for free! data Free f a = Either a (f (Free f a)) Not sure about unfree, but there are cofree comonads that are pretty closely related, and give you a comonad given a functor: data Cofree f a = (a, f (Cofree f a)) I'm sure the more categorically minded can

Re: [Haskell-cafe] "datakind" declaration

2010-02-22 Thread Daniel Peebles
It's not quite what you're asking for, but a very similar idea is the SHE preprocessor: http://personal.cis.strath.ac.uk/~conor/pub/she/ Dan On Mon, Feb 22, 2010 at 8:08 PM, Paul Brauner wrote: > Hello, > > I remember seeing something like > > > typedata T = A | B > > somewhere, where A and B a

Re: [Haskell-cafe] Linear programming in Haskell

2010-02-17 Thread Daniel Peebles
Interesting. Do you have any details on this? It seems like it would be hard to express system of linear inequalities as a finite system of linear equations. Thanks, Dan 2010/2/17 Matthias Görgens > > As far as I can see, you'd use that for systems of linear equalities, but > > for systems of l

Re: [Haskell-cafe] Linear programming in Haskell

2010-02-16 Thread Daniel Peebles
As far as I can see, you'd use that for systems of linear *equalities*, but for systems of linear *inequalities* with a linear objective function, it's not suitable. I may be wrong though :) On Tue, Feb 16, 2010 at 3:37 PM, Felipe Lessa wrote: > On Tue, Feb 16, 2010 at 03:12:53PM

Re: [Haskell-cafe] Linear programming in Haskell

2010-02-16 Thread Daniel Peebles
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 optimization)! Thanks, Dan On Tue, Feb 16, 2010 at 2:54 PM, Felipe Lessa wro

Re: [Haskell-cafe] Stack ADT?

2010-02-04 Thread Daniel Peebles
> > data Stack a = EmptyStk | Stk a (Stack a) I find it amusing that the book defined a type that is exactly isomorphic to the standard list (EmptyStk === [] and Stk === (:)). I guess it's just for clarity? On Thu, Feb 4, 2010 at 12:29 PM, Casey Hawthorne wrote: > On Thu, 4 Feb 2010 09:07:28

  1   2   >