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

comment 4y ago · link · parent

Thanks for the feedback! :) We spent so many iterations on the color scheme and design, so I'm really glad to hear this.

Created an issue for that interally. We'll fix this soon!

comment 4y ago · link · parent

Hey there, Founder of digitally induced here. Happy to share what've been working on with Thin Backend over the last months.

Thin is a version of the IHP Framework (https://ihp.digitallyinduced.com/), designed to be used by frontend developers. Instead of building APIs with low-level `fetch` calls, we provide high-level APIs like `createRecord('tasks', { title: 'Hello World' }`, `updateRecord(..)` and `deleteRecord(..)` to update your database.

To simplify state management (which is typically hard and lot's of boilerplate), we provide realtime APIs so that all app state is always in sync with the actual database. Previously your react app might have been rendered from the redux state, now it's rendered directly from the server state.

The Schema Designer and the migration tools make it really easy to get going with a project.

Internally Thin is built with Haskell and powered by IHP DataSync (https://ihp.digitallyinduced.com/Guide/realtime-spas.html).

Happy to hear everyone's feedback! :)

93.

Show HN: thin.dev, back end for making realtime, typesafe React Apps(thin.dev ↗)

147 points · by _query · 4y ago · 33 comments

comment 4y ago · link · parent

Yes, there's now `Data.Text` https://hackage.haskell.org/package/text-2.0/docs/Data-Text.... which is widely supported

comment 4y ago · link · parent

Haskell is a bit famous for being very academic and being only for language enthusiasts and researchers. But that image is outdated by now.

The Haskell ecosystem has improved quite a lot in recent years: E.g. there's now Haskell Language Server which provides very nice autocompletion in Editors like VSCode. Very recently support for dot-notation has been added, so you can now write `someValue.someField` as in other languages. In the web dev space we now have IHP, which is Haskell's take of Laravel/Rails/Django https://ihp.digitallyinduced.com/ (Disclaimer: I'm founder of the company that makes IHP)

So if you have checked out Haskell in the past already, you might want to give it another try! :)

comment 4y ago · link · parent

Haskell can also be very useful for practical real world programs, not just researchers. Check out IHP: https://ihp.digitallyinduced.com/ This might change your mind a bit :-)

97.

IHP: Haskell Framework for Type-Safe Web Applications(ihp.digitallyinduced.com ↗)

2 points · by _query · 4y ago · discuss

98.

What Is Nix and Why You Should Use It(serokell.io ↗)

2 points · by _query · 4y ago · discuss

99.

IHP: Haskell Framework for Type-Safe Web Applications(ihp.digitallyinduced.com ↗)

10 points · by _query · 4y ago · discuss

100.

IHP: Haskell Framework for Type-Safe Web Applications(serokell.io ↗)

6 points · by _query · 4y ago · discuss

comment 4y ago · link · parent

If you don't like cookies, you can disable them in your browser settings https://support.google.com/accounts/answer/61416?hl=de&co=GE...

comment 4y ago · link · parent

The basic version is open source. There's an additional commercial version that supports the development of IHP, you can find more infos here https://ihp.digitallyinduced.com/blog/6392ad84-e96a-46ce-9ab... :)

comment 4y ago · link · parent

Agree, Haskell's works best when working with flat data structures. IHP also only supports one-level nesting depth, like this:

    post <- fetch postId
        >>= fetchRelated #comments
This is fine for simple form based CRUD apps.

As you mentioned you're consuming the data with a JS frontend: For these cases we added a subsystem called DataSync to IHP. DataSync allows to use the IHP query builder directly from the JS side. This way we basically avoid needing to hand-write these nested graph API responses. Complex forms that depend on a lot of complex data can now be implemented using React components.

Here's an example query call from the JS:

    const todos = await query('todos')
            .where('id', 'd94173ec-1d91-421e-8fdc-20a3161b7802')
            .or(where('id', '173ecd94-911d-1e42-dc8f-1b780320a316'))
            .fetch()
This way the frontend can query data that it needs just in time. And also write records to the database without needing to manually writing API actions (thus avoid the data tree problem).

You can find an example of this here: https://ihp.digitallyinduced.com/Guide/realtime-spas.html#bu... For web apps that are fully consumed by a single page app, we're right now building IHP Backend, which provides the IHP tooling + the DataSync API in a way that is way simpler than full stack IHP. If you're curious, you can find a demo video here: https://youtu.be/-jj19fpkd2c

comment 4y ago · link · parent

Thanks a lot for this feedback :) Shared it with the team!

comment 4y ago · link · parent

Yep, the query builder is only designed for simple queries. For complex queries with many joins, it's best to do a raw SQL query instead: https://ihp.digitallyinduced.com/Guide/database.html#raw-sql...

comment 4y ago · link · parent

Thanks for sharing, really happy to hear this! :)

comment 4y ago · link · parent

Haskell is an underrated super power for building backends and web apps. Since 2019 when the blog post was written the ecosystem has improved quite a lot. With the Haskell Language Server and the Haskell Plugin for VS Code there's now really nice editor support. The language itself also got major improvements, e.g. support for dot-notation has been added, so you can now write `someValue.someField` as in other languages.

If you're interested in Haskell and are doing web dev, check out IHP, Haskell's version of Laravel/Rails/Django: https://ihp.digitallyinduced.com/ (Disclaimer: I'm founder of the company that makes IHP)

108.

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

5 points · by _query · 4y ago · discuss

109.

Writing about Haskell is Hard(anthony.noided.media ↗)

7 points · by _query · 5y ago · 1 comment

comment 5y ago · link · parent

The ihp-new command is only a shell script that does a few checks and then git clones the project boilerplate:

https://github.com/digitallyinduced/ihp/blob/master/ProjectG...

The actual IHP project has it's own nix-shell environment, so that all project dependencies are managed locally (https://github.com/digitallyinduced/ihp-boilerplate/blob/mas...).

comment 5y ago · link · parent

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

comment 5y ago · link · parent

It's not possible to use IHP without Nix. Using nix allows us to make fully reproducable dev environments as all versions (even e.g. the version of postgres used in dev mode) are pinned down.

The IHP docs assume no knowledge about nix, so it should still mostly be very simple to get started.

We compiled a couple more reasons why IHP uses nix in this blog post: https://ihp.digitallyinduced.com/blog/2020-07-22-why-ihp-is-...

Btw: To give IHP a try without installing Nix you can also try out the official GitPod image here https://gitpod.io/#https://github.com/gitpod-io/template-ihp :)

113.

Haskell IHP framework, from a technical and business perspective(gizra.com ↗)

95 points · by _query · 5y ago · 28 comments

114.

Haskell in Production: Scarf(serokell.io ↗)

7 points · by _query · 5y ago · discuss

115.

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

3 points · by _query · 5y ago · discuss

comment 5y ago · link · parent

Thanks for the feedback! :)

Automatic migration generation has only been added in the last release a few weeks ago. Right now it works by keeping track of all changes you apply via the GUI based schema designer, and then writing that into the migration sql file once you generate a new migration.

When you add a trigger manually to the Schema.sql file of your app, you then still need to copy it over to the migration manually right now.

We're still exploring that auto migration space. In the future we might switch to a real schema diff approach (in fact there's a WIP PR here https://github.com/digitallyinduced/ihp/pull/1137)

> Second question- Is there something I could read to catch up with what's happened to the Haskell language over the last 5-10 years or so, since I looked at it last?

I'm not aware about a central place for this. The closest might be the GHC change log, but that also contains a lot of noise.

comment 5y ago · link · parent

Haha yes :) Sorry, the IHP website is hosted via https://ihpcloud.com/ (like Heroku but for IHP) and the system just crashed because of too much activity (unrelated to the HN traffic, mostly too many deployments at the same time). We're about to roll out a new more stable system in the next days that fixes the root cause of the downtime today.

comment 5y ago · link · parent

Thanks for the feedback on the ads! We've been experimenting a lot with different ad formats recently. I'll make sure this is fixed. (Update: Fixed now, thanks again for the honest feedback)

In a comparison between IHP and Yesod I think that IHP is designed for people that have only very little to no haskell experience. IHP brings a lot of conventions and code generators to get you up and running very quickly, while Yesod gives you more flexibility (flexibility might be more challenging when you're just starting out with haskell. E.g. what DB library do you want to pick? In Yesod you have many options, in IHP we'll provide one out of the box). Check out the IHP documentation and compare it to the Yesod docs, you'll quickly see the difference :) Also if you want to check out some reviews of people already using IHP, you can find a few longer ones on our G2 page https://www.g2.com/products/ihp/reviews

> Can I create rest and especially graphql apis or is it more focused on building old-school server side rendered pages?

At the start IHP was focussed a lot on server-side rendering. Now you can also use it for building REST APIs. GraphQL is not yet supported, but it's coming in the future.

We're also right now working on a generic REST API layer with a bundled JS SDK. It will allow you to query your database, create and delete models and keep everything in sync with a realtime sync engine.

Here's a JS code example:

        const tasks = await query('tasks')
            .orderBy('createdAt')
            .fetch()
On the backend we use Postgres Row-level-security Policies to make sure that a user can only access his own data.

Here's a demo react component that uses the new JS APIs: https://github.com/digitallyinduced/ihp-datasync-demo/blob/m...

Docs are still in progress, but here's a draft https://github.com/digitallyinduced/ihp/commit/39baa4aa23cc6... :)

comment 5y ago · link · parent

Haskell is really an underrated super power for building backends and web apps. The ecosystem has improved quite a lot over the recent years. With the Haskell Language Server and the Haskell Plugin for VS Code there's now really nice editor support. The language itself is also improving at a good pace, e.g. the latest release of GHC (The haskell compiler) added support for dot-notation, so you can now write `someValue.someField` as you might know from other languages.

If you're curious about giving it a try and are doing web dev, check out IHP, haskell's largest web framework: https://ihp.digitallyinduced.com/ (Disclaimer: I'm founder of the company that makes IHP)

120.

Why Co–Star Uses Haskell(costarastrology.com ↗)

142 points · by _query · 5y ago · 263 comments

12345
10