[Haskell-cafe] Subject: A universal data store interface

Greg Weber greg at gregweber.info
Mon Feb 13 20:52:00 CET 2012


Persistent is a database abstraction layer with no dependencies on
Yesod. Those that need a persistence layer have the same needs to
interface with the database in a type-safe way, regardless of whether
their program presents a web interface.

Have you tried using Persistent? We have never heard a report from a
user that the Persistent DSL schema syntax is confusing. These
complaints always seem to be from someone that hasn't actually tried
it but is adverse to quasi-quoting. The DSL is basically the exact
same as Haskell record syntax. I am not sure who the mythical users
are that can figure out Haskell but can't understand dead-simple
DSL's.

That being said, I would like to have a Template Haskell interface
instead of just a QQ interface. The reason why we haven't bothered
with doing that ourselves is because the record name-spacing issue
makes the current QQ interface much more convenient. I am actively
working to solve the namespace issue. This all brings up a great point
though: as part of the GSoC we should create a Template Haskell
interface (similar to acid-state as you mention). Given the structure
of things that Michael has already pointed out, and that we are
already using Template Haskell with the DSL, this should only be a few
day's work.


On Mon, Feb 13, 2012 at 11:40 AM, Tom Murphy <amindfv at gmail.com> wrote:
> It seems that all tutorials and resources for Persistent use Template
> Haskell along with several Yesod specifics.
>
> But, I could be wrong, or new tutorials could be written.
>
> Tom
>
> On 2/13/12, Michael Snoyman <michael at snoyman.com> wrote:
>> Actually, Persistent is fully usable without any special syntax, DSLs,
>> or Template Haskell. In fact, Persistent itself has no
>> template-haskell dependencies, specifically so that it can be built on
>> ghc-iphone. Additionally, the Persistent DSL syntax is completely
>> separate from any other Yesod DSL syntaxes that exist, so it's not
>> like you have to learn five new things to get the automatic code
>> generation.
>>
>> On Mon, Feb 13, 2012 at 9:30 PM, Tom Murphy <amindfv at gmail.com> wrote:
>>>     With respect, I don't think that Persistent is a natural choice
>>> as the go-to tool for Haskell users, simply because it requires
>>> knowledge of a lot of Yesod-EDSL syntax.
>>>     The set of users with persistent data needs seems a very
>>> different set than that of those who are familiar with Yesod, and I
>>> think the syntax is quite confusing without fuller understanding of
>>> Yesod.
>>>
>>>     The syntax of acid-state (not familiar with this one), and
>>> swapper (https://github.com/roman-smrz/swapper/blob/master/test/) seem
>>> to have a much more linear learning curve for an intermediate Haskell
>>> user.
>>>
>>> amindfv / Tom
>>>
>>> On 2/13/12, Greg Weber <greg at gregweber.info> wrote:
>>>> Hi Sergiu,
>>>>
>>>> Thanks you for your interest in that proposal. I rushed it off a year
>>>> ago. Since then we have made a lot of improvements to Persistent and
>>>> the library forms a basic building block for most Yesod users and
>>>> other Haskellers. Persistent offers a level of type-safety and
>>>> convenience not available elsewhere (except perhaps for libraries like
>>>> acid-state that are limited to in-memory storage). That being said,
>>>> there are still a lot of improvements that could be made. With the
>>>> effort of a GSoC volunteer we could probably get it to the point of
>>>> being the go-to data storage library for Haskellers, at least those
>>>> planning on using the subset of backends (likely SQL) with great
>>>> support. This proposal is vague and we would need to work with you to
>>>> narrow things down a bit.
>>>>
>>>> I am biased, but I believe the Yesod project is one of the most
>>>> compelling in the Haskell ecosystem. There are a lot of different ways
>>>> a GSoC project could help make things even better besides improving
>>>> the associated Persistent library, and we would really like to mentor
>>>> at least one GSoC student. I would open more tickets for this in the
>>>> system, but I am not sure how helpful it will be. It seems that we
>>>> need to reach out to more students like yourself, but I am not sure
>>>> how to do that unless I see messages like these first.
>>>>
>>>> Greg Weber
>>>>
>>>> _______________________________________________
>>>> Haskell-Cafe mailing list
>>>> Haskell-Cafe at haskell.org
>>>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>>>
>>>
>>> _______________________________________________
>>> Haskell-Cafe mailing list
>>> Haskell-Cafe at haskell.org
>>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>



More information about the Haskell-Cafe mailing list