-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Discussion: concepts to implement #534
Comments
I agree with all these except Regex I think.
|
Oh, I went through the Random package but I somehow missed seeds and steps. Wonderful! OK then, I'll create issues for these except for regex, I agree that it's a confusing technology that should be under String or Parser. Actually the parsing concept open with
|
Thanks jeremie. I have a few others I was thinking about as well, I'll add
them to this issue when I get home.
…On Sat, 26 Nov 2022, 23:31 Jie, ***@***.***> wrote:
Oh, I went through the Random package but I somehow missed seeds and
steps. Wonderful!
OK then, I'll create issues for these except for regex, I agree that it's
a confusing technology that should be under String or Parser. Actually the
parsing concept open with
Parsing is the process of transforming text into meaningful data.
Functions from the String package are limiting in that regard and regular
expressions are difficult to use, so the idiomatic way in Elm to parse is
with the elm/parser package.
—
Reply to this email directly, view it on GitHub
<#534 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADHR5RYEE6K4I2UGUKOZEELWKKMUFANCNFSM6AAAAAASLXQML4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Here are some things that I was thinking about.
|
The frontend aspect of Elm is kinda hard to present to student considering the only interaction possible on exercism I'm aware of is testing and static analysis. Since the core team of exercism is taking a step back, maybe a good idea would be to participate in exercism upcoming discussions and see how tracks could be able to enjoy some of their specificities. For example, building webpages in Elm. For tooling, it's also hard to teach considering the exercism platform makes it difficult to use. I guess we could add special cases in our runners to special-case some exercises, but I don't feel like adding complexity to a tool stack that is already not trivial would be a good idea. Regarding elm-review, I could see a concept on static analysis instead, transforming code and ASTs. An exercise or concept on making undesirable states unrepresentable (or as Richard says impossible states impossible) would make perfect sense. Could be providing some code with too many things and asking students to transform that code to fix it. This will be hard to write tests and analysis for though. |
I think this code is fairly testable. init, update and view could all be tested, which is most of it. And the code is runnable so we could add instructions for that somewhere, even if we couldn't do it in exercism. Ellie or running locally or something. I think this is possible too, although maybe a bit hacky. We could define dummy Lamdera functions in a helper fine. Some of the other stuff might be better as a list of further reading, but I think with a bit of imagination and some dummy functions and things like that we might be able to do some things ... |
What would you think of a It would be strange to test though, I don't think the tests can catch the debug logs. Although we can test the output of |
A debug concept exercise would be good, but probably tricky to do, as you mention. Maybe that's fine though, it could be more of a reading exercise than an implementation exercise. We could also try and teach other Elm debugging techniques, and link to some useful content. It's something you see coming up on slack / forums every now and again. |
What do people think about some Elm Architecture / Creating Websites type concepts? I'm keen to give it a try :) Probably following the lines of the Elm Guide. We already have the html module in our docker containers (although its an indirect test dependency, so it might want promoting), but we need to do something for Browser. I think a dummy module / supporting file would be easiest for this. For Browser.sandbox, I think we would be able to test everything using elm-explorations/test, which again we already have in the docker files. We wouldn't be able to host the websites in Exercism, but we could direct students to copy and paste their code in to the online editor, or to create the app locally and run it if they wanted to. For Browser.element, and the things it unlocks, things might get more complicated, and we might also want to provide a dummy module / support file for elm/http and maybe other things. I think this would be doable, but I haven't properly investigated yet. We could look in to this once the easier concepts / exercises were done. |
I don't know if this is a good fit for the current exercism, the |
I think requiring students to copy and paste code would be bad, but having it as an option at the end so they can see a thing working would be ok. Elm is a language aimed solely at writing web applications (although it can be teased in to other things as well), so it seems a bit of a shame that a student could complete the exercism track and still have no idea how to write the simplest web application. I think if we could test everything sufficiently using a combination of tests and the analyser then it would be better than nothing, and I'm hoping that this is possible (although I haven't got in to the nitty gritty yet). Some things will never be as good as writing the web app directly, as you can't look at it and debug and things like that, but I think it would still be useful to start students off with the general ideas and the basics. |
I was thinking about some other concepts that we don't have at the moment.
I would love to have some opinions. We can leave this issue open to discuss that topic.
String => #536
That would be a simple one to add, we introduce the concept extremely quickly in
basics-2
but mention almost nothing about the library. It's a very rich library, it would be nice to touch upon functions that are a little bit different in other languages, maybe likecons
,uncons
,words
,toX
,fromX
...Regex => ⛔
I know it's not used very often in Elm, but there are still cases where it's useful, and we provide the library, so why not. We can fork an existing concept for this, like this one.
Json Decoders => #538
This is usually a pain point for beginners, because the approach is very unique. Well worth a concept. There is one exercise using json input.
Random => #537
There are a few exercises that need it, and it's not an obvious thing in Elm, so it might be good to introduce.
The problem is that it's not possible to use without
Platform
functions, and we cannot test that withoutelm-program-test
so we would need to add the dependency. However with this, we can introduce effectful concepts, likeTask
or the Elm architecture.The text was updated successfully, but these errors were encountered: