News for hackers. Stuff that matters.
Re:Haskell IHP framework, from a technical and business pers... by leetrout on Thursday November 11, 2021 @08:39AM (#29187682)
I tried Haskell a decade ago and gave up pretty quick due to some of the stereotypical reasons.

I really like this test file the author linked to for a great example of what "real" haskell can look like.

https://github.com/Gizra/ihp-simple-seat-reservation/blob/ma...

I'm interested in other "pragmatic" haskell sources / tutorials that lose the ego / pretentiousness and demonstrate Getting Stuff Done™... any recommendations?

Re:Haskell IHP framework, from a technical and business pers... by agentultra on Thursday November 11, 2021 @10:31AM (#29188929)
I should probably write more but this is what I do on my stream at https://twitch.tv/agentultra -- we've built a streaming replication library for PostgreSQL (from scratch all the way up to released package) and are presently exploring different native GUI frameworks.

I tend to focus more on building things than the theory and hope that folks are seeing the practical side of programming in Haskell.

Re:Haskell IHP framework, from a technical and business pers... by _query on Thursday November 11, 2021 @09:12AM (#29187992)
Here's a link to the IHP Chat Example app: https://github.com/digitallyinduced/ihp-chat-example-app/blo...

You can find a couple real-world examples here https://ihp.digitallyinduced.com/Guide/examples.html

Re:Haskell IHP framework, from a technical and business pers... by __s on Thursday November 11, 2021 @08:10PM (#29195257)
Here's some of my repos, where I wouldn't say I'm a Haskell programmer, was more writing C/Python back when I wrote these:

Fractal renderer: https://github.com/serprex/Fractaler Templates.hs implements a variety of fractals as pure functions & Fractaler.hs is the UI

Brainfuck interpreter: https://github.com/serprex/bfhs minibf.hs is half the size of bf.hs, but the latter is more optimized as it implements jump tables for [] instructions & combines consecutive <>+- & more. Tape implemented as a zipper. Fun part of implementation is that the interpreter is mostly a pure function building up an output string & returns that to the io interpreter when it needs input or escaping

Re:Haskell IHP framework, from a technical and business pers... by gilmi on Thursday November 11, 2021 @10:25AM (#29188843)
I've recently released a (fairly complete by still alpha version) project-oriented Haskell ebook[0].

It targets programmers that are new to the language, and focuses on the practice of writing Haskell to build projects. Specifically, a blog generator.

[0]: https://lhbg-book.link

Re:Haskell IHP framework, from a technical and business pers... by rgoulter on Thursday November 11, 2021 @09:31AM (#29188172)
I like the term 'simple haskell' more. It links to a few blogposts with similar sentiments. http://simplehaskell.org/
Re:Haskell IHP framework, from a technical and business pers... by lalaithion on Thursday November 11, 2021 @11:45AM (#29190026)
The file linked is not what the 'simple Haskell' philosophy suggests. It is compiled with the following extensions enabled:

    OverloadedStrings
    NoImplicitPrelude
    ImplicitParams
    Rank2Types
    DisambiguateRecordFields
    NamedFieldPuns
    DuplicateRecordFields
    OverloadedLabels
    FlexibleContexts
    TypeSynonymInstances
    FlexibleInstances
    QuasiQuotes
    TypeFamilies
    PackageImports
    ScopedTypeVariables
    RecordWildCards
    TypeApplications
    DataKinds
    InstanceSigs
    DeriveGeneric
    MultiParamTypeClasses
    TypeOperators
    DeriveDataTypeable
    MultiWayIf
    UndecidableInstances
    BlockArguments
    PartialTypeSignatures
    LambdaCase
    DefaultSignatures
    EmptyDataDeriving
    BangPatterns
    BlockArguments
    MultiWayIf
    FunctionalDependencies
    PartialTypeSignatures
    StandaloneDeriving
    DerivingVia
Re:Haskell IHP framework, from a technical and business pers... by rgoulter on Thursday November 11, 2021 @12:16PM (#29190409)
Most of those feature in this list of recommended defaults https://github.com/commercialhaskell/rio#language-extensions which is cited as an example in simplehaskell's page on recommendations. https://www.simplehaskell.org/language-extensions.html

From what I've touched of Haskell, I'd think e.g. OverloadedStrings makes Haskell simpler to use than leaving it out. (And OverloadedStrings certianly doesn't seem ego-inducing).

Simple Haskell's page on extensions also isn't advocating for anything too concrete. Just an emphasis on pragmatic, simple to maintain code.

IHP's landing page even claims "Don't worry, you don't need to know much about Haskell to get started, you'll learn it along the way". This seems to be in the spirit of simple Haskell, although I'd be curious to hear about what parts seem not-simple.

Re:Haskell IHP framework, from a technical and business pers... by dwohnitmok on Thursday November 11, 2021 @01:26PM (#29191223)
The extensions that aren't on that list but are in the list provided by lalaithion are pretty "big" extensions that can severely increase the bar needed to understand Haskell code (I'm looking at ImplicitParams, QuasiQuotes, DataKinds, TypeOperators, and UndeciableInstances).

In general, I've only read over IHP code, but never used it myself, I'd be worried about the quality of GHC error messages for a Haskell novice with the amount of magic IHP is providing.

There's some nifty type-level programming going on in the background with IHP which works great when everything compiles, but can have confusing GHC error messages if you have an error.

Re:Haskell IHP framework, from a technical and business pers... by res0nat0r on Thursday November 11, 2021 @03:07PM (#29192510)
I bought the PDF, and now physical book of this, it's massive and really good: https://haskellbook.com/