Daniel Santa Cruz | 1 Jun 04:06 2012
Picon

Trouble building scaffolded site.

I'm now unable to build a scaffolded site, with a relatively clean ghc and cabal install.  Am not sure what I'm doing wrong. Here are the specifics:


> cd ~/src
> mkdir yesod-platform-bin
> cd yesod-platform-bin
> cabal-dev install yesod-platform

> cd ~/src
> ./yesod-platform-bin/cabal-dev/bin/yesod init  # project name: project
> cd project
> cabal-dev install
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: project-0.0.0 (user goal)
trying: http-conduit-1.4.1.7 (dependency of project-0.0.0)
trying: attoparsec-0.10.2.0 (dependency of http-conduit-1.4.1.7)
next goal: yesod-platform (dependency of project-0.0.0)
rejecting: yesod-platform-1.0.4.1, 1.0.4, 1.0.3.4, 1.0.3.3, 1.0.3.2, 1.0.2,
1.0.1, 1.0.0 (conflict: attoparsec==0.10.2.0, yesod-platform =>
attoparsec==0.10.1.1)
rejecting: yesod-platform-0.10.3, 0.10.2 (conflict: project =>
yesod-platform>=1.0 && <1.1)

> ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.0.4

> cabal --version
cabal-install version 0.14.0
using version 1.14.0 of the Cabal library

> cabal-dev --version
cabal-dev 0.9.1
built with Cabal 1.14.0

> ghc-pkg list
/usr/local/Cellar/ghc/7.0.4/lib/ghc-7.0.4/package.conf.d:
    Cabal-1.10.2.0
    array-0.3.0.2
    base-4.3.1.0
    bin-package-db-0.0.0.0
    bytestring-0.9.1.10
    containers-0.4.0.0
    directory-1.1.0.0
    extensible-exceptions-0.1.1.2
    ffi-1.0
    filepath-1.2.0.0
    (ghc-7.0.4)
    (ghc-binary-0.5.0.2)
    ghc-prim-0.2.0.0
    (haskell2010-1.0.0.0)
    haskell98-1.1.0.1
    hpc-0.5.0.6
    integer-gmp-0.2.0.3
    old-locale-1.0.0.2
    old-time-1.0.0.6
    pretty-1.0.1.2
    process-1.0.1.5
    random-1.0.0.3
    rts-1.0
    template-haskell-2.5.0.0
    time-1.2.0.3
    unix-2.4.2.0

/Users/dansan/.ghc/x86_64-darwin-7.0.4/package.conf.d:
    Cabal-1.14.0
    HTTP-4000.2.3
    deepseq-1.3.0.0
    mtl-2.0.1.0
    mtl-2.1.1
    network-2.3.0.13
    parsec-3.1.2
    tar-0.3.2.0
    text-0.11.2.1
    transformers-0.2.2.0
    transformers-0.3.0.0
    zlib-0.5.3.3

Rodrigo Gadea | 1 Jun 04:53 2012
Picon

Re: Re: Thank you



On Thu, May 31, 2012 at 12:20 PM, Simon Michael <simon-jbxitMBJ2LLQT0dZR+AlfA@public.gmane.org> wrote:
For a slick donation and management experience, wepay is rather nice, at the cost of a 3.5% cut. You can do target-based or open ended campaigns.


I think money comes with troubles, so being careful is necessary.

I don't know how much the donation was - I think it's not up to Micheal to do it public - but having an infrastructure to admin money seems a bit high for the moment.

Sometimes it is necessary - indispensable - for keeping really big projects going (as the previously named, there are even more FSF-related) as LLVM, which lives because of Apple's ""generosity"" paying their engineers to code (as Red Hat pays for theirs to contribute on GCC, and Microsoft has paid many of the core Haskell people).

Sometimes it is called "sponsorship to the coders", other "sponsorship to developers", other "work for me and I set the agenda of the contributed patches", or "charity" (or support of a good work).

If a mean Haskeller wins - on average -- according to indeed -- about 110k/year, if you look at the concrete job offers, you will find that there are a lot about 200k for just knowing any functional languages on hype (even clojure or scala).

I don't know how much Micheal earns, but for having just one month coding 8 hours / 5 days a week as he does at his job and paying him 110k/year, we would have to raise about 160 USD 60 donations each month. This is not a really big sum, but this is no iTunes, and Micheal ain't Steel Robs.

As he has a family (look at his picture), it would be not wise to quit his job for a 3-month-funding trip (which would be 330k), nor traveling every month to a conference and stay away from his family one or two weeks per month (his kid may start calling "daddy" to a neighbor in the long term) during some years.

Also, Micheal is not the only who has contributed to Yesod - yes, he created him and he is our Jesus (or Moises ((or Ala (((or Budha))) - but there are others (i.e. Greg) who also contributed. But I think everyone would agree that the first question is to Micheal.

So, unless someone (some fancy corporation) "puts the pigs over the table" (it's how we say here - a "Show Me The Money" localization), I would say that Micheal keeps just in case, you never know, have a beer. It seems that it is worldwide the habit of saying "yes... yes... seems good... I'll answer you the next week" but never showing up when you have to "break the piggy-bank".

I think the better for now is not having an infrastructure (which is complicated), and don't loose the sight on the deer. Maybe a company wants to sponsor only Micheal for Yesod, and it "hires" him, maybe not. If that is the case, I think he deserves it. Micheal won't be able to do eventually all, despite working 8 hours, 10, 12 or more hours / day. When that moment arrives, well, he may start choosing his bitches (and I already have a red lipstick on me).

Just have a beer!

Cheers,
Rodrigo
Rodrigo Gadea | 1 Jun 04:53 2012
Picon

Re: Re: Thank you



On Thu, May 31, 2012 at 11:53 PM, Rodrigo Gadea <rodrigo.gadea-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:


On Thu, May 31, 2012 at 12:20 PM, Simon Michael <simon-jbxitMBJ2LLQT0dZR+AlfA@public.gmane.org> wrote:
For a slick donation and management experience, wepay is rather nice, at the cost of a 3.5% cut. You can do target-based or open ended campaigns.


I think money comes with troubles, so being careful is necessary.

I don't know how much the donation was - I think it's not up to Micheal to do it public - but having an infrastructure to admin money seems a bit high for the moment.

Sometimes it is necessary - indispensable - for keeping really big projects going (as the previously named, there are even more FSF-related) as LLVM, which lives because of Apple's ""generosity"" paying their engineers to code (as Red Hat pays for theirs to contribute on GCC, and Microsoft has paid many of the core Haskell people).

Sometimes it is called "sponsorship to the coders", other "sponsorship to developers", other "work for me and I set the agenda of the contributed patches", or "charity" (or support of a good work).

If a mean Haskeller wins - on average -- according to indeed -- about 110k/year, if you look at the concrete job offers, you will find that there are a lot about 200k for just knowing any functional languages on hype (even clojure or scala).

I don't know how much Micheal earns, but for having just one month coding 8 hours / 5 days a week as he does at his job and paying him 110k/year, we would have to raise about 160 USD 60 donations each month. This is not a really big sum, but this is no iTunes, and Micheal ain't Steel Robs.

As he has a family (look at his picture), it would be not wise to quit his job for a 3-month-funding trip (which would be 330k), nor traveling every month to a conference and stay away from his family one or two weeks per month (his kid may start calling "daddy" to a neighbor in the long term) during some years.

Also, Micheal is not the only who has contributed to Yesod - yes, he created him and he is our Jesus (or Moises ((or Ala (((or Budha))) - but there are others (i.e. Greg) who also contributed. But I think everyone would agree that the first question is to Micheal.

So, unless someone (some fancy corporation) "puts the pigs over the table" (it's how we say here - a "Show Me The Money" localization), I would say that Micheal keeps just in case, you never know, have a beer. It seems that it is worldwide the habit of saying "yes... yes... seems good... I'll answer you the next week" but never showing up when you have to "break the piggy-bank".

I think the better for now is not having an infrastructure (which is complicated), and don't loose the sight on the deer. Maybe a company wants to sponsor only Micheal for Yesod, and it "hires" him, maybe not. If that is the case, I think he deserves it. Micheal won't be able to do eventually all, despite working 8 hours, 10, 12 or more hours / day. When that moment arrives, well, he may start choosing his bitches (and I already have a red lipstick on me).

Just have a beer!

Cheers,
Rodrigo

(Happy Weekend)
Rodrigo Gadea | 1 Jun 05:22 2012
Picon

Re: Re: Thank you

(Today is easier to get money from good-looking powerpoints to friends than for building something, if not, see http://www.theverge.com/2012/5/31/3054444/diffbot-raises-2-million-apps-open-web )

Michael Snoyman | 1 Jun 06:37 2012

Re: Trouble building scaffolded site.

I just uploaded a new version of yesod-platform that updates some of
the dependencies. Can you see if that solves the problem?

On Fri, Jun 1, 2012 at 5:06 AM, Daniel Santa Cruz <dstcruz@...> wrote:
> I'm now unable to build a scaffolded site, with a relatively clean ghc and
> cabal install.  Am not sure what I'm doing wrong. Here are the specifics:
>
>> cd ~/src
>> mkdir yesod-platform-bin
>> cd yesod-platform-bin
>> cabal-dev install yesod-platform
>
>> cd ~/src
>> ./yesod-platform-bin/cabal-dev/bin/yesod init  # project name: project
>> cd project
>> cabal-dev install
> Resolving dependencies...
> cabal: Could not resolve dependencies:
> trying: project-0.0.0 (user goal)
> trying: http-conduit-1.4.1.7 (dependency of project-0.0.0)
> trying: attoparsec-0.10.2.0 (dependency of http-conduit-1.4.1.7)
> next goal: yesod-platform (dependency of project-0.0.0)
> rejecting: yesod-platform-1.0.4.1, 1.0.4, 1.0.3.4, 1.0.3.3, 1.0.3.2, 1.0.2,
> 1.0.1, 1.0.0 (conflict: attoparsec==0.10.2.0, yesod-platform =>
> attoparsec==0.10.1.1)
> rejecting: yesod-platform-0.10.3, 0.10.2 (conflict: project =>
> yesod-platform>=1.0 && <1.1)
>
>> ghc --version
> The Glorious Glasgow Haskell Compilation System, version 7.0.4
>
>> cabal --version
> cabal-install version 0.14.0
> using version 1.14.0 of the Cabal library
>
>> cabal-dev --version
> cabal-dev 0.9.1
> built with Cabal 1.14.0
>
>> ghc-pkg list
> /usr/local/Cellar/ghc/7.0.4/lib/ghc-7.0.4/package.conf.d:
>     Cabal-1.10.2.0
>     array-0.3.0.2
>     base-4.3.1.0
>     bin-package-db-0.0.0.0
>     bytestring-0.9.1.10
>     containers-0.4.0.0
>     directory-1.1.0.0
>     extensible-exceptions-0.1.1.2
>     ffi-1.0
>     filepath-1.2.0.0
>     (ghc-7.0.4)
>     (ghc-binary-0.5.0.2)
>     ghc-prim-0.2.0.0
>     (haskell2010-1.0.0.0)
>     haskell98-1.1.0.1
>     hpc-0.5.0.6
>     integer-gmp-0.2.0.3
>     old-locale-1.0.0.2
>     old-time-1.0.0.6
>     pretty-1.0.1.2
>     process-1.0.1.5
>     random-1.0.0.3
>     rts-1.0
>     template-haskell-2.5.0.0
>     time-1.2.0.3
>     unix-2.4.2.0
>
> /Users/dansan/.ghc/x86_64-darwin-7.0.4/package.conf.d:
>     Cabal-1.14.0
>     HTTP-4000.2.3
>     deepseq-1.3.0.0
>     mtl-2.0.1.0
>     mtl-2.1.1
>     network-2.3.0.13
>     parsec-3.1.2
>     tar-0.3.2.0
>     text-0.11.2.1
>     transformers-0.2.2.0
>     transformers-0.3.0.0
>     zlib-0.5.3.3
>

Ricardo Wurmus | 1 Jun 06:47 2012
Picon

"Maybe" in a relation

Hi,

I have a declaration of entities like this:

Account
  username String
  infoId OptionalInfoId Maybe

OptionalInfo
  name String
  pet String

Not every Account has an associated OptionalInfo record, so the
`infoId` field in the database may be NULL. When I compile the
application and execute it, however, Yesod first runs this migration:

  ALTER TABLE "Account" ALTER COLUMN "infoId" SET NOT NULL

Since the database contains records where infoId is NULL, the
application crashes.
Why is "Maybe" ignored on `infoId`? Does the relation imply that the
field may not be NULL? Why?

(I'm dealing with an existing PostgreSQL database and I should not
modify the schema too much.)

-- rekado

Carlos López Camey | 1 Jun 08:19 2012
Picon

Re: Trouble building scaffolded site.

The other day I had to replace all the "==" to ">=" in the
dependencies list in yesod-platform.cabal, some packages in the
development build were newer; if ignored, I got broken packages.

Is there a reason why is "==" preferred?

2012/6/1 Michael Snoyman <michael@...>:
> I just uploaded a new version of yesod-platform that updates some of
> the dependencies. Can you see if that solves the problem?
>
> On Fri, Jun 1, 2012 at 5:06 AM, Daniel Santa Cruz <dstcruz@...> wrote:
>> I'm now unable to build a scaffolded site, with a relatively clean ghc and
>> cabal install.  Am not sure what I'm doing wrong. Here are the specifics:
>>
>>> cd ~/src
>>> mkdir yesod-platform-bin
>>> cd yesod-platform-bin
>>> cabal-dev install yesod-platform
>>
>>> cd ~/src
>>> ./yesod-platform-bin/cabal-dev/bin/yesod init  # project name: project
>>> cd project
>>> cabal-dev install
>> Resolving dependencies...
>> cabal: Could not resolve dependencies:
>> trying: project-0.0.0 (user goal)
>> trying: http-conduit-1.4.1.7 (dependency of project-0.0.0)
>> trying: attoparsec-0.10.2.0 (dependency of http-conduit-1.4.1.7)
>> next goal: yesod-platform (dependency of project-0.0.0)
>> rejecting: yesod-platform-1.0.4.1, 1.0.4, 1.0.3.4, 1.0.3.3, 1.0.3.2, 1.0.2,
>> 1.0.1, 1.0.0 (conflict: attoparsec==0.10.2.0, yesod-platform =>
>> attoparsec==0.10.1.1)
>> rejecting: yesod-platform-0.10.3, 0.10.2 (conflict: project =>
>> yesod-platform>=1.0 && <1.1)
>>
>>> ghc --version
>> The Glorious Glasgow Haskell Compilation System, version 7.0.4
>>
>>> cabal --version
>> cabal-install version 0.14.0
>> using version 1.14.0 of the Cabal library
>>
>>> cabal-dev --version
>> cabal-dev 0.9.1
>> built with Cabal 1.14.0
>>
>>> ghc-pkg list
>> /usr/local/Cellar/ghc/7.0.4/lib/ghc-7.0.4/package.conf.d:
>>     Cabal-1.10.2.0
>>     array-0.3.0.2
>>     base-4.3.1.0
>>     bin-package-db-0.0.0.0
>>     bytestring-0.9.1.10
>>     containers-0.4.0.0
>>     directory-1.1.0.0
>>     extensible-exceptions-0.1.1.2
>>     ffi-1.0
>>     filepath-1.2.0.0
>>     (ghc-7.0.4)
>>     (ghc-binary-0.5.0.2)
>>     ghc-prim-0.2.0.0
>>     (haskell2010-1.0.0.0)
>>     haskell98-1.1.0.1
>>     hpc-0.5.0.6
>>     integer-gmp-0.2.0.3
>>     old-locale-1.0.0.2
>>     old-time-1.0.0.6
>>     pretty-1.0.1.2
>>     process-1.0.1.5
>>     random-1.0.0.3
>>     rts-1.0
>>     template-haskell-2.5.0.0
>>     time-1.2.0.3
>>     unix-2.4.2.0
>>
>> /Users/dansan/.ghc/x86_64-darwin-7.0.4/package.conf.d:
>>     Cabal-1.14.0
>>     HTTP-4000.2.3
>>     deepseq-1.3.0.0
>>     mtl-2.0.1.0
>>     mtl-2.1.1
>>     network-2.3.0.13
>>     parsec-3.1.2
>>     tar-0.3.2.0
>>     text-0.11.2.1
>>     transformers-0.2.2.0
>>     transformers-0.3.0.0
>>     zlib-0.5.3.3
>>

Michael Snoyman | 1 Jun 13:38 2012

Re: "Maybe" in a relation

On Fri, Jun 1, 2012 at 7:47 AM, Ricardo Wurmus
<ricardo.wurmus@...> wrote:
> Hi,
>
> I have a declaration of entities like this:
>
> Account
>  username String
>  infoId OptionalInfoId Maybe
>
> OptionalInfo
>  name String
>  pet String
>
> Not every Account has an associated OptionalInfo record, so the
> `infoId` field in the database may be NULL. When I compile the
> application and execute it, however, Yesod first runs this migration:
>
>  ALTER TABLE "Account" ALTER COLUMN "infoId" SET NOT NULL
>
> Since the database contains records where infoId is NULL, the
> application crashes.
> Why is "Maybe" ignored on `infoId`? Does the relation imply that the
> field may not be NULL? Why?
>
> (I'm dealing with an existing PostgreSQL database and I should not
> modify the schema too much.)
>
> -- rekado

When I run your code, I get:

Migrating: CREATE TABLE "account"("id" SERIAL PRIMARY KEY
UNIQUE,"username" VARCHAR NOT NULL,"info_id" INT8 NULL REFERENCES
"optional_info")

And no ALTER TABLE. Can you provide a reproducing test case that shows
your result?

Michael

Michael Snoyman | 1 Jun 13:39 2012

Re: Trouble building scaffolded site.

This approach is actually designed to *avoid* dependency hell. So far
it's been mostly successful, but I'm not surprised that there are
hiccups. The only real solution to the problem is fixing
cabal-install, which thankfully has been improving greatly recently.
The new version (0.14.0) has worked much better for me at least.

On Fri, Jun 1, 2012 at 9:19 AM, Carlos López Camey <c.lopez@...> wrote:
> The other day I had to replace all the "==" to ">=" in the
> dependencies list in yesod-platform.cabal, some packages in the
> development build were newer; if ignored, I got broken packages.
>
> Is there a reason why is "==" preferred?
>
> 2012/6/1 Michael Snoyman <michael@...>:
>> I just uploaded a new version of yesod-platform that updates some of
>> the dependencies. Can you see if that solves the problem?
>>
>> On Fri, Jun 1, 2012 at 5:06 AM, Daniel Santa Cruz <dstcruz@...> wrote:
>>> I'm now unable to build a scaffolded site, with a relatively clean ghc and
>>> cabal install.  Am not sure what I'm doing wrong. Here are the specifics:
>>>
>>>> cd ~/src
>>>> mkdir yesod-platform-bin
>>>> cd yesod-platform-bin
>>>> cabal-dev install yesod-platform
>>>
>>>> cd ~/src
>>>> ./yesod-platform-bin/cabal-dev/bin/yesod init  # project name: project
>>>> cd project
>>>> cabal-dev install
>>> Resolving dependencies...
>>> cabal: Could not resolve dependencies:
>>> trying: project-0.0.0 (user goal)
>>> trying: http-conduit-1.4.1.7 (dependency of project-0.0.0)
>>> trying: attoparsec-0.10.2.0 (dependency of http-conduit-1.4.1.7)
>>> next goal: yesod-platform (dependency of project-0.0.0)
>>> rejecting: yesod-platform-1.0.4.1, 1.0.4, 1.0.3.4, 1.0.3.3, 1.0.3.2, 1.0.2,
>>> 1.0.1, 1.0.0 (conflict: attoparsec==0.10.2.0, yesod-platform =>
>>> attoparsec==0.10.1.1)
>>> rejecting: yesod-platform-0.10.3, 0.10.2 (conflict: project =>
>>> yesod-platform>=1.0 && <1.1)
>>>
>>>> ghc --version
>>> The Glorious Glasgow Haskell Compilation System, version 7.0.4
>>>
>>>> cabal --version
>>> cabal-install version 0.14.0
>>> using version 1.14.0 of the Cabal library
>>>
>>>> cabal-dev --version
>>> cabal-dev 0.9.1
>>> built with Cabal 1.14.0
>>>
>>>> ghc-pkg list
>>> /usr/local/Cellar/ghc/7.0.4/lib/ghc-7.0.4/package.conf.d:
>>>     Cabal-1.10.2.0
>>>     array-0.3.0.2
>>>     base-4.3.1.0
>>>     bin-package-db-0.0.0.0
>>>     bytestring-0.9.1.10
>>>     containers-0.4.0.0
>>>     directory-1.1.0.0
>>>     extensible-exceptions-0.1.1.2
>>>     ffi-1.0
>>>     filepath-1.2.0.0
>>>     (ghc-7.0.4)
>>>     (ghc-binary-0.5.0.2)
>>>     ghc-prim-0.2.0.0
>>>     (haskell2010-1.0.0.0)
>>>     haskell98-1.1.0.1
>>>     hpc-0.5.0.6
>>>     integer-gmp-0.2.0.3
>>>     old-locale-1.0.0.2
>>>     old-time-1.0.0.6
>>>     pretty-1.0.1.2
>>>     process-1.0.1.5
>>>     random-1.0.0.3
>>>     rts-1.0
>>>     template-haskell-2.5.0.0
>>>     time-1.2.0.3
>>>     unix-2.4.2.0
>>>
>>> /Users/dansan/.ghc/x86_64-darwin-7.0.4/package.conf.d:
>>>     Cabal-1.14.0
>>>     HTTP-4000.2.3
>>>     deepseq-1.3.0.0
>>>     mtl-2.0.1.0
>>>     mtl-2.1.1
>>>     network-2.3.0.13
>>>     parsec-3.1.2
>>>     tar-0.3.2.0
>>>     text-0.11.2.1
>>>     transformers-0.2.2.0
>>>     transformers-0.3.0.0
>>>     zlib-0.5.3.3
>>>

Bulat Ziganshin | 1 Jun 14:34 2012
Picon

Re[4]: Re: Multiple static pages

Hello Kirill,

Wednesday, May 30, 2012, 2:39:46 PM, you wrote:

> Bulat, why don't you use Hakyll[1] for that?

thank you for suggestion. those static pages were only the first step,
i'm already adding some intelligence to them. so i'm searching for
application server like node.js 

yesod looks the best choice for me - because i already know haskell,
and because it promises great performance and scalability. now i
use nginx for reverse proxying and static files, plus apache for
ssi/fcgi and hope to replace them all with yesod-based app server

--

-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin@...


Gmane