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

WIP: Starting on concepts. #128

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions concepts/basics-1/.meta/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"authors": [
"redvers"
],
"blurb": "Learn the basic syntax of an pony program"
}
Empty file added concepts/basics-1/about.md
Empty file.
Empty file.
1 change: 1 addition & 0 deletions concepts/basics-1/links.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
23 changes: 20 additions & 3 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rename the concept to basics? There should really only be one basics concept. Any other concepts should be "real" concepts (like numbers, booleans, etc.)

"name": "Basics 1"
}
],
"blurb": "Pony is an open-source, object-oriented, actor-model, capabilities-secure, high-performance programming language.",
"version": 3,
"online_editor": {
Expand All @@ -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",
Expand Down Expand Up @@ -165,7 +183,6 @@
}
]
},
"concepts": [],
"key_features": [
{
"title": "Concurrency",
Expand Down
Empty file.
Empty file.
Empty file.
18 changes: 18 additions & 0 deletions exercises/concept/lucians-luscious-lasagna/.meta/config.json
Original file line number Diff line number Diff line change
@@ -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"
}
2 changes: 2 additions & 0 deletions exercises/concept/lucians-luscious-lasagna/.meta/example.pony
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
primitive HelloWorld
fun hello(): String => "Hello, World!"
7 changes: 7 additions & 0 deletions exercises/concept/lucians-luscious-lasagna/lasagna.pony
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
primitive HelloWorld
fun hello(): String =>
"""
Return the String "Hello World!"
"""

"Goodbye, Mars!"
14 changes: 14 additions & 0 deletions exercises/concept/lucians-luscious-lasagna/test.pony
Original file line number Diff line number Diff line change
@@ -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())