Greg Weber | 1 May 2012 06:24
Gravatar

Re: With yesod-platform-1.0.3.1, missing dependency on persistent-sqlite == 0.9.*

On Mon, Apr 30, 2012 at 1:17 PM, Chris Mennie <camennie@...> wrote:
> I tried again from a fresh virtualenv and did a
>
> "cabal-dev install ./yesod-platform-1.0.3.1.tar.gz persistent-sqlite
> persistent-mysql"

virthualenv and cabal-dev should not be used together according to the
virthualenv readme.

>
> Using the yesod in the new cabal-dev directory I did a "yesod init", made a
> symbolic link in the new directory to cabal-dev, and can now build (yesod
> --dev devel).
>
> With any luck this should now work :).
>
> Thanks,

Max Cantor | 1 May 2012 09:09
Picon
Gravatar

Re: Type safe urls is not type safe enough

It should still be compile time checkable when hamlet does the  <at> {} or * <at> {} interpolation.  Just call that
respondsToVerb function in the TH.

As long as someRoute = read "boo" still results in an instance of the Route ADT it should be fine right?

Max

On May 1, 2012, at 2:39 AM, Michael Snoyman wrote:

> The problem with this approach is that it can't be fully compile-time
> checked. It works[1] in the simple case where we know at compile time
> precisely which route will be used, but imagine:
> 
>    <form * <at> {mkPost someRoute}>
> 
>    someRoute = read "Something Else"
> 
> I think the only compile-time checkable approach revolves around with
> GADTs or phantoms.
> 
> Michael
> 
> [1] Presuming sufficiently intelligent TH code
> 
> On Mon, Apr 30, 2012 at 12:33 PM, Max Cantor <mxcantor@...> wrote:
>> This is a very raw thought, but how about we have some function:
>> 
>>    supportsVerb :: text -> Route -> Bool
>> 
>> which will be generated by the mkYesod template haskell function.
(Continue reading)

Max Cantor | 1 May 2012 10:19
Picon
Gravatar

Re: Type safe urls is not type safe enough

Oops, misunderstood your point.  Yes, it wouldn't work for any runtime generated routes.  My bad.  

On May 1, 2012, at 3:09 PM, Max Cantor wrote:

> It should still be compile time checkable when hamlet does the  <at> {} or * <at> {} interpolation.  Just call that
respondsToVerb function in the TH.
> 
> As long as someRoute = read "boo" still results in an instance of the Route ADT it should be fine right?
> 
> Max
> 
> On May 1, 2012, at 2:39 AM, Michael Snoyman wrote:
> 
>> The problem with this approach is that it can't be fully compile-time
>> checked. It works[1] in the simple case where we know at compile time
>> precisely which route will be used, but imagine:
>> 
>>   <form * <at> {mkPost someRoute}>
>> 
>>   someRoute = read "Something Else"
>> 
>> I think the only compile-time checkable approach revolves around with
>> GADTs or phantoms.
>> 
>> Michael
>> 
>> [1] Presuming sufficiently intelligent TH code
>> 
>> On Mon, Apr 30, 2012 at 12:33 PM, Max Cantor <mxcantor@...> wrote:
>>> This is a very raw thought, but how about we have some function:
(Continue reading)

Magicloud Magiclouds | 1 May 2012 16:44
Picon

How to use selectKeys?

Hi,
  I'd like to retrieve some ItemId-s, since selectList is just too
much, I chose selectKeys.
  Then, how to use it? I failed with "runResourceT $ lazyConsume $
selectKeys []", lazyConsume does not work with SqlPersiste....
--

-- 
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.

Michael Snoyman | 1 May 2012 17:15
Favicon
Gravatar

Re: How to use selectKeys?

You can use Data.Conduit.List.consume, something like:

    selectKeys [] $$ consume

Michael

On May 1, 2012 5:44 PM, "Magicloud Magiclouds" <magicloud.magiclouds-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi,
 I'd like to retrieve some ItemId-s, since selectList is just too
much, I chose selectKeys.
 Then, how to use it? I failed with "runResourceT $ lazyConsume $
selectKeys []", lazyConsume does not work with SqlPersiste....
--
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.
Max Cantor | 2 May 2012 07:29
Picon
Gravatar

Current AWS best library

Just polling the crowd, which of the several AWS/S3 libraries on Hackage is the current "new hotness"?
Max Cantor | 2 May 2012 07:42
Picon
Gravatar

Re: Current AWS best library

Please disregard..  I remember there being a few on hackage, but can only find AWS (which looks very much
alive) and hS3 (which looks dead) now.
On May 2, 2012, at 1:29 PM, Max Cantor wrote:

> Just polling the crowd, which of the several AWS/S3 libraries on Hackage is the current "new hotness"?

Michael Snoyman | 2 May 2012 07:42
Favicon
Gravatar

Re: Current AWS best library

On Wed, May 2, 2012 at 8:29 AM, Max Cantor <mxcantor@...> wrote:
> Just polling the crowd, which of the several AWS/S3 libraries on Hackage is the current "new hotness"?

Easy: aws. It's authored by two superb Haskellers and has very wide
support for AWS APIs. I haven't personally used very much of it yet
(most of my few scripts that needed this were written before aws was
around), but I *have* used it for some things recently and it went
very smoothly.

Michael

Max Cantor | 2 May 2012 07:50
Picon
Gravatar

Re: Current AWS best library

I'm going to add it as an option to yesod-generate.  Currently, YG stores images as a BLOB in the database
which is very ugly and poor form and needs to be fixed.  

On May 2, 2012, at 1:42 PM, Michael Snoyman wrote:

> On Wed, May 2, 2012 at 8:29 AM, Max Cantor <mxcantor@...> wrote:
>> Just polling the crowd, which of the several AWS/S3 libraries on Hackage is the current "new hotness"?
> 
> Easy: aws. It's authored by two superb Haskellers and has very wide
> support for AWS APIs. I haven't personally used very much of it yet
> (most of my few scripts that needed this were written before aws was
> around), but I *have* used it for some things recently and it went
> very smoothly.
> 
> Michael

Magicloud Magiclouds | 2 May 2012 10:22
Picon

Problem when using yesod-auth-kerberos.

Hi,
  I am using apache to as reverse proxy between clients and Yesod.
Apache was configured correct to do MS's SSO (kerb v5 auth).
  When debugging, I see that my app already got the
("Authorization","Negotiate TOKEN") header.
  Then I installed yesod-auth-kerberos (which by the way, is not
directly installable by cabal. I have to modify its .cabal to resolve
conflict.) Using only it as my authPlugins.
  Then what should I do? I reloaded the page. I was not already
logined (which suppose to be auto logined). So I went to /auth/login,
input the info, then I got the following page at /kerberos/login :

Internal Server Error

fd:13: hFlush: resource vanished (Broken pipe)

--

-- 
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.


Gmane