Re: [Haskell-cafe] Superset of Haddock and Markdown

2011-11-18 Thread Ertugrul Soeylemez
Ivan Lazar Miljenovic wrote: > Wasn't there talk at one stage of integrating pandoc into haddock? I wouldn't mind Haddock depending on Pandoc, at least optionally (-fmarkdown-comments). Taking this to its conclusion you could easily have syntax-highlighted code examples in Haddock documentation

Re: [Haskell-cafe] A Mascot

2011-11-16 Thread Ertugrul Soeylemez
John Meacham wrote: > People tend to concentrate on the lambda which cooresponds to the > functional aspect of haskell when designing logos. Not nearly enough > attention is paid to the other striking feature, the laziness. The > 'bottom' symbol _|_ should feature prominently. The two most defini

Re: [Haskell-cafe] ANN: Netwire 2.0.0

2011-11-14 Thread Ertugrul Soeylemez
Ozgur Akgun wrote: > Compilation problems here: > > [...] > > This build was trying to use deepseq-1.2.0.1. It builds fine with > deepseq-1.1.0.2 though. It should be fixed now. Thanks for your report! Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife >>= sex) http://ertes.de/

[Haskell-cafe] ANN: Netwire 2.0.0

2011-11-14 Thread Ertugrul Soeylemez
Hello everybody, it's finally done. I have just released Netwire 2.0.0, which is a complete rewrite from scratch. It has been generalized to arbitrary automata with inhibition, so FRP is now just a special use case. First of all the top module is now: import Control.Wire Wire is now an ar

Re: [Haskell-cafe] German names for kinds and sorts

2011-11-14 Thread Ertugrul Soeylemez
Daniel Schoepe wrote: > > Most time, it is not really difficult to find an appropriate term > > for concepts of Haskell, like types (Typen) or type classes > > (Typklassen). But I really don't know how to call kinds and sorts > > in German. Any ideas? > > I'd go with "Arten" and "Sorten" respect

Re: [Haskell-cafe] How do you describe systems in general with Haskell?

2011-11-05 Thread Ertugrul Soeylemez
Grigory Sarnitskiy wrote: > If you are to describe a system, which consists of several subsystems, > how do you approach the problem? What types, classes, functions > whatever do you introduce? > > I guess it is a common problem, is there a general method? Just to > describe, not to solve (though

Re: [Haskell-cafe] arr considered harmful

2011-11-02 Thread Ertugrul Soeylemez
Ryan Ingram wrote: > I know it's a bit of an 'intentionally provocative' title, but with > the recent discussions on Arrows I thought it timely to bring this up. > > Most of the conversion from arrow syntax into arrows uses 'arr' to > move components around. However, arr is totally opaque to the

Re: [Haskell-cafe] A catch-all MonadIO instance

2011-10-28 Thread Ertugrul Soeylemez
Bas van Dijk wrote: > I understand, portability is important for transformers. For > monad-control it's less of an issue because I already use other > language extensions (incl. RankNTypes). > > So I think I go ahead and add a catch-all instance for MonadControlIO > to monad-control. I'm not sur

Re: [Haskell-cafe] Reminder Munich Haskell

2011-10-28 Thread Ertugrul Soeylemez
Heinrich Hördegen wrote: > We would appreciate, if more people from outside Munich could join us, > but I understand if it is too far. The problem is that all the meetings seem to be planned in the middle of the week. If you could throw in some more convenient dates in the weekend or before hol

Re: [Haskell-cafe] Reminder Munich Haskell

2011-10-27 Thread Ertugrul Soeylemez
Heinrich Hördegen wrote: > this evening, Haskeller meet at Cafe Puck at 19h30: > www.haskell-munich.de May I ask how the evening went? I would love to join, but it's just too far away from here (Ludwigsburg near Stuttgart) for work days. Greets, Ertugrul -- nightmare = unsafePerformIO (get

Re: [Haskell-cafe] Is it possible to get the information of instances of a type?

2011-10-26 Thread Ertugrul Soeylemez
Magicloud Magiclouds wrote: > If this was in ruby or other languages that support reflection, it > won't be a question. > But in Haskell, could I write a code to list the classes that a type > instanced? In regular Haskell, type information is completely lost after compilation, so you can't

Re: [Haskell-cafe] Data.Vector.Mutable.mapM

2011-10-20 Thread Ertugrul Soeylemez
Joachim Breitner wrote: > I’m consdering to change some performance critical code from Vector to > MVector, hopefully avoiding a lot of copying and garbage collecting. But > it seems that the Data.Vector.Mutable interface at > http://hackage.haskell.org/packages/archive/vector/0.9/doc/html/Data-V

Re: [Haskell-cafe] Waiting on input with `hWaitForInput' or `threadWaitRead'

2011-10-18 Thread Ertugrul Soeylemez
Michael Orlitzky wrote: > > I have uploaded a simple concurrent echo server implementation to > > hpaste [1]. It uses one thread for the stdout logger, one thread > > for the server, one thread for each client and finally a main thread > > waiting for you to hit enter to quit the application. >

Re: [Haskell-cafe] Waiting on input with `hWaitForInput' or `threadWaitRead'

2011-10-18 Thread Ertugrul Soeylemez
Jason Dusek wrote: > > I don't think you want either of the functions you mentioned. What > > you probably want instead is to do concurrent programming by > > creating Haskell threads.  A hundred Haskell threads reading from > > Handles are translated to one or more OS threads using whatever > >

Re: [Haskell-cafe] ANNOUNCE: vector-bytestring-0.0.0.0

2011-10-17 Thread Ertugrul Soeylemez
Christian Maeder wrote: > > So please, please, please, if you decide to use a newtype, do /not/ > > hide the constructor. > > The better alternative to "not hiding the constructor" is to supply > conversion functions that may or may not do more than the constructor > and selector and are named ac

[Haskell-cafe] ANN: netwire 1.2.7

2011-10-17 Thread Ertugrul Soeylemez
Hello fellows, netwire 1.2.7 is out. Summary of the changes from netwire 1.2.5 (my last announcement): * Events: Added 'periodically' event generator. * Manager: Added the 'manager' wire, which is sort of a generalization of the various context wires and should be useful for highl

Re: [Haskell-cafe] ANNOUNCE: vector-bytestring-0.0.0.0

2011-10-17 Thread Ertugrul Soeylemez
Christian Maeder wrote: > I think the cleanest solution (just from a theoretical point of view) > is to use a newtype for your byte strings. > > - it should have the same performance > - allows to make ByteString really abstract when hiding the newtype > constructor > - is portable and supplies c

Re: [Haskell-cafe] Waiting on input with `hWaitForInput' or `threadWaitRead'

2011-10-17 Thread Ertugrul Soeylemez
Jason Dusek wrote: > I would like to use evented I/O for a proxying application. My present > thinking is to fork a thread for each new connection and then to wait > for data on either socket in this thread, writing to one or the other > socket as needed. > > [...] > > Ideally, I'd get something

Re: [Haskell-cafe] ANNOUNCE: vector-bytestring-0.0.0.0

2011-10-16 Thread Ertugrul Soeylemez
Felipe Almeida Lessa wrote: > > Although I don't have a problem with using language extensions the > > vector package, as it is a commonly used tool, shouldn't require me > > to use an extension just to be able to debug my code.  This would be > > particularly annoying when using GHCi, because yo

Re: [Haskell-cafe] ANNOUNCE: vector-bytestring-0.0.0.0

2011-10-16 Thread Ertugrul Soeylemez
Bas van Dijk wrote: > On 15 October 2011 23:17, Ertugrul Soeylemez wrote: > > Both instances are valid here, and there is no mechanism to choose > > one of them. > > There is: OverlappingInstances[1] chooses the most specific instance. > So in case someVector :: Vector

Re: [Haskell-cafe] Question, re: using Automaton

2011-10-16 Thread Ertugrul Soeylemez
Captain Freako wrote: > Encapsulating an automaton by running it on a stream of inputs, > obtaining a stream of outputs. > > Typical usage in arrow notation: > > proc p -> do > ...*ys <- (|runAutomaton (\x -> ...)|) xs* > > Here xs refers to the input stream and x

Re: [Haskell-cafe] ANNOUNCE: vector-bytestring-0.0.0.0

2011-10-15 Thread Ertugrul Soeylemez
Bas van Dijk wrote: > > My suggestion was to remove the generic Show instance and add only > > specialized instances.  This is more work, but will also yield > > better results.  In particular, it allows specialized string > > representations for other types, too. > > What exactly is the problem

Re: [Haskell-cafe] ANNOUNCE: vector-bytestring-0.0.0.0

2011-10-15 Thread Ertugrul Soeylemez
Roman Leshchinskiy wrote: > > Personally, I think that ByteString and especially Vector Word8 > > aren't strings and shouldn't be treated as such. But I wouldn't be > > strongly against showing them as strings. However, I *am* strongly > > against using UndecidableInstances in vector and I don't

Re: [Haskell-cafe] ANNOUNCE: vector-bytestring-0.0.0.0

2011-10-15 Thread Ertugrul Soeylemez
Joachim Breitner wrote: > > So what do other people think about this? > > having a human-readable Show instance for ByteStrings is definitely a > great plus when debugging code. I agree and would even go as far as saying that it's generally useful, even if the data is not guaranteed to be text.

Re: [Haskell-cafe] ANNOUNCE: vector-bytestring-0.0.0.0

2011-10-14 Thread Ertugrul Soeylemez
Max Rabkin wrote: > > Though I would argue that unless you're trying to actually use for > > Show/Read for serialisation, does it really matter what the > > Show/Read instances for Bytestring are? > > Convenient debugging and REPL interaction certainly matter! On the other hand, having a separat

Re: [Haskell-cafe] A question about causality in FRP

2011-10-14 Thread Ertugrul Soeylemez
David Barbour wrote: > > The usual model for arrowized FRP is based on this type: > > > >newtype Auto a b = Auto (a -> (b, Auto a b)) > > > > I would be very interested in how you would write an ArrowApply > > instance for such a type. So far my conclusion is: It's > > impossible. > > Inter

Re: [Haskell-cafe] A question about causality in FRP

2011-10-14 Thread Ertugrul Soeylemez
David Barbour wrote: > If you want first-class behaviors or behavior transformers, those will > need a different abstraction than 'nested' behaviors. Nested != First > Class. You'd have special functions to lift a first-class behavior as > an argument (e.g. add a phantom type to prohibit non-cau

Re: [Haskell-cafe] Up and Down the Latter of Abstraction

2011-10-12 Thread Ertugrul Soeylemez
Lyndon Maydwell wrote: > I came across an interesting page about interactive abstraction called > "Up and Down the Latter of Abstraction" [1] while browsing > hacker-news. > > Under the appendix "Tools & Implementation" Bret Victor ponders: > > "Perhaps language theorists will stop messing arou

Re: [Haskell-cafe] Haskell vs. Dart

2011-10-11 Thread Ertugrul Soeylemez
Heinrich Apfelmus wrote: > I didn't look very carefully, but from a Haskeller's point of view, I > can't see any significant difference between Dart and JavaScript, > except perhaps for the name. By comparison, CoffeeScript is a way more > innovative venture. If you want a useful client-side bro

Re: [Haskell-cafe] ANN: ircbot 0.1.1

2011-10-11 Thread Ertugrul Soeylemez
Jeremy Shaw wrote: > 1. The library is based around the old String based irc library. Would > be nice to upgrade to something that used ByteStrings+Text+Builder. > Practically speaking.. it's IRC. The maximum line length is 510 > characters, and the bot typically needs to handle, at most, a few >

Re: [Haskell-cafe] haskell i18n best practices

2011-09-30 Thread Ertugrul Soeylemez
Paulo Pocinho wrote: > I don't know if this is a bad habit, but I had already separated the > dialogue text in the code with variables holding the respective > strings. At this time, I thought there could be some other way than > gettext. Then I figured how to import localisation data, that the >

Re: [Haskell-cafe] Much faster complex monad stack based on CPS state

2011-09-28 Thread Ertugrul Soeylemez
Bas van Dijk wrote: > Because of this reason I don't provide a MonadTransControl instance > for ContT in monad-control[2]. Is that even possible? I tried hard to come up with just a MonadFix instance for CPS-based monads, and I failed. I would think that MonadTransControl is just as hard, if n

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

2011-09-22 Thread Ertugrul Soeylemez
"Paterson, Ross" wrote: > See the GHC Arrow notation documentation for more about the banana > brackets, which let you use user-defined control structures like > event. I have reread the documentation now. It seems that there are a lot of syntactic constructs, which I've missed. Particularly t

[Haskell-cafe] Proposal: Subcomputations in arrow notation

2011-09-21 Thread Ertugrul Soeylemez
Hello fellow Haskellers, this is a proposal to extend the arrow notation (-XArrows). I find myself writing the following very often: system :: Wire IO () String system = proc _ -> do botAddPeriod <- succ ^<< noise -< () botAddSpeed <- noise1 -< ()

Re: [Haskell-cafe] Animas/Yampa - Using Zip as a Routing Function in a Parallel Switch with Feedback

2011-09-20 Thread Ertugrul Soeylemez
"M. George Hansen" wrote: > I've been playing around with functional reactive programming using > Animas/Yampa and ran into a strange situation. I'm using a parallel > switch to route input to a collection of signal functions and using > the output as feedback (to simulate state). Everything work

Re: [Haskell-cafe] ANN: Webwire 0.1.0, netwire 1.2.5

2011-09-16 Thread Ertugrul Soeylemez
Daniel Patterson wrote: > I'm also excited to see examples. Even simple ones! Alright, I have written some examples: > Based on my understanding of FRP (which may have little bearing on > what webwire actually does, just what I hope it does), what

Re: [Haskell-cafe] Karatsuba Multiplication Parallel

2011-09-16 Thread Ertugrul Soeylemez
Burak Ekici wrote: > I am trying to parallelize the below Karatsuba multiplication > code. However, at each trial of mine the error message speaking of > "incorrect indentation" is returned. I could not come up with ideas to > solve the problem. I didn't read enough of the code to help you with

Re: [Haskell-cafe] ANN: Webwire 0.1.0, netwire 1.2.5

2011-09-16 Thread Ertugrul Soeylemez
Michael Snoyman wrote: > I'm not sure what you mean by runtime-only, could you clarify? The session is inherently bound to its current continuation, and the continuation is a function, i.e. cannot be serialized. This is a generalization, which comes with the price that sessions are lost, as soo

Re: [Haskell-cafe] ANN: Webwire 0.1.0, netwire 1.2.5

2011-09-16 Thread Ertugrul Soeylemez
Michael Snoyman wrote: > Nice to see another project taking advantage of WAI and Shakespeare. I > look forward to seeing some example code as well, though I personally > am very wary of continuation-based frameworks. AFRP uses continuations under the hood, so you can view webwire as continuation

Re: [Haskell-cafe] ANN: Webwire 0.1.0, netwire 1.2.5

2011-09-16 Thread Ertugrul Soeylemez
Christopher Done wrote: > > webwire is an experimental web framework based on the functional > > reactive programming library netwire.  It uses WAI under the hood > > and right now features only a subset of the very basics of what you > > need to write web sites > > Are you going to provide any e

Re: [Haskell-cafe] ANN: Webwire 0.1.0, netwire 1.2.5

2011-09-15 Thread Ertugrul Soeylemez
Ertugrul Soeylemez wrote: > webwire is [...] stupid me. =) As always I forgot to link them: <http://hackage.haskell.org/package/webwire> <http://hackage.haskell.org/package/netwire> Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife >>=

[Haskell-cafe] ANN: Webwire 0.1.0, netwire 1.2.5

2011-09-15 Thread Ertugrul Soeylemez
Hello fellow Haskellers, webwire is an experimental web framework based on the functional reactive programming library netwire. It uses WAI under the hood and right now features only a subset of the very basics of what you need to write web sites. Features: * Reactive programming of web sites

[Haskell-cafe] ANN: Netwire 1.2.4

2011-09-11 Thread Ertugrul Soeylemez
Hello there, version 1.2.4 of netwire is out. Major changes: * Changed the semantics of time. Previously if a wire was not run (because of an earlier inhibiting wire), then its local time was suspended. Example: proc _ -> do t1 <- time -< () fps1 <- a

Re: [Haskell-cafe] mapM is supralinear?

2011-09-09 Thread Ertugrul Soeylemez
Roman Cheplyaka wrote: > > In general it's a bad idea to use mapM over IO. > > Could you explain why? Most applications don't require loading the entire result into memory, so a combinator like foldM is more appropriate. You should use mapM over IO only, when the list is short, or when there is

Re: [Haskell-cafe] mapM is supralinear?

2011-09-07 Thread Ertugrul Soeylemez
Travis Erdman wrote: > The performance of mapM appears to be supralinear in the length of the > list it is mapping on.  Does it need to be this way?  As a comparison, > both mapM_ and map are linear in the length of the list. It needs to be this way in most monads. It's not a problem of mapM it

Re: [Haskell-cafe] ANN: Netwire 1.2.0

2011-09-06 Thread Ertugrul Soeylemez
Ertugrul Soeylemez wrote: > version 1.2.1 of netwire is out. It's actually 1.2.2 now, because had forgotten something in the .cabal file. Greets Ertugrul -- nightmare = unsafePerformIO (getWrongWife >>= sex) http://ertes.de/ -- nightmare = unsafePerformIO (getWrongWife

[Haskell-cafe] ANN: Netwire 1.2.0

2011-09-06 Thread Ertugrul Soeylemez
Hello there, version 1.2.1 of netwire is out. New features include: * Completely reworked event system. Events are now solely based on signal inhibition, which turns out to be much more convenient and faster than AFRP's traditional approach using Maybe-wrapped values. Now instead

Re: [Haskell-cafe] How to make callCC more dynamic

2011-08-25 Thread Ertugrul Soeylemez
bob zhang wrote: > I was curious that we could bring really continuations into haskell, > the traditional callCC brings a lot of unnecessary type restrictions That's where the misconception lies. The type parameter /is/ necessary for delimited continuations in Haskell. By the way, I don't se

Re: [Haskell-cafe] haskell or lazy functional as procedure language

2011-08-25 Thread Ertugrul Soeylemez
Permjacov Evgeniy wrote: > Ok, I know, I want something strange. But consider situation, when one > is starting a project and finds, that he need s > > 1) ACID relational storage > 2) Power of good RDBMS system (postgresql for example) > 3) Power of some very hight level language and compiled (ha

Re: [Haskell-cafe] How to make callCC more dynamic

2011-08-24 Thread Ertugrul Soeylemez
bob zhang wrote: > I thought the right type for ContT should be > newtype ContT m a = ContT {runContT :: forall r. (a-> m r) -> m r} No, that will effectively make it impossible to make use of CPS effects, hence turning your ContT into an IdentityT-like monad transformer, which can only change t

Re: [Haskell-cafe] Function composition in run-time?

2011-08-24 Thread Ertugrul Soeylemez
dokondr wrote: > This is a nice one, looks already like tiny DSL ) > > I think I've got the main idea - enumerate in my program all function > compositions in some data structure for Haskell to compile, and the > associate these with parameter values in external file. In Haskell you get a not-ev

[Haskell-cafe] ANN: Netwire 1.1.0 and instinct 0.1.0

2011-08-22 Thread Ertugrul Soeylemez
Hello there, today I have released one new library 'instinct' for neural networks as well as a new revision of my AFRP library 'netwire', which comes along with many new features, but also with largely incompatible changes. Instinct is a library for neural networks, which currently features: *

Re: [Haskell-cafe] Problem with types

2011-08-19 Thread Ertugrul Soeylemez
Anupam Jain wrote: > However, if I try to parameterise over the function 'f' it does not > work! - > > p f = (m1',m2') where > m1 = M ("1", ()) > m2 = M ("2", True) > m1' = f m1 > m2' = f m2 > > It doesn't even typecheck, producing the error - "Couldn't match > expected type 'Bool' with

Re: [Haskell-cafe] why is Random in System?

2011-08-17 Thread Ertugrul Soeylemez
Ryan Newton wrote: > I'm the maintainer of random. If people could decide on what the > alternative name would be we could put it through the library proposal > process. It seems that one problem at this moment is the lack of a > single, clear "right" answer. Replacing one debatable not-quite-

Re: [Haskell-cafe] why is Random in System?

2011-08-17 Thread Ertugrul Soeylemez
Brandon Allbery wrote: > > > I've noticed there's a convention to put modules having to deal > > > with randomness into System.Random. I thought System was for OS > > > interaction? Granted getting a random seed usually means going to > > > the OS, but isn't the rest of it, like generating rand

[Haskell-cafe] ANN: Netwire AFRP library

2011-08-07 Thread Ertugrul Soeylemez
Hi there, after a few weeks of development time, I have released the first official version of my arrowized FRP library called Netwire: http://hackage.haskell.org/package/netwire I have written it with networking applications in mind, but it is a general purpose library, so it can be used in

[Haskell-cafe] Animas/Yampa: ArrowChoice?

2011-07-14 Thread Ertugrul Soeylemez
Hello all, I really like the way Animas (fork of Yampa) represents reactive systems, and I would love to write some of my simulations using it. Unfortunately most of what I want to do requires dynamic systems, which can be boiled down to me believing to need an ArrowChoice instance for the SF arro

Re: [Haskell-cafe] Paid work available in functional web programming

2011-07-13 Thread Ertugrul Soeylemez
Christopher Done wrote: > > I write to mention briefly that I'm looking for people interested in > > writing Ur/Web programs for pay.  Ur/Web is a DSL for building > > modern web applications, and I believe it is truly a secret weapon > > for that domain, and one that should appeal to many Haskel

Re: [Haskell-cafe] compare iteratee with python's yield

2011-07-01 Thread Ertugrul Soeylemez
yi huang wrote: > I just read several tutorials on iteratee, i find that iteratee is > similar to python's generator, both allow streamlined data > processing. For example, i can implement enumFile and printChunks in > python like this: > > EOF = None > def enum_file(bufsize, filename): >

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

2011-06-30 Thread Ertugrul Soeylemez
吴兴博 wrote: > it seems that cabal install different into different folders. if two > package contains same module name, can they all exist? since cabal > have no "remvoe" or "uninstall". how can I hide some packages? Alternatively for small programs for which you don't use a Cabal file you can

Re: [Haskell-cafe] Enumerators, Enumeratees and Iterators

2011-06-28 Thread Ertugrul Soeylemez
Sævar Berg wrote: > The first question is, I think, to be solved with enumeratees but I can't > really grok how. > Let's say I have an iteratee that consumes all input. Is it possible to > implement an enumeratee or something else to stick between the enumerator > and the iteratee to basically mo

Re: [Haskell-cafe] toSql and fromSql, for Algebraic Data Type

2011-06-27 Thread Ertugrul Soeylemez
Tom Murphy wrote: > The title is self-explanatory. I'd like to store information from > an algebraic data type in an SQL database, but the type signature of > toSql (toSql > :: Data.Convertible.Base.Convertible a SqlValue => a -> SqlValue) > doesn't make sense to me. > How is this don

Re: [Haskell-cafe] Data.Enumerator question

2011-06-23 Thread Ertugrul Soeylemez
David Place wrote: > I can see that an Enumeratee can produce fewer outputs than it > receives as inputs. For example, this GroupBy Enumeratee. > > > http://hpaste.org/47916 > > Can an Enumeratee produce more outputs than inputs? For instance, > take a Data.Text and send each character to the i

[Haskell-cafe] pool: Why doesn't it block?

2011-06-12 Thread Ertugrul Soeylemez
Hello Michael, hello fellow haskellers, there is something, which has bothered me for quite a while, but now it has become a serious problem for me, because I see it as a bug, and there is no elegant way to work around it. I wonder if it's the right semantics for Data.Pool to simply fail with an

[Haskell-cafe] Yesod: How safe are forms?

2011-06-11 Thread Ertugrul Soeylemez
Hello fellow haskellers, how far does Yesod.Form protect you from invalid input? I'm particularly interested in what happens, when you submit invalid data to select fields or radio groups. Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife >>= sex) http://ertes.de/

Re: [Haskell-cafe] Proposal: remove "Stability" from haddock documentation on hackage

2011-06-08 Thread Ertugrul Soeylemez
Chris Smith wrote: > I got asked a question today about why Control.Applicative is labeled > as "experimental" on Hackage. Perhaps that field is something of a > failed experiment, and it remaining there is likely to confuse people. > > Just a thought... not sure of the best place to mention it.

Re: [Haskell-cafe] *GROUP HUG*

2011-06-04 Thread Ertugrul Soeylemez
Yves Parès wrote: > From from what I see here, Haskell at work seems to target web > development. I should try this soon... That's one of the main use cases for Haskell in real world projects (in my opinion). However, I also use Haskell for network servers. > What is everyone using? Yesod?

Re: [Haskell-cafe] *GROUP HUG*

2011-06-02 Thread Ertugrul Soeylemez
Yves Parès wrote: > > I cannot agree with this for practical reasons. I'm using Haskell > > for real world commercial applications, and I'm very productive with > > it. > > I wish so much I could say that... Out of curiosity, what are you > using Haskell for? I use the Yesod web framework for w

Re: [Haskell-cafe] *GROUP HUG*

2011-06-02 Thread Ertugrul Soeylemez
Ivan Tarasov wrote: > myFoldr :: (a -> b -> b) -> b -> [a] -> b > myFoldr f z xs = foldl' (\s x v -> s (x `f` v)) id xs $ z That's not foldr. It's a function similar to foldr in Haskell and equal to foldr in a different language, which lacks bottom. Greets, Ertugrul -- nightmare = unsafePe

Re: [Haskell-cafe] *GROUP HUG*

2011-06-02 Thread Ertugrul Soeylemez
"Alberto G. Corona " wrote: > Haskell is an academic asset as well as a fun asset. I cannot agree with this for practical reasons. I'm using Haskell for real world commercial applications, and I'm very productive with it. There is however a variation of this statement, with which I could agree

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Ertugrul Soeylemez
Gregory Crosswhite wrote: > Or even better, > > filter isJust To make it worse again the original function can be generalized in a few ways. Here is a generalization from the inner Maybe type: import Data.Foldable as F catFoldables :: Foldable t => [t a] -> [a] catFoldables =

Re: [Haskell-cafe] Random thoughts about typeclasses

2011-05-16 Thread Ertugrul Soeylemez
Robert Clausecker wrote: > I found out, that GHC implements typeclasses as an extra argument, a > record that stores all functions of the typeclass. So I was wondering, > is there a way (apart from using newtype) to pass a custom record as > the typeclass record, to modify the behavior of the typ

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

2011-05-06 Thread Ertugrul Soeylemez
David Mazieres wrote: > Hi, everyone. I'm pleased to announce the release of a new iteratee > implementation, iterIO: > > http://hackage.haskell.org/package/iterIO > > IterIO is an attempt to make iteratees easier to use through an > interface based on pipeline stages reminiscent of Unix c

Re: [Haskell-cafe] Python is lazier than Haskell

2011-04-29 Thread Ertugrul Soeylemez
Chris Smith wrote: > > > Sometimes I wish for a -fphp flag that would turn some type errors > > > into warnings. Example: > > > > > > v.hs:8:6: > > > Couldn't match expected type `[a]' against inferred type `()' > > > In the first argument of `a', namely `y' > > > In the expression: a

Re: [Haskell-cafe] Python is lazier than Haskell

2011-04-28 Thread Ertugrul Soeylemez
Gracjan Polak wrote: > Ketil Malde malde.org> writes: > > > In Haskell, I often need to add stubs of "undefined" in order to do > > this. I don't mind, since it is often very useful to say > > *something* about the particular piece - e.g. I add the type > > signature, establishing the shape of

Re: [Haskell-cafe] There is no null; Maybe/Option types

2011-04-26 Thread Ertugrul Soeylemez
wren ng thornton wrote: > But the greatest thing about Maybe is that you don't *have* to write > code in monadic style. Because Maybe makes explicit the null-pointer > shenanigans in other languages, you can simply unwrap the Maybe and > pass around the raw value instead of letting Nothing permea

Re: [Haskell-cafe] select(2) or poll(2)-like function?

2011-04-18 Thread Ertugrul Soeylemez
Don Stewart wrote: > Redirecting to haskell-cafe@, where this kind of long discussion belongs. Answering to Mike Meyer here, because it has been requested multiple times that we move the discussion to the cafe. What you described about Eiffel didn't sound very different from what Haskell does,

Re: [Haskell-cafe] Stateful iteratees

2011-04-12 Thread Ertugrul Soeylemez
Maciej Marcin Piechotka wrote: > > Does someone know a cleaner, more elegant solution? Encapsulating the > > state in the iteratee's input type is not an option. > > The first thing that come to my mind. > > runWithState :: Iteratee a (StateT s m) b -> s -> Iteratee a m (b, s) > runWithState i s

Re: [Haskell-cafe] Stateful iteratees

2011-04-07 Thread Ertugrul Soeylemez
Gregory Collins wrote: > On Thu, Apr 7, 2011 at 7:35 PM, Ertugrul Soeylemez wrote: > > > > Why can't you use #1 and do this when you call "run_"? > > > > Because that runs the iteratee and leaves me with a StateT.  Even > > though I use a CP

Re: [Haskell-cafe] Stateful iteratees

2011-04-07 Thread Ertugrul Soeylemez
Gregory Collins wrote: > > I'm trying to solve a very practical problem:  I need a stateful > > iteratee monad transformer.  Explicit state passing is very > > inconvenient and would destroy the elegance of my library. > > > > There are two approaches to this: > > > > 1. type MyT a m = Iteratee

[Haskell-cafe] Stateful iteratees

2011-04-07 Thread Ertugrul Soeylemez
Hello fellow Haskellers, I'm trying to solve a very practical problem: I need a stateful iteratee monad transformer. Explicit state passing is very inconvenient and would destroy the elegance of my library. There are two approaches to this: 1. type MyT a m = Iteratee a (StateT MyConfig m)

Re: [Haskell-cafe] 'Progress bar' enumeratee

2011-04-06 Thread Ertugrul Soeylemez
"David Hotham" wrote: > The desired behaviour (certainly my desired behaviour, but I think > also the most useful behaviour generally) is that the enumeratee > passes n bytes to its iteratee, prints a dot, and repeats. > > Given that, printing the dots all in one bunch after passing bytes to > th

Re: [Haskell-cafe] 'Progress bar' enumeratee

2011-04-06 Thread Ertugrul Soeylemez
As a side note, even though GHC seems to handle this properly, I would force the value of 'i' before passing data to the continuation. Otherwise a less smart compiler may eat memory. I believe, it can only eat memory proportional to 'n', but nevertheless real constant space is better: seq i $

Re: [Haskell-cafe] 'Progress bar' enumeratee

2011-04-06 Thread Ertugrul Soeylemez
"David Hotham" wrote: > I did have a version along those lines at some point, but I felt it > was cheating rather to print the dots not at the correct point in the > stream. > > Perhaps I've over-complicated for the sake of the learning experience, > but I do like to have a version that passes on

Re: [Haskell-cafe] 'Progress bar' enumeratee

2011-04-06 Thread Ertugrul Soeylemez
"David Hotham" wrote: > I've spent some time over the last couple of days trying to write an > enumeratee that prints a "." every n bytes (with obvious intended use > as a progress tracker). Seems like it oughtn't be hard, but it has > been a steep learning curve... > > I have come up with somet

[Haskell-cafe] Ann: contstuff, dnscache, ihttp, ismtp, netlines, yesod-tableview

2011-04-03 Thread Ertugrul Soeylemez
ur efforts both in libraries and support. Many thanks, guys! Thanks also to the rest of the innovative and helpful Haskell community. Greets, Ertugrul -- Key-ID: E5DD8D11 "Ertugrul Soeylemez " FPrint: 0F12 0912 DFC8 2FC5 E2B8 A23E 6BAC 998E CE40 2012 Keysrv: hkp://subkeys.pgp.net/

Re: [Haskell-cafe] pool, persistent, persistent-sqlite: Space leak

2011-04-02 Thread Ertugrul Soeylemez
Michael Snoyman wrote: > Good catch, that was most definitely a space leak in pool. I've > uploaded version 0.0.1.1, would you mind testing? Great! I will test it and report back, as soon as I'm at home. Many thanks. Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife >>= sex) h

Re: [Haskell-cafe] using IO monad in Iteratee

2011-04-02 Thread Ertugrul Soeylemez
Bas van Dijk wrote: > On 1 April 2011 21:59, Dmitry Olshansky wrote: > > Is it possible to change enumFile to using MonadIO class? > > No because it uses the control operation Control.Exception.finally :: > IO a -> IO b -> IO a internally. You can't lift control operations > with liftIO :: Monad

[Haskell-cafe] pool, persistent, persistent-sqlite: Space leak

2011-03-30 Thread Ertugrul Soeylemez
Hello Michael, hello fellow Haskellers, there seems to be a space leak in either 'pool', 'persistent' or 'persistent-sqlite'. From the behaviour I suspect the bug to be in 'pool'. When I run a transaction in an infinite loop, my program keeps eating more and more memory, even if the transaction

Re: [Haskell-cafe] ANNOUNCE: enumerator 0.4.8

2011-03-29 Thread Ertugrul Soeylemez
Antoine Latter wrote: > It looks like we can't quite fit Enumeratee into the Category > typeclass (without newtypes, at least). That's a shame. Yeah. Intuitively it looks like iteratees and enumeratees are excellent candidates for Category and even Arrow. Unfortunately they can either be monad

Re: [Haskell-cafe] ANNOUNCE: enumerator 0.4.8

2011-03-29 Thread Ertugrul Soeylemez
Hello John, Sorry that I'm late. And honestly one day for request submissions is a bit narrow. I have a request, too: Right now it is difficult to compose enumeratees. An equivalent of (.) for enumeratees would be great. So instead of: joinI $ e1 $$ joinI $ e2 $$ iter one could write

Re: [Haskell-cafe] ANNOUNCE: enumerator 0.4.8

2011-03-27 Thread Ertugrul Soeylemez
John Millikin wrote: > Good idea -- I've added an ``enumSocketTimed`` and ``iterSocketTimed`` > to the network-enumerator package at < > http://hackage.haskell.org/package/network-enumerator > >. ``enumSocketTimed`` is equivalent to your ``enumHandleTimeout``, > but instead of Handle uses the mor

Re: [Haskell-cafe] ANNOUNCE: enumerator 0.4.8

2011-03-26 Thread Ertugrul Soeylemez
on has been an > ongoing process throughout 0.4.x releases, and I think it's now > complete. The old names in Data.Enumerator will continue to exist in > 0.4.x versions, but will be removed in 0.5. > > Second, Gregory Collins and Ertugrul Soeylemez found a space leak in > I

Re: [Haskell-cafe] Question on a common pattern

2011-03-15 Thread Ertugrul Soeylemez
Hello tsuraan, Most often, when we multi-pattern-match on the return value of a monadic computation, we talk about Maybe or Either or [], and I often find myself doing this: someIO1 :: IO (Maybe A) someIO2 :: IO (Either A B) result1 <- someIO1 >>= maybe ... result2 <- someIO2 >>=

Re: [Haskell-cafe] Yesod 0.7.1 using GHC 7.0.2 on Arch Linux

2011-03-13 Thread Ertugrul Soeylemez
I know, but at least I can go on with development. I hope, the problem will be fixed soon. vagif.ve...@gmail.com wrote: > No, it is not solved. > With -fproduction flag you are loosing devel-server functionality. > > On Saturday, March 12, 2011 02:45:11 PM Ertugrul Soeylemez wrot

Re: [Haskell-cafe] Yesod 0.7.1 using GHC 7.0.2 on Arch Linux

2011-03-12 Thread Ertugrul Soeylemez
Oh, I just noticed the other thread about this issue. Compiling Yesod with the -fproduction flag solved it. Thanks to Michael for that. Greets, Ertugrul Ertugrul Soeylemez wrote: > Hello Ryan, > > thanks a lot. > > Is there a workaround for this, until it's f

Re: [Haskell-cafe] Yesod 0.7.1 using GHC 7.0.2 on Arch Linux

2011-03-12 Thread Ertugrul Soeylemez
> On Sat, Mar 12, 2011 at 3:26 PM, Ertugrul Soeylemez wrote: > > > Hello there, > > > > today I have upgraded to GHC 7.0.2 by doing a system update on my Arch > > Linux box (x86, 32 bits), and I'm having difficulties to install Yesod. > > Its dependencie

[Haskell-cafe] Yesod 0.7.1 using GHC 7.0.2 on Arch Linux

2011-03-12 Thread Ertugrul Soeylemez
Hello there, today I have upgraded to GHC 7.0.2 by doing a system update on my Arch Linux box (x86, 32 bits), and I'm having difficulties to install Yesod. Its dependencies seem to have been installed without problems, but the Yesod package itself fails. The complete build log follows: % cab

Re: [Haskell-cafe] On hGetContents semi-closenesscloseness

2011-02-16 Thread Ertugrul Soeylemez
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Brandon S Allbery KF8NH wrote: > Haskell is actually what manufacturing folks call "just in time"; > things are evaluated when they are needed. Usually this means that > when you output something, anything needed to compute that output will > b

Re: [Haskell-cafe] Yesod and concurrency

2011-02-03 Thread Ertugrul Soeylemez
Michael Snoyman wrote: > On Mon, Jan 31, 2011 at 1:09 PM, Ertugrul Soeylemez wrote: > > > how well do WAI, Yesod and the 'persistent' package play with > > concurrency?  For example, I'd like to write a program, which > > concurrently provides two re

  1   2   3   >