Re: [Haskell-cafe] Haskell Logo Macbook Decal

2013-10-02 Thread Tikhon Jelvis
I've heard good things about teespring. I gather it's like a kickstarter but specifically for t-shirts. They seem to have some procedures[1] in place specifically for non-profit organizations, which might be a good option for supporting haskell.org. [1]: http://teespring.com/solutions

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

2013-09-27 Thread Tikhon Jelvis
Could threepenny work with webGL, or is that too far out of the scope of the project? I guess the overhead of having a server--even locally--and using a web browser might just be too much for many use cases. On Sep 27, 2013 1:51 AM, Heinrich Apfelmus apfel...@quantentunnel.de wrote: Conal

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-14 Thread Tikhon Jelvis
My problem with cucumber is not the idea of a high-level DSL for tests. Au contraire--I think this is a perfect place for a little language. I could easily see a similar tool being useful for Haskell. Rather, my issue is with the syntax. Not gherkin in particular but rather languages that try to

Re: [Haskell-cafe] continuations and monads

2013-08-17 Thread Tikhon Jelvis
Yes they are. Purely intuitively, you can see how writing code in a monadic style (using = a lot) is very similar to writing in continuation-passing style. You can express this the most directly with the continuation monad. Then, from this monad, you can express other monads. In some sense, the

Re: [Haskell-cafe] Alternative name for return

2013-08-15 Thread Tikhon Jelvis
If we're adding applicative brackets, it would be nice to have something like ⦇⦈ as options via UnicodeSyntax. When playing around with She, I found it much easier to read than the ASCII version, especially when I needed to combine them: (|(|a + b|) + (|c * d|)|) ⦇⦇a + b⦈ + ⦇c * d⦈⦈

Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework

2013-08-06 Thread Tikhon Jelvis
Could you add some documentation on how to use this with cabal? I've found integrating tests with cabal unintuitive and poorly documented--to the point where I haven't really bothered! I've gotten it working before, but I would have to look it up again in the future. (I also didn't use a

Re: [Haskell-cafe] Sneaky method for var-arg fns?

2013-07-26 Thread Tikhon Jelvis
Take a look at Text.Printf which takes this idea even further with its printf function, which can accept an arbitrary number of arguments. This is achieved by basically using your approach but with a recursive instance. On Jul 26, 2013 10:10 PM, Micah Cowan mi...@cowan.name wrote: So, just for

Re: [Haskell-cafe] newbie question about Functional dependencies conflict between instance declarations:.....

2013-07-05 Thread Tikhon Jelvis
You're running into the open worldassumption--anybody could come along and make Integer part of your NotAnInteger class, and there's nothing you can do to stop them. This is a design tradeoff for typeclasses: typeclass instances are always global and are exported to all other modules you use. This

Re: [Haskell-cafe] question about indentation conventions

2013-07-01 Thread Tikhon Jelvis
My current approach is not to have one rule for every case but rather to indent however seems best for the particular code. For example, for Parsec's |, I try to make the code look like a BNF grammar rather than adhering to normal indentation conventions. Perhaps as a carry-over from my C-style

Re: [Haskell-cafe] question about indentation conventions

2013-07-01 Thread Tikhon Jelvis
allber...@gmail.comwrote: On Mon, Jul 1, 2013 at 9:56 AM, Tikhon Jelvis tik...@jelv.is wrote: I've thought about writing an automatic indenting tool for Haskell (or, more accurately, a pretty-printer) for another project I have, and this is the main thing that threw me off. While automatic

Re: [Haskell-cafe] ghci ghc - JS (Emscripten)

2013-06-28 Thread Tikhon Jelvis
My understanding is that Try Haskell actually runs the submitted code on a server with mueval rather than compiling it to JavaScript and running it in the client. This is different from some of the other try websites (like try.ocamlpro.com), so it's easy to get confused. On Fri, Jun 28, 2013 at

Re: [Haskell-cafe] hand over maintenance of a package

2013-06-19 Thread Tikhon Jelvis
As far as I know, Hackage does not enforce control of a given package at all. You can just have the new maintainer upload a new version of the package, changing the maintainer field of the .cabal file. On Jun 19, 2013 7:10 AM, Corentin Dupont corentin.dup...@gmail.com wrote: Hi Cafe, How to

Re: [Haskell-cafe] Efficiency/Evaluation Question

2013-06-15 Thread Tikhon Jelvis
There's a very good StackOverflow question which covers this: When is memoization automatic in GHC?[1]. I found it really cleared up the issue for me. [1]: http://stackoverflow.com/questions/3951012/when-is-memoization-automatic-in-ghc-haskell On Sat, Jun 15, 2013 at 9:13 PM, Clark Gaebel

Re: [Haskell-cafe] Simplest way to learn FRP through use

2013-06-01 Thread Tikhon Jelvis
Right. It's at https://github.com/TikhonJelvis/Reactive-Life. On May 31, 2013 11:46 PM, Christopher Howard christopher.how...@frigidcode.com wrote: On 05/31/2013 07:47 PM, Tikhon Jelvis wrote: My favorite mini app is John Conway's game of life. I implemented a version with reactive banana

Re: [Haskell-cafe] Simplest way to learn FRP through use

2013-05-31 Thread Tikhon Jelvis
My favorite mini app is John Conway's game of life. I implemented a version with reactive banana and found it perfect for learning the ideas. I have a simple version of the code up on GitHub if you ever want a nice example to read. I tried to make the code neat rather than worrying about

Re: [Haskell-cafe] mapFst and mapSnd

2013-05-28 Thread Tikhon Jelvis
These are present in Control.Arrow as (***), first and second respectively. They are easy to overlook because they work for *all* arrows, not just functions. So the type signatures look like: first :: Arrow a = a b c - a (b, d) (c, d) If you replace a with (-), you'll see that this is

Re: [Haskell-cafe] List comprehensions with Word8

2013-05-16 Thread Tikhon Jelvis
This happens because of how fromInteger is defined for Word8. It maps integers to integers mod 256. Also remember that 10 is actually fromInteger 10, in all of your examples. So your example is actually equivalent to [0..1 `mod` 256]. On May 16, 2013 2:19 PM, Jose A. Lopes

Re: [Haskell-cafe] [extension]syntactic sugar for maps

2013-03-27 Thread Tikhon Jelvis
I'm genuinely curious as to how you use maps. I've found I use them far less in Haskell than in any other language: I only use them in select circumstances. And most of those uses would not benefit from a mayo literal. I suspect that many of the uses of map literals are better replaced with

Re: [Haskell-cafe] Is there a tool like ri from ruby?

2012-11-23 Thread Tikhon Jelvis
Have you tried Hoogle? I know you can install it locally and use it from GHCi or Emacs. I'm not familiar with ri, but from your description I think a local Hoogle would serve the same purpose with the added benefit of being able to search by types. Here's the wiki page about it: