Skip to content

[aura-1.4] Prelude ==> BasicPrelude && Formatting ==> th-printf#383

Merged
fosskers merged 1 commit intofosskers:aura-1.4from
theotherjimmy:basic-prelude
Jan 7, 2016
Merged

[aura-1.4] Prelude ==> BasicPrelude && Formatting ==> th-printf#383
fosskers merged 1 commit intofosskers:aura-1.4from
theotherjimmy:basic-prelude

Conversation

@theotherjimmy
Copy link
Contributor

This one is much simpler, just making the switch to basic-prelude and changing all of the sformats to a more C-printf looking function. The reasoning of the Formatting to th-printf switch is simple: I did not see th-printf earlier, or I would have used it instead of Formatting from the beginning. My bad XD.

  • Prelude ==> BasicPrelude
  • Formatting ==> th-printf

@theotherjimmy theotherjimmy changed the title This one is much simpler, just making the switch to basic-prelude and changing all of the sformats to a more C-printf looking function. [aura-1.4] Prelude ==> BasicPrelude && Formatting ==> th-printf Jan 5, 2016
@bb010g
Copy link
Contributor

bb010g commented Jan 6, 2016

Shouldn't BasicPrelude be the first import?

@fosskers
Copy link
Owner

fosskers commented Jan 6, 2016

I could only see that mattering if doing so rendered other imports redundant.

@bb010g
Copy link
Contributor

bb010g commented Jan 6, 2016

It's mainly a style thing. The prelude isn't a "normal" import, and is less noise when set apart from the other imports.

@fosskers
Copy link
Owner

fosskers commented Jan 6, 2016

I can agree with that. Let's add that to the style guide (which also has to be updated to reflect the removal of the Aura monad).

@theotherjimmy
Copy link
Contributor Author

Right. Just a moment, I'll update the PR.

On Wed, Jan 6, 2016 at 3:10 PM, Colin Woodbury notifications@github.com
wrote:

I can agree with that. Let's add that to the style guide (which also has
to be updated to reflect the removal of the Aura monad).


Reply to this email directly or view it on GitHub
#383 (comment).

"Open-source software has fewer bugs because it admits the possibility of
bugs." Paul Graham

@fosskers
Copy link
Owner

fosskers commented Jan 7, 2016

Re: th-printf. What's its advantage over plain, old printf?

@flamusdiu
Copy link

@fosskers I guess the package is from here: https://github.com/pikajude/th-printf

Looks like th-printf is more flexible then plain printf according to the github.

@fosskers
Copy link
Owner

fosskers commented Jan 7, 2016

Just took a look. I realize I should probably be using that for everything, haha. Things like:

foo name age = "Hello " ++ name ++ ", you are " ++ show age ++ " years old!"

are clumsy. I especially like its ability to produce Text. I had forgotten normal printf was limited in that way.

fosskers added a commit that referenced this pull request Jan 7, 2016
[aura-1.4] Prelude ==> BasicPrelude && Formatting ==> th-printf
@fosskers fosskers merged commit 53821f0 into fosskers:aura-1.4 Jan 7, 2016
@fosskers
Copy link
Owner

fosskers commented Jan 7, 2016

Thanks again @theotherjimmy for this!

@flamusdiu
Copy link

@fosskers : lol. The same can be said for python. I guess plenty of language prefer using printf style output in some form for everything.

@fosskers
Copy link
Owner

fosskers commented Jan 7, 2016

That shows me there's something inherently good about printf style.

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.

4 participants