You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose to use this issue to put all the interesting problems that can be solved with Hawk that we have in mind and then select the most interesting to show in the readme.
I start with some use cases:
convert a unix timestamp from/to a readable date: a simple function in Prelude.hs should do the magic
convert an integer representing bytes into a readable value, like 28461575 -> 28M: a simple function in Prelude.hs should do the magic
highlight some text using a regexp to select it: we need the library to color the output, then it's easy
print a range of lines, like from the 3rd to the 11th lines: take (11-3) . drop 3
translate based on a dictionary: this is more difficult because we need to load the dictionary...maybe we should add the possibility to take in input more than one file and/or stream and then find a way to work on both of them. This is difficult IMHO...
The text was updated successfully, but these errors were encountered:
In the readme, I would prefer to focus on uses which don't require a fancy prelude. This way, readers can easily recognize that the expression is ordinary haskell code, which they could write themselves, and then decide that they would indeed like to write haskell from the command-line.
With a complicated prelude, we can make much more impressive demonstrations, but it would demonstrates the flexibility of haskell, not that of hawk. We should, of course, include at least one complicated example in order to demonstrate that a complicated prelude can allow you to add support for anything, but I don't think we should focus on that.
One way in which the prelude could be sensibly demonstrated while focussing on hawk's strengths is by structuring the readme around the various input and output formats supported by hawk. Somebody opened an issue about adding yaml support; after sections titled "list of lines" and"tab-separated tables", we could have a section titled "and every other formats" demonstrating that custom formats such as yaml can easily be added by writing a short snipped it the prelude.
I propose to use this issue to put all the interesting problems that can be solved with
Hawk
that we have in mind and then select the most interesting to show in the readme.I start with some use cases:
Prelude.hs
should do the magicPrelude.hs
should do the magictake (11-3) . drop 3
The text was updated successfully, but these errors were encountered: