[Haskell-cafe] Re: Mining Twitter data in Haskell and Clojure

2010-06-16 Thread braver
WIth @dafis's help, there's a version tagged cafe3 on the master branch which is better performing with ByteString. I also went ahead and interned ByteString as Int, converting the structure to IntMap everywhere. That's reflected on the new "intern" branch at tag cafe4. Still it can't do the ful

[Haskell-cafe] Re: Using the ContT monads for early exits of IO ?

2010-06-16 Thread Ertugrul Soeylemez
Hello Günther, I use ContT monads for early exit often, because that's one of the things they encode naturally. But I don't do this with callCC. I prefer monadLib over mtl/transformers, which has a specific function for that: abort :: (AbortM m i) => i -> m a where AbortM is a class for mona

Re: [Haskell-cafe] HaskellWiki and Wikipedia

2010-06-16 Thread Jason Dagit
On Wed, Jun 16, 2010 at 11:35 AM, Roman Beslik wrote: > Hi all. There are some notions which are not described in HaskellWiki but > described in Wikipedia, e.g. "catamorphism". When clicking on a link > [[catamorphism]] that leads to "create a new page" it would be nice to show > link to a corres

Re: [Haskell-cafe] Announce: hs2dot 0.1.1 - generate graphviz code by analyzing Haskell source code files

2010-06-16 Thread Oscar Finnsson
>> On a related note: has anyone yet tried to visualize the flow of the >> IO monad in an application? > > You mean a control flow graph? Exactly. In (most) other programming languages it would be impossible for a tool to automatically know which flow to concentrate on/visualize but in Haskell it

Re: [Haskell-cafe] Announce: hs2dot 0.1.1 - generate graphviz code by analyzing Haskell source code files

2010-06-16 Thread Ivan Lazar Miljenovic
Oscar Finnsson writes: > > On a related note: has anyone yet tried to visualize the flow of the > IO monad in an application? You mean a control flow graph? -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Ca

Re: [Haskell-cafe] HaskellWiki and Wikipedia

2010-06-16 Thread Ketil Malde
Edward Kmett writes: > I realize that this is addressing the symptom, not the cause I'm not so sure Wikipedia is a good source of information for this. I've tried to read some of their articles on e.g. type systems or generic programming, but they tend to be confused by other languages and their

Re: [Haskell-cafe] Re: Different choice operations in a continuation monad

2010-06-16 Thread Edward Kmett
On Wed, Jun 16, 2010 at 9:11 AM, Sebastian Fischer < s...@informatik.uni-kiel.de> wrote: > > Heinrich Apfelmus wrote: > > Sebastian Fischer wrote: >> >>> I still don't understand why it is impossible to provide `orElse` with >>> the original type. I will think more about the reason you gave. >>>

Re: [Haskell-cafe] HaskellWiki and Wikipedia

2010-06-16 Thread Edward Kmett
I have an article describing catamorphisms in some detail that is available online at http://knol.google.com/k/catamorphisms I hereby give whatever rights I need to give to whomever I need to give them to so that it might be used as a basis for a HaskellWiki entry. I realize that this is

[Haskell-cafe] HaskellWiki and Wikipedia

2010-06-16 Thread Roman Beslik
Hi all. There are some notions which are not described in HaskellWiki but described in Wikipedia, e.g. "catamorphism". When clicking on a link [[catamorphism]] that leads to "create a new page" it would be nice to show link to a corresponding Wikipedia page. Also "search in Wikipedia" on the se

[Haskell-cafe] Re: Different choice operations in a continuation monad

2010-06-16 Thread Heinrich Apfelmus
Sebastian Fischer wrote: > Heinrich Apfelmus wrote: >> >> The reason is that you have chosen the "wrong" type for your >> continuation monad; it should be >> >> newtype CMaybe a = CMaybe (forall r. (a -> Maybe r) -> Maybe r) > > Yes, with this type `orElse` has the same type as `mplus`, which is

Re: [Haskell-cafe] The Arrow class (was: Vague: Assembly line process)

2010-06-16 Thread Edward Kmett
On Wed, Jun 16, 2010 at 6:55 AM, Tillmann Rendel < ren...@mathematik.uni-marburg.de> wrote: > Bas van Dijk wrote: > >> data Iso (⇝) a b = Iso { ab ∷ a ⇝ b >> , ba ∷ b ⇝ a >> } >> >> type IsoFunc = Iso (→) >> >> instance Category (⇝) ⇒ Category (Iso (⇝))

Re: [Haskell-cafe] Announce: hs2dot 0.1.1 - generate graphviz code by analyzing Haskell source code files

2010-06-16 Thread Oscar Finnsson
>> It's a small tool that lets you automatically generate graphviz/dot >> code that visualize the relations between data types, types and type >> classes. > > This sounds very familiar to my SourceGraph package that's already on > Hackage... I hope that some friendly competition can spur both of u

Re: [Haskell-cafe] Vague: Assembly line process

2010-06-16 Thread Steve Schafer
On Wed, 16 Jun 2010 18:30:47 +0200, you wrote: >Then I thought, what if I replace the (*) and (+) operations which are applied >when I multipy the matrix with a vector (i.e. a vector if inputs or outputs) >by something more general. So I replaced (+) by function application and my >matrix was n

Re: [Haskell-cafe] Vague: Assembly line process

2010-06-16 Thread Martin Drautzburg
On Tuesday, 15. June 2010 19:43:26 Steve Schafer wrote: > On Tue, 15 Jun 2010 19:23:35 +0200, you wrote: > >When I know my supplies I want to know what I can produce. When I know > > what I want to produce I want to know what supplies I need for that. Both > > kinds of questions should be answered

[Haskell-cafe] Re: What is Haskell unsuitable for?

2010-06-16 Thread Maciej Piechotka
On Wed, 2010-06-16 at 10:34 +0200, David Virebayre wrote: > On Wed, Jun 16, 2010 at 8:00 AM, Michael Snoyman wrote: > > >> Next you'll say there's no need for anyone to ask whether they prefer > >> vi or emacs... ;-) > > > Of course *real* programmers use ed. It is the standard editor[1]. > > *

Re: [Haskell-cafe] What is Haskell unsuitable for?

2010-06-16 Thread Casey Hawthorne
I remember quite a few months ago, someone gave a presentation on Haskell and he admitted that so far all he had used it for were shell scripts. He said that his Haskell shell scripts ran faster than his shell scripts written in ? So all he had used so far, was just the imperative part of Haskell

Re: [Haskell-cafe] What is Haskell unsuitable for?

2010-06-16 Thread David Virebayre
On Wed, Jun 16, 2010 at 11:04 AM, Ivan Lazar Miljenovic wrote: > David Virebayre writes: >> *Real* programmers use butterfiles [1]. > If your files are composed of butter, I"d hate to see how you store them > in an efficient manner... Oh well, at least le ridicule ne tue pas(1)... I'm a typo s

Re: [Haskell-cafe] What is Haskell unsuitable for?

2010-06-16 Thread Pierre-Etienne Meunier
> - an existing solution exists which does the job and you know you're not > going to patch the source ( eg OpenOffice or Linux kernel, or simple > build scripts. There is already make etc ) Don't you find yourself looking at the documentation each time you want to write a loop in a Makefile ?

Re: [Haskell-cafe] Re: Different choice operations in a continuation monad

2010-06-16 Thread Sebastian Fischer
Heinrich Apfelmus wrote: Sebastian Fischer wrote: I still don't understand why it is impossible to provide `orElse` with the original type. I will think more about the reason you gave. The reason is that you have chosen the "wrong" type for your continuation monad; it should be newtype CM

[Haskell-cafe] Announce: hlcm 0.2.2 - Parallel closed frequent itemsets mining

2010-06-16 Thread Alexandre Termier
Dear all, I'm pleased to announce the release of hlcm on Hackage : http://hackage.haskell.org/package/hlcm-0.2.2 hlcm is data mining tool for computing closed frequent itemsets. This problem is famous as "market basket analysis": - given a list of transactions : [["bread", "butter","choc

[Haskell-cafe] The Arrow class (was: Vague: Assembly line process)

2010-06-16 Thread Tillmann Rendel
Bas van Dijk wrote: data Iso (⇝) a b = Iso { ab ∷ a ⇝ b , ba ∷ b ⇝ a } type IsoFunc = Iso (→) instance Category (⇝) ⇒ Category (Iso (⇝)) where id = Iso id id Iso bc cb . Iso ab ba = Iso (bc . ab) (ba . cb) An 'Iso (⇝)' also _almost_ forms an

[Haskell-cafe] Re: Mining Twitter data in Haskell and Clojure

2010-06-16 Thread Simon Marlow
On 15/06/2010 20:43, braver wrote: On Jun 15, 6:27 am, Simon Marlow wrote: On 15/06/2010 06:09, braver wrote: In fact, the tag cafe2, when run on the full dataset, gets stuck at 11 days, with RAM slowly getting into 50 GB; a previous version caused ghc 6.12.1 to segfault around day 12 -- -deb

Re: [Haskell-cafe] Vague: Assembly line process

2010-06-16 Thread Yitzchak Gale
Alexander Solla wrote: > ...and (probably) the most efficient production plan given the > costs of his inputs.  This is a problem I am going to have to solve > programmatically, too. I intend on solving it by finding the input in a > given category of necessary inputs with the lowest average cost p

Re: [Haskell-cafe] What is Haskell unsuitable for?

2010-06-16 Thread Ivan Lazar Miljenovic
David Virebayre writes: > On Wed, Jun 16, 2010 at 8:00 AM, Michael Snoyman wrote: > >>> Next you'll say there's no need for anyone to ask whether they prefer >>> vi or emacs... ;-) > >> Of course *real* programmers use ed. It is the standard editor[1]. > > *Real* programmers use butterfiles [1].

Re: [Haskell-cafe] What is Haskell unsuitable for?

2010-06-16 Thread David Virebayre
On Wed, Jun 16, 2010 at 8:00 AM, Michael Snoyman wrote: >> Next you'll say there's no need for anyone to ask whether they prefer >> vi or emacs... ;-) > Of course *real* programmers use ed. It is the standard editor[1]. *Real* programmers use butterfiles [1]. [1] http://xkcd.com/378/ David. _

Re: [Haskell-cafe] Haskell Indonesia

2010-06-16 Thread Max Cantor
Given that I can see Indonesia (pulau batam) from my bedroom window, I'm going to say that I didn't cross any lines.. On Jun 16, 2010, at 6:17 AM, Ivan Lazar Miljenovic wrote: > Max Cantor writes: > >> Its not indonesia, but the Singapore FP Users is pretty close by. >> [snip] > > Fine, if w

Re: [Haskell-cafe] Vague: Assembly line process

2010-06-16 Thread Bas van Dijk
On Tue, Jun 15, 2010 at 9:26 PM, Bas van Dijk wrote: > On Tue, Jun 15, 2010 at 7:23 PM, Martin Drautzburg > wrote: >> When I know my supplies I want to know what I can produce. When I know what I >> want to produce I want to know what supplies I need for that. Both kinds of >> questions should be