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

Paul R paul.r.ml at gmail.com
Mon Feb 13 21:12:44 CET 2012


For one, I am adverse to DSL based on quasi-quotation. Not because
I find the syntax hard - to be honnest it is often the opposite, with
DSL designed with ease of use in mind - but because of the volatile
nature of languages without specification, be them basic DSL. It is
quiet hard to settle on a language spec that users will be able to rely
on in the long run, and we all know that. The haskell commitee did
a fine job with Haskell 98, so people felt confident to spend days and
months and years working through Haskell 98, building blocks of it and
sharing them so that they can be used together in the long term. I'd
rather type more of Haskell 98 than less of a unspecified DSL, simply
because of that.



On Mon, 13 Feb 2012 11:52:00 -0800, Greg Weber <greg at gregweber.info>
said:

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

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

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


Greg> 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
>>> 

-- 
  Paul



More information about the Haskell-Cafe mailing list