[Haskell-cafe] Ann: Netwire 3.0.0

2011-12-01 Thread Ertugrul Söylemez
Hello there, Netwire 3.0.0 is out: http://hackage.haskell.org/package/netwire Overview Netwire is a library for high performance functional reactive programming, which calls its signal functions 'wires'. It solves the classic problems of FRP through a number of simple concepts:

Re: [Haskell-cafe] ANNOUNCE: monad-control-0.3

2011-12-03 Thread Ertugrul Söylemez
Bas van Dijk v.dijk@gmail.com wrote: It provides lifted versions of functions from the base library. Currently it exports the following modules: * Control.Exception.Lifted * Control.Concurrent.Lifted * Control.Concurrent.MVar.Lifted * System.Timeout.Lifted These are just modules

Re: [Haskell-cafe] How did iteratees get their names?

2011-12-07 Thread Ertugrul Söylemez
Douglas McClean douglas.mccl...@gmail.com wrote: I love iteratees as a paradigm for IO, but I am having trouble developing a relationship with the names. Could someone explain their origin? It seems like if iteratees consume things, enumerators produce them, andenumeratees do both that

Re: [Haskell-cafe] How did iteratees get their names?

2011-12-07 Thread Ertugrul Söylemez
Henrik Nilsson n...@cs.nott.ac.uk wrote: Just like chatter and chattee, employer and employee, there is an iterator (usually as part of an enumerator/ee) and an iteratee. Thanks for the attempt to explain. But I, at least, remain mystified, and I agree with Douglas that the terminology is

[Haskell-cafe] web-routes-quasi: Generating a route type

2011-12-09 Thread Ertugrul Söylemez
Hello there, I'm trying to use the web-routes-quasi package outside of Yesod. Is there any documentation on how to use TH to generate a route type just like Yesod does? Or is that a Yesod-specific feature? I don't need the actual automatic dispatch or anything, just a type to work with. If

[Haskell-cafe] AFRP is not (necessarily) imperative

2011-12-12 Thread Ertugrul Söylemez
Hello fellows, after a few discussions on IRC and via private mail I feel obligated to point out that arrows and in particular AFRP do not force you to use an imperative style in any way. You can use a style very similar to SHE's idiom brackets. I will demonstrate this using the Netwire

[Haskell-cafe] Test

2011-12-21 Thread Ertugrul Söylemez
This is a test. Please disregard. -- nightmare = unsafePerformIO (getWrongWife = sex) http://ertes.de/ signature.asc Description: PGP signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] State Machine Composition

2011-12-22 Thread Ertugrul Söylemez
Daniel Waterworth da.waterwo...@gmail.com wrote: I made this simple state machine combinator library today. I think it works as a simple example of a good use for GADTs. https://gist.github.com/1507107 Aren't your examples all special cases of the generic automaton arrow? There are two ways

Re: [Haskell-cafe] Are all monads functions?

2011-12-31 Thread Ertugrul Söylemez
Yves Parès limestrael+hask...@gmail.com wrote: But still, I maintain my previous view. I could clarify that by saying that (e.g. for Maybe) we could separate it in two types, Maybe itself and its monad: -- The plain Maybe type data Maybe a = Just a | Nothing -- The MaybeMonad newtype

[Haskell-cafe] Thanks and a happy new year!

2012-01-01 Thread Ertugrul Söylemez
Dear fellow Haskellers, as I have learned so much throughout the past four years of Haskell experience, I feel obligated to thank everyone for the nice support and the great ideas. Exploring and using Haskell has changed my way of thinking about programming and computers in a profound way and

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

2012-01-01 Thread Ertugrul Söylemez
Steve Horne sh006d3...@blueyonder.co.uk wrote: The do-notation sugar may confuse the issue - the - looks like an operator, but translating to binds-and-lambdas form suggests otherwise. Quick translations (I hope no mistakes) with lots of parens... m = (\x - (f x x)) m = (\x - (m =

Re: [Haskell-cafe] Serializing UTCTimes

2012-01-20 Thread Ertugrul Söylemez
Bas van Dijk v.dijk@gmail.com wrote: However I have no idea how to serialize the DiffTime stored in an UTCTime: instance Serialize DiffTime where get = ? put = ? Note that DiffTime has this weird property that there is a Real instance, so you have a toRational function. ;) To

Re: [Haskell-cafe] strict version of Haskell - does it exist?

2012-01-29 Thread Ertugrul Söylemez
Marc Weber marco-owe...@gmx.de wrote: A lot of work has been gone into GHC and its libraries. However for some use cases C is still preferred, for obvious speed reasons - because optimizing an Haskell application can take much time. Is there any document describing why there is no ghc

Re: [Haskell-cafe] strict version of Haskell - does it exist?

2012-01-30 Thread Ertugrul Söylemez
Alexander Bernauer alex-hask...@copton.net wrote: On Sun, Jan 29, 2012 at 11:25:09PM +0100, Ertugrul Söylemez wrote: First of all, /learning/ to optimize Haskell can be difficult. The optimizing itself is actually fairly easy in my experience, once you understand how the language works

[Haskell-cafe] network-conduit failing to close sockets

2012-02-01 Thread Ertugrul Söylemez
Hello there, I have tried to implement a simple echo server using the network-conduit library version 0.2.1. This is the code: module Main where import Data.Conduit import Data.Conduit.Network main :: IO () main = runTCPServer (ServerSettings 4000 Nothing) ($$) It works,

Re: [Haskell-cafe] network-conduit failing to close sockets

2012-02-01 Thread Ertugrul Söylemez
Michael Snoyman mich...@snoyman.com wrote: Good catch, thanks guys. New version released. Note: there was the same bug in runTCPClient, the new test suite checks for both. Thanks for the quick response. Greets, Ertugrul -- Key-ID: E5DD8D11 Ertugrul Soeylemez e...@ertes.de FPrint: BD28

[Haskell-cafe] Conduit experiment: Is this correct?

2012-02-03 Thread Ertugrul Söylemez
Hello there, I'm trying to build a server for testing the conduit and network-conduit packages. As a contrived example the goal is to pick the first three lines from the client and send them back without the line feeds. After that, I'd like to switch to a simple echo server. This is the code:

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-02-03 Thread Ertugrul Söylemez
Steve Horne sh006d3...@blueyonder.co.uk wrote: There's a proposal at the moment to add support for TDNR to Haskell - to leverage the power of the dot (e.g. for intellisense). http://hackage.haskell.org/trac/haskell-prime/wiki/TypeDirectedNameResolution I'm not sure whether this should really

Re: [Haskell-cafe] Conduit experiment: Is this correct?

2012-02-03 Thread Ertugrul Söylemez
Michael Snoyman mich...@snoyman.com wrote: In this particular case, it will work due to the implementation of snk. In general, however, you're correct: you should not use the same sink twice. I haven't thought about it much yet, but my initial recommendation would be to create a new Conduit

Re: [Haskell-cafe] Conduit experiment: Is this correct?

2012-02-03 Thread Ertugrul Söylemez
Michael Snoyman mich...@snoyman.com wrote: In this particular case, it will work due to the implementation of snk. In general, however, you're correct: you should not use the same sink twice. I haven't thought about it much yet, but my initial recommendation would be to create a new Conduit

Re: [Haskell-cafe] Mersenne-random and standard random API

2012-02-09 Thread Ertugrul Söylemez
Yves Parès yves.pa...@gmail.com wrote: I've been in the past told that mersenne-random was much better than the standard random package. This is relative. The Mersenne Twister algorithm has a large memory footprint, but in relation to the size of the average Haskell program, this is probably

Re: [Haskell-cafe] Best FRP package for newbie

2012-02-17 Thread Ertugrul Söylemez
Gabríel A. Pétursson gabri...@simnet.is wrote: Netwire by Ertugrul Söylemez would be a good library to start with. If for some reason netwire doesn't quite suit your needs, take a look at Animas, a fork of Yampa. http://hackage.haskell.org/package/netwire-3.1.0 http://www.haskell.org

Re: [Haskell-cafe] Haskell showcase in 5 minutes

2012-02-27 Thread Ertugrul Söylemez
Arnaud Bailly arnaud.oq...@gmail.com wrote: I will be (re)presenting Haskell in a Batlle Language event Wednesday evening: A fun and interactive contest where various programming language champions try to attract as much followers as possible in 5 minutes. Having successfully experimented

Re: [Haskell-cafe] Haskell showcase in 5 minutes

2012-02-28 Thread Ertugrul Söylemez
Arnaud Bailly arnaud.oq...@gmail.com wrote: Thanks Yves for your advice. And I agree with you that too much laziness may be mind-blowing for most of the audience, yet this is one of the characteristics of Haskell, whether or not we like it and whatever troubles it can induce. I really think

Re: [Haskell-cafe] Theoretical question: are side effects necessary?

2012-03-16 Thread Ertugrul Söylemez
Hi there, Christopher Svanefalk christopher.svanef...@gmail.com wrote: there is a question I have been thinking about a bit. In short, we could simply formulate it like this: Are there any problems which *cannot *be solved a side effect-free language (such as Haskell)? In other words, are

Re: [Haskell-cafe] is the evaluation order deterministic when using applicative with IO

2012-03-16 Thread Ertugrul Söylemez
Rouan van Dalen rvda...@yahoo.co.uk wrote: I was wondering if I can make assumptions about the evaluation order of the following code: Nitpick: This is execution order, not evaluation order. The evaluation order is indeed undefined here. Greets, Ertugrul -- nightmare = unsafePerformIO

Re: [Haskell-cafe] Is this a correct explanation of FRP?

2012-03-29 Thread Ertugrul Söylemez
Peter Minten peter.min...@orange.nl wrote: I've been trying to get my head around Functional Reactive Programming by writing a basic explanation of it, following the logic that explaining something is the best way to understand it. Am I on the right track with this explanation? You are

Re: [Haskell-cafe] Is this a correct explanation of FRP?

2012-04-01 Thread Ertugrul Söylemez
Peter Minten peter.min...@orange.nl wrote: Sorry, I don't understand this. Would it be correct to say that AFRP shares the basic ideas of FRP in that it has behaviors and events/signals and that the main difference comes from the way AFRP is implemented? Well, FRP is usually interpreted as

Re: [Haskell-cafe] I Need a Better Functional Language!

2012-04-10 Thread Ertugrul Söylemez
Tillmann Rendel ren...@informatik.uni-marburg.de wrote: I am curious what are interesting use-cases for that? Symbolic analysis? self-compilers? Optimization. For example, imagine the following definition of function composition: map f . map g = map (f . g) f . g = \x - f (g x)

Re: [Haskell-cafe] Annoyed at System.Random

2012-05-03 Thread Ertugrul Söylemez
Thomas DuBuisson thomas.dubuis...@gmail.com wrote: I've grown annoyed at System.Random enough (specifically, StdGen). How much, if any, pushback would there be if I put together a FFI binding to a C AES-CTR based RNG. There are many advantages: [...] I'd be tempted to pull in the

Re: [Haskell-cafe] Annoyed at System.Random

2012-05-03 Thread Ertugrul Söylemez
Thomas DuBuisson thomas.dubuis...@gmail.com wrote: Vincent has done great work for Haskell+Crypto so I think he knows I mean nothing personal when I say cprng-aes has the right idea done the wrong way. Why a new effort vs Vincent's package? 1. cprng-aes is painfully slow. 2. It doesn't use

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-06 Thread Ertugrul Söylemez
Janek S. fremenz...@poczta.onet.pl wrote: a couple of times I've encountered a statement that Haskell programs can have performance comparable to programs in C/C++. I've even read that thanks to functional nature of Haskell, compiler can reason and make guarantess about the code and use that

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-06 Thread Ertugrul Söylemez
Roman Cheplyaka r...@ro-che.info wrote: isn't it that particular Haskell code is outperforming C (22 seconds vs. 33), just because the author uses recursion in C? I surely love Haskell, and the way it's code is easy parallelized, but that example seams not fair. I think the point was

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-10 Thread Ertugrul Söylemez
Ryan Newton rrnew...@gmail.com wrote: I think this is a bit of an unfair accusation (simple-minded). Performance is only relevant to certain domains, sure. But program performance is an entire *industry*. And I'd argue it's of massive importance to the world at large. Intel has an army of

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-12 Thread Ertugrul Söylemez
Gregg Lebovitz glebov...@gmail.com wrote: Ryan writes: With a few years of Haskell experience in my backpack I know how to utilize laziness to get amazing performance for code that most people would feel must be written with destructively updating loop. That was me actually. Just a minor

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-14 Thread Ertugrul Söylemez
Dmitry Vyal akam...@gmail.com wrote: My point is: If you need C-like performance at a certain spot there is really no excuse for writing the entire application in C. Haskell has a working, powerful enough FFI. Also idiomatic Haskell code nowadays performs close to C. If your code doesn't,

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-19 Thread Ertugrul Söylemez
wren ng thornton w...@freegeek.org wrote: However, while the logical interpretation of Ertugrul's words may be that simple-mindedness implies performance-desire, that interpretation is not the only one available to the standard interpretation of his words, nor IMO the dominant interpretation.

Re: [Haskell-cafe] Formalisation for types of monads

2012-05-21 Thread Ertugrul Söylemez
Yves Parès yves.pa...@gmail.com wrote: When explaining monads to beginners (having an imperative background), I found myself to say that there is *roughly* three groups of monads (because they're always worried about their cost, i.e. their incidental complexity): My recommendation (as I've

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-21 Thread Ertugrul Söylemez
Ryan Newton rrnew...@gmail.com wrote: I do think we have the opposite problem, however, in much Haskell code -- people are using the clean, obviously correct, but inefficient code even in standard library functions that really should be optimized like crazy! Not necessarily. For example the

Re: [Haskell-cafe] Formalisation for types of monads

2012-05-23 Thread Ertugrul Söylemez
Yves Parès yves.pa...@gmail.com wrote: Note about []: Don't even mention foldl. The folding combinator for lists is foldr, period. Yes, I do agree. I came to this when I realized foldr gave the church encoding of a list. Not only that. The foldr combinator has an identity fold and

Re: [Haskell-cafe] gona to join in haskell-cafe

2012-05-26 Thread Ertugrul Söylemez
Dante.py xiangduxi...@gmail.com wrote: I come from China, wishing to enjoy haskell with you. Hi there and welcome to the Haskell community. =) Greets, Ertugrul signature.asc Description: PGP signature ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Confused by ghci output

2012-05-31 Thread Ertugrul Söylemez
Clark Gaebel cgae...@uwaterloo.ca wrote: *X 3^40 `mod` 3 == modexp2 3 40 3 False *X modexp2 3 40 3 0 *X 3^40 `mod` 3 0 I'm confused. Last I checked, 0 == 0. This has to do with types: 3^40 `mod` 3 0 3^40 `mod` 3 :: Int 2 When doing number theory always use Integer.

Re: [Haskell-cafe] Program for displaying graph state in lambda interpreter?

2012-06-02 Thread Ertugrul Söylemez
Benjamin Redelings benjamin.redeli...@duke.edu wrote: However, it would be nice to know of any programs that are better suited for this. For example, if I could write * and draw arrows from the placeholders to the memory location being referenced, that would be easier to read. This is

Re: [Haskell-cafe] lightweight alternative to mtl?

2012-06-16 Thread Ertugrul Söylemez
Anton Kholomiov anton.kholom...@gmail.com wrote: What are you using instead of mtl? I need simple type for State. The more classy it gets the harder error messages are to understand. I've installed new package. Silently it installed new mtl. And here I'm staring into three lines of code

Re: [Haskell-cafe] How do people still not understand what FP is about? What are we doing wrong?

2012-06-18 Thread Ertugrul Söylemez
Ben Kolera ben.kol...@gmail.com wrote: Programming languages that require random senseless voodoo to get an effect are awesome. Let's make programming hard through poor design. [1] [...] Is it even worth trying to convince people so set in their ways? Someone saying something as stupid as

Re: [Haskell-cafe] How do people still not understand what FP is about? What are we doing wrong?

2012-06-18 Thread Ertugrul Söylemez
Christopher Done chrisd...@googlemail.com wrote: You just have to live with the fact that there will always be a small percentage of retarded people.  It's best to just ignore them. Well, they're not stupid. Just very stubborn. Like most programmers. Stupid people can be taught to be

Re: [Haskell-cafe] Plain lambda inside banana brackets in the arrow notation

2012-07-06 Thread Ertugrul Söylemez
Tsuyoshi Ito tsuyoshi.ito.2...@gmail.com wrote: How can I use combinators like repeat, which takes a plain function as an argument, in the arrow notation in a more readable way? Or am I trying to do an impossible thing? To answer your question: Arrow notation has no support for what you

Re: [Haskell-cafe] Interest in typed relational algebra library?

2012-07-07 Thread Ertugrul Söylemez
Paul Visschers m...@paulvisschers.net wrote: I've been out of the Haskell game for a bit, but now I'm back. A couple of years ago I made a small library that implements relational algebra with types so that malformed queries and other operations are caught at compile time. It is heavily based

Re: [Haskell-cafe] Plain lambda inside banana brackets in the arrow notation

2012-07-15 Thread Ertugrul Söylemez
Ross Paterson r...@soi.city.ac.uk wrote: Though one possibility that might get us most of the way there would be to refactor the Arrow class as class PreArrow a where premap :: (b - b') - a b' c - a b c Note that you are reinventing the 'profunctors' package here. Every arrow forms a

Re: [Haskell-cafe] What is the surefire way to handle all exceptions and make sure the program doesn't fail?

2012-07-17 Thread Ertugrul Söylemez
Hello there Yifan, exception handling should be done on a per-context basis, where the developer establishes the notion of context. Most of the time this boils down to releasing resources: forkIO (doStuffWith h `finally` hClose h) In more complicated scenarios, where you actually need to

Re: [Haskell-cafe] Relational Algebra library: first version on GitHub

2012-07-21 Thread Ertugrul Söylemez
Hello there Paul, Paul Visschers m...@paulvisschers.net wrote: A couple of weeks ago I asked if there was interest in a library that implements a type-safe relational algebra. The response was positive, so I have spruced up the code I had a bit and created a repository on GitHub at:

Re: [Haskell-cafe] specifying using type class

2012-07-22 Thread Ertugrul Söylemez
Patrick Browne patrick.bro...@dit.ie wrote: {- Below is a *specification* of a queue. If possible I would like to write the equations in type class. Does the type class need two type variables? How do I represent the constructors? Can the equations be written in the type class rather than

Re: [Haskell-cafe] specifying using type class

2012-07-22 Thread Ertugrul Söylemez
Hi there Patrick, Patrick Browne patrick.bro...@dit.ie wrote: Thanks for you very clear explanation. Without committing to some concrete representation such as list I do not know how to specify constructors in the class (see below). As you point out a class may not be appropriate for an

Re: [Haskell-cafe] specifying using type class

2012-07-23 Thread Ertugrul Söylemez
Patrick Browne patrick.bro...@dit.ie wrote: Thank you for your clear an detailed reply, the work on dependent types seems to address my needs. However it is beyond my current research question, which is quite narrow(see[1]). I merely wish to identify the strengths and weakness of *current

Re: [Haskell-cafe] specifying using type class

2012-07-31 Thread Ertugrul Söylemez
Patrick Browne patrick.bro...@dit.ie wrote: Thanks for all the very useful feed back on this thread. I would like to present my possibly incorrect summarized  view: Class signatures can contain placeholders for constructors. These place-holder-constructors cannot be used in the class to

Re: [Haskell-cafe] Benchmark of DFT libraries in Haskell

2012-08-05 Thread Ertugrul Söylemez
Takayuki Muranushi muranu...@gmail.com wrote: * vector-fftw with wisdom was more than 1/2 times faster than fftw in C with wisdom (and with communication overhead.) * vector-fftw without wisdom was significantly _faster_ than fftw in C without wisdom. I wonder why. * vector-fftw over vector

Re: [Haskell-cafe] Benchmark of DFT libraries in Haskell

2012-08-06 Thread Ertugrul Söylemez
Scott Michel scooter@gmail.com wrote: I might be missing something in translation, but if I understand Takayuki's message's intent, everything needs to be calculated because the C-based FFTW library is called (eventually). Laziness doesn't really have an impact. The choice of underlying

Re: [Haskell-cafe] 'let' keyword optional in do notation?

2012-08-08 Thread Ertugrul Söylemez
Vo Minh Thu not...@gmail.com wrote: This is not a parsing problem, but a scoping one: try to run this program: main = do let x = y y = 5 let a = b let b = 6 print (x, y, a, b) Cheers, Thu Martijn has actually covered this question: Where each sequence of let-less

Re: [Haskell-cafe] 3 level hierarchy of Haskell objects

2012-08-08 Thread Ertugrul Söylemez
Patrick Browne patrick.bro...@dit.ie wrote: Gast [1] describes a 3 level hierarchy of Haskell objects using elementOf from set theory: value  *elementOf*  type  *elementOf*  class This hierarchy is pretty arbitrary and quickly runs into problems with some type system extensions. You can

Re: [Haskell-cafe] 3 level hierarchy of Haskell objects

2012-08-08 Thread Ertugrul Söylemez
Patrick Browne patrick.bro...@dit.ie wrote: If we include super-classes would the following be an appropriate mathematical representation? What is a superclass?  What are the semantics? I assume that like a normal class a super-class *defines* a set operations for types, but it is

Re: [Haskell-cafe] How to simplify the code of Maybe within a monad?

2012-08-16 Thread Ertugrul Söylemez
Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Since Maybe is a monad, I could write code like 'maybeA maybeB maybeC' to check if all these are not Nothing. Or 'liftM foo maybeD' to avoid ugly 'case of'. Also check out the somewhat cleaner Functor class with its liftM

Re: [Haskell-cafe] guards in applicative style

2012-09-12 Thread Ertugrul Söylemez
Brent Yorgey byor...@seas.upenn.edu wrote: However, guardA is not as useful as guard, and it is not possible to do the equivalent of the example shown using a list comprehension with a guard. The reason is that whereas monadic computations can make use of intermediate computed values to

Re: [Haskell-cafe] simple servers

2012-09-19 Thread Ertugrul Söylemez
Kazu Yamamoto (山本和彦) k...@iij.ad.jp wrote: One last question. When writing C code, using epoll apis explicitly can impose some blocking. Is the same to be said for GHC.Event? I don't understand your question. All system calls issued from the network package use non-blocking. You don't

Re: [Haskell-cafe] Explicitly passing an argument to an arrow

2012-10-03 Thread Ertugrul Söylemez
Alfredo Di Napoli alfredo.dinap...@gmail.com wrote: Thanks Brent, this should do the trick, although what I was asking was something more general: For explicitly pass I meant passing them without the eta reduce, in other terms: swapA' :: (Arrow a) = a ((b,c), (b,c)) (c,b) swapA' t =

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

2012-10-15 Thread Ertugrul Söylemez
damodar kulkarni kdamodar2...@gmail.com wrote: The Monad class makes us define bind (=) and unit (return) for our monads. Why the Kleisli composition (=) or (=) is not made a part of Monad class instead of bind (=)? Is there any historical reason behind this? The bind (=) is not as

Re: [Haskell-cafe] Computed promoted natural

2012-11-08 Thread Ertugrul Söylemez
Arie Peterson ar...@xs4all.nl wrote: I'm trying to use data kinds, and in particular promoted naturals, to simplify an existing program. The background is as follows: I have a big computation, that uses a certain natural number 'd' throughout, which is computed from the input. Previously,

Re: [Haskell-cafe] code length in Haskell, a comparison

2012-11-19 Thread Ertugrul Söylemez
Darren Grant therealklu...@gmail.com wrote: I find myself wondering where Rebol would stand in this. Or APL. Greets, Ertugrul -- Not to be or to be and (not to be or to be and (not to be or to be and (not to be or to be and ... that is the list monad. signature.asc Description: PGP

Re: [Haskell-cafe] Can a GC delay TCP connection formation?

2012-11-26 Thread Ertugrul Söylemez
Jeff Shaw shawj...@gmail.com wrote: I've run into an issue that makes me think that when the GHC GC runs while a Snap or Warp HTTP server is serving connections, the GC prevents or delays TCP connections from forming. My application requires that TCP connections form within a few tens of

Re: [Haskell-cafe] Observer pattern in haskell FRP

2012-11-27 Thread Ertugrul Söylemez
Nathan Hüsken nathan.hues...@posteo.de wrote: In fact it could be a (free) monad: myApp :: MyWire a (GameDelta ()) someDelta :: GameDelta () someDelta = do randomPos - liftA2 (,) getRandom getRandom replicateM_ 4 (addCreature randomPos)

Re: [Haskell-cafe] Simple GUI Form

2012-11-29 Thread Ertugrul Söylemez
Hi there Rune, if you want to get started with declarative GUI programming in Haskell, I really recommend taking the FRP route. Check out the reactive-banana-wx [1] library instead of using wxHaskell directly. If you manage to get wxHaskell working on Windows, then reactive-banana will work as

Re: [Haskell-cafe] Simple GUI Form

2012-11-29 Thread Ertugrul Söylemez
Rune Harder Bak r...@bak.dk wrote: I'm very interested in FRP, but all the examples I could see was forms with live feedback gui like a real-time calculator. This is a one-time form where the user fills everything in, clicks on a button, where after the computations might take a long time,

Re: [Haskell-cafe] Observer pattern in haskell FRP

2012-12-10 Thread Ertugrul Söylemez
Nathan Hüsken nathan.hues...@posteo.de wrote: I put a pseudo C++ example below the mail. I use the terms model and view for the game logic and rendering respectively. The example is a little different. Asteroids explode when they collide. The moment asteroids explode, they are removed from

Re: [Haskell-cafe] How to start with GHC development?

2012-12-11 Thread Ertugrul Söylemez
Eric Rochester eroch...@gmail.com wrote: Another idea is to have a list of open tasks grouped by how difficult they will be and how much knowledge of Haskell and GHC will be required. This is somewhat at odds with the earlier suggestion to have domains in codebase, with separate de facto

Re: [Haskell-cafe] Observer pattern in haskell FRP

2012-12-11 Thread Ertugrul Söylemez
Nathan Hüsken nathan.hues...@posteo.de wrote: Actually it is very scalable, as the same map is passed to every object. It can even live in the underlying monad, which means that you could even use a mutable vector, if you wish; however, I don't recommend that. Remember that a map is

Re: [Haskell-cafe] Predicates in data types

2012-12-12 Thread Ertugrul Söylemez
Navid Hallajian navi...@gmail.com wrote: I'm a beginner in Haskell, so forgive me if this is a basic question, but I'd like to know if it's possible to have a predicate as part of a data type, so that when the data type is created, it can only be done if it satisfies the predicate else a type

Re: [Haskell-cafe] Can cabal be turned into a package manager?

2012-12-12 Thread Ertugrul Söylemez
Janek S. fremenz...@poczta.onet.pl wrote: In the recent months there was a lot of dicussion about cabal, dependency hell and alike. After reading some of these discussions there is a question I just have to ask: Why not create a package manager (like rpm or apt) for Haskell software? There

Re: [Haskell-cafe] Can cabal be turned into a package manager?

2012-12-12 Thread Ertugrul Söylemez
Rustom Mody rustompm...@gmail.com wrote: On Wed, Dec 12, 2012 at 11:25 PM, Ertugrul Söylemez e...@ertes.de wrote: Janek S. fremenz...@poczta.onet.pl wrote: In the recent months there was a lot of dicussion about cabal, dependency hell and alike. After reading some

Re: [Haskell-cafe] category design approach for inconvenient concepts

2012-12-17 Thread Ertugrul Söylemez
Christopher Howard christopher.how...@frigidcode.com wrote: Say you created a type called Component (C for short), the idea being to compose Components out of other Components. Every C has zero or more connectors on it. Two Cs can be connected to form a new C using some kind of composition

Re: [Haskell-cafe] category design approach for inconvenient concepts

2012-12-18 Thread Ertugrul Söylemez
Christopher Howard christopher.how...@frigidcode.com wrote: Since I received the two responses to my question, I've been trying to think deeply about this subject, and go back and understand the core ideas. I think the problem is that I really don't have a clear understanding of the basics of

Re: [Haskell-cafe] category design approach for inconvenient concepts

2012-12-19 Thread Ertugrul Söylemez
Mark Flamer m...@flamerassoc.com wrote: I have also become intrigued and confused by this category theory and how it relates to Haskell. It has been stated many times that you don't need to understand category theory to utilize the Haskell language but all the concepts, patterns and every

Re: [Haskell-cafe] Example programs with ample use of deepseq?

2013-01-08 Thread Ertugrul Söylemez
Joachim Breitner m...@joachim-breitner.de wrote: I’m wondering if the use of deepseq to avoid unwanted lazyness might be a too large hammer in some use cases. Therefore, I’m looking for real world programs with ample use of deepseq, and ideally easy ways to test performance (so preferably no

Re: [Haskell-cafe] ANN: crypto-pubkey: all your public key crypto algorithms belong to us.

2013-01-12 Thread Ertugrul Söylemez
Vincent Hanquez t...@snarc.org wrote: I've recently released crypto-pubkey [1][2], which provide a comprehensive solution for public key cryptography. Most known RSA modes (PKCS15, OAEP, PSS) are supported, and there's also DSA and ElGamal signature support. Most of the code originally

Re: [Haskell-cafe] ANN: crypto-pubkey: all your public key crypto algorithms belong to us.

2013-01-14 Thread Ertugrul Söylemez
Vincent Hanquez t...@snarc.org wrote: Also for the particular purpose of generating safe primes I have written a blazingly fast implementation that uses intelligent sieving and finds even large primes (= 4096 bits) within seconds or minutes. It's on hpaste [2]. I might turn this into a

Re: [Haskell-cafe] ANN: crypto-pubkey: all your public key crypto algorithms belong to us.

2013-01-15 Thread Ertugrul Söylemez
Vincent Hanquez t...@snarc.org wrote: Yes, the performance are terrible in term of integers. As the library is specific to public key algorithm, i just can't reasonable work on 64 bits integer :-), and multiprecision integers is the only way to go. I'm on-and-off working on some mutable mpi

Re: [Haskell-cafe] ANNOUNCE: MFlow 0.2

2013-01-18 Thread Ertugrul Söylemez
Heinrich Apfelmus apfel...@quantentunnel.de wrote: For some reason, your blog posts are not displayed in my browser (Chrome). I block all cookies and I'm using adblock, though. Blogger.com blogs often need JavaScript to display anything at all. Greets, Ertugrul -- Not to be or to be and

Re: [Haskell-cafe] Container libraries

2013-01-20 Thread Ertugrul Söylemez
Alexander Solla alex.so...@gmail.com wrote: What is the state of container libraries? I am looking for a library which provides: * unordered containers (for operational type safety, I don't want to impose orders on things that don't have them -- unordered containers does this) You are

Re: [Haskell-cafe] ANN: monad-bool 0.1

2013-01-22 Thread Ertugrul Söylemez
Roman Cheplyaka r...@ro-che.info wrote: - what do you need unsafeCoerce for? The unsafeCoerce is needed because the library is severely broken. Consider this: do onlyIf False x - c onlyIf True return x There is a good reason why Haskell's type system would never have

Re: [Haskell-cafe] ANN: monad-bool 0.1

2013-01-22 Thread Ertugrul Söylemez
John Wiegley jo...@fpcomplete.com wrote: And poof, all my code just disappeared... Welcome to Haskell. =) Greets, Ertugrul -- Not to be or to be and (not to be or to be and (not to be or to be and (not to be or to be and ... that is the list monad. signature.asc Description: PGP signature

Re: [Haskell-cafe] ANN: monad-bool 0.1

2013-01-23 Thread Ertugrul Söylemez
David Thomas davidleotho...@gmail.com wrote: We could even set up NotOnHackage: a package repository just like Hackage, except the packages are just documentation on why there is no such package. Implementation-wise it's just a wiki; but the idea is about how to organize the wiki.

Re: [Haskell-cafe] ANN: monad-bool 0.1

2013-01-26 Thread Ertugrul Söylemez
wren ng thornton w...@freegeek.org wrote: Yes. There is no reason to put up a second Hackage for that one. Without changing anything in the current system, packages can just update their categories, so that they will be displayed below Defunct or something like that. This is fine, as

Re: [Haskell-cafe] Suggestiong for inter-thread communication

2013-01-26 Thread Ertugrul Söylemez
Erik de Castro Lopo mle...@mega-nerd.com wrote: Do you need advice on what? I didn't understand your last phrase. Well I have data from two sources, stdin and the calculation thread. If I was doing this in C, I'd probably use a pipe for the calculation data and then do select on the two

Re: [Haskell-cafe] Monadic parser vs. combinator parser

2013-01-30 Thread Ertugrul Söylemez
Jan Stolarek jan.stola...@p.lodz.pl wrote: I will be writing a parser in Haskell and I wonder how to approach the problem. My first thought was to use monadic parser, e.g. like the one described by Hutton and Meijer in Monadic Parsing in Haskell functional pearl. But then I stumbled upon

Re: [Haskell-cafe] Ticking time bomb

2013-01-30 Thread Ertugrul Söylemez
Ramana Kumar ramana.ku...@cl.cam.ac.uk wrote: But if you keep calling cabal a package manager, eventually you'll have to write the patches to make it one. The combination of Cabal, cabal-install and Hackage is a package distribution system. As such, it needs the necessary cryptographic

Re: [Haskell-cafe] FFI - Approaches to C/C++

2013-01-30 Thread Ertugrul Söylemez
Casey Basichis caseybasic...@gmail.com wrote: I'm working on a project in Haskell and C++ where the former is the brains and the latter is for UI, interaction etc. That's a rather odd choice. Not exactly answering your question, but questioning your project decisions, why would you do UI and

Re: [Haskell-cafe] FFI - Approaches to C/C++

2013-01-31 Thread Ertugrul Söylemez
Casey Basichis caseybasic...@gmail.com wrote: I'm not entirely sure what you mean. I'm intending on using Ogre for GUI - for which there is the Hogre bindings, but after emailing the DEV about it, I didn't get the impression from his advice that I should be using it for production code.

Re: [Haskell-cafe] Ticking time bomb

2013-01-31 Thread Ertugrul Söylemez
Vincent Hanquez t...@snarc.org wrote: I agree this is terrible, I've started working on this, but this is quite a bit of work and other priorities always pop up. https://github.com/vincenthz/cabal https://github.com/vincenthz/cabal-signature My current implementation generate a manifest

Re: [Haskell-cafe] Ticking time bomb

2013-01-31 Thread Ertugrul Söylemez
Vincent Hanquez t...@snarc.org wrote: For example, previous maintainer might be away from email for a long time potentially leaving a trojan version for days/weeks, or changed email address.. And that may even be more harmful, because an insecure system with a false sense of security is worse

Re: [Haskell-cafe] Ticking time bomb

2013-01-31 Thread Ertugrul Söylemez
Joachim Breitner m...@joachim-breitner.de wrote: And that may even be more harmful, because an insecure system with a false sense of security is worse than an insecure system alone. Let's do it properly. but don’t overengineer it either. Simply adding to hackage the possibility to

Re: [Haskell-cafe] Monadic parser vs. combinator parser

2013-01-31 Thread Ertugrul Söylemez
Jan Stolarek jan.stola...@p.lodz.pl wrote: Thanks for replies guys. I indeed didn't notice that there are monads and applicatives used in this parser. My thought that monadic parsers are more verbose came from Hutton's paper where the code is definitely less readable than in example I

Re: [Haskell-cafe] Ticking time bomb

2013-01-31 Thread Ertugrul Söylemez
Vincent Hanquez t...@snarc.org wrote: That was exactly my suggestion actually. It requires the ability to make and check signatures. The making can be done with external tools like GnuPG, but the checking has to be done by cabal-install. To detect changed keys there also needs to be a

  1   2   >