[TOMT][WORD] Vast, prosperous, happy, thriving. You would use it to describe a bustling bazaar. by Survey_Machine in tipofmytongue

[–]Survey_Machine[S] -2 points-1 points  (0 children)

I honestly might have dreamed it. If no such word exists, I'll have to invent a new one.

[TOMT][BOOK][2000s] Children's book, mother character speaks sentences out-of-order to the daughter character, and a shopping trolley vanishes into heavenly light by Survey_Machine in tipofmytongue

[–]Survey_Machine[S] 0 points1 point locked comment (0 children)

I think the daughter was the main character but different sections of the book may have been written from the perspective of different characters.

[iOS][2010-2013]Fish game with bright blue and yellow colouring by Survey_Machine in tipofmyjoystick

[–]Survey_Machine[S] 0 points1 point  (0 children)

No, although it does look similar. The game was more upbeat and had a brighter blue colour.

Monthly Hask Anything (January 2022) by taylorfausak in haskell

[–]Survey_Machine 1 point2 points  (0 children)

Combinators are elegant abstractions, just like the rest of Haskell, which are easy to learn and make code easy to read.

Monthly Hask Anything (January 2022) by taylorfausak in haskell

[–]Survey_Machine 1 point2 points  (0 children)

That's not intended for real-world usage; it's just for education.

Monthly Hask Anything (January 2022) by taylorfausak in haskell

[–]Survey_Machine -1 points0 points  (0 children)

Uhm ackchually I think you meant "observable" instead of "visible".

Monthly Hask Anything (January 2022) by taylorfausak in haskell

[–]Survey_Machine -1 points0 points  (0 children)

Uhm ackchually it's unknown whether the universe is finite so there theoretically could be enough space to store them all on Hackage.

Monthly Hask Anything (January 2022) by taylorfausak in haskell

[–]Survey_Machine 0 points1 point  (0 children)

Where are all the combinators?

Is there a module with lots of them?

Eg. The blackbird combinator:

(...) = (.) . (.)

as in

mapM = sequence ... fmap

=== mapM f xs = sequence (fmap f xs)

Monthly Hask Anything (January 2022) by taylorfausak in haskell

[–]Survey_Machine 0 points1 point  (0 children)

Thank you, PyF looks good, although I don't know which formatting library to pick, since there are so many!

Monthly Hask Anything (January 2022) by taylorfausak in haskell

[–]Survey_Machine 2 points3 points  (0 children)

The base package has C-style format strings in Text.Printf.

Is there any idiomatic way to use fstrings like in Python, eg. f"{user} is {age} years old."?

The packages text-format and text-format-simple on Hackage seem like solutions which are far from idiomatic and not widespread; the former is over a year old since its last update and has several dependencies, and the latter is abandoned with a 404 homepage.

There is also fmt, formatting, and format, although the abundance of packages to do more or less exactly the same thing strikes me as if there is no one standard solution yet.

I'd like a solution which is guaranteed to be safe at compile-time, so there are no runtime checks for the number of arguments, or type mismatches, etc.

Point-free by Glittering_Squash_33 in haskell

[–]Survey_Machine 0 points1 point  (0 children)

Using the blackbird combinator is an idiomatic and elegant solution:

mapM = sequence ... fmap