Applications

Does large-scale software development in Haskell suffer from lack of objects?

Submitted by metaperl on Tue, 10/17/2006 - 1:08am.

Would someone with experience in designing large Haskell systems comment on whether it becomes difficult to manage or understand large Haskell programs due to lack of objects and the benefits of objects (such as inheritance).

I think type classes have polymorphism covered.

Python job or Perl job? The quandry is solved

Submitted by metaperl on Mon, 10/16/2006 - 6:58am.

Since all language suck more than Haskell and since you suck at haskell, just get the job that pays more.

I recently have had this thang for Python, swearing it was the greatest thing out there but now I realize where the real thing is.

So it's really just bread-winning unless I have finally earned a haskell job.

not everyone can dine at the Beverly Hills Social Club of Programming Languages

Submitted by metaperl on Mon, 10/16/2006 - 6:56am.

If you have adequate savoire faire, then yes, you can drive a rolls royce, eat caviar, listen to the best of music and dine with the most beautiful of women.

But most of us have to get buy of frozen tv dinners, pickup trucks and rock and roll.

Haskell is truly the creme de la creme of programming languages. But not everyone has a tight enough brain to deal with such elegance and quality. And Haskell, being the refined aristocrastic snob that it is, will not reduce its standards to suit the mere commoner. Relax my type checking? NEVER! Compute things that won't be in the final result? NEVER!

Average joes can do average things with their language but there's only one language which has taken first prize 3 years in a row in what might be the most hotly contested competition on Planet Earth... and only the Rolls Royce of languages could do it and that language is Haskell.

How to rewrite this list in Haskell?

Submitted by metaperl on Fri, 09/29/2006 - 9:51am.

I really miss haskell. But Python is not bad. It's easier to read than Ocaml. Not as fast as OCaml. But many more libraries. Haskell is for people who can think. I never quite made it over the hump with Haskell for some reason.

But anyway, I was wondering what a Haskell solution to this would look like. I'm sure it's just a one-liner making use of concatMap() and a binary decision function that returns a list as a function of it's inputs:


def retokenize(l):
"""Given a list consisting of terms and the negation symbol, retokenize() creates a list which
(1) changes negation symbols to AND NOT and
(2) inserts AND between two terms without an interceding
conjunction symbol. Examples:

>>> sqlgen.retokenize( sqlgen.tokenize("cancer drug").asList() )
['cancer', 'AND', 'drug']
>>> sqlgen.retokenize( sqlgen.tokenize("cancer - drug").asList() )
['cancer', 'AND NOT', 'drug']
>>> sqlgen.retokenize( sqlgen.tokenize("cancer drug therapy").asList() )
['cancer', 'AND', 'drug', 'AND', 'therapy']
>>> sqlgen.retokenize( sqlgen.tokenize("cancer - drug - therapy").asList() )
['cancer', 'AND NOT', 'drug', 'AND NOT', 'therapy']
>>>

"""

o = []
for i, tok in enumerate(l):
if tok == neg:
o.append('AND NOT')
else:
if i == 0:
o.append(tok)
elif l[i-1] == neg:
o.append(tok)
else:
o.append('AND')
o.append(tok)

return o

I know my eyes are going to water when I see that elegant, purefuly functional solution :)

IMAP implemented, but ...

Submitted by jmuk on Wed, 07/26/2006 - 11:38am.

Now, I wrote IMAP4.
see, http://darcs.haskell.org/SoC/haskellnet/HaskellNet/IMAP.hs

But, there are two critical problems.

1. no test

I did not do any tests for the implementation because my IMAP environment requires SSL. The current state is only `compile succeed'.
I'd like to write codes to connect IMAP with hsgnutls, and test as soon as possible.

2. ugly codes

The code is too ugly. And it may have many unnecessary definitions. It also has no comments. I'll brush up my codes later...

IMAP4rev1 is pretty huge protocol. It is difficult to parse the server's response, especially FETCH. Implementing IMAP takes longer and longer time than I thought. I get fed up with IMAP...

When perfect all-encompassing systems get the rug pulled out from under them...

Submitted by metaperl on Sun, 07/16/2006 - 1:31pm.

So I'm here at home, pissed. I really want to crank out a website, but dont want to be limited to generating HTML. Some website generators produce PDF files. And some allow for adding validation. And some allow for tagging of document parts so that you can re-navigate the documented based on some combination of tags. And unfortunately, the perfect document system was written before the web came out: LaTeX.

So LaTeX's idea of device independant did not include the web device. And that excellent system of document references, BibTeX did not include any concept of hypertext media types.

Sigh.

And now we get to Haskell. Is it the perfect language for building websites automatically? If so, then why is this site done in Drupal instead of in Haskell?

"no more complex statement in any language"

Submitted by metaperl on Fri, 07/07/2006 - 7:14am.

My instructor here again made a stimulating statement: "the most complex statement in any language is the SELECT statement: you can group, multiply, format and more"

Opinions?

"You don't learn programming by theory, you learn it by hacking"

Submitted by metaperl on Wed, 07/05/2006 - 2:13pm.

I'm in a training course for MS SQL Server 2005, and the teacher said: "how did I learn programming? I went to a magazine and typed in some code and watched it run. You don't learn programming by theory, you learn it by hacking."

I bit my tongue because I'm sure many Haskellers (mathematician like Cale and physicists like David Roundy) did learn Haskell by placing theoretical expectations on how the language should work from a theoretical perspective and then seeing how haskell implemented their theoretical expectations.

What is meant by "cores" in microprocessor terminology?

Submitted by metaperl on Tue, 07/04/2006 - 3:01pm.

This post is somewhat off-topic, but I think it relates to Haskell enough to post here, so please indulge me.

I was reading an article on Erlang. In the section entitled Scalable Is the New Fast, it was said:

These days, you’re much less likely to get a chip that’s twice as fast, but you may get one with twice as many cores.

So my question is: what is a core and how does it affect hardware performance?

And to bring this post into Haskell context, is there some way for Haskell programs to execute faster as the machine it runs on gains cores?

hot snippets

Submitted by metaperl on Fri, 06/02/2006 - 3:26pm.

6/2/06 [14:23]

sequence [] = [];
sequence (x:xs) = do x' <- x;
xs' <- sequence xs;
return (x' : xs')