From 9a400c9d555c17f2248983c66131016b069cba71 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Thu, 14 Oct 2021 12:24:51 -0300 Subject: [PATCH] Hello world --- racket/hello-world/.exercism/config.json | 25 ++++++++++++++ racket/hello-world/.exercism/metadata.json | 1 + racket/hello-world/HELP.md | 39 ++++++++++++++++++++++ racket/hello-world/README.md | 37 ++++++++++++++++++++ racket/hello-world/hello-world-test.rkt | 14 ++++++++ racket/hello-world/hello-world.rkt | 6 ++++ 6 files changed, 122 insertions(+) create mode 100644 racket/hello-world/.exercism/config.json create mode 100644 racket/hello-world/.exercism/metadata.json create mode 100644 racket/hello-world/HELP.md create mode 100644 racket/hello-world/README.md create mode 100644 racket/hello-world/hello-world-test.rkt create mode 100644 racket/hello-world/hello-world.rkt diff --git a/racket/hello-world/.exercism/config.json b/racket/hello-world/.exercism/config.json new file mode 100644 index 0000000..d958fe6 --- /dev/null +++ b/racket/hello-world/.exercism/config.json @@ -0,0 +1,25 @@ +{ + "blurb": "The classical introductory exercise. Just say \"Hello, World!\"", + "authors": [ + "arguello" + ], + "contributors": [ + "benreyn", + "mbertheau", + "PurityControl", + "yurrriq" + ], + "files": { + "solution": [ + "hello-world.rkt" + ], + "test": [ + "hello-world-test.rkt" + ], + "example": [ + ".meta/example.rkt" + ] + }, + "source": "This is an exercise to introduce users to using Exercism", + "source_url": "http://en.wikipedia.org/wiki/%22Hello,_world!%22_program" +} diff --git a/racket/hello-world/.exercism/metadata.json b/racket/hello-world/.exercism/metadata.json new file mode 100644 index 0000000..a6c4d8e --- /dev/null +++ b/racket/hello-world/.exercism/metadata.json @@ -0,0 +1 @@ +{"track":"racket","exercise":"hello-world","id":"f0da42f150134b3189c52ad16b42f84e","url":"https://exercism.org/tracks/racket/exercises/hello-world","handle":"JBiason","is_requester":true,"auto_approve":false} \ No newline at end of file diff --git a/racket/hello-world/HELP.md b/racket/hello-world/HELP.md new file mode 100644 index 0000000..222694b --- /dev/null +++ b/racket/hello-world/HELP.md @@ -0,0 +1,39 @@ +# Help + +## Running the tests + +To run the test through DrRacket, simply open the test file and click the 'Run' button in the upper right. + +To run the test from the command line, run the test from the exercise directory with the following command: + +``` +raco test -test.rkt +``` + +where `` should be replaced with the exercise's slug. + +## Submitting your solution + +You can submit your solution using the `exercism submit hello-world.rkt` command. +This command will upload your solution to the Exercism website and print the solution page's URL. + +It's possible to submit an incomplete solution which allows you to: + +- See how others have completed the exercise +- Request help from a mentor + +## Need to get help? + +If you'd like help solving the exercise, check the following pages: + +- The [Racket track's documentation](https://exercism.org/docs/tracks/racket) +- [Exercism's support channel on gitter](https://gitter.im/exercism/support) +- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs) + +Should those resources not suffice, you could submit your (incomplete) solution to request mentoring. + +To get help if you're having trouble, you can use one of the following resources: + +- [The Racket Reference](http://docs.racket-lang.org/reference/index.html) +- [/r/racket](https://www.reddit.com/r/racket) is the Racket subreddit. +- [StackOverflow](http://stackoverflow.com/questions/tagged/racket) can be used to search for your problem and see if it has been answered already. You can also ask and answer questions. \ No newline at end of file diff --git a/racket/hello-world/README.md b/racket/hello-world/README.md new file mode 100644 index 0000000..eeb05da --- /dev/null +++ b/racket/hello-world/README.md @@ -0,0 +1,37 @@ +# Hello World + +Welcome to Hello World on Exercism's Racket Track. +If you need help running the tests or submitting your code, check out `HELP.md`. + +## Instructions + +The classical introductory exercise. Just say "Hello, World!". + +["Hello, World!"](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program) is +the traditional first program for beginning programming in a new language +or environment. + +The objectives are simple: + +- Write a function that returns the string "Hello, World!". +- Run the test suite and make sure that it succeeds. +- Submit your solution and check it at the website. + +If everything goes well, you will be ready to fetch your first real exercise. + +## Source + +### Created by + +- @arguello + +### Contributed to by + +- @benreyn +- @mbertheau +- @PurityControl +- @yurrriq + +### Based on + +This is an exercise to introduce users to using Exercism - http://en.wikipedia.org/wiki/%22Hello,_world!%22_program \ No newline at end of file diff --git a/racket/hello-world/hello-world-test.rkt b/racket/hello-world/hello-world-test.rkt new file mode 100644 index 0000000..dc037d3 --- /dev/null +++ b/racket/hello-world/hello-world-test.rkt @@ -0,0 +1,14 @@ +#lang racket + +(require "hello-world.rkt") + +(module+ test + (require rackunit rackunit/text-ui) + + (define suite + (test-suite + "hello world tests" + + (test-equal? "returns Hello, World!" (hello) "Hello, World!"))) + + (run-tests suite)) diff --git a/racket/hello-world/hello-world.rkt b/racket/hello-world/hello-world.rkt new file mode 100644 index 0000000..eb5c01d --- /dev/null +++ b/racket/hello-world/hello-world.rkt @@ -0,0 +1,6 @@ +#lang racket + +(provide hello) + +(define (hello) + "Hello, World!")