[Yesod] psuedo-announcement: yesod-goodies

Hey all, Just wanted to post a quick note here about a package I've started with various little utilities that I find generally useful enough to be used across different yesod sites. The best explanation is probably by way of example, so here's what it provides so far: Y.G.Gravatar : fetch a gravatar image for an email address Y.G.Links : concise internal/external link-widgets Y.G.Markdown : a slightly altered version of yesod-markdown Y.G.Paginate : paginate a large list of items Y.G.Search : a type class engine behind search pages Y.G.Shorten : a type class to shorten a variety of... Y.G.Time : prints UTCTime as "one hour ago", etc That last one was taken from haskellers.com (hope you don't mind Michael). The package has been on hackage[1] for a bit and the source is on github[2]. Feel free to contribute if you've got your own goodies. Thanks, Pat 1: http://hackage.haskell.org/package/yesod-goodies 2: https://github.com/pbrisbin/yesod-goodies -- patrick brisbin

Sounds great. And just to give credit where credit is due, the "fuzzy
time" code was taken from Gregory Collins in the first place.
On Sun, Jul 17, 2011 at 7:17 AM, Patrick Brisbin
Hey all,
Just wanted to post a quick note here about a package I've started with various little utilities that I find generally useful enough to be used across different yesod sites.
The best explanation is probably by way of example, so here's what it provides so far:
Y.G.Gravatar : fetch a gravatar image for an email address Y.G.Links : concise internal/external link-widgets Y.G.Markdown : a slightly altered version of yesod-markdown Y.G.Paginate : paginate a large list of items Y.G.Search : a type class engine behind search pages Y.G.Shorten : a type class to shorten a variety of... Y.G.Time : prints UTCTime as "one hour ago", etc
That last one was taken from haskellers.com (hope you don't mind Michael).
The package has been on hackage[1] for a bit and the source is on github[2]. Feel free to contribute if you've got your own goodies.
Thanks, Pat
1: http://hackage.haskell.org/package/yesod-goodies 2: https://github.com/pbrisbin/yesod-goodies
-- patrick brisbin
_______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel

I like these helpers! I am wondering if they can be organized a bit
better For the helpers that aren't specific to yesod (Shorten, Time,
Gravatar, Search) could that be move to a web-goodies or web-helpers module
so it is clear for non-Yesod users that they can use them and that there
isn't a yesod dependency?
I am also wondering if it is best to remove the Goodies namespace? But for
something like Time it might be named something like Display.Time (maybe
there is a better convention on hackage already).
Thanks,
Greg Weber
On Sat, Jul 16, 2011 at 10:08 PM, Michael Snoyman
Sounds great. And just to give credit where credit is due, the "fuzzy time" code was taken from Gregory Collins in the first place.
On Sun, Jul 17, 2011 at 7:17 AM, Patrick Brisbin
wrote: Hey all,
Just wanted to post a quick note here about a package I've started with various little utilities that I find generally useful enough to be used across different yesod sites.
The best explanation is probably by way of example, so here's what it provides so far:
Y.G.Gravatar : fetch a gravatar image for an email address Y.G.Links : concise internal/external link-widgets Y.G.Markdown : a slightly altered version of yesod-markdown Y.G.Paginate : paginate a large list of items Y.G.Search : a type class engine behind search pages Y.G.Shorten : a type class to shorten a variety of... Y.G.Time : prints UTCTime as "one hour ago", etc
That last one was taken from haskellers.com (hope you don't mind Michael).
The package has been on hackage[1] for a bit and the source is on github[2]. Feel free to contribute if you've got your own goodies.
Thanks, Pat
1: http://hackage.haskell.org/package/yesod-goodies 2: https://github.com/pbrisbin/yesod-goodies
-- patrick brisbin
_______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel
_______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel

On 07/16/11 at 11:12pm, Greg Weber wrote:
I like these helpers! I am wondering if they can be organized a bit better For the helpers that aren't specific to yesod (Shorten, Time, Gravatar, Search) could that be move to a web-goodies or web-helpers module so it is clear for non-Yesod users that they can use them and that there isn't a yesod dependency?
You're absolutely right. Search isn't even /web/-specific, let alone yesod-specific. It would be good to have a few different packages with only the deps each needs. Not sure when I'll get the time to do any major restructuring, but I have no qualms leaving it up to someone else to take care of via pull request (if they're so inclined).
I am also wondering if it is best to remove the Goodies namespace? But for something like Time it might be named something like Display.Time (maybe there is a better convention on hackage already).
I think I had that because I have some pages where I use almost all of these and it was nice to just `import Yesod.Goodies`. I'm open to letting it go though; I see Michael took the "Helpers" namespace out of at least one yesod package recently -- maybe that's a trend to follow. -- patrick brisbin

On Sun, Jul 17, 2011 at 5:33 PM, Patrick Brisbin
On 07/16/11 at 11:12pm, Greg Weber wrote:
I like these helpers! I am wondering if they can be organized a bit better For the helpers that aren't specific to yesod (Shorten, Time, Gravatar, Search) could that be move to a web-goodies or web-helpers module so it is clear for non-Yesod users that they can use them and that there isn't a yesod dependency?
You're absolutely right. Search isn't even /web/-specific, let alone yesod-specific. It would be good to have a few different packages with only the deps each needs.
Not sure when I'll get the time to do any major restructuring, but I have no qualms leaving it up to someone else to take care of via pull request (if they're so inclined).
I am also wondering if it is best to remove the Goodies namespace? But for something like Time it might be named something like Display.Time (maybe there is a better convention on hackage already).
I think I had that because I have some pages where I use almost all of these and it was nice to just `import Yesod.Goodies`. I'm open to letting it go though; I see Michael took the "Helpers" namespace out of at least one yesod package recently -- maybe that's a trend to follow.
I have no opinion on presence or absence of Goodies for the moment, but Helpers is targeted for complete removal. I only had it in earlier Yesod versions where everything was in a single package to make it clear what was "core" and what was "extra". That's no longer necessary, and frankly, I always forget whether it's "Helpers" or "Helper" ;) Michael
participants (3)
-
Greg Weber
-
Michael Snoyman
-
Patrick Brisbin