
Running a startup on Haskell - DanielRibeiro
http://bos.github.com/strange-loop-2011/talk/talk.html#(1)
======
michaelschade
For background, Bryan gave this talk at the excellent Strange Loop 2011
conference (<https://thestrangeloop.com/>).

Abstract: [https://thestrangeloop.com/sessions/running-a-startup-on-
has...](https://thestrangeloop.com/sessions/running-a-startup-on-haskell)

He also gave a workshop on Sunday (which I unfortunately was not able to
attend): [https://thestrangeloop.com/sessions/haskell-functional-
progr...](https://thestrangeloop.com/sessions/haskell-functional-programming-
solid-code-big-data)

~~~
pjscott
For a different type of background, Bryan O'Sullivan is the author of some of
the best Haskell libraries out there. The _de facto_ standard JSON
parser/serializer is his doing, for example, and his Riak client is the best
I've seen in any language. This guy really knows what he's talking about.

~~~
wunki
I'm very impressed with the amount and quality of libraries they have released
on Github [1].

Going to use the following in my "webmachine in Haskell" project.

    
    
      - aeson: Fast json library [2]
      - pronk: load test webservers [3]
    

[1]: <https://github.com/mailrank/> [2]: <https://github.com/mailrank/aeson>
[3]: <https://github.com/mailrank/pronk>

------
narain
So what _is_ "the best compiler bug ever" (slide 31)?

~~~
technomancy
There was a certain condition (~ 10 years ago) where if the source file didn't
pass the type checker it would be deleted.

Bryan quickly assured everyone that it had since been resolved. =)

------
socratic

      I must hunt down and learn to use a QuickCheck-like library for my language.
    
      If I can't find one, I should write one.
    

So what's the (best) equivalent of QuickCheck in Ruby? In other languages?

~~~
olliesaunders
For Ruby: <http://rushcheck.rubyforge.org/about.html>

Check out the citations on <http://en.wikipedia.org/wiki/QuickCheck> for
QuickChecks in other languages.

------
abhijitr
Can anyone comment on the claim "QuickCheck is shockingly more effective at
finding bugs than unit tests"? I'd be interested in hearing other opinions.

~~~
masklinn
It's essentially a unit-fuzzing framework, so it can find holes in boundary
conditions people generally forget to check, because it's in their blind spot
or because "nobody would ever do that".

QC does not care, and since it's injecting fuzzed data at the unit leve
(~function, generally) it makes it quite easy to see precisely where the
failure happens.

~~~
eru
Also writing up the laws that the fuzzers checks, is a good exercise in
thinking about your API. Read [http://donsbot.wordpress.com/2007/05/01/roll-
your-own-window...](http://donsbot.wordpress.com/2007/05/01/roll-your-own-
window-manager-part-1-defining-and-testing-a-model/) and
[http://donsbot.wordpress.com/2007/05/17/roll-your-own-
window...](http://donsbot.wordpress.com/2007/05/17/roll-your-own-window-
manager-tracking-focus-with-a-zipper/) for some examples.

Quick also not only gives you the failing cases, but tries to simplify and
shrink them first.

------
thurn
Interesting that he comes down in favor of Snap. I've been looking at the Snap
vs. Yesod question for my own projects, lately, and there's interesting
arguments both ways. Yesod is big and comprehensive, with four or five custom
DSLs that have compilers implemented in Template Haskell. Snap is tiny, really
just a routing engine and server with a small template library tacked on.

Yesod reminds me of Rails, while Snap reminds me of Servlets + JSP.

~~~
Periodic
Yesod is a web framework. It is designed to display web pages with some sort
of datastore backing them. If you had a CRUD-type app with a few different
data models then Yesod will make it really easy to generate the appropriate
HTML and forms and make them _type safe_. It extends the Haskell all the way
down to the application layer, assuming standard HTML as your primary response
and a certain data representation and persistence layer.

Snap (I have only looked at it. Please correct me) seems like it only goes as
far as the HTTP layer. It's designed so you can implement web services. Those
services might return HTML, but they might return JSON or XML. It doesn't care
or help you with your data representation. You have to do your own data
persistence and display layers.

------
scarmig
It appears he's teaching a course at Stanford on Haskell starting next week,
MW later in the afternoons.

Taking a class just to learn a language is a bit dodgy, but Haskell is
probably a forgivable exception.

~~~
mgummelt
It's a class in Haskell, not on Haskell.

~~~
Periodic
This is a good point. It's "Functional Programming _in_ Haskell". When I first
saw the course I think it was titled, "Systems Programming in Haskell."

~~~
mgummelt
"Functional Systems in Haskell". I think it's still based on systems
programming.

------
hristov
It is pretty disappointing that they decided to go with c# for the local
client. This pretty much guarantees that it will not work on Linux.

~~~
protagonist_h
Not really, as long as they don't use Windows API directly and rely on .NET
Framework they should be able to run it on MONO.

~~~
technomancy
He said in the Q&A that they used C# specifically to target integrating with
Outlook, so that wouldn't apply in this case.

------
shogunmike
I really like the idea of QuickCheck. Presumably it is -best- used in
conjunction with unit testing. It seems to me though that it would be suitable
mainly for numeric type code, given the random nature of the inputs?

~~~
pja
Remember that Haskell datatypes are very rich. QuickCheck will generate random
instances of any datatype you define. Because Haskell datatypes are so
expressive,. t's normal for Haskell programmers to define complex types for
their functions to process. Hence you can easily get good coverage of any
idiomatic Haskell code with QuickCheck.

If you're working in a datatype poor language, or simply one where the syntax
makes defining complex datatypes painful then you're much more likely to pass
around datatypes which are in implicitly defined. In this case you'll have to
write a QuickCheck function to generate suitable instances in order to test
your code. (This is also true for Haskell: there are often a few functions
where you have to explain to QuickCheck how to generate appropriate test
cases.)

------
tel
Anyone know what the "best compiler bug of all time" was?

~~~
daltontf
It was something to do with the compiler deleting the source file if there was
a type error within it.

~~~
mkopinsky
Kamikaze programming.

------
dubya
What is Reshaper in slide 35? Google suggests ReSharper, which seems more
likely, since searching just for reshaper finds a pretty goofy product.

~~~
droz
It's ReSharper from JetBrains. It's a widely used plugin for Visual Studio
providing a handful of refactoring and productivity tools.

------
pragmatic
Any reason to use C# instead of F#, considering F# is more functional?

Wonder if it has something to do with COM...

------
olliesaunders
A related talk: <http://vimeo.com/27192476> (video)

------
hugues
Hackers News is boring because of this type of post. What is the purpose of
your link?

~~~
freshhawk
Did you know that that was a slideshow? You're seeing the title page, click on
it to advance to the next page. repeat.

~~~
narain
Arrow keys also work.

~~~
mkopinsky
That said, this is pretty poorly designed. I also had no clue what to do for
the first few seconds after I clicked the link. It was only at slide 38/41
that I noticed the tiny, hidden controls on the very bottom blending into my
status bar.

~~~
Periodic
I didn't even notice those. Fortunately, I've worked with systems like S5
slideshows, and this looked a lot like a slideshow (no scroll bar, large text,
numeric fragment in the URL).

Usability could definitely be better, but I will admit to writing up similarly
boring slides in the past.

~~~
mkopinsky
Compare this slideshow to the basic S5 slideshow at
<http://meyerweb.com/eric/tools/s5/s5-intro.html> . A simple CSS template
could solve the usability problem here.

~~~
icey
I wonder why 280slides never really took off. This still seems like an
unsolved problem (hosting slides online)

~~~
notJim
Slideshare and Scribd: both allow you to use the program you already know
(Keynote or PowerPoint, most likely) that's also a native app with lots of
powerful functionality.

