News for hackers. Stuff that matters.
Re:John Carmack: Thoughts on Haskell [video] by agentultra on Monday August 26, 2013 @03:10PM (#6279215)
AFAICT he doesn't reach any particularly satisfying conclusions and just speculates that Haskell is an interesting avenue of research that may bear fruit for game development.

It doesn't seem like he has put the same amount of effort in experimenting with Lisp. He doesn't mention any attempt to port Wolfenstein over to Common Lisp. Instead he seems content speculating from the same position many Lisp doubters have after reading a few books and working on some exercises (which is ironic considering his impetus for the Haskell project). I hope he gave Lisp the same treatment as Haskell before he drew any conclusions but it doesn't seem like he has from this speech.

Lisp for game development could be an interesting avenue (and has precedent in AAA console development). The dynamic vs. static argument isn't the interesting feature. Personally I think the symbolic model of computation is far more compelling. I've read posts by programmers who've written a high-level language for writing financial trading algorithms in Common Lisp that compile down to optimized VHDL for running on FPGAs. Sure you don't have a static analyzer to tell you you've done something wrong before you run your programs but I've rarely seen that becoming an issue in practice at that level. There are plenty of Common Lisp libraries that have been around for a long time that don't require much maintenance which makes me wonder where this belief that dynamic languages don't produce solid, maintainable code comes from.

In my rather limited experience I find the over-specification required by statically typed language to be a impedance to writing robust, compose-able software (at least it's much more difficult and tends to lead to Greenspunning if you try to go that route).

Either way... a very interesting talk and it's cool to hear that he's experimenting with this stuff. Carmack is in a rare position to have such a breadth of experience and deep technical knowledge that even just messing around with this stuff might make waves throughout the industry.

Re:John Carmack: Thoughts on Haskell [video] by bad_user on Monday August 26, 2013 @04:18PM (#6279610)
If you'll go read his opinions, you'll see that he has been a strong advocate for static analysis. His position is very understandable since he spent a lot of time working on complex pieces of C/C++ code, encountering a lot of subtle accidental errors that could have been avoided with better tools for static analysis or with a better language. He also worked mostly on client side software, where the fail fast / fail hard strategy of projects built in dynamic languages doesn't work so well.

Lisp vs ML vs others is a very subjective issue since languages involve different kinds of trade-offs, so optimal choices depend on the project or on personal style.

Also, this is John Carmack. For me he was a God 10 years ago and he's still one of the best and most practical developers we have today. Seeing him talk about Haskell is amazing.

BTW, I've been a big fan of Scala lately, and I don't see myself using much Haskell precisely because its tools for modularity seem limited. In Scala you can use OOP to build abstract modules, with the much hyped Cake pattern being based on that. Dynamic languages are naturally more modular, however I still prefer static languages.

Re:John Carmack: Thoughts on Haskell [video] by jerf on Monday August 26, 2013 @07:25PM (#6280556)
Haskell's tools for modularity cut in a dimension you're not used to, and if you're not experienced with it, won't see. Percentage-wise in the last 15 years I haven't spent that much time in Haskell, but it's Haskell's tools I'm missing more often in imperative languages than the other way around. (And note the "more often"; it's not that I never miss more conventional tools in Haskell, it's just that I spend more time missing Haskell tools in other languages.)
Re:John Carmack: Thoughts on Haskell [video] by sfvisser on Monday August 26, 2013 @05:18PM (#6279984)
> ...I don't see myself using much Haskell precisely because its tools for modularity seem limited.

> Dynamic languages are naturally more modular

Why is that? I'm pretty convinced pure and especially lazy languages allow for great modularity.

See http://augustss.blogspot.nl/2011/05/more-points-for-lazy-eva... for an interesting view on this.

Re:John Carmack: Thoughts on Haskell [video] by taeric on Tuesday August 27, 2013 @09:45AM (#6283353)
I would think it is because of how "modules" can effectively be "bolted" on top of existing things quite easily.

Consider putting a new "module" on a bicycle. If you were doing it statically, it would have to have the screws in the proper place to be able to attach as it needs. Dynamically, however, you just use a zip tie to hold your piece onto the bike.

To be sure, if you buy a nice bike, many of the common attachments have "static" points where things can be added. If you want to place a holder for a phone, however, you are much more likely to do something that is much more adaptable at fitting things on.

becomes much more easy to bolt on funct

Re:John Carmack: Thoughts on Haskell [video] by pnathan on Monday August 26, 2013 @07:09PM (#6280504)
Yeah, Carmack has weight due to his history of being incredibly technical and writing lots of incredibly useful code. Also, he has a huge profile in the industry.

He's been a heavyweight proponent of static typing for a while - 2-3 years IIRC - and so it doesn't totally surprise me that Haskell is up his alley. It's particularly notable that he prefers it as a technical lead as a low-pass filter on bugs.

Re:John Carmack: Thoughts on Haskell [video] by sseveran on Tuesday August 27, 2013 @12:53AM (#6281523)
Tim Sweeney (Unreal Engine) has also written about haskell and specifically STM (http://www.st.cs.uni-saarland.de/edu/seminare/2005/advanced-...) and more recently on dependently typed languages (http://arxiv.org/pdf/1307.5277v1.pdf).
Re:John Carmack: Thoughts on Haskell [video] by jcsmnt0 on Wednesday August 28, 2013 @07:24PM (#6293294)
Thank you so much for that second link! I've been interested recently in how dependently typed languages can be made more natural for general-purpose programming, and this looks like a really good read. It gives me hope that it won't be too long before there's a dependently typed language comparable to Haskell in terms of community and ecosystem - in my (limited) experience, Agda and Idris are awesome for theorem proving and for small programs, but they're both a ways off from being usable for large, complex programs, and I feel like a big part of what they're lacking is just well-documented libraries for common operations.
Re:John Carmack: Thoughts on Haskell [video] by agentultra on Monday August 26, 2013 @04:28PM (#6279694)
I agree.

When Carmack speaks, I do listen. He's a very good programmer and has the level of experience and technical expertise few will get to enjoy. I think it's awesome to see how far he has come from being a C purist, to C++, and now nice functional languages like Haskell.

Re:John Carmack: Thoughts on Haskell [video] by agumonkey on Monday August 26, 2013 @05:33PM (#6280064)
Already mentioned in previous threads, but Tim Sweeney (Epic Games), who made a long presentations about the benefits of FP around 2006, is presenting a paper about a formalism related to dependent typing http://lambda-the-ultimate.org/node/4791
Re:John Carmack: Thoughts on Haskell [video] by teamonkey on Monday August 26, 2013 @09:56PM (#6281015)
Re:John Carmack: Thoughts on Haskell [video] by aryastark on Monday August 26, 2013 @04:54PM (#6279862)
I can't watch his talk right now, but at QuakeCon he recently discussed Scheme, and the potential for embedding it in a game. I think he also pondered what Quake would have been if QuakeC was based on Scheme instead.

But my basic issue with talking about Carmack with respect to programming languages is that he never struck me as an expert on languages. Or even programming for that matter. The source code to Quake was on the messy side of things. His rationale for switching to C++ always seemed a little on the thin side of things, and seemed more like industry pressure than anything. He's great on concepts, on graphics, and keeping up with OpenGL and whatever NVidia/ATI are doing. But he's just now coming around to Scheme and Haskell. I don't really think his perspective on languages carries that much weight to be honest. But I'll listen to him talk about it anytime.

Re:John Carmack: Thoughts on Haskell [video] by robrenaud on Monday August 26, 2013 @05:11PM (#6279936)
To me, that is a great reason to listen to him.

He builds big and complicated programs that people actually use.

Re:John Carmack: Thoughts on Haskell [video] by chebert on Monday August 26, 2013 @08:48PM (#6280804)
Agreed. I listen to him because I want to know what's practical, not necessarily what's theoretically stimulating.
Re:John Carmack: Thoughts on Haskell [video] by aryastark on Monday August 26, 2013 @09:58PM (#6281018)
> He builds big and complicated programs that people actually use.

That's kind of an insult to, well, every working programmer.

Re:John Carmack: Thoughts on Haskell [video] by sseveran on Tuesday August 27, 2013 @12:55AM (#6281530)
Most people don't build big and complicated programs.
Re:John Carmack: Thoughts on Haskell [video] by Argorak on Tuesday August 27, 2013 @03:46AM (#6282052)
Please qualify "most people".
Re:John Carmack: Thoughts on Haskell [video] by sseveran on Tuesday August 27, 2013 @01:00AM (#6281551)
As an intermediate haskeller (I use it for my business every day) his criticisms largely mirror mine. I found the quake codebase to be great in the 90s. I have also found him more than most other developers to admit when thing didn't work out, specifically that doom 3 was c++ in name only and he didn't fully understand it. A scheme based language would have been better for most modders than quakeC.
Re:John Carmack: Thoughts on Haskell [video] by kazagistar on Tuesday August 27, 2013 @10:35PM (#6287706)
There is a reason Lua has taken over so decisively: speed, simplicity, and good support for both functional and oo programming.
Re:John Carmack: Thoughts on Haskell [video] by boothead on Tuesday August 27, 2013 @04:27AM (#6282174)
> As an intermediate haskeller

Are you serious?! If you're only intermediate - then there's no hope for me!

Re:John Carmack: Thoughts on Haskell [video] by tel on Tuesday August 27, 2013 @09:09AM (#6283154)
That's one of the nice things about the Haskell community. The experts tend to be much, much better than in other places. There's much more depth there than memorization of quirks and ability to hold large numbers of arbitrary, disconnected pieces in your head all at once.

So, while becoming an expert haskeller is enviable, intermediate still suggests an ability to tackle a Fantastic array of problems.

Re:John Carmack: Thoughts on Haskell [video] by boothead on Tuesday August 27, 2013 @09:32AM (#6283267)
Indeed - it's definitely one of the best places to be if you like to be surrounded by incredibly talented, but also very humble folks.

In fact I'd go so far as to say that the pool of wicked smart people who would love to build stuff in Haskell represents a significant opportunity to start ups right now. How have you found hiring for your company?

Re:John Carmack: Thoughts on Haskell [video] by tel on Tuesday August 27, 2013 @10:33AM (#6283634)
I asked around speculatively and got great response. Right now we've got exactly the team we need, and I'm not too worried about hiring in the future.
Re:John Carmack: Thoughts on Haskell [video] by sseveran on Tuesday August 27, 2013 @10:12AM (#6283500)
Well while I can produce large swaths of elegant code when I need crazy instances I usually call upon my colleague for his invaluable assistance. I don't claim to be an expert in the language. Many people know much more about it than me.
Re:John Carmack: Thoughts on Haskell [video] by orclev on Tuesday August 27, 2013 @11:58AM (#6284242)
I've been trying to come up with a general way to rank Haskell experience, and so far I've got:

Beginner: Can read the basic syntax, knows about E.G. Monads and folds

Intermediate: Understands and can use the more advanced classes like Applicative, Arrow, lenses, and how to use things like fix

Advanced: ??? Makes new powerful classes/libraries like Pipe, Conduit, or Netwire? Can easily translate a problem domain into a concise and elegant type representation.

Maybe there needs to be some more layers in there, I don't know... also the advanced level feels weak to me. I'm still somewhere between beginner and intermediate myself.

Re:John Carmack: Thoughts on Haskell [video] by sseveran on Tuesday August 27, 2013 @03:28PM (#6285633)
Well I don't claim to understand the mathematical basis of Monads, and I don't use arrows and just started using applicative more often. Lenses rock and I have used those for a long time. I do build my own Monad Transformers so maybe I am still a beginning with intermediate tendencies. :-)
Re:John Carmack: Thoughts on Haskell [video] by mynameisme on Monday August 26, 2013 @07:06PM (#6280493)
If Carmack isn't an expert programmer, no one is. There are very few people with a comparable resume.
Re:John Carmack: Thoughts on Haskell [video] by nicolast on Tuesday August 27, 2013 @04:45AM (#6282241)
Being an expert C++ programmer doesn't make you an expert Haskell programmer, or vice-versa ;-)
Re:John Carmack: Thoughts on Haskell [video] by MLR on Monday August 26, 2013 @10:06PM (#6281042)
I can understand saying he isn't an expert on languages, but to say he isn't an expert programmer is honestly just condescending.
Re:John Carmack: Thoughts on Haskell [video] by aryastark on Tuesday August 27, 2013 @03:55PM (#6285841)
What I meant by that is that he doesn't use what most people qualify as "best practices" today. At least per the language he uses. If you look at his (or id Software's, rather) C++, it doesn't follow anything resembling standards in that area. They don't use design patterns, there are straight C (stdio, for example) calls in C++, etc.

I'm not saying that's bad. But it's obvious he doesn't keep on top of trends that well. Or languages, for that matter.

Re:John Carmack: Thoughts on Haskell [video] by Dewie on Monday August 26, 2013 @08:39PM (#6280771)
An outside perspective is valuable in its own right, and especially when it comes from a widely respected programmer. I think it's valuable to have both long time expert users, intermediate users and relatively new users chime in on issues: the experts often lack a certain perspective, since it was so long ago that they were novices themselves. And of course the intermediate and novice users lack experience. Together they can hopefully complement each other.
Re:John Carmack: Thoughts on Haskell [video] by orclev on Tuesday August 27, 2013 @12:08PM (#6284298)
I think that's part of why people are so interested in his opinion in this case. The games programming industry has some very unique challenges, and the focus on squeezing every last drop of performance out of the stuff you write tends to make it a pretty brutal environment for programming languages. From his background as a voice of authority in the games programming industry it's interesting to hear his feelings on the merits/drawbacks of something like Haskell specifically from that perspective.

The fact that he's not a long time user, or particularly a fan of functional programming, but a relative newcomer to it just adds more weight as he isn't some known fanboy that's going to praise FP no matter what. He's got extensive background in C, and at worst, average C++ skills if not considerably better than that, so he makes a fairly good case study of how practical it is for a non-functional programmer (but someone who's really experienced with imperative/OO programming) to pick up something like Haskell and actually do something useful with it.

It's also good to listen to the things he doesn't like about Haskell, E.G. debugging, and see if anything can be done to improve that.