Live data from Hacker News

IHP – A Haskell web framework

github.com

31–40 of 41 posts

Re: IHP – A Haskell web framework

#31
IHP has a lot of potential and it's getting better by the day. The way I see it, its weakest point is the documentation: things like changing the default UI framework (bootstrap), integrating react or another frontend framework, giving more complex examples (with foreign keys i.e.), changing the URL style, exposing JSON endpoints, and so on. I also didn't like the automatic generation of controllers, views, etc that it offers, I found it quite more confusing than just manually writing them out. Maybe this is because I come from Django instead of Rails, but I still wanted to point that out: IHP is full of magic, this is both good and bad.

Re: IHP – A Haskell web framework

#32
post #31

IHP has a lot of potential and it's getting better by the day. The way I see it, its weakest point is the documentation: things like changing the default UI framework (bootstrap), integrating react or another frontend framework, giving more complex examples (with foreign keys i.e.), changing the URL style, exposing JSON endpoints, and so on. I also didn't like the automatic generation of controllers, views, etc that…

> IHP is full of magic, this is both good and bad.

I find that not true. Scaffolding is not magic. IHP has little magic compared to big names like Rails and Spring Boot.

What I find that IHP is full of: type safety saving my ass from runtime drama.

Totally agree on the docs remark, the community is very friendly though.

Re: IHP – A Haskell web framework

#33
post #15
post #8

Two rather insignificant observations: - the video scaffold redirected to localhost:8000/Posts why in the world are the controller paths capitalized? So rare to see that but somehow I'm less surprised in haskell - the name sounds a lot like i-Hop and I can't get it out of my head now and it will forever be that. First impressions have a way of sticking around Otherwise I like the opinionated direction they chose. Esp…

Thanks for your thoughts! > why in the world are the controller paths capitalized The idea behind that is that it makes mapping from url to action easier when trying to understand how things work. E.g. `/Posts` maps to `PostsAction`. `/NewUser` maps to `NewUserAction`. I think longterm urls don't matter that much anymore as many browsers just hide them completly (think Safari, many mobile browsers, etc.), so we optim…

Another reason why urls (still) matter: SEO.

Re: IHP – A Haskell web framework

#34
post #4

I've seen this come up on reddit ads - has anyone tried it out ? Does it live up to the claim that its Rail's for Haskell ? How does it compare to any of the other web frameworks out there ?

I tried it out about a month ago, and my sense was it's definitely on the right track, but I wouldn't by any means put it into production yet. The UI was surprisingly useful rather than gimmicky, and the use of types was very cool. I was particularly impressed with the migrations framework, which was really easy to work with. I didn't get too far into it, though, because at the time it didn't support the Haskell lang…

> at the time it didn't support the Haskell language server

It does now:

https://ihp.digitallyinduced.com/Guide/editors.html#notes-on...

Re: IHP – A Haskell web framework

#35
post #31

IHP has a lot of potential and it's getting better by the day. The way I see it, its weakest point is the documentation: things like changing the default UI framework (bootstrap), integrating react or another frontend framework, giving more complex examples (with foreign keys i.e.), changing the URL style, exposing JSON endpoints, and so on. I also didn't like the automatic generation of controllers, views, etc that…

Thanks! We'll improve the documentation on the points you've mentioned :) Created https://github.com/digitallyinduced/ihp/issues/570 to keep track of it.

For custom URLs check this: https://ihp.digitallyinduced.com/Guide/routing.html#custom-r... For JSON check this: https://ihp.digitallyinduced.com/Guide/view.html#json

Re: IHP – A Haskell web framework

#36
post #24

I wonder how this framework performs on speed. Rails is really nice but somewhat on the slow side, would be cool if the haskell alternative was more efficient.

I did a test once with Yesod (also a Haskell based server side web framework; also uses Haskell's Warp webserver), and it was very fast. I got 60ms from Rails and 2ms from Yesod in a similar scenario.

This will not be fastest (that will be the C/C++/Rust solutions), but the programming experience is very high level. I want speed in runtime performance (1) and in developer productivity (2). I'd say Rust and Haskell have interesting offerings looking at these two metrics.

Re: IHP – A Haskell web framework

#37
post #18

Earlier quoted context omitted.

Someone from the haskell community summarized it like this [0]: > You thought Yesod was Rails? Nope. Yesod is a highly modular library for developing web applications with a few opinions and some scaffolds. > IHP is Rails - all the components are glued together in a way that makes modularity difficult. The main difference is that IHP is very opinionated and cares a lot about giving a great developer experience. Where…

So yesod to IHP is like expressjs to meteor, fastapi or flask to django?

Yesod is in the Flask/Sinatra to Rails range.

IHP is in the Rails to Django range.

Re: IHP – A Haskell web framework

#38

I love writing Haskell code, but the community desperately needs to agree on one method of install and project setup-- cabal, stack, nix, whatever-- and then make it WAY easier for new users to start projects. I'm not at all saying simplify the language for the LCD, but I have to manage all three of those tools and more and their usability is horrible. The configs are all over the place, there's 2 or 3 per project re…

I'd say this competition has been the reason for some amazing innovation. Both Nix and Stack are pretty next level compared what most other languages have going. And since there is no big corp (like Google for Golang) to order what to use, we will have competing standards for a long time.

Re: IHP – A Haskell web framework

#39

Why? What’s the point? Do we need another web framework? Are Haskell programmers spending too much time writing boilerplate for their web apps? If this just a fun project then cool. I hoped the author learned something. I hope even more that they share what they learned.

Good point. Here’s a different angle. I don’t see it, that the Haskell community needs another web framework. However, the niche that Rails fills, could benefit from purity and type safety; which Haskell provides.

And Rails was very easy to get started with. Not so much for Yesod. IHP makes a big difference in this area.

Radical type safety for the masses!

Re: IHP – A Haskell web framework

#40
post #15
post #8

Two rather insignificant observations: - the video scaffold redirected to localhost:8000/Posts why in the world are the controller paths capitalized? So rare to see that but somehow I'm less surprised in haskell - the name sounds a lot like i-Hop and I can't get it out of my head now and it will forever be that. First impressions have a way of sticking around Otherwise I like the opinionated direction they chose. Esp…

Thanks for your thoughts! > why in the world are the controller paths capitalized The idea behind that is that it makes mapping from url to action easier when trying to understand how things work. E.g. `/Posts` maps to `PostsAction`. `/NewUser` maps to `NewUserAction`. I think longterm urls don't matter that much anymore as many browsers just hide them completly (think Safari, many mobile browsers, etc.), so we optim…

not a good idea to leak implementation details in the url/interface. think about facebook with all those .php urls.
Post reply on HN