diff --git a/concepts/basics-1/.meta/config.json b/concepts/basics-1/.meta/config.json new file mode 100644 index 0000000..a38d0cc --- /dev/null +++ b/concepts/basics-1/.meta/config.json @@ -0,0 +1,6 @@ +{ + "authors": [ + "redvers" + ], + "blurb": "Learn the basic syntax of an pony program" +} diff --git a/concepts/basics-1/about.md b/concepts/basics-1/about.md new file mode 100644 index 0000000..e69de29 diff --git a/concepts/basics-1/introduction.md b/concepts/basics-1/introduction.md new file mode 100644 index 0000000..e69de29 diff --git a/concepts/basics-1/links.json b/concepts/basics-1/links.json new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/concepts/basics-1/links.json @@ -0,0 +1 @@ +[] diff --git a/config.json b/config.json index 62a75c1..bd87503 100644 --- a/config.json +++ b/config.json @@ -3,11 +3,18 @@ "slug": "pony", "active": false, "status": { - "concept_exercises": false, + "concept_exercises": true, "test_runner": false, "representer": false, "analyzer": false }, + "concepts": [ + { + "uuid": "3e6e4a21-cc66-4c48-857b-90e1ca5298f9", + "slug": "basics-1", + "name": "Basics 1" + } + ], "blurb": "Pony is an open-source, object-oriented, actor-model, capabilities-secure, high-performance programming language.", "version": 3, "online_editor": { @@ -30,7 +37,18 @@ ] }, "exercises": { - "concept": [], + "concept": [ + { + "slug": "lucians-luscious-lasagna", + "name": "Lucian's Luscious Lasagna", + "uuid": "e37094a8-1fba-4781-92b1-da206cd101ec", + "concepts": [ + "basics-1" + ], + "prerequisites": [], + "status": "beta" + } + ], "practice": [ { "slug": "anagram", @@ -165,7 +183,6 @@ } ] }, - "concepts": [], "key_features": [ { "title": "Concurrency", diff --git a/exercises/concept/lucians-luscious-lasagna/.docs/hints.md b/exercises/concept/lucians-luscious-lasagna/.docs/hints.md new file mode 100644 index 0000000..e69de29 diff --git a/exercises/concept/lucians-luscious-lasagna/.docs/instructions.md b/exercises/concept/lucians-luscious-lasagna/.docs/instructions.md new file mode 100644 index 0000000..e69de29 diff --git a/exercises/concept/lucians-luscious-lasagna/.docs/introduction.md b/exercises/concept/lucians-luscious-lasagna/.docs/introduction.md new file mode 100644 index 0000000..e69de29 diff --git a/exercises/concept/lucians-luscious-lasagna/.meta/config.json b/exercises/concept/lucians-luscious-lasagna/.meta/config.json new file mode 100644 index 0000000..600316b --- /dev/null +++ b/exercises/concept/lucians-luscious-lasagna/.meta/config.json @@ -0,0 +1,18 @@ +{ + "blurb": "The basics of pony's variables via Lasagna", + "authors": [ + "redvers" + ], + "files": { + "solution": [ + "lasagna.pony" + ], + "test": [ + "test.pony" + ], + "exemplar": [ + ".meta/example.pony" + ] + }, + "source": "This is an exercise to introduce basic pony types" +} diff --git a/exercises/concept/lucians-luscious-lasagna/.meta/example.pony b/exercises/concept/lucians-luscious-lasagna/.meta/example.pony new file mode 100644 index 0000000..bfe73a4 --- /dev/null +++ b/exercises/concept/lucians-luscious-lasagna/.meta/example.pony @@ -0,0 +1,2 @@ +primitive HelloWorld + fun hello(): String => "Hello, World!" diff --git a/exercises/concept/lucians-luscious-lasagna/lasagna.pony b/exercises/concept/lucians-luscious-lasagna/lasagna.pony new file mode 100644 index 0000000..cf6388a --- /dev/null +++ b/exercises/concept/lucians-luscious-lasagna/lasagna.pony @@ -0,0 +1,7 @@ +primitive HelloWorld + fun hello(): String => + """ + Return the String "Hello World!" + """ + + "Goodbye, Mars!" diff --git a/exercises/concept/lucians-luscious-lasagna/test.pony b/exercises/concept/lucians-luscious-lasagna/test.pony new file mode 100644 index 0000000..c4da445 --- /dev/null +++ b/exercises/concept/lucians-luscious-lasagna/test.pony @@ -0,0 +1,14 @@ +use "pony_test" + +actor Main is TestList + new create(env: Env) => + PonyTest(env, this) + + fun tag tests(test: PonyTest) => + test(_TestHelloWorld) + +class iso _TestHelloWorld is UnitTest + fun name(): String => "hello-world/HelloWorld" + + fun apply(h: TestHelper) => + h.assert_eq[String]("Hello, World!", HelloWorld.hello())