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

Updates to dependencies, and small touchups in wijkanders #128

Merged
merged 7 commits into from
Jun 5, 2024

Conversation

The1Penguin
Copy link
Contributor

No description provided.

Copy link
Contributor

@Multipacker Multipacker left a comment

Choose a reason for hiding this comment

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

Looks good to me

@@ -1,5 +1,3 @@
version: '3.7'
Copy link
Contributor

Choose a reason for hiding this comment

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

Good to see this removed as it is now obsolete.

@@ -31,4 +31,4 @@ defaultConfig = Config False 14 (1000000 * 60 * 30) 5007
-- TODO: Feel free to bikeshed the function name.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not enough bikesheding 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tehee ;P

Copy link
Contributor

Choose a reason for hiding this comment

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

Much better!

src/Config.hs Outdated
@@ -31,4 +31,4 @@ defaultConfig = Config False 14 (1000000 * 60 * 30) 5007
-- TODO: Feel free to bikeshed the function name.
reifyConfig
:: ([Config -> Config], [String], [String]) -> (Config, [String], [String])
reifyConfig = (& _1 %~ foldl' (flip id) defaultConfig)
reifyConfig = _1 %~ foldl' (flip id) defaultConfig
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity: Is it so that the (& ...) construct doesn't really do anything?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apparently not, not fully sure why, but HLS complained so I took the Haskell way and got really lazy ;P

Copy link
Contributor

Choose a reason for hiding this comment

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

Damn legit! Laziness <3

Here, have some types!

λ: :t (&)
(&) :: a -> (a -> b) -> b

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then it makes total sense, since we have the function we want to apply, we just apply it instead

Copy link
Contributor

@Rembane Rembane left a comment

Choose a reason for hiding this comment

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

Good stuff! If it typechecks, ship it!

@@ -90,7 +91,7 @@ getWijkanders d =
>>> dropWhile (~/= "<strong>")
>>> removeWhitespaceTags
>>> partitions (~== "<strong>")
>>> mapMaybe ((maybeTagText =<<) . (`atMay` 1))
>>> mapMaybe (maybeTagText <=< (`atMay` 1))
Copy link
Contributor

Choose a reason for hiding this comment

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

Pretty!

Copy link

@malmz malmz left a comment

Choose a reason for hiding this comment

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

Prima symbolsoppa, LGTM

@@ -31,4 +31,4 @@ defaultConfig = Config False 14 (1000000 * 60 * 30) 5007
-- TODO: Feel free to bikeshed the function name.
Copy link
Contributor

Choose a reason for hiding this comment

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

Much better!

@The1Penguin The1Penguin changed the title Updates to dependencies and small touchups in wijkandes Updates to dependencies and small touchups in wijkanders Jun 4, 2024
@The1Penguin
Copy link
Contributor Author

I cannot believe that this wasn't in the thyme library

@The1Penguin
Copy link
Contributor Author

Oops, forgot to check, now it works. This would fix #33

@The1Penguin The1Penguin changed the title Updates to dependencies and small touchups in wijkanders Updates to dependencies, fix of overflow of days, and small touchups in wijkanders Jun 4, 2024
src/Util.hs Outdated
Comment on lines 38 to 39
| m < 12 = YearMonthDay y (m + 1) (d - len)
| otherwise = YearMonthDay (y + 1) 1 (d - len)
Copy link
Contributor

Choose a reason for hiding this comment

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

Couldn't these just set the day to 0?

Suggested change
| m < 12 = YearMonthDay y (m + 1) (d - len)
| otherwise = YearMonthDay (y + 1) 1 (d - len)
| m < 12 = YearMonthDay y (m + 1) 0
| otherwise = YearMonthDay (y + 1) 1 0

Copy link
Contributor Author

@The1Penguin The1Penguin Jun 4, 2024

Choose a reason for hiding this comment

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

Right, these should be 1 but since they are bounded they will bounce up to being a 1

Copy link
Contributor

Choose a reason for hiding this comment

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

Ohh I was wondering why they were using different bases for months and days, that explains it

@SimonAlling
Copy link

Seems like this PR changes multiple completely unrelated things, and that some of the changes might have quite non-obvious implications. Should they really be thought of as a single "conceptual" change? 👀 😊

@The1Penguin
Copy link
Contributor Author

I disagree that a pull request should be seen as a single "conceptual" change. It is one way to approach pull requests, but that is more fit when multiple people are working on the same project at the same time. In this case, it is a project that occasionally gets an update and in this case, I don't see it as problematic, especially since the common way to merge is via rebase.

What is your idea about non-obvious implications? The only one I can think of is the overflow of days, which fixes a bug that has been known about for 6 years.

@The1Penguin
Copy link
Contributor Author

I went ahead and changed so we don't have the time overflow aspect for this pull request, since it matches the history of the pull request in this repo.

@The1Penguin The1Penguin changed the title Updates to dependencies, fix of overflow of days, and small touchups in wijkanders Updates to dependencies, and small touchups in wijkanders Jun 5, 2024
@The1Penguin The1Penguin self-assigned this Jun 5, 2024
@SimonAlling
Copy link

I disagree that a pull request should be seen as a single "conceptual" change. It is one way to approach pull requests, but that is more fit when multiple people are working on the same project at the same time. In this case, it is a project that occasionally gets an update and in this case, I don't see it as problematic, especially since the common way to merge is via rebase.

Merging by rebasing certainly alleviates the problem. It's obviously more difficult to review many changes at once than one at a time, but the history benefits should at least be preserved then. Good to hear that you've thought it through!

What is your idea about non-obvious implications? The only one I can think of is the overflow of days, which fixes a bug that has been known about for 6 years.

I was thinking of the language version, compiler, libraries etc.

@The1Penguin
Copy link
Contributor Author

The1Penguin commented Jun 5, 2024

I was thinking of the language version, compiler, libraries etc.

Changing the version is something that I believe is a positive change that will make it easier for others to get into the repo. Last time we did such an update was in #120 where we also removed stack for it to be easier to manage.

Having up to date dependencies will also make it easier to manage in the event that there is a breaking change in an update. Not doing incremental updates is one of the reasons that DFoto is in the state that it is (DFoto currently cannot be built).

)
)
(or . ([
BL.isPrefixOf (BL8.pack "Med reservation")

Choose a reason for hiding this comment

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

Indent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We love indentation

@The1Penguin The1Penguin merged commit 899e274 into main Jun 5, 2024
1 check passed
@The1Penguin The1Penguin deleted the touchups branch June 5, 2024 17:35
@SimonAlling
Copy link

Changing the version is something that I believe is a positive change that will make it easier for others to get into the repo. Last time we did such an update was in #120 where we also removed stack for it to be easier to manage.

Having up to date dependencies will also make it easier to manage in the event that there is a breaking change in an update. Not doing incremental updates is one of the reasons that DFoto is in the state that it is (DFoto currently cannot be built).

For the record, I’m all for updating dependencies etc. My suggestion was only about doing it in a separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants