Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Multiple Examples of Haskell Code #41

Open
liamzee opened this issue Dec 18, 2023 · 7 comments
Open

Suggestion: Multiple Examples of Haskell Code #41

liamzee opened this issue Dec 18, 2023 · 7 comments

Comments

@liamzee
Copy link

liamzee commented Dec 18, 2023

Feature request

It might present a better introduction to Haskell if there were a broader list of Haskell programs on display.

I'm the owner of this, for example:

https://www.github.com/haskript/big-book-of-small-haskell-projects

Including a ton of micro-projects that, unlike the exercise book I've been working through, show off Haskell's good side (expressive, strong types, concise code, decent, if sometimes impenetrable libraries) might be helpful for the Playground.

@tomsmeding
Copy link
Collaborator

Fair! As for the repo you've linked, though, I feel like most programs are on the long side for a playground template. The longest template program so far is 38 lines, and I don't want to make them much longer than that -- the point is to put something in there so that the "Run" button does something interesting instead of "you need to type some code first".

That HexGrid example is neat, though -- I might steal that one :)

@liamzee
Copy link
Author

liamzee commented Dec 19, 2023

It's not like didn't I steal it and adapt it from Al Sweigart (with permission) anyways. :)

I also agree that the examples should be small; i.e, do something interesting, maybe grab some data from a site, do ultra-concise data transformation, etc...

@tomsmeding
Copy link
Collaborator

I added a modified version of the hexgrid example. Thanks! :)

I'll close this issue for now. If you have other suggestions of small teaser programs that could perhaps replace one of the existing ones, feel free to suggest and I'll have a look.

@liamzee
Copy link
Author

liamzee commented Dec 22, 2023

I meant having multiple small examples stored in a repository; i.e, being able to choose a bunch of different programs as needed.

@tomsmeding
Copy link
Collaborator

How do you mean "as needed"? Would the playground randomly one from the repository, or would the user get to see a list of examples to choose from, or something else?

@liamzee
Copy link
Author

liamzee commented Dec 23, 2023

Both, I think, having the playground choose a random example from a select list, then leave a bunch of examples available for the user to select and toy around with if they like it.

@tomsmeding
Copy link
Collaborator

Fair, perhaps that's a nice idea. They should be examples that don't try to read input from stdin though, because of how the playground is currently set up.

I'll reopen this.

@tomsmeding tomsmeding reopened this Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants