I need to create a simple Chat system like facebook chat and a twitter-like app.
What is the best concurrent program languages in this case ?
Erlang, Haskell, Scala or anything else ?
Thanks ^_^
...
I'm trying to understand type patterns and generic classes in Haskell but can't seem to get it.
Could someone explain it in laymen's terms?
In [1] I've read that
"To apply functions generically to all data types, we view data types in a uniform manner: except for basic predefined types such as Float, IO, and →, every Haskell data t...
Is there a mature library that could enable audio input and output and work within Haskell? (A nice wrapper is fine, of course.)
I'm looking for something that can easily capture microphone input and, perhaps, play various audio files as well.
Thanks.
...
When working with derived instances in Haskell, is it possible to derive functions for arbitrary types, or are we restricted to particular functions?
...
I'm currently working on a Haskell project which automatically tests some functions based on an XML specification. The XML specification gives the arguments to each function and the expected result that the function will provide (the arguments are of many different types). I know how to extract the function arguments from the XML and par...
Previously attoparsec was suggested to me for parsing complex binary file formats. While I can find examples of attoparsec parsing HTTP, which is essentially text based, I cannot find an example parsing actual binary, for example, a TCP packet, or image file, or mp3. Can someone post some code or pointer to some code which does this usin...
I have read that Haskell parser combinators (in Parsec) can parse context sensitive grammars. Is this also true for Scala parser combinators? If so, is this what the "into" (aka ">>") function is for?
What are some strengths/weaknesses of Scala's implementation of parser combinators, vs Haskell's? Do they accept the same class of gra...
hi, do you know if are there pointers in haskell?
-If yes, how do you use them? Are there any problems with them? And why aren't they popular?
-If no, is there any reason for it?
Please help us!! :)
Thank you so much!!
...
Suppose I'm writing a function that takes a list of integers and returns only those integers in the list that are less than 5.2. I might do something like this:
belowThreshold = filter (< 5.2)
Easy enough, right? But now I want to constrain this function to only work with input lists of type [Int] for design reasons of my own. This se...
I have a list that I need to parse where the all but the last element needs to be parsed by one parser, and the last element needs to be parsed by another parser.
a = "p1 p1b ... p2"
or
a = "p2"
Originally I tried
parser = do parse1 <- many parser1
parse2 <- parser2
return AParse parse1 parse2
The problem is...
This is a problem that I can easily enough solve in a non-functional manner.
But solving it in Haskell is giving me big problems. Me being inexperienced when it comes to functional programming is surely a reason.
The problem:
I have a 2D field divided into rectangles of equal size. A simple grid. Some rectangles are empty space (and c...
For a tool I'm writing ( http://hackage.haskell.org/package/explore ) I need a way to read haskell function definitions at run-time, apply them to values from my tool and retrieve the results of their application.
Can anyone give me a very basic example using GHC (6.10.4 or 6.12.1) API?
example function definition to be read from a fil...
What are the usual causes of "Error C stack overflow" in the Hugs Haskell implementation.
...
I have this code that I want to make point-free;
(\k t -> chr $ a + flip mod 26 (ord k + ord t -2*a))
How do I do that?
Also are there some general rules for point free style other than "think about this amd come up with something"?
...
I'm in the process of writing a small lisp interpreter in haskell. In the process i defined this datatype, to get a less typed number;
data Number = _Int Integer
| _Rational Rational
| _Float Double
deriving(Eq,Show)
Compiling this fails with the following error:
ERROR "types.hs":16 - Syntax error in da...
how to write a function from list to a tuple
i have taken the string to a tuple. but i need to send it to a tuple.
can someone help me
...
In python zip function accepts arbitrary number of lists and zips them together.
>>> l1 = [1,2,3]
>>> l2 = [5,6,7]
>>> l3 = [7,4,8]
>>> zip(l1,l2,l3)
[(1, 5, 7), (2, 6, 4), (3, 7, 8)]
>>>
How can I zip together multiple lists in haskell?
...
how to convert a String type to a Int
i have a tuple and i want to convert it to a tuple which has different types
tupletotuple :: (String,String,String) ->(String,Int,Int)
tupletotuple (a,b,c) = (a,read(b),read(c))
i get this Error Msg
Project> tupletotuple ("cha",4,3)
ERROR - Cannot infer instance
*** Instance : Num [Char]
*** E...
is there a difference like that from IO String to String
i want to take some String values from a IO.
can anyone tell me about this issue. im clueless
...
What is haskell equivalent of
string str = string.Format("{0} {1}",10,20); // C#
...