Content for non-Haskellers

193 views
Skip to first unread message

Michael Snoyman

unread,
Jan 7, 2015, 2:17:46 AM1/7/15
to yeso...@googlegroups.com
Already, get ready for a crazy idea.

I've noticed a problem with the way we market things in the Haskell world: too much of what we write (myself included) in blog posts and other public-facing material is __just for Haskellers__. But our goal shouldn't just be to create an echo chamber: we should be trying to create content that appeals to non-Haskellers as well, so they can learn more about our wonderful ecosystem and become a part of it.

So the crazy idea: I'd like yesodweb.com to start a concerted effort of having blog posts that are explicitly targeted at non-Haskellers. And I don't want to do this myself; I think the content would be far more meaningful if it came from a variety of people, from people just getting started with Haskell all the way to Haskell experts.

So, have I lost my mind, or is this an idea worth pursuing? And does anyone out there feel like joining in on this quest?

Joel Hermanns

unread,
Jan 7, 2015, 9:18:56 AM1/7/15
to yeso...@googlegroups.com
I would definitely appreciate this.

I think it would be great to have some more resources for non-Haskellers. When I got started with Haskell (after I learned the very basics at university), I did not understand most of the great blog posts etc. out there. My experience with fellow students is that most of them think Haskell is impractical and it’s only used in research. So having some material to convince people would be great.

I could try to help with some posts, but my English skills are quite limited. So I’m not sure if I’m the right one :)

Do you have any specific topics in mind? Tutorials regarding Yesod?

--
You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Snoyman

unread,
Jan 7, 2015, 12:09:53 PM1/7/15
to yeso...@googlegroups.com
I didn't have any particular topics in mind. Tutorials/examples using Yesod would certainly make a lot of sense to start off with.

If this email is any indication, I wouldn't be worried about your English skills. Anyway, I'm sure that, if you write something and ask for feedback, people will be happy to provide it.

Christopher Reichert

unread,
Jan 7, 2015, 1:39:56 PM1/7/15
to yeso...@googlegroups.com


It's a great idea. The most compelling arguments we can make revolve
around how Haskell and Yesod can deliver real-world value to an
individual or team. I'm constantly trying to figure out how other
frameworks deliver this message. Maybe we have a bit more work cut out
because it's Haskell.

How do other frameworks deliver this message? Briefly glancing through
the Django, Node, and Rails blogs doesn't seem to turn up anything
particularly different from what yesodweb.com/blog is doing.


We have lots of examples on how to use Haskell libraries with Yesod or
the latest changes to libraries but they may not focus on why it is
valuable to invest in learning Yesod. For the record, I like the current
blog content but I also agree with the sentiment here.


Here are some preliminary ideas; some of which have already been
discussed many times and some of which have been on my mind lately:

- Building Wai/Yesod Applications!

We've heard a lot about libraries :). We could talk more about what
we are building and how. We have the wiki page
https://github.com/yesodweb/yesod/wiki/Powered-by-Yesod but I only
recently found this myself.


- Refactoring a route (or model) in an application.

Common pain-point in other frameworks is refactoring. I want to make
core modifications to a web app; large or small, old or new. this
can be quite fun in haskell and we should present it as so.


- Deploying apps to Aws,Heroku,DigitalOcean,wherever; possibly with Docker (or some other container solution).

This has been discussed many times and will probably always be on
peoples minds. Given the rapid pace of these technologies it would be
nice to talk about deployment in light of what _we_ use as opposed to
simply POC. What are Haskell developers using in production today?


- More Javascript interoperability

Not necessarily everyone's cup of tea but there is a breadth of
Javascript libraries out there people like and are familiar with and
would like to use.


- Wai/Yesod microservices interacting with other services written with
different tools.


- Optimizing Persistent (when to use Esqueleto or raw sql).

I have some apps with quite a few large "normalized" tables which
require several get, getBy, select calls to pull an object. What are
best practice for compensating the areas where Persistent might be
lacking (e.g. joins).


I'm generally poor at _finishing_ my blog posts but I do want to help
out here.

-Christopher
--
Christopher Reichert
irc: creichert
gpg: C81D 18C8 862A 3618 1376 FFA5 6BFC A992 9955 929B
signature.asc

Michael Snoyman

unread,
Jan 7, 2015, 2:06:39 PM1/7/15
to yeso...@googlegroups.com
Wow, that's an awesome list! I especially like the idea of talking about applications, not necessarily libraries.

I want to clarify one thing: I'm also happy with the content we've had on the Yesod blog until now. I'm *not* saying we should stop or change that at all. I'm just talking about adding new content, from new (and existing) authors, focusing on a different audience.

I think it would be great if you could take these ideas and put them in a Wiki page, and then perhaps people can start writing posts based on those ideas. To keep the idea alive, we should:

1. Link back to that list of ideas in each of the relevant blog posts
2. Make sure to have discussions of possible ideas for that list on this mailing list

I'm happy to see enthusiasm for this!

--
You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+unsubscribe@googlegroups.com.

Bardur Arantsson

unread,
Jan 7, 2015, 2:26:40 PM1/7/15
to yeso...@googlegroups.com
On 2015-01-07 20:06, Michael Snoyman wrote:
> Wow, that's an awesome list! I especially like the idea of talking about
> applications, not necessarily libraries.
>

+1. FWIW, I think this whole endeavour is a great idea.

One idea for a post that came to mind would be something on building a
simple-but-complete server+client application with GHCJS. (Cabal support
was merged for Cabal 1.22 which is due to arrive soon, I think.) Not
sure what should be used for server-side, but something really simple
like Scotty might be a good idea just to avoid too much distraction from
the GHCJS thing :). Maybe a simplified version of TodoMVC would be a
reasonable scope for an application?

I know that you did at least one talk on GHCJS (which was excellent,
btw), but I think that a full article treatment of a server+client
application written in Haskell (on both sides) might be great P.R.-wise
for Haskell. Personally I see client+server side in the same language as
somewhat of a "killer app". Not sure if the GHCJS ecosystem is *quite*
ready for it, but it would be interesting either way.

Unfortunately, I'm not likely to have any time soon to actually write
such an article, though I'd love to.

Anyway, just an idea...

Regards,

Maximilian Tagher

unread,
Jan 7, 2015, 2:55:48 PM1/7/15
to yeso...@googlegroups.com
Cabal 1.22 is already out, I'm using it right now :)

Bardur Arantsson

unread,
Jan 7, 2015, 3:13:20 PM1/7/15
to yeso...@googlegroups.com
On 2015-01-07 20:55, Maximilian Tagher wrote:
> Cabal 1.22 is already out, I'm using it right now :)
>

Ah, so it is. For some reason I mentally linked its release schedule to
GHC 7.10 even though I even participated in 1.22RC testing. I guess I'm
getting old :)

(Not sure about distributions, though...)

Regards,


Arthur Fayzrakhmanov

unread,
Jan 7, 2015, 4:29:20 PM1/7/15
to yeso...@googlegroups.com
This is good idea! I want to write few articles about some Yesod tips and tricks I've found myself. I also writing GHCJS code rather than JavaScript, and it's very exciting. Last interesting this I've learned is how to use one cabal file to build project both for client side (GHCJS code) and server side (Yesod). This, for example, could give you ability to use your model directly with GHCJS. It's very fun and I also have interest to share my little expirience to get some feedback and possibility to improve my Haskell and Yesod skills!

Bardur Arantsson

unread,
Jan 7, 2015, 5:01:20 PM1/7/15
to yeso...@googlegroups.com
Sounds great!

+1 :)

Christopher Reichert

unread,
Jan 7, 2015, 9:08:19 PM1/7/15
to yeso...@googlegroups.com

On Wed, Jan 07 2015, Michael Snoyman <mic...@snoyman.com> wrote:
> Wow, that's an awesome list! I especially like the idea of talking about
> applications, not necessarily libraries.
>
> I want to clarify one thing: I'm also happy with the content we've had on
> the Yesod blog until now. I'm *not* saying we should stop or change that at
> all. I'm just talking about adding new content, from new (and existing)
> authors, focusing on a different audience.
>
> I think it would be great if you could take these ideas and put them in a
> Wiki page, and then perhaps people can start writing posts based on those
> ideas. To keep the idea alive, we should:
>
> 1. Link back to that list of ideas in each of the relevant blog posts
> 2. Make sure to have discussions of possible ideas for that list on this
> mailing list
>

Done! https://github.com/yesodweb/yesod/wiki/Blog-Posts.


I used the existing blog posts page and put the ideas at the bottom.
Anyone feel to add a topic, put their name on an existing one, or link
to some relevant content.

A GHCJS post would be _very_ cool. I haven't had much time to play with it
yet but I would very much be interested in seeing that.


I've made a note to start a post myself and I'm hoping to draft it over
the weekend.


-Christopher
>> email to yesodweb+u...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>

signature.asc

Michael Snoyman

unread,
Feb 18, 2015, 3:24:57 AM2/18/15
to yeso...@googlegroups.com
Just checking in on this thread: is anyone working on something along these lines? Any drafts worth sharing?


>> For more options, visit https://groups.google.com/d/optout.
>>

--
Christopher Reichert
irc: creichert
gpg: C81D 18C8 862A 3618 1376  FFA5 6BFC A992 9955 929B

--
You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+unsubscribe@googlegroups.com.

Njagi Mwaniki

unread,
Feb 18, 2015, 6:30:46 AM2/18/15
to yeso...@googlegroups.com, mic...@snoyman.com
Well uh I don't have a draft but rather something I'm working on. I asked you a question even on twitter but you've been offline for a while. I'm just learning yesod and I'm quite new to haskell. What I'm working on is here https://github.com/urbanslug/payroll-web. I plan on writing a few tutorials regarding how I came up with it. I know I have likely made a lot of mistakes with it and would appreciate it if I got someone to tell me which they are. Also the yesod book has someone almost totally lost when it comes to making something from the scaffold site so that's an area I hope the project will teach. Also anything I could do for yesod for Google Summer of Code? I really want to do something.

>> For more options, visit https://groups.google.com/d/optout.
>>

--
Christopher Reichert
irc: creichert
gpg: C81D 18C8 862A 3618 1376  FFA5 6BFC A992 9955 929B

--
You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+u...@googlegroups.com.

Michael Snoyman

unread,
Feb 18, 2015, 6:41:28 AM2/18/15
to Njagi Mwaniki, yeso...@googlegroups.com
Good to hear it! For the record, Twitter is about the least reliable way of reaching me, right behind IRC.

Joel Hermanns

unread,
Feb 19, 2015, 9:34:40 AM2/19/15
to yeso...@googlegroups.com, mic...@snoyman.com
Hi,

One of the topics mentioned earlier was the deployment of Haskell/Yesod apps. As I got into some Infrastructure management/DevOps stuff lately I thought about putting together a set of guides of different possibilities to deploy such apps. If my ideas sound too crazy, please tell me!

Some of my ideas:

* Collect existing tutorials, articles, blog posts, ...
* Comparison of existing tools/solutions, e.g. Halycon + Haskell on Heroku, Docker, …
* Simple step by step guides, e.g. how to create a docker image of your application
* More advanced stuff: from zero to running multiple applications in the cloud, running your own hackage or creating automated build and test environments.
* Similar to Joe Nelson’s microservice-template[1] maybe create some templates for infrastructure

These are just some thoughts and I have no draft so far, but I’m interested in getting some feedback :) If something like this already exists, please point me to it.

Since I have actually no experience in running Haskell applications in production and see this as a way to learn about it, I would appreciate help of someone more experienced.

Regards,
Joel

Michal Blazejczyk

unread,
Feb 19, 2015, 1:08:28 PM2/19/15
to yeso...@googlegroups.com, mic...@snoyman.com
If I can throw in my two cents...  I don't think non-Haskellers are going to be much of an audience give that Yesod simply cannot be picked up by people who know no Haskell.  Where there could be an audience, though, is people (like me) who are Haskell beginners trying to improve their knowledge of Haskell while working on a practical web project.  I don't know exactly how to best target this audience - maybe it will become clearer to me as I go forward with my project and keep asking questions on this group  :)

One possible interestingh thing would be taking a simple (but realistic) sample application, and explaining line by line what the code does.  The Yesod book is a great read and explains a lot of concepts, but a Haskell beginner is still left in many places staring at the precise code trying to understand what *exactly* is going on there. Another thing would be a tutorial in how to best troubleshoot compilation errors with Yesod.  This would be more of a Haskell thing but geared towards Yesod.  I was struggling with this yesterday and couldn't find any Yesod functions or constructors on Hoogle, making it time consuming to figure out what the library functions return, for instance, or which "do" blocks operate in which monads.

Thanks,
Michal

stephen barrett

unread,
Feb 20, 2015, 11:13:08 AM2/20/15
to yeso...@googlegroups.com, mic...@snoyman.com
A beginning Haskeller (and I will stick with it).

Three words. Annotated Code samples.

When coming from other programming language stacks, what I've found most challenging is finding decent examples of how Haskellers do fairly standard tasks.

The thing to note is that the IRC community based approach to getting things done is both wonderful, but also quite foreign to many developers from other communities, who do read code for sure, but also are quite used to effectively FAQs that illustrate the obvious cases. Must add that the Haskell community strikes me as very friendly and helpful - but you've got to ask rather than read. 

so, for example, if one looks at documentation for php (yes, i know :) one is hit immediately with plenty of samples of how to use various functions in common scenarios.

I may be looking in the wrong places, and for sure some of the open source projects are a great study, but simple accessible examples of how to use library functions seems to me to be missing. One has to dig too deeply to work out the simple stuff. One ends up with a greater understanding of the library code for sure, but one of the main selling points of libraries for most developers is that one can treat them as black boxes. My suggestion is look to how the ruby/rails community operates. 

If there was a clean accessible source of support material for getting the basic things done (eg. oauth, the full range of db type stuff, input output) written from a FAQ, non-Haskeller perspective, then noobs could hit the ground running with less overhead. I suspect some of these basic things turn people away. 
 
just my 2c. Very much enjoying my exploration of this technology. 

Michal Blazejczyk

unread,
Feb 20, 2015, 1:03:03 PM2/20/15
to yeso...@googlegroups.com
Hi,

I couldn't agree more with Stephen!  I am often discouraged when looking for information on Hackage and facing long pages of complex function signatures with single-sentence comments.  Putting it together into working code is a serious challenge for beginners - sometimes one does not even know where to start  :)

Best,
Michal

--
You received this message because you are subscribed to a topic in the Google Groups "Yesod Web Framework" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/yesodweb/dbUsQuB656w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to yesodweb+u...@googlegroups.com.

Chris Allen

unread,
Feb 20, 2015, 1:07:06 PM2/20/15
to yeso...@googlegroups.com
Ditto, examples go a very long way for beginners and practitioners alike. Can save a shocking amount of time compared to reverse engineering from the types.
You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+u...@googlegroups.com.

Moritz Angermann

unread,
Feb 23, 2015, 1:09:52 PM2/23/15
to yeso...@googlegroups.com
Ok, I know I'm late to the party. Here are my two cents.
I will wholeheartedly agree with what stephen wrote. Annotated Code samples, in the form of either
a blog post which guides you through the code and explains the rational and thought train whiting
the snipped or program, or the code with the text in comments. Now this does sound an awful lot like
literate programming, no?

After some more experience now (and being able to finally navigate hackage, and hoogle with quite some
proficiency, I might add), I have come to the conclusion that haskell apparently allows you more easily
than other languages to write the same idea in a plethora of different ways. Which often is caused by
the authors experience (composable) and taste (using . and $ or more lispy using braces).

A list of applications which are relatively small and of high quality, would provide a nice addition on
ones path to understanding haskell better. To see how the expressive power can be weld to obtain nice
yet understandable code that is composable.

Another thing I often run into is, writing code, and *feeling* it's just not right, way to excessive and
there should be a better, easier, cleaner way to do it, but unable to see how that solution would look.
Thus an explanation of common idioms and patterns on how to *nicely* deal with certain problems in haskell
would be very helpful as well.

Regarding especially yesod, what I was missing--probably because I did not properly read everything and
skimmed most--was a high level look at the yesod architecture of a scaffolded application. The sample
apps all look nothing like the scaffolded app. What is Application for? What is Foundation for, why do
we have this special Import thingy? How does it all interact? What are the architectural layers and how
do things fit together?

Another thing that is written in the book, but could use quite a bit of elaboration is the route logic,
the handler types and how to reach what. (E.g. what is `Handler Html`? -- breaking down the types and
explaining it, also what changing Html to something else would do... This is very basic haskell stuff,
but for someone probably new to yesod (and haskell) can be very confusing. Or how do I access the
configuration/settings? Why do I have to call runDB when all the sample code can do without? How do I
run IO actions?). This will probably lean into what certain constructs in haskell are and what they are
for, how to use datatypes as containers with unwrapping and wrapping, etc.

So, that's at least the things I remember, I might have asked. I'll try to take note now that some of
my colleagues are trying to wet their feet with haskell (and yesod).

Cheers,
Moritz

Michael Snoyman

unread,
Feb 24, 2015, 2:30:09 AM2/24/15
to yeso...@googlegroups.com
I think there are a lot of good ideas in this thread. I'd recommend that the best next course of action would be for someone to write up a single piece of content (even on the very short side) to demonstrate the ideas being discussed, so that people (1) have something concrete to talk about, and (2) others have a good model to base future work on. Does any brave soul want to volunteer to be that person?

>> To unsubscribe from this group and all its topics, send an email to yesodweb+unsubscribe@googlegroups.com.

>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+unsubscribe@googlegroups.com.

>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+unsubscribe@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+unsubscribe@googlegroups.com.

Christopher Reichert

unread,
Feb 24, 2015, 8:46:47 AM2/24/15
to yeso...@googlegroups.com

I dropped the ball on this one as I have been very busy recently but I
am still planning to provide a post on the ideas I jotted down earlier
in the thread.

Cheers,
-Christopher
>> yesodweb+u...@googlegroups.com.
>> >> For more options, visit https://groups.google.com/d/optout.
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> Groups "Yesod Web Framework" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> an email to yesodweb+u...@googlegroups.com.
>> >> For more options, visit https://groups.google.com/d/optout.
>> >
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups "Yesod Web Framework" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> an email to yesodweb+u...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Yesod Web Framework" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to yesodweb+u...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>

--
signature.asc

Michael Snoyman

unread,
Feb 24, 2015, 8:56:49 AM2/24/15
to yeso...@googlegroups.com
Awesome!


>> >> For more options, visit https://groups.google.com/d/optout.
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> Groups "Yesod Web Framework" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send

>> >> For more options, visit https://groups.google.com/d/optout.
>> >
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups "Yesod Web Framework" group.
>> > To unsubscribe from this group and stop receiving emails from it, send

>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Yesod Web Framework" group.
>> To unsubscribe from this group and stop receiving emails from it, send an

>> For more options, visit https://groups.google.com/d/optout.
>>

--
Christopher Reichert
irc: creichert
gpg: C81D 18C8 862A 3618 1376  FFA5 6BFC A992 9955 929B

--
You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+unsubscribe@googlegroups.com.

Tony Kay

unread,
Mar 10, 2015, 6:35:58 PM3/10/15
to yeso...@googlegroups.com, mic...@snoyman.com
I would take things one step beyond the annotated code samples: show versions of functions with full (non-inferred) type information. I know that is not idiomatic Haskell, but I think it would really help demystify things, especially when trying to understand things like monad transformers. 

Given that it is likely to be web-based documentation: It would be really nifty to make a javascript widget that has a "show types" button that toggles between the idiomatic Haskell and one that has all of the types spelled out explicitly.

Tony
Reply all
Reply to author
Forward
0 new messages