News for hackers. Stuff that matters.
Re:Reflections on Using Haskell for My Startup by alexmingoia on Friday February 19, 2021 @06:16AM (#26191865)
I think his two-week setup time is due to choosing to use libraries and architecture he didn’t understand or worked with before (rebase, fused-effects). I make webapps in Haskell and it takes me 5-10 minutes to setup a project, since I already know what to do.

- “The ‘monad’ abstraction is excellent for dealing with code with a lot of failure conditions (ie. parsing) and avoids ‘pyramid of doom’ type code. Haskell worked out really well in this key area.”

- “Another strong positive for writing Deadpendency was testing. Haskell has a lesser-known style of testing libraries that do ‘property based testing’ (PBT).”

- “Haskell is very safe to refactor thanks to the type safety the compiler brings, which is probably the most important thing.”

- “My core Haskell had very few logic bugs. This is because Haskell is very safe by default and I had opted into strict types that help catch edge cases”

- “At this point I think it is actually pretty stable. I consider the project a big success. A huge part of this has been due to Haskell and its excellent ecosystem.”

Re:Reflections on Using Haskell for My Startup by ritchiea on Friday February 19, 2021 @09:05AM (#26193256)
It doesn't take 2 weeks to set up an app in a language with a big community of developers, well maintained libraries and at least decent documentation. It probably takes a day or 2. Maybe a bit more if you are venturing into a new ecosystem like switching from Java backends to a node.js backend.

I loved learning Haskell in university. It's an interesting language. I came into intro CS class thinking I could already program & the class would just be about sharpening my axe. Then my intro CS class started with Haskell which threw my brain for a loop and made me think about programming completely differently. That was a great intellectual experience and good for my long term thinking.

Haskell also seems like an incredibly impractical choice for a production language that only a stubborn purist would make. Of course the last bit is purely opinion, your experience may vary.

Re:Reflections on Using Haskell for My Startup by dunefox on Friday February 19, 2021 @10:42AM (#26194297)
If you don't know the language and tools it definitely takes quite some time to setup Java, Maven, etc. All the issues with class paths, manifests, and so on, that are just completely alien and opaque coming from any other language make the experience very frustrating.
Re:Reflections on Using Haskell for My Startup by agentultra on Friday February 19, 2021 @11:33AM (#26194838)
This. I think a lot of people who use mainstream languages forget what it's like starting from scratch in those languages. Getting a projects setup in Java, C++, C, Rust, etc are all quite difficult.

Getting a web application started in Ruby is easy because it does so much for you out of the box.

There are frameworks that make similar choices for you in Haskell as well: IHP, Yesod, etc.

I think taking two weeks to "set up" a Haskell project is a bit long but I read it as the author taking two weeks to learn enough Haskell to make two rather advanced libraries work together... which means they had to make all the little micro decisions that frameworks make for you, etc. With more experience that could've been done in less time.

If they had started with IHP I think it would've been your usual day or two.

Re:Reflections on Using Haskell for My Startup by IggleSniggle on Friday February 19, 2021 @12:07PM (#26195208)
Thanks for mentioning IHP. I've only read its landing page, but if what is has to say about itself is all true and from what is apparent looking at code samples, it definitely deserves to be on folks' radar!

It's enough to make Haskell really seem like a reasonable choice to "jump in with" without fear of never reaching some mundane goal.

Re:Reflections on Using Haskell for My Startup by ssijak on Friday February 19, 2021 @01:47PM (#26196437)
Starting a very good starter project in Java/Kotlin is literally next->next->next while selecting what you want (frameworks, maven/gradle, jvm version, etc) in IntelliJ. And if you do not use IntelliJ you can use https://start.spring.io/ or other starter projects.
Re:Reflections on Using Haskell for My Startup by ghostwriter on Friday February 19, 2021 @04:29PM (#26198262)
Starting a Haskell project with IntelliJ Idea is the same next->next->next [1]

[1] https://youtu.be/F0E0aV85GeQ?t=165s

Re:Reflections on Using Haskell for My Startup by hibbelig on Friday February 19, 2021 @02:48PM (#26197226)
Well, Haskell is too niche to have this...

And if I was new to Java, I wouldn't know which frameworks I wanted...

Re:Reflections on Using Haskell for My Startup by nouveaux on Friday February 19, 2021 @11:49AM (#26194992)
Javascript: webpack, gulp, sass, react, node, npm/yarn. The whole frontend ecosystem is consolidating but I would not consider this trivial. Experienced programmers coming into Javascript still stumble over these tools.
Re:Reflections on Using Haskell for My Startup by sokoloff on Friday February 19, 2021 @12:08PM (#26195225)
I think the first 5 minute experience is really good in React at this point.

  npx create-react-app foo-app
  cd foo-app
  yarn start
In ~2 minutes (10 if you had to install node/npm/npx), you have a hot-reloading live site to play with.

That doesn’t make React great nor solve all of the issues that lie between minute 1 and v0.1 in production, but the startup is smooth and painless (for me who comes from C/C++/C#/SQL, and my javascript is at a level where beginners can still help me).

Re:Reflections on Using Haskell for My Startup by ghostwriter on Friday February 19, 2021 @05:20PM (#26198767)
The first 2-minute experience with a Haskell web service:

  curl -L https://nixos.org/nix/install | sh
  
  cat > ./script.sh <<EOF
  #! /usr/bin/env nix-shell
  #! nix-shell <nixpkgs> -i runghc -p "ghc.withPackages (x: [ x.yesod ])"
  {-# LANGUAGE ExtendedDefaultRules #-}
  {-# LANGUAGE OverloadedStrings    #-}
  {-# LANGUAGE QuasiQuotes          #-}
  {-# LANGUAGE TemplateHaskell      #-}
  {-# LANGUAGE TypeFamilies         #-}
  import Yesod
  
  data App = App
  
  mkYesod "App" [parseRoutes|
    / HomeR GET
  |]
  
  instance Yesod App
  
  getHomeR = return $ object ["msg" .= "Hello!"]
  port     = 3000
  
  main = warp port App
  EOF
  
  chmod +x ./script.sh
  
  ./script.sh
Re:Reflections on Using Haskell for My Startup by yughurt on Friday February 19, 2021 @09:41AM (#26193625)
What intro cs class uses Haskell as its first language!
Re:Reflections on Using Haskell for My Startup by Symbiote on Friday February 19, 2021 @10:13AM (#26194011)
Re:Reflections on Using Haskell for My Startup by momentoftop on Friday February 19, 2021 @09:52AM (#26193756)
The first programming course at Edinburgh is the Haskell course, taught in the first year in the first semester.
Re:Reflections on Using Haskell for My Startup by ritchiea on Friday February 19, 2021 @10:27AM (#26194139)
Reed College