[Haskell-cafe] Something wrong with happs.org?

2009-03-24 Thread Vimal
Hi, http://happs.org/ has some Javascript visible as plain text. It looks like some tags are missing in the page... I hope that's the right website, because it turned up first on my Google search happs with a nice description too. -- Vimal

[Haskell-cafe] Packet analysis framework for Haskell.

2009-03-16 Thread Vimal
to mentor for GSoC 2009? (Assuming Haskell would be on the list of mentoring organisations, although I have no reason to doubt it wouldn't.) Thanks, Regards, -- Vimal ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] UDP

2009-02-01 Thread Vimal
(a descriptor) that you can identify. bind() creates an identity for the socket so that applications outside can refer to it (using ip:port); it also enables the kernel to pass the received data to your application. sendto() doesn't require that identity. -- Vimal

Re: [Haskell-cafe] [ANN] Next Bay FP Meeting: Bryan O'Sullivan on Concurrent and multicore programming in Haskell

2008-05-02 Thread Vimal
for the video! How long before the video comes up on the website? -- Vimal ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Analysing Haskell with Graph Theory

2008-03-06 Thread Vimal
that can be used to solve the above problems? I guess once you come up with the algorithms, translating it into Haskell shouldnt be much of a problem. -- Vimal ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Internships at GHC HQ

2008-01-25 Thread Vimal
a course on Language Translators, say). -- Vimal ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] An idea - Feasibility and effort

2008-01-18 Thread Vimal
be a project that Haskell might help me beautifully model and execute. I would like to have some opinion on the complexity of the project ideas that I have in mind. Thanks, -- Vimal Indian Institute of Technology Madras Chennai India ___ Haskell-Cafe mailing

Re: [Haskell-cafe] problem building array package

2008-01-18 Thread Vimal
Data/Array/Base.hs:391:23: Not in scope: `Arr.numElements' Data/Array/Base.hs:1067:35: Not in scope: `ArrST.numElementsSTArray' Data/Array/Base.hs:1079:51: Not in scope: `ArrST.numElementsSTArray' I had the same problem with ghc-6.6. It works with ghc-6.8.2. -- Vimal

Re: [Haskell-cafe] [OT] A nice organized collection of threads in Haskell-Cafe

2007-12-10 Thread Vimal
Hi, Thanks for the info. Vimal wrote: What is the difference between In-Reply-To and References? There was a time In-Reply-To was for emails and References was for Usenet. My friend wrote a parser for Haskell-cafe messages from the mailman archives as suggested. He told that there were

Re: [Haskell-cafe] [OT] A nice organized collection of threads in Haskell-Cafe

2007-12-09 Thread Vimal
to reconstruct the tree... And looks like this post has gone on a tangent :D Vimal ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] [OT] A nice organized collection of threads in Haskell-Cafe

2007-12-09 Thread Vimal
And looks like this post has gone on a tangent :D Vimal And looks like this _thread_ has gone on a tangent :) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] [OT] A nice organized collection of threads in Haskell-Cafe

2007-12-07 Thread Vimal
] /forum as XML. However, I find that that the messages (in haskell-cafe/usenet) themselves aren't organized in this fashion. I would like to know if there is any way in which I can get the archives in this fashion. Thanks, -- ~Vimal RLE :) encode = map (length head) . group decode = concatMap

Re: [Haskell-cafe] Pretty-printing peg solitaire boards

2007-11-24 Thread Vimal
On 25/11/2007, Maurí­cio [EMAIL PROTECTED] wrote: Hi, I'm trying to pretty-print (with Text . PrettyPrint . HughesPJ) a set of peg solitaire boards. No matter what I try, I always get this: 00# 00# #00 000 000 000 000 : 00# 00#

[Haskell-cafe] Re: Functional specification of DFS

2007-10-18 Thread Vimal
meaningful places as possible, but it doesnt work :( I have sat with the code for a long time, and yet I am not able to come up with a convincing reason as to why it doesnt work. For somegraphs, it even hangs and gives a stack overflow exception! Any help appreciated. Thanks, Vimal

Re: [Haskell-cafe] Re: Functional specification of DFS

2007-10-18 Thread Vimal
of the spanning tree (through backtracking). You probably said that, but I have probably missed that posting. Okay, I want a DFS Spanning tree. Vimal ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell-cafe] Functional specification of DFS

2007-10-17 Thread Vimal
on paper and see if it works out. References: [1]: www.cse.ogi.edu/~jl/Papers/dfs.ps Do you have any thoughts on this? Thanks, -- ~Vimal RLE :) encode = map (length head) . group decode = concatMap (uncurry replicate) ___ Haskell-Cafe mailing list Haskell

Re: [Haskell-cafe] On the verge of ... giving up!

2007-10-15 Thread Vimal
The really amazing thing about the IO Monad in Haskell is that there *isn't* any magic going on. An level of understanding adequate for using the I/O and State monads stuff (that is, adequate for practically anything analogous to what you might do in another language) goes like this:[...]

[Haskell-cafe] On the verge of ... giving up!

2007-10-14 Thread Vimal
a functional pearl, with an example' and was quite impressed by it. But the actual modelling might be slightly tricky here, and I am yet to start off with it. Many thanks for your patience, Cheers, -- ~Vimal IIT Madras RLE :) encode = map (length head) . group decode = concatMap (uncurry replicate

Re: [Haskell-cafe] On the verge of ... giving up!

2007-10-14 Thread Vimal
Cool! Lots of opinion. Let me consider them one by one: @Neil: This is where you went wrong. I know none of this stuff and am perfectly happy with IO in Haskell. Read

Re: [Haskell-cafe] On the verge of ... giving up!

2007-10-14 Thread Vimal
@Andrew: This probably works quite well for mainstream programming languages (since they're all so similar), but is unlikely to work at all for Haskell (since, as far as I know, no other programming language on Earth is remotely like it - Miranda excluded). Even Lisp and Erland are nothing

Re: [Haskell-cafe] On the verge of ... giving up!

2007-10-14 Thread Vimal
In my opinion (other may think differently) it is not a good idea to learn IO by starting with trying to grasp the theoretical foundation for monads. In the beginning you should just view the IO monad as Haskell's way of doing imperative IO stuff. When you feel comfortable with Haskell IO,

Re: [Haskell-cafe] On the verge of ... giving up!

2007-10-14 Thread Vimal
I think you have got a very good point in your mail that I overlooked all along ... Why was Haskell created? is a question that I havent tried looking for a answer :) I also agree about this, so I started looking for small projects on which to cut my teeth and really learn the basic concepts in

[Haskell-cafe] Shouldnt this be lazy too?

2007-09-24 Thread Vimal
Hi all, I was surprised to find out that the following piece of code: length [1..] 10 isnt lazily evaluated! I wouldnt expect this to be a bug, but in this case, shouldnt the computation end when the length function evaluation goes something like: 10 + length [11..] ? -- -- Vimal

Re: [Haskell-cafe] Shouldnt this be lazy too?

2007-09-24 Thread Vimal
Wow, half an hour, about 7 replies :) I dont know which one to quote! Okay. So, why is GHC finding it difficult to conclude that length is always 0? Suppose I define length like: length [] = 0 length (x:xs) = 1 + length xs Hmm, well, I think the fact that we, as humans, expecting GHC to infer

Re: [Haskell-cafe] Shouldnt this be lazy too?

2007-09-24 Thread Vimal
From the wiki: If you write it, you force Haskell to create all list nodes. ... Alright. Now, lets look at the definition again: length [] = 0 length (x:xs) = 1 + length xs We see that the value of *x* isnt needed at all. So, why does GHC allocate so much memory creating all those *x*s?

Re: [Haskell-cafe] Re: Shouldnt this be lazy too?

2007-09-24 Thread Vimal
Prelude 10 + length (replicate maxBound 'a') -2147483639 Ah, nice example! If you note, this doesnt allocate memory at all! Very less footprint! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: [Off topic] Proving an impossibility

2007-09-04 Thread Vimal
is necessary; don't remember the title, however. Thanks for the info! I willl check it out soon! ~Vimal ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

[Haskell-cafe] Parsec: Parenthesized expressions and more!

2007-08-14 Thread Vimal
on that :D Cheers -- -- Vimal Department of Computer Science and Engineering Indian Institute of Technology Madras ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Slow IO or bad code?

2007-08-09 Thread Vimal
a - getLine b - getLine let la = to_int (words a); lb = to_int (words b); in print (prod la lb) main = do t - getLine loop (read t) doit END OF CODE I would love to see if there is any improvement that can be done, to the code ... Thanks! Vimal

Re: [Haskell-cafe] Slow IO or bad code?

2007-08-09 Thread Vimal
@Donald: Thanks for the link. prod = sum . zipWith (*) This is the slow part. Prelude.read ist really slow. Futhermore use the recusion pattern again: to_int = map read What is n used for? @Lutz: Those are some nice tricks... Thanks! Now, the 'n' is for getting the number of numbers in

Re: [Haskell-cafe] Slow IO or bad code?

2007-08-09 Thread Vimal
On 8/9/07, Brent Yorgey [EMAIL PROTECTED] wrote: On 8/9/07, Chaddaï Fouché [EMAIL PROTECTED] wrote: I get Wrong answer with the following code for the same problem... Is there something strange in this code : This problem description is not worded very well. You have to figure out the

Re: [Haskell-cafe] how to make haskell faster than python at finding primes?

2007-08-06 Thread Vimal
on the fact that it was a multiple of 2 ... (or 3? Which one comes first?) This happens in a different order than what would be expected generally in a sieve :-) So, the question is, does this improve efficiency? -- Vimal ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] how to make haskell faster than python at finding primes?

2007-08-06 Thread Vimal
argument to hold good for something like this: primes n = sieve (take n [2..]) sieve (p:xs) = p : sieve [x | x - xs, x `mod` p 0] print (primes 1000) -- Vimal ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell-cafe] how to make haskell faster than python at finding primes?

2007-08-06 Thread Vimal
primes n = sieve (take n [2..]) sieve (p:xs) = p : sieve [x | x - xs, x `mod` p 0] print (primes 1000) -- Vimal But as we can see, this obviously doesn't *take* 1000 primes, :-) -- Vimal ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Sudoku Solver

2007-08-06 Thread Vimal
+ few techniques to help with the backtrack, after modeling Sudoku as a contraint satisfaction problem. You can write a backtracking algorithm that is at least as fast as DLX :-) -- Vimal ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http