Live data from Hacker News

Advanced programming languages

matt.might.net

21–30 of 76 posts

Re: Advanced programming languages

#21

All the languages he suggests apart from Scala are or are pretty close to being pure functional languages. I'm not convinced that I would be more productive developing say a web app , database app or game using say Haskell rather than Java or Python especially since a large amount of programming is all about state and side effects. I'm not against learning a pure functional language as a way to improve your programmi…

> Are there any large pieces of software outside of academia that are written primarily in functional languages? If you're asking about places where FP is often used, I know it's big in finance (though I have no idea what those guys are up to). The haskell web development space has also gotten to a pretty mature point. I think you'd have no problem building a web app with Yesod or Snap. http://www.yesodweb.com/ http:…

> If you're asking about places where FP is often used, I know it's big in finance

I've heard this a few times (mostly from the Scala crowd) but very little data to back it up, so I'm still skeptical.

Re: Advanced programming languages

#22
So the article first states a mathematical definition:

> A bounded lattice is a mathematical structure that has a least element (bot), a greatest element (top)

And then proceeds to define a typeclass that does not satisfy the definition:

    instance (Ord k, Lattice a) => Lattice (Map k a) 
        where top = error $ "Cannot be represented.
:-(

You can't even fix the definition of top, since union of arbitrary Maps is not bounded, e.g. there is no finite Map String foo (map with String keys) that is a superset of every Map String foo.

You could change Lattice to a weaker structure, but I think it would be better to present a simpler typeclass like Show or Ord.

Re: Advanced programming languages

#23
post #14

Earlier quoted context omitted.

Wow! I never knew that Amazon was a Lisp company. I'd like to know more about their infrastructure setup with Lisp and C.

I don't have any info besides Yeggie saying it.

I read him religiously but I don't remember him even coming close to making such a claim and searching for "yegge amazon lisp" doesn't turn up anything.

Re: Advanced programming languages

#24
post #14

Earlier quoted context omitted.

I don't have any info besides Yeggie saying it.

I read him religiously but I don't remember him even coming close to making such a claim and searching for "yegge amazon lisp" doesn't turn up anything.

https://sites.google.com/site/steveyegge2/tour-de-babel

Re: Advanced programming languages

#25

Earlier quoted context omitted.

I don't know how far over to the functional paradigm arc leans but hacker news is programed in it. I know it's built off common lisp so there is that linage. The naughty dog game studio used a form of lisp in their games starting with Crash Bandicoot until they got purchased by Sony(I think). Though, the language was much more imperative in nature instead of functional. Autocad had autolisp built into it. http://en.w…

I wonder if the lack of state is why I keep getting the "Unknown or expired link" message all the time? I see allot of functional DSLs (Excel for example + autocad as you pointed out). Was crash bandicoot written in Lisp or was this just an internal DSL used for certain operations? I don't have anything against functional languages and I'm sure all good developers should know at least 1 but the article seems to sugge…

Naughty Dog used an internally developed programming language for the whole game (or at least most of it.) A big part of the appeal was apparently the dynamic nature of Lisps, which allowed reloading of code at runtime to simplify debugging. This article is a postmortem about Jak and Daxter; the next page also mentions the drawbacks of using GOAL, as well:

http://www.gamasutra.com/view/feature/2985/postmortem_naught...

Re: Advanced programming languages

#26
post #3

Earlier quoted context omitted.

Any advanced language worth his salt will allow you to link libraries from other languages. It may require some work, but at least it can be done; whilst you can't expand the capabilities of your programming language of choice as easily. I think no language is advanced enough to be used alone for everything. Steve Yeggie said that once a time at Amazon the only languages allowed were Lisp and C. It makes sense: an hi…

Wow! I never knew that Amazon was a Lisp company. I'd like to know more about their infrastructure setup with Lisp and C.

Yegge wrote that in "Tour de Babel". I don't think it is really true tho.

When I started in 1997 (before Yegge) there was lots of C and Perl but no Lisp, at least not in the central repo. There were restrictions on Perl. The DBAs wouldn't let us use it to insert data in the database. Shel didn't care much for Perl. He might have warmed to it a little bit when he discovered it supported closures; I remember him sending a msg to the software alias about it.

Eric Benson had been a principal at Lucid, though I didn't know it at the time. Once he gave a class to the perlhackers on how to write code. The advice, as I recall, was to put "use strict;" at the top of our scripts and to start every function by shifting all the arguments into local variables. Eric Benson wrote the initial version of the "customer who bought this also bought..." code, and he used Perl, not Lisp. I'm sure he thought about the problem in Lisp terms, tho.

http://sites.google.com/site/steveyegge2/tour-de-babel

Re: Advanced programming languages

#27

All the languages he suggests apart from Scala are or are pretty close to being pure functional languages. I'm not convinced that I would be more productive developing say a web app , database app or game using say Haskell rather than Java or Python especially since a large amount of programming is all about state and side effects. I'm not against learning a pure functional language as a way to improve your programmi…

    "...especially since a large amount of programming is all
    about state and side effects."
Haskell provides lots of tools for reasoning about and managing side effects; it just doesn't (and, indeed, can't) allow them arbitrarily. In terms of interacting with the outside world—e.g. doing GUI work or interacting with a database—you usually have an effectful 'core' that manages side effects while a slew of pure helper functions operate on the data derived from those side effects. (This is good style in non-functional languages, as well, as it is a kind of separation of concerns.) Other functional languages are far less stringent about side effects, so both the ML family and Scheme allow state modification and side effects, although the functional style is preferred when possible.

In terms of writing algorithms, you'd be amazed at how little needs to be expressed in terms of manipulation of state. It feels natural to write stateful functions if you've spent large amounts of time programming in stateful languages, but that has more to do with your familiarity than a property inherent in the problem. If you were immersed in Scheme, you might say, "...a large amount of programming is about function definition and application", just like if you were immersed in Forth, you might say, "...a large amount of programming is about stack manipulation." You certainly could use e.g. Scheme as language for general-purpose programming, and I suspect the problems that would arise would not be problems with functional programming, but rather an unfortunate lack of modern libraries for things like Unicode handling.

Re: Advanced programming languages

#28

All the languages he suggests apart from Scala are or are pretty close to being pure functional languages. I'm not convinced that I would be more productive developing say a web app , database app or game using say Haskell rather than Java or Python especially since a large amount of programming is all about state and side effects. I'm not against learning a pure functional language as a way to improve your programmi…

I've written public web applications in Ur/Web (a functional language for web development, http://www.impredicative.com/ur/) and the backend for one in ATS (http://www.ats-lang.org). I've found them both pretty productive.

Re: Advanced programming languages

#29

All the languages he suggests apart from Scala are or are pretty close to being pure functional languages. I'm not convinced that I would be more productive developing say a web app , database app or game using say Haskell rather than Java or Python especially since a large amount of programming is all about state and side effects. I'm not against learning a pure functional language as a way to improve your programmi…

One company that's making heavy use of F# is Credit Suisse. They use it in their global modeling and analysis group.

The F# based WebSharper web framework: http://websharper.com/. WebSharper is based on the work of Philip Wadler, et al: http://groups.inf.ed.ac.uk/links/formlets/

Here's another article by Philip Wadler on Formlets: http://homepages.inf.ed.ac.uk/wadler/papers/formlets-aplas/f...

Of course Microsoft uses F# for Bing data processing.

Re: Advanced programming languages

#30

Earlier quoted context omitted.

> Are there any large pieces of software outside of academia that are written primarily in functional languages? If you're asking about places where FP is often used, I know it's big in finance (though I have no idea what those guys are up to). The haskell web development space has also gotten to a pretty mature point. I think you'd have no problem building a web app with Yesod or Snap. http://www.yesodweb.com/ http:…

> If you're asking about places where FP is often used, I know it's big in finance I've heard this a few times (mostly from the Scala crowd) but very little data to back it up, so I'm still skeptical.

I wouldn't say FP is big in finance. On the other hand, financial companies are probably over-represented among the industrial users of FP.

There are several prop trading firms (Jane Street, Tsuru Capital, etc) that use functional languages heavily. Also, many of the big banks (Credit Suisse, Deutsche Bank, Barclays, etc) use some FP in production, but as far as I know it's only used by small, strategic groups. FWIW I've interviewed or applied at many of those big banks in Tokyo and not one of them ever mentioned interest in FP skills. As far as I could gather the typical developer there doesn't know or is not interested in FP.

Post reply on HN