Rosetta Code:Village Pump: Difference between revisions
Content deleted Content added
Request to show how to run the programs |
Included the static summary |
||
(100 intermediate revisions by 29 users not shown) | |||
Line 1:
This is the
|topic=Title
▲This is the new place for Rosetta Code community activity. Pages can be created starting here (similarly to [[Loops]]) for community discussion. To start a new "thread", just append a "/" to the end of the URL of this page and give your thread a short title. On the new page, give a more detailed description of the topic as a heading, and write away. Also, link to the new topic on this page. Ex: <nowiki>[[Village Pump:Home/New Topic]]</nowiki>.
|summary=Summary of the topic
}}</nowiki></pre>substituting your topic title for "Title" and a summary for "Summary of the topic".
<!--
{{#ask:[[Is village pump topic::true]]
|?Summary
|?Modification date
|format=broadtable
|limit=20
|order=desc
|sort=Modification date
|searchlabel=Older topics...
|offset=0
}}
-->
{{/summary}}
Hi, sorry to post this here but I don't know a better place. I wanted to create a new proposed task "Create statically-validated API" but it's impossible to create a page without solving a captcha, and the browser I use doesn't show the captcha (I was able to create this account using a phone browser, but that's no good for entering much text or code). Maybe someone can move it to the right place? (Added: I also had to de-link the urls to bypass the captcha).
By the way I find this site a huge pain to use because of the captchas. Email verification for account creation is likely to be enough.
== create statically-validated API ==
This is a challenge proposed by Tony Morris here:
blog.tmorris.net/posts/understanding-practical-api-design-static-typing-and-functional-programming/
It is only for statically-typed languages and the challenge is to implement a Tic-tac-toe API that supports operations like starting a game, making a move, and seeing who won, where invalid arguments (such as asking who won an unfinished game) are rejected by the compiler as compile-time type errors. So it is mostly a test of how expressive the language's type system is.
A Haskell solution (not by me) is here:
github.com/tismith/tictactoe-haskell/blob/master/Tictactoe.hs
Further discussion and links to some other solutions:
github.com/data61/fp-course/blob/master/projects/TicTacToe/TicTacToe.markdown
|