Better HN
topnewbestaskshowjobs
Log inSign up

_query

1,262 karma · joined Mar 7, 2014 (12y ago) · 293 submissions

Founder, digitally induced GmbH

https://www.digitallyinduced.com/

marc a t digitallyinduced com

Submissions

121.

IHP v0.15.0 has been released(github.com ↗)

2 points · by _query · 5y ago · discuss

122.

IHP v0.15.0 has been released(github.com ↗)

12 points · by _query · 5y ago · discuss

comment 5y ago · link · parent

Highly recommend to try this out if you run an open source project and want to get some insights about usage.

Avi gave me a demo last week as we’ve been looking on how to get better analytics for our open source framework IHP https://ihp.digitallyinduced.com/ it’s quick to set up and they also provides tools for doing analytics for eg the documentation.

124.

The New IHP Developer Subscription and IHP v0.14(ihp.digitallyinduced.com ↗)

3 points · by _query · 5y ago · discuss

comment 5y ago · link · parent

This looks really great! Congrats on launching!

comment 5y ago · link · parent

In my experience when learning functional programming with Haskell there are two kinds of complexity:

1. Complexity caused by the change of paradigm: This specifically hits programmers with a lot of experience in OOP languages. For getting into the FP-mindset your brain needs a bit of time to get rewired. You need to switch thinking about mutating objects to thinking in mapping streams of data. Given that many OOP languages are adopting functional ideas like map and fold/reduce, nowadays a lot of developers already have a bit of experience in thinking in the FP-way, and this will get better with time.

2. Complexity caused by the tools: There's a reason the author in the above post started out with Elm instead of Haskell :-) Writing a few recursive functions in haskell is still pretty simple. Where it get's very complex is when you want to build real world applications. To build a simple web app you need to 10s of decision on what tools and libraries to use. Here's a couple questions you'll need to find an answer to when building a haskell app:

- What GHC and what language extensions do I need? How do I install it? - What package manager do I use? Cabal, nix, stack? - What web server library? - What database library do I need? Do I need an ORM, are there even ORMs in haskell even though there are no objects? - What HTML template library to use? - How do I compose it all together? What is a monad stack?

When you have only very few experience in haskell it's really hard to not get stuck here. The quality of documentation of most haskell tools also doesn't very much help here.

I believe that the value haskell can bring is signifcant, and by fixing the tooling situation we can a lot more people to adopt haskell in the future.

With IHP we're trying to fix the tooling situation and build a haskell-based web framework that is as easy to use a rails or laravel :) To combine the benefits of purely-functional programming with the RAD approach of rails, laravel and django. It's now already the most active haskell web framework and we have many people starting their haskell journey with IHP.

We have live reloading in dev mode, a JSX-inspired template language and many code generators to quickly get started with shipping real world apps.

Check out this video of building a simple blog app in IHP: https://www.youtube.com/watch?v=UbDtS_mUMpI To get started (supports macOS, linux, windows) check out the IHP Website: https://ihp.digitallyinduced.com/

comment 5y ago · link · parent

If this made you interested in trying out haskell for making web apps, check out IHP https://ihp.digitallyinduced.com/ It's the easiest way to get started with building haskell web apps :) IHP is designed for non-haskellers, so it's easy to start with for most people that haven't written much haskell yet.

128.

How IHP uses Haskell's Type System to enforce good patterns(ihp.digitallyinduced.com ↗)

13 points · by _query · 5y ago · discuss

129.

Displaying Realtime Data in Your Web Application Without Hassle: IHP AutoRefresh(ihp.digitallyinduced.com ↗)

6 points · by _query · 5y ago · discuss

comment 5y ago · link · parent

I've been using nix on macOS as my primary package manager for years. Really love it! Specifically nix-shell is a blessing a you can quickly try out things without worrying about breaking some other packages on the system.

Initially we've only used nix for development at my company, but now we're also running most of our servers with NixOS. This allows us to use our dev package definitions in production, so our dependencies are always in sync between dev and prod. I've written a blog post about all the advantages we get with nix in our framework IHP a while ago, if you're curious, check it out: https://ihp.digitallyinduced.com/blog/2020-07-22-why-ihp-is-...

If you're using an older mac and have troubles with installing nix, try out the new installer in this GH issue: https://github.com/NixOS/nix/pull/4289 (the command is in the "Try it out" section). It's already merged, but not released yet. So far this has solved all the issues on older macs for me.

Also check out https://nix.dev/ which has many great resources to get started :)

131.

Integrated Haskell Platform: v0.12.0 has been released(github.com ↗)

2 points · by _query · 5y ago · discuss

comment 5y ago · link · parent

> For instance, you don't see a "stand up a web app in Haskell in 10 minutes" tutorials. Historically it may have worked in Haskell's favour to slowly induct learners, but in this age where languages are fighting for mind space I don't agree that's a good approach anymore.

There's now the IHP framework that allows you to build haskell web apps in like 10 minutes. If you're curious, check it out: https://www.youtube.com/watch?v=UbDtS_mUMpI It's been called "Haskell on Rails", and for good reason.

133.

Why the IHP Framework Is Using the Nix Package Manager(ihp.digitallyinduced.com ↗)

2 points · by _query · 5y ago · discuss

134.

Integrated Haskell Platform: v0.11.0 has been released(github.com ↗)

4 points · by _query · 5y ago · discuss

135.

Integrated Haskell Platform: v0.9 is out(ihp.digitallyinduced.com ↗)

3 points · by _query · 5y ago · discuss

comment 5y ago · link · parent

This approach definitely has a lot of value for specific use cases. Specifically to get MVP done in a fast way. When you need to scale out, you can still add a SPA later on.

If you combine the approach of WebSockets + dom patching with postgres pg_notify you get some real magic :) In the new IHP framework we provide something like that. We call it Auto Refresh: https://ihp.digitallyinduced.com/Guide/auto-refresh.html

Auto Refresh is activated with a function call inside a controller action, like this:

  action ShowProjectAction { projectId } = autoRefresh do
      project <- fetch projectId
      render ShowView { .. }
The only difference to a normal IHP action is that it has the `autoRefresh` call in front of the do-block.

Once activated IHP will automatically track all tables your action is using e.g. in `SELECT * FROM ...` queries. Once the action sends a response IHP will start watching for any kind of `INSERT`, `UPDATE` or `DELETE` statement to all the tables used by your action using pg_notify.

When the page is rendered a small JavaScript function will connect back to the IHP server using a WebSocket connection.

Whenever an `INSERT`, `UPDATE` or `DELETE` happens to the tables used by your action IHP will rerun your action on the server-side. When the generated HTML looks different than the HTML generated on the initial page load it will send the new HTML to the browser using the WebSocket connection. The JavaScript listening on the WebSocket will use the new HTML to update the current page. It uses morphdom to only touch the parts of your current DOM that have changed.

Here's how this looks in the real world: https://twitter.com/digitallyinduce/status/13207288333943808... <- This view has no app-specific Javascript. The auto refresh is enabled using a single function call and the framework takes care of all the technical details.

Some use cases where this really shines:

- interactive dashboards (e.g. showing the current status of job queue)

- simple user chat systems (you can send messages using normal form submission, as long as auto refresh is enabled this works like a SPA)

- building a twitter clone, the feed will automatically add new content as it's added to the database

We're using this approach in production since last year and it saves an incredible amount of development time.

comment 5y ago · link · parent

Measured by GitHub stars, which is a good proxy:

https://star-history.t9t.io/#digitallyinduced/ihp&yesodweb/y...

We also have a very active community, e.g. over 100 people in Slack, over 180 in Gitter, over 100 weekly active projects (https://ihp-telemetry.digitallyinduced.com/admin/Events <- here's some telemetry)

comment 5y ago · link · parent

The tooling situation has improved a lot in the haskell ecosystem in the last year.

E.g. with Haskell Language Server there's now a good and standard way for having autocompletion, etc. inside VSCode and other editors.

In the web development space we now have IHP, which is like rails but with type-safety. It's already the second largest haskell framework, even though it was just launched last year: https://ihp.digitallyinduced.com/ (Disclaimer: I'm founder of the company that makes IHP)

comment 5y ago · link · parent

At digitally induced we're always looking for great developers to add to our haskell team: https://www.digitallyinduced.com/JobPositions :)

comment 5y ago · link · parent

Our company is also using a lot of haskell for our projects. Since we adopted haskell we had a lot more very talented developers apply.

I think this only might be a problem if you don't want to hire remote.

141.

Reflections on Using Haskell for My Startup(alistairb.dev ↗)

129 points · by _query · 5y ago · 101 comments

142.

The Database Inside Your Codebase(feifan.blog ↗)

2 points · by _query · 5y ago · discuss

143.

Haskell: The Good Parts(ihp.digitallyinduced.com ↗)

2 points · by _query · 5y ago · discuss

144.

Haskell's at Symbol – Type Application(zacwood.me ↗)

2 points · by _query · 5y ago · discuss

145.

Building IHP Apps with Nix and Docker(zacwood.me ↗)

2 points · by _query · 5y ago · discuss

comment 5y ago · link · parent

IHP is very opinionated in the way how it approaches building web applications (Code Gen, Project structure, Naming, ..). But exactly this kind of opinionated design makes it possible to be very productive, compared to doing everything yourselves.

comment 5y ago · link · parent

> I think that Haskell is a great language to prototype pure business logic because of the type system and focus on purity, but it has several warts, because haskellers focus more on language research than DX.

This is very true. We recently started https://github.com/digitallyinduced/haskell-ux to keep track of haskell DX improvements. Some of our suggestions are already issues on the GHC (haskell compiler) bug tracker.

Here's an example of a great UX improvement in GHC: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4711

comment 5y ago · link · parent

I think for making stuff the speed of iteration is the most important metric.

Haskell is great for this because:

- In dev mode it's super fast, see https://www.youtube.com/watch?v=nTjjDo57B8g&feature=youtu.be

- You can change features of your product easier thanks to the type system. Doing a big refactoring with rails always adds many bugs. With haskell you spend less time on doing these kind of changes because the compiler tells you what needs to be changed.

comment 5y ago · link · parent

The value of type safety is more that you're more productive because you can faster change things (as the compiler tells you what needs to be changed). This allows for faster iteration on your product.

Correctness is indeed not the most important thing, it's kind of a nice side effect.

1
456
10