Re: [Haskell-cafe] Haskell vs. Dart

2011-10-11 Thread Heinrich Apfelmus
ld be a standardized bytecode language for the browser; something that can be JITted efficiently while guaranteeing safety/security. This way, the compilation chain Haskell -> bytecode -> browser would finally be viable. Best regards, Heinrich Apfelmus -- h

Re: [Haskell-cafe] Question: Lazy Incremental Evaluation and Haskell?

2011-10-08 Thread Heinrich Apfelmus
David Barbour wrote: Heinrich Apfelmus wrote: Even then, events and behaviors are "one abstraction level too low". In my opinion, you are better off with a library/approach geared directly towards incremental computations. I believe behaviors are precisely the 'right' abs

Re: [Haskell-cafe] Question: Lazy Incremental Evaluation and Haskell?

2011-10-07 Thread Heinrich Apfelmus
are "one abstraction level too low". In my opinion, you are better off with a library/approach geared directly towards incremental computations. [1]: http://haskell.org/haskellwiki/Reactive-banana Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com _

Re: [Haskell-cafe] Really Simple explanation of Continuations Needed

2011-10-02 Thread Heinrich Apfelmus
quivalently: evalState (sequence . repeat . state $ \s -> (s,s+1)) 0 Thanks, I've changed it. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Really Simple explanation of Continuations Needed

2011-10-01 Thread Heinrich Apfelmus
ot;Operational Monad Tutorial" http://apfelmus.nfshost.com/articles/operational-monad.html The link to the Cont monad is explained at the very end. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Hask

Re: [Haskell-cafe] CFG specification and analysis directly in Haskell

2011-09-30 Thread Heinrich Apfelmus
r you. I was using the names for a Show instance. I am assuming there is no syntax sugar to recover the name of the variable used in a binder as a String. Ah, good point. There is no referentially transparent way to recover the name of a variable. Best regards, Heinrich Apfelmu

Re: [Haskell-cafe] CFG specification and analysis directly in Haskell

2011-09-27 Thread Heinrich Apfelmus
ule Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Package versioning policy - Harmless type changes?

2011-09-23 Thread Heinrich Apfelmus
ance, the generalization read :: Read a => String -> a - showDouble :: Double -> String + showDouble :: Floating a => a -> String will break the program foo :: String -> String foo = showDouble . read That said, is it true that *removing* a class constraint will

[Haskell-cafe] Package versioning policy - Harmless type changes?

2011-09-22 Thread Heinrich Apfelmus
ion A.B.C when introducing this change? Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] stack overflow pain

2011-09-21 Thread Heinrich Apfelmus
your code, though. What happens if you change it to map_ applyAction sas return [1..100] ? If this still throws a stack overflow, then problem is in the part of the code that consumes said list. Best regards, Heinrich Apfelmus -- htt

Re: [Haskell-cafe] Categorized Weaknesses from the State of Haskell 2011 Survey

2011-09-15 Thread Heinrich Apfelmus
s and code. I interpret this as a sign that my library is easy to understand (if you know Applicative Functors, that is) even though a key part of the documentation is still missing. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshos

Re: [Haskell-cafe] Categorized Weaknesses from the State of Haskell 2011 Survey

2011-09-13 Thread Heinrich Apfelmus
d any further than that. Of course, the resulting text will be very useful to readers with a high attention span, too.) Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.h

Re: [Haskell-cafe] Finger Tree without using Monoid

2011-09-02 Thread Heinrich Apfelmus
id is that you can use one and the same finger tree implementation for a variety of data structures. Practically every tree-based data structure can be obtained this way. See also http://apfelmus.nfshost.com/articles/monoid-fingertree.html Best regards, Heinrich Apfelmus --

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-14 Thread Heinrich Apfelmus
Heinrich Apfelmus wrote: Dear Haskellers, Can GUI programming be liberated from the IO monad? Functional Reactive Programming (FRP) promises as much, and I'm trying to make this dream a reality with my [reactive-banana][] library. Having released version 0.4.0.0, I am now looking for ex

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-14 Thread Heinrich Apfelmus
rrows is equal in expressiveness to the approach I took in reactive-banana . Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-10 Thread Heinrich Apfelmus
Henning Thielemann wrote: Heinrich Apfelmus wrote: Question: how would you actually like to describe the guitar simulator at a high-level? Did you already wish for some specific combinators? Assume that you had something like reactive-banana available and imagine that there were a benevolent

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-10 Thread Heinrich Apfelmus
Henning Thielemann wrote: Heinrich Apfelmus wrote: Could you expand a little on your arrow-like stream processors? What do the arrows look like, data SF a b = SF (a -> (b, SF a b)) ? My stream processors are not Arrows, because 'first' cannot be implemented. Howev

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-09 Thread Heinrich Apfelmus
Henning Thielemann wrote: Heinrich Apfelmus wrote: Can GUI programming be liberated from the IO monad? Functional Reactive Programming (FRP) promises as much, and I'm trying to make this dream a reality with my [reactive-banana][] library. Having released version 0.4.0.0, I am now lo

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-08 Thread Heinrich Apfelmus
David Virebayre wrote: Heinrich Apfelmus: I want to hear! Just a description. :) You can also mention why you find it interesting etc. Well I have an old program sitting around. Anyway, it's very simple : The GUI has - a window with a menu bar, 2 directory selects (source and

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-08 Thread Heinrich Apfelmus
-side Haskell, the latency is just too big. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-08 Thread Heinrich Apfelmus
Dmitriy Nikitinskiy wrote: Heinrich Apfelmus пишет: Do you know any *small GUI programs* that you would *like* to see *implemented with Functional Reactive Programming?* Maybe realize on FRP one of following bored examples: CRUD table: create, update, delete records in table (for example

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-08 Thread Heinrich Apfelmus
Chris Smith wrote: Heinrich Apfelmus wrote: Do you know any *small GUI programs* that you would *like* to see *implemented with Functional Reactive Programming?* This isn't really a specific application, but what I'd like to see most from FRP is an example of something that invol

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-08 Thread Heinrich Apfelmus
Ketil Malde wrote: Heinrich Apfelmus writes: Do you know any *small GUI programs* that you would *like* to see *implemented with Functional Reactive Programming?* I don't know if this fits the bill, but a tool that I'd like to see is plotting for one or more live streams of data.

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-08 Thread Heinrich Apfelmus
Jason Dagit wrote: Heinrich Apfelmus wrote: Do you know any *small GUI programs* that you would *like* to see *implemented with Functional Reactive Programming?* I would love to hear your examples, so that I can try to convert them to FRP style and test my library against them! How about a

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-07 Thread Heinrich Apfelmus
David Virebayre wrote: Heinrich Apfelmus wrote: Do you know any *small GUI programs* that you would *like* to see *implemented with Functional Reactive Programming?* I may have an example. I want to hear! I would love to hear your examples, so that I can try to convert them to FRP style

[Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-07 Thread Heinrich Apfelmus
[zipedit]: http://byorgey.wordpress.com/2008/06/21/zipedit/ [hbeat]: http://dockerz.net/twd/hBeat [midi streams]: http://hackage.haskell.org/package/streamed [hwn]: http://www.haskell.org/haskellwiki/Haskell_Weekly_News Best regards, Heinrich

Re: [Haskell-cafe] Patterns for processing large but finite streams

2011-07-01 Thread Heinrich Apfelmus
elism PAR. Basically, the SYNCHLIST primitive only allows simultaneous access to the input stream and the parallelism is used to make that simultaneity happen. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Patterns for processing large but finite streams

2011-06-30 Thread Heinrich Apfelmus
gards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] what if two package contains same module?

2011-06-30 Thread Heinrich Apfelmus
want to run the command ghc-pkg hide offending-package Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Data Flow Programming in FP

2011-06-21 Thread Heinrich Apfelmus
k I should have another look now, thanks for the suggestion. I'm currently working on a variant of Elliott's and Hudak's original FRP model. See also: http://hackage.haskell.org/package/reactive-banana http://apfelmus.nfshost.com/blog.html#functional-reactive-programming-frp B

Re: [Haskell-cafe] question about interruptable state runner

2011-06-10 Thread Heinrich Apfelmus
org/operational/ In particular, the examples WebSessionState.lhs TicTacToe.hs PoorMansConcurrency.hs show how to suspend and resume the control flow. Feel free to request additional examples. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___

Re: [Haskell-cafe] State Machine and the Abstractions

2011-05-30 Thread Heinrich Apfelmus
like during or fork , but I don't know whether that's the best way to go about it. It's worth trying, but keep in mind that the goal is to have an expressive set of combinators, not to shoehorn everything into monads.) Best regards, Hein

Re: [Haskell-cafe] How unique is Unique

2011-05-30 Thread Heinrich Apfelmus
Emil Axelsson wrote: Heinrich Apfelmus wrote: Since every module of my DSL depends on the same global variable, only two things should happen: * Reloading a module does not reload the global counter. Everything is fine. * Reloading a module does reload the global counter. This forces *all

Re: [Haskell-cafe] How unique is Unique

2011-05-28 Thread Heinrich Apfelmus
Unfortunately, it forces Typeable contraints on polymorphic combinators. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] No fish, please

2011-05-21 Thread Heinrich Apfelmus
ion][2]. I would love the ability to install it locally and to link to it from the Haddock documentation. [1]: http://hackage.haskell.org/package/operational [2]: http://projects.haskell.org/operational/Documentation.html Best regards, Heinrich Apfelmus -- http://apfelmus.n

Re: [Haskell-cafe] Status of Haskell + Mac + GUIs & graphics

2011-05-21 Thread Heinrich Apfelmus
st regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Status of Haskell + Mac + GUIs & graphics

2011-05-19 Thread Heinrich Apfelmus
the latest problem is that ghci is unable to link libstdc++. But the crash problem is probably still there. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailma

Re: [Haskell-cafe] Status of Haskell + Mac + GUIs & graphics

2011-05-19 Thread Heinrich Apfelmus
ished cross-platform GUI toolkits is that they embed a lot of wisdom about platform quirks (Cocoa is particularly annoying) that you would have to solve again. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Status of Haskell + Mac + GUIs & graphics

2011-05-18 Thread Heinrich Apfelmus
lements from scratch. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Status of Haskell + Mac + GUIs & graphics

2011-05-18 Thread Heinrich Apfelmus
mple program that you can try out. It might be worth to include the extra hoops (EnableGUI) in the GLFW package. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Server hosting

2011-05-07 Thread Heinrich Apfelmus
Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANNOUNCE: iterIO-0.1 - iteratee-based IO with pipe operators

2011-05-06 Thread Heinrich Apfelmus
settled on the Producer/Transformer/Consumer trilogy. I'd love to hear thoughts on the issue, especially from David. I vastly prefer the names Producer/Transformer/Consumer over the others. Then again, I never quite understood what Iteratees were all about in the first place. Best regard

Re: [Haskell-cafe] Inputs to classic FRP: unsafeInterleaveIO/unsafePerformIO

2011-04-29 Thread Heinrich Apfelmus
Ryan Ingram wrote: Heinrich Apfelmus wrote: However, even in a demand-driven implementation, there is one optimization that I would like make: when there are multiple external events, say e1 and e2, the network splits into subnetworks that react only to one of the inputs. For instance, your

Re: [Haskell-cafe] Inputs to classic FRP: unsafeInterleaveIO/unsafePerformIO

2011-04-26 Thread Heinrich Apfelmus
Ryan Ingram wrote: Apfelmus, I hope you don't abandon your efforts, at least for the selfish reason that I enjoy reading your blog entries about trying to implement it! :D My reasoning was that a temporary demand-driven implementation would allow me to release the library sooner; I

Re: [Haskell-cafe] Inputs to classic FRP: unsafeInterleaveIO/unsafePerformIO

2011-04-26 Thread Heinrich Apfelmus
st.) See also http://apfelmus.nfshost.com/blog/2011/04/24-frp-push-driven-sharing.html Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] More ideas for controlled mutation

2011-04-25 Thread Heinrich Apfelmus
he compiler that you fulfilled that proof obligation! (At least, I don't see any obvious one. Maybe a clever abuse of parametricity helps.) It might be an option in Agda, though. In that light, it is entirely reasonable that you have to use unsafePerformIO . Best regards, Heinrich

Re: [Haskell-cafe] Why not Darcs?

2011-04-23 Thread Heinrich Apfelmus
* want to write whole programs that way. At some point, you need something that works at another level than pure functions. What the *hell* do you do? I think a better invective would be "amazing". Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com

Re: [Haskell-cafe] Testing Implementation vs Model - Records or Type Classes?

2011-04-09 Thread Heinrich Apfelmus
s simply a dummy variable to index different FRP implementations. The problem with this is that I need the FlexibleContexts extension to do that. There goes Haskell2010 compatibility. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com _

[Haskell-cafe] Testing Implementation vs Model - Records or Type Classes?

2011-04-08 Thread Heinrich Apfelmus
his own programs as well. Since the implementation makes heavy use of IO, it is a bit harder to test automatically, so the model might be useful to have. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing li

Re: [Haskell-cafe] Computational Physics in Haskell

2011-04-01 Thread Heinrich Apfelmus
http://hackage.haskell.org/package/hmatrix Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] A practical Haskell puzzle

2011-03-04 Thread Heinrich Apfelmus
ge. Note that GHC has long supported existential types, just not the explicit syntax. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] A practical Haskell puzzle

2011-03-04 Thread Heinrich Apfelmus
s f -> c) -> c Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] A practical Haskell puzzle

2011-02-28 Thread Heinrich Apfelmus
correctly, the EHC from Utrecht supports first-class existential quantification ). You have to encode it in some way, for instance with a data type data Exists f = forall c . Exists (f c) takeC :: Int -> Compoz a b -> Exists (Compoz a)

Re: [Haskell-cafe] A practical Haskell puzzle

2011-02-28 Thread Heinrich Apfelmus
xists c. Compoz c b) run :: Compoz a b -> (a -> b) Of course, you will have to wrestle with the existential types for takeC and dropC a bit, but that shouldn't be much of a problem. For instance, you can fuse these functions into runLayers and hide the existential typ

Re: [Haskell-cafe] Haskell GUI

2011-02-16 Thread Heinrich Apfelmus
works fine, though. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Proving correctness

2011-02-12 Thread Heinrich Apfelmus
, etc. to help prove correctness. Admittedly, I don't know how many people actually do so... I did, I did! http://projects.haskell.org/operational/Documentation.html#proof-of-the-monad-laws-sketch Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___

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

2011-01-08 Thread Heinrich Apfelmus
g my code in such a way that correctness becomes obvious. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] V.I.P.s and the associativity of merge'

2010-12-31 Thread Heinrich Apfelmus
Will Ness wrote: Heinrich Apfelmus writes: Here an example where the VIP merge would give a different result bad = tfold $ (1:10:undefined) : (2:3:5:undefined) : (4:undefined) : error "bad" We have ghci> bad [1,2*** Exception: bad but the VIP

Re: [Haskell-cafe] V.I.P.s and the associativity of merge'

2010-12-31 Thread Heinrich Apfelmus
Will Ness wrote: Heinrich Apfelmus writes: Here an example where the VIP merge would give a different result bad = tfold $ (1:10:undefined) : (2:3:5:undefined) : (4:undefined) : error "bad" We have ghci> bad [1,2*** Exception: bad but the VIP

Re: [Haskell-cafe] V.I.P.s and the associativity of merge'

2010-12-30 Thread Heinrich Apfelmus
r the time and space complexity stays the same. (Which is not as bad as it sounds, since we didn't know them well in the first place anyway). More worryingly, changing the tree shape now affects correctness. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com _

Re: [Haskell-cafe] Making type-incompatible strategies interchangeable

2010-12-18 Thread Heinrich Apfelmus
page once the link works again.) Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: "Haskell is a scripting language inspired by Python."

2010-11-04 Thread Heinrich Apfelmus
whitespace from Haskell. Haskell itself (or rather the design committee) got the idea from SASL (1976) and Miranda (1986), though it goes way back to the 1960s, as described in section 4.1 "Layout" of http://www.haskell.org/haskellwiki/History_of_Haskell Regards, Heinri

[Haskell-cafe] Re: Parsing workflow

2010-11-01 Thread Heinrich Apfelmus
ize different first characters. * Don't do recursion yourself, use premade combinators like many1 etc. instead. * lookAhead is very useful for avoiding capturing input in the second argument of manyTill Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___

[Haskell-cafe] Re: Haskellers.com idea: strike forces

2010-10-30 Thread Heinrich Apfelmus
) and code everything that comes up on the fly. There is no better way to ensure usability of an application than to write it while heavily using it (and aiming for a large usability / features ratio). Regards, Heinrich Apfelmus -- http://apfelmus.n

[Haskell-cafe] Re: A rant against the blurb on the Haskell front page

2010-10-19 Thread Heinrich Apfelmus
ever got around to finishing it: http://www.haskell.org/haskellwiki/Haskell_a_la_carte Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Who is afraid of arrows, was Re: ANNOUNCE: Haskell XML Toolbox Version 9.0.0

2010-10-18 Thread Heinrich Apfelmus
Malcolm Wallace wrote: Heinrich Apfelmus wrote: Personally, I would be much happier with the slogan "HXT = XML transformations with filters". Browsing through Manuel's thesis, I discover that your combinators are quite slick ( >>> , choiceA , when, guards ), it

[Haskell-cafe] Re: Who is afraid of arrows, was Re: ANNOUNCE: Haskell XML Toolbox Version 9.0.0

2010-10-18 Thread Heinrich Apfelmus
C. McCann wrote: Heinrich Apfelmus wrote: Combined with >>= / >> you have multiple reading direction in the same expression, as in expression ( c . b . a ) `liftM` a1 >>= a2 >>= a3 reading order 6 5 41 2 3 That's why I

[Haskell-cafe] Re: Who is afraid of arrows, was Re: ANNOUNCE: Haskell XML Toolbox Version 9.0.0

2010-10-15 Thread Heinrich Apfelmus
;- f x `orElse` deep f x] where [] `orElse` ys = ys xs `orElse` _ = xs which can also be written as deep f xml = do x <- children xml f x `orElse` deep f x Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Who is afraid of arrows, was Re: ANNOUNCE: Haskell XML Toolbox Version 9.0.0

2010-10-13 Thread Heinrich Apfelmus
1 2 3 So that could be one reason. That's why I'm usually using =<< instead of >>= . Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: ANNOUNCE: Haskell XML Toolbox Version 9.0.0

2010-10-09 Thread Heinrich Apfelmus
://www.haskell.org/HaXml/icfp99.html but it appears to me that representing them as type Filter a b = a -> [b] allows the use of the list monad, which would highlight the similarity between list comprehensions and working with XML trees. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.

[Haskell-cafe] Re: I still cannot seem to get a GUI working under Windows.

2010-10-02 Thread Heinrich Apfelmus
ceed yet. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: I still cannot seem to get a GUI working under Windows.

2010-10-02 Thread Heinrich Apfelmus
sonally, I revisit projects I value a lot every month anyway, which boils down to a larger share in the end. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailma

[Haskell-cafe] Re: I still cannot seem to get a GUI working under Windows.

2010-10-02 Thread Heinrich Apfelmus
external constraints, but it is a more forthright form of showing that your work is valued than a silent download or virtual nod. [1]: http://flattr.com Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Hask

[Haskell-cafe] Re: Distribution needs

2010-09-30 Thread Heinrich Apfelmus
(The link doesn't seem to work, only http://gwolf.org/blog is available.) Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: "Introducing The Monads" Presentation Slides

2010-09-17 Thread Heinrich Apfelmus
aditya siram wrote: Ok, I feel dumb. I have the slides hosted elsewhere now and I can't figure out how to change the Reddit link. Any help is appreciated! You can't change the link on Reddit, but you can delete the old submission and make a new one. Regards, Heinrich Apfelmu

[Haskell-cafe] Re: recommendations for reading list?

2010-09-09 Thread Heinrich Apfelmus
today. I would recommend against MacLane (unless you are indeed a working mathematician), his choice of topics and examples does not really help understanding the Haskell side of category theory. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com __

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

2010-09-08 Thread Heinrich Apfelmus
erate new keys with the same cipher algorithm. All examples that use buildKeyPair and type classes can be reformulated in terms of Key with this additional field. That's because buildKeyPair actually expects a type argument; the cipher filed merely shifts that argument to the

[Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-09-01 Thread Heinrich Apfelmus
en read. [1]: http://www.reddit.com/r/haskell/comments/ar4wb/understanding_iteratees/c0j0f3r Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-27 Thread Heinrich Apfelmus
Daniel Fischer wrote: Heinrich Apfelmus wrote: Daniel Fischer wrote: For many hashing or de/encryption algorithms, chunking is more natural than single-character access. Even when the chunk lengths are unpredictable? After all, unlike with fread in C, you can't request the next chu

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

2010-08-27 Thread Heinrich Apfelmus
encrypt :: B.ByteString -> B.ByteString, decrypt :: B.ByteString -> B.ByteString, keyLength :: BitLength, serialize :: B.ByteString} rsa :: RandomGen g => BitLength -> g -> ((Key,Key), g) Regards, Heinric

[Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-26 Thread Heinrich Apfelmus
Daniel Fischer wrote: John Lato wrote: Heinrich Apfelmus wrote: Do you have an example where you want chunking instead of single character access? I am unable to think of any examples where you want chunking for any reason other than efficiency. For many hashing or de/encryption algorithms

[Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-25 Thread Heinrich Apfelmus
Nicolas Pouillard wrote: Heinrich Apfelmus wrote: There are also enumerators and enumeratees. I think that purpose of enumerator = run an iteratee on multiple sources (i.e. first part of the input from a Handle , second part from a String ) I would say

[Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-25 Thread Heinrich Apfelmus
Jason Dagit wrote: Heinrich Apfelmus wrote: I'm curious, can you give an example where you want to be explicit about chunking? I have a hard time imagining an example where chunking is beneficial compared to getting each character in sequence. Chunking seems to be common in C for reaso

[Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-25 Thread Heinrich Apfelmus
gt;>= k) = runString (k $ null cs) cs -- an iteratee that counts the number of elements in the input count :: Monad m => Iteratee m Int count = go 0 where go n = eof >>= \b -> case b of True -> return n False -&

[Haskell-cafe] Re: Higher-order algorithms

2010-08-24 Thread Heinrich Apfelmus
edu/webs/people/okasaki/jfp98.ps Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-24 Thread Heinrich Apfelmus
ratee . return . Continue $ go [] where go xs EOF= Yield xs EOF go xs (Chunk ys) = Continue $ go (xs++ys) (using the API from http://ianen.org/articles/understanding-iteratees/ ) Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com __

[Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-24 Thread Heinrich Apfelmus
mString (xs ++ ys) = fromString ys . fromString xs assuming a function fromString :: String -> Enumerator To get an actual result from an Iteratee, we only need a way to run it on the empty stream. runOnEmptyString :: Iteratee a -> Maybe a Regards, Heinrich

[Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-23 Thread Heinrich Apfelmus
Luke Palmer wrote: Heinrich Apfelmus wrote: Conal Elliott wrote: For anyone interested in iteratees (etc) and not yet on the iteratees mailing list. I'm asking about what iteratees *mean* (denote), independent of the various implementations. In my world view, iteratees are just a mo

[Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-23 Thread Heinrich Apfelmus
is something that should be left to the iteratee abstraction. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: philosophy of Haskell

2010-08-20 Thread Heinrich Apfelmus
Ertugrul Soeylemez wrote: Heinrich Apfelmus wrote: In particular, the World -> (a,World) model is unsuitable even without concurrency because it cannot distinguish loop, loop' :: IO () loop = loop loop' = putStr "c" >> loop' I interpret the

[Haskell-cafe] Re: philosophy of Haskell

2010-08-18 Thread Heinrich Apfelmus
del" to be the operational semantics presented in the tutorial paper. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Finding zipper for custom tree

2010-07-16 Thread Heinrich Apfelmus
also R Backhouse, P Jansson, J Jeuring, L Meertens Generic Programming - An Introduction - http://www.cse.chalmers.se/~patrikj/poly/afp98/ A corresponding chapter in the wikibook ("Datatype algebra") has not been written, so far. Regards, Heinrich Apfelmus -- http://

[Haskell-cafe] Re: lambda calculus and equational logic

2010-07-15 Thread Heinrich Apfelmus
, say product [1..5] -> 1 * product [2..5] -> .. -> 120 is a proof that the initial and the final expression denote the same value. The Curry-Howards correspondence is about the type system, viewing types as logical propositions and programs as their proofs. Regards, Heinrich

[Haskell-cafe] Re: Equivalence of two expressions

2010-07-12 Thread Heinrich Apfelmus
solve such problems. As Michael already mentioned, the problem is undecidable in general since it includes group rings. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.o

[Haskell-cafe] Re: Memoization in Haskell?

2010-07-10 Thread Heinrich Apfelmus
Gregory Crosswhite wrote: Heinrich Apfelmus wrote: Gregory Crosswhite wrote: You're correct in pointing out that f uses memoization inside of itself to cache the intermediate values that it commutes, but those values don't get shared between invocations of f; thus, if you call

[Haskell-cafe] Re: Memoization in Haskell?

2010-07-09 Thread Heinrich Apfelmus
memo table might get reconstructed redundantly. (However, there are other strategies for memoization that are persistent across calls.) It should be f = \n -> memo ! n where memo = .. so that memo is shared across multiple calls like f 1 , f 2 etc. Regards, Hein

[Haskell-cafe] Re: finding the right mathematical model

2010-07-07 Thread Heinrich Apfelmus
too complicated for you and your graphs are really small, you can also use a toy implementation like type Graph = [(Node, -- Department [Node]) -- List of Departments it shares revenue to ] To test whether a graph has cycles ("looping mapping"), you

[Haskell-cafe] Re: Finding zipper for custom tree

2010-07-02 Thread Heinrich Apfelmus
t (a * x) ^^ List involves a fixed point So, to find the derivate, you have to calculate the derivative of List first: List' x = List x * List x and then you can use the chain rule to find DTreeF . Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com __

[Haskell-cafe] Re: Finding zipper for custom tree

2010-07-02 Thread Heinrich Apfelmus
r is a *list* of these things: ContextDTree a = List (DList (a * DTree a) * a) After all, what you describe is only the context of DTree a within a single level, but it might be many levels down in the tree. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com __

[Haskell-cafe] Re: When the unknown is unknown

2010-06-24 Thread Heinrich Apfelmus
Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

<    1   2   3   4   5   6   7   8   9   >