-
-
Notifications
You must be signed in to change notification settings - Fork 112
Add new concept time
and concept exercise kurokos-clock
#748
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
base: main
Are you sure you want to change the base?
Conversation
Just randomly adding my input re this (sorry for the actual PR content ^^). I’ve had very mixed interactions with LLMs. Claude 3.5 and 3.7 while being clearly guided have been very useful. However, as soon as I’m a bit vague, not precise enough, it’s not good. And I’ve just tried the new gemini 2.5 pro exp because it’s still free and many people talking about how great it is. But for me it only produced overly verbose and wrong garbage. Especially in agents where it is kinda loose. So quite disappointed for now. But I feel like with the nature of Elm (simple and pure functions) there is probably a path to generate inputs and context in a way that enable an agent to have a great overview of a big project. Say with just the type signatures for example, in addition to the body of some relevant functions and the agent could discover on its own the relevant context to add to continue to work. Aaaanywaaay, |
So far I'm only using whatever default agent Cursor picks for me, because I can't be bothered to compare models. In general, I find the "autocomplete" functions really useful, especially in Elm, you add a new message, and then tab-tab-tab, it adds the right things in the right places. |
## General | ||
|
||
- Check out the [`elm/time` documentation][elm-time] for working with dates and times | ||
- The introduction introduces most of the necessary concepts to solve the exercise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The introduction introduces most of the necessary concepts to solve the exercise | |
- The introduction showcases most of the necessary concepts to solve the exercise |
introduction introduces
sounds a bit strange, might be just me ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add https://package.elm-lang.org/packages/CoderDennis/elm-time-format/latest?
I'm not sure how much it is used, but formatting your own time is something I wouldn't be keen to bother with if I was writing an app
@@ -0,0 +1,53 @@ | |||
# About | |||
|
|||
The `Time` module is used to display human-readable times. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The `Time` module is used to display human-readable times. | |
The `Time` module is used to display human-readable dates / times. |
|
||
The `Time` module is used to display human-readable times. | ||
While it's technically possibly to manipulate times with `Time`, there are Elm community packages that are far more suited to the task. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe mention https://package.elm-lang.org/packages/justinmimbs/date/latest, https://package.elm-lang.org/packages/CoderDennis/elm-time-format/latest here?
Formatting dates and times seems like a solved problem, so probably best not to scare people off using Elm ...
|
||
Define a function `showLocalDate : Locale -> Int -> Month -> Int -> String` which will display a (valid) local date. | ||
|
||
In the `US` locale, the format will be `M/D/Y`, while in the `JP` locale it will be `Y年M月D日`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe expand this a bit, like you do for the time example? I found that my eyes didn't see the Y, M and D very easily in the string
Students should be able to | ||
|
||
- understand what POSIX time means | ||
- transform `Posix` into millisecond `Int` back and forth (`posixToMillis`, `millisToPosix`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all these things are in the exercise, but I think thats ok
Solves #735.
New concept, I tried to keep it simple :)
Full disclosure, I have been using Cursor for a while (AI-integrated editor), and I used it to generate some things (initial implementations, tests, hints) but of course I reviewed everything in detail and changed a lot of stuff. I wrote the intro and instructions myself, although I asked the AI to review them.
It was quite nice actually, it pointed out some issues, and even found a mistake in one instruction example. It also generated all the links in the hints correctly, which was cool because I hate writing those :)
As usual, I left the introduction as TODO, which will fail the CI.