Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Programming Language Readability

Lets compare some Python to Haskell for solving the same problem.  The problem we’ll pick is Trie data-structure for auto-completions.  We are interested not so much in the nitty gritty of the algorithm, but in the language style itself.  Auto-complete has been in the programming news a lot recently; both a Python and a Haskell solver have turned up.(I suspect this post got flagged on Hacker News :(  It never got on the front-page despite the rapid upvoting on a no-news night)Here’s the Python:"""A fast data structure for searching strings with autocomplete su...

2,716 0       PROGRAMMING PYTHON HASKELL READABILITY


  Learn from Haskell - Functional, Reusable JavaScript

Learn You a Haskell: For Great Good?For the last couple months I have been learning Haskell. Because there are so many unfamiliar concepts, it feels like learning to program all over again. At i.TV, we write a lot of JavaScript (node.js and front end). While many functional/haskell paradigms don’t translate, there are a few techniques that JS can benefit from. There are Haskell library functions for everything. At first I thought this was just because it was mature, but then I noticed that these functions could be applied to a wider variety of problems than in other languages. This make...

2,180 0       JAVASCRIPT FEATURE HASKELL FUNCTIONAL REUSABILITY


  Haskell’s effect on my C++: exploit the type system

Like most programmers, I was attracted to Scheme by the promise that it would make me a better programmer. I came to appreciate the functional style, but swapped to Haskell, a more developed language with a rapidly developing standard library. Unfortunately, for me, Haskell can’t yet replace C++ on a day to day basis, so I reluctantly spend my days tapping away at C++. So, were the promises true? has functional programming made me a better programmer?Better is a tough question, I have no benchmarks for the quality of my code before and after Haskell, but it has certainly changed my c...

3,309 0       COMPARISON C++ HASKELL TYPE SYSTEM


  Replacing small C programs with Haskell

C is the classic go-to tool for small programs that need to be really fast. When scripts.mit.edu needed a small program to be a glorified cat that also added useful HTTP headers to the beginning of its output, there was no question about it: it would be written in C, and it would be fast; the speed of our static content serving depended on it! (The grotty technical details: our webserver is based off of a networked filesystem, and we wanted to avoid giving Apache too many credentials in case it got compromised. Thus, we patched our kernel to enforce an extra stipulation that you must be runnin...

2,685 0       C HASKELL SMALL PROGRAM


  How to read Haskell like Python

Have you ever been in the situation where you need to quickly understand what a piece of code in some unfamiliar language does? If the language looks a lot like what you’re comfortable with, you can usually guess what large amounts of the code does; even if you may not be completely familiar how all the language features work.For Haskell, this is a little more difficult, since Haskell syntax looks very different from traditional languages. But there's no really deep difference here; you just have to squint at it just right. Here is a fast, mostly incorrect, and hopefully useful guide fo...

3,258 0       PYTHON FORMAT HASKELL LIKE SIMILARITY


  Why learning Haskell/Python makes you a worse programmer

I've found, contrary to what you sometimes read, that learning Python and Haskell has not improved my programming using other languages. Haskell in particular, being so different from imperative languages, is supposed to give new insights into programming that will help you even when you are not using the language. My current experience doesn't exactly tally with this, and here is why:Demotivation.I find I think in Python, and even in Haskell to some extent, even though I have used Haskell very little. I constantly find myself wanting to use idioms from these languages, or noticing h...

2,921 2       PYTHON PROGRAMMER BAD BAD PROGRAMMER HASKELL