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

❤️ ❤️ ❤️ #487

Open
davidchambers opened this issue Feb 13, 2018 · 16 comments
Open

❤️ ❤️ ❤️ #487

davidchambers opened this issue Feb 13, 2018 · 16 comments

Comments

@davidchambers
Copy link
Member

As a community we've achieved a lot in a few years, but there are still projects to create, incomplete projects to release, improvements to make to existing projects, blog posts to write, screencasts to record and edit, and many other ways to make the community even more welcoming to newcomers.

I find this very exciting, but with so many good ideas it's unclear how to best serve the community.

This thread is for gauging interest in various Sanctuary-related endeavours which may or may not have begun and have not yet concluded. I will add ideas as they occur to me; I invite you to do the same.

Submitting a proposal

  1. Post a short description of something you would like to happen. Include an issue link if applicable.
  2. Add a ❤️ “reaction” to your comment. Presumably you're excited about the idea. :)

Supporting a proposal

  1. Add a ❤️ “reaction” to a comment if it excites you. Keep in mind that adding a heart to every comment would indicate that all proposals are equally important to you, so be selective. ;)

Please do not discuss proposals in this thread. Let's keep this thread on point. If you would like to comment on a proposal, please do so in a dedicated GitHub issue (create one if necessary).

@davidchambers
Copy link
Member Author

Release sanctuary-html

@soroushjp and I created sanctuary-html almost two years ago but never quite got it ready to release (sanctuary-js/sanctuary-html#3). It is similar to Cheerio in that it facilitates traversal and manipulation of HTML documents in Node. Whereas Cheerio is based on jQuery, sanctuary-html uses easily understood types such as Array Node and easily understood functions such as S.chain. It's a joy to use!

@davidchambers
Copy link
Member Author

davidchambers commented Feb 13, 2018

✔︎ Release sanctuary-maybe

Completed 27 May 2018


Sanctuary's Maybe type is currently defined in Sanctuary itself, but there are contexts in which one might want to use this type without adding a relatively large dependency. Sanctuary's API would not change: it would depend on sanctuary-maybe and would continue to export S.Nothing and S.Just. sanctuary-js/sanctuary-maybe#3 is almost ready to merge.

@davidchambers
Copy link
Member Author

davidchambers commented Feb 13, 2018

✔︎ Release sanctuary-either

Completed 26 May 2018


Sanctuary's Either type is currently defined in Sanctuary itself, but there are contexts in which one might want to use this type without adding a relatively large dependency. Sanctuary's API would not change: it would depend on sanctuary-either and would continue to export S.Left and S.Right. sanctuary-js/sanctuary-either#3 is almost ready to merge.

@davidchambers
Copy link
Member Author

davidchambers commented Feb 13, 2018

✔︎ Release sanctuary-pair

Completed 28 May 2018


Sanctuary currently considers ['foo', true] to be a member of Pair String Boolean, but this is misleading. A true Pair type such as that defined in sanctuary-js/sanctuary-pair#3 supports S.map, S.bimap, and various related functions.

@davidchambers
Copy link
Member Author

Release sanctuary-set

@scott-christopher put a great deal of work into sanctuary-js/sanctuary-set#1 back in 2016. It provides a Fantasy Land -compliant Set type with value-based equality semantics. Not only will the project be useful in its own right, but it will improve the types of certain Sanctuary functions (S.keys, S.values, and S.pairs) by removing the arbitrary ordering caveat, and will allow us to export Set-specific functions such as intersection and union.

@davidchambers
Copy link
Member Author

Release sanctuary-map

sanctuary-map will provide a Fantasy Land -compliant Map type with value-based equality semantics. Whereas plain JavaScript objects can be considered “string maps”, the Map type is parameterized by key type as well as by value type (Map (Pair Integer Integer) (Array String), for example).

@davidchambers
Copy link
Member Author

davidchambers commented Feb 13, 2018

✔︎ Release sanctuary-identity

Completed 26 May 2018


sanctuary-js/sanctuary-identity#3 introduces a Fantasy Land -compliant Identity type. The Identity type is not terribly exciting, of course, but it is very useful for testing certain properties of other types, and is useful in the implementation of van Laarhoven lenses (do not give this comment a heart based solely on what the Identity type enables).

@davidchambers
Copy link
Member Author

Export functions for creating and using lenses

Ramda provides R.view, R.over, and R.set. Sanctuary should provide equivalent functions. Ramda also provides functions for creating lenses. Sanctuary should provide similar functions, ensuring that the lens laws are obeyed as mentioned in #177.

@davidchambers
Copy link
Member Author

davidchambers commented Feb 15, 2018

✔︎ Create and release sanctuary-show

Completed 29 April 2018


S.toString is an invaluable function, but it has several deficiencies:

  • it relies on toString methods, which must sometimes serve other roles;
  • the presence of a toString method is not a reliable indicator of intent to support S.toString;
  • there is no specification for S.toString-friendly toString methods; and
  • the implementations live in sanctuary-type-classes but have nothing to do with Fantasy Land.

The plan, as discussed in fantasyland/fantasy-land#254, is to create a project named sanctuary-show which specifies the desired semantics of a new @@show method, provides @@show implementations for built-in types, and exports Showable :: TypeClass and show :: Showable a => a -> String. We would then remove Z.toString and replace S.toString with S.show.

@davidchambers
Copy link
Member Author

Create and release a functional testing library

We define lovely pure functions which we then test by throwing and catching assertion errors in a module with global suite and test functions and dollops of mutable state. This is no way to live! Let's make our test suites pure too by using the Validation type to accumulate errors, potentially in conjunction with the Future type in order to test asynchronous code.

@davidchambers
Copy link
Member Author

Create an ESLint rule for Sanctuary-style indentation

I'm very excited about embracing the style proposed in #438, but this currently requires disabling the ESLint "indent" rule. Despite being highly configurable, the rule cannot be configured to accept this:

foo (bar)
    (baz)
    (function(x) {
       return x * x;
     })
    (quux);

@davidchambers
Copy link
Member Author

Derive propTypes from sanctuary-def types

When using React, I'd like to derive propTypes from sanctuary-def Type values. We could add to the sanctuary-def readme a definition of a function which takes a Type value and returns a “custom validator”. We could even create a package which provides more faithful translations ($.EnumType could map to PropTypes.oneOf, for example). This may produce more descriptive error messages.

@davidchambers
Copy link
Member Author

Create and release a command-line argument parser

I have used Commander.js in several projects. It's okay, but we can do better. We can build a library without null, undefined, or type coercion. We can build a library which defines parsers with types such as String -> Maybe Integer to allow option values to be precisely defined and validated.

@davidchambers
Copy link
Member Author

Publish documentation of all Sanctuary projects on the website

Currently only the documentation of Sanctuary itself is on the website. For any other Sanctuary project one must consult the readme on GitHub. It would be convenient to have all the projects documented in one place.

@davidchambers
Copy link
Member Author

Create and release sanctuary-list

sanctuary-list will provide an immutable, Fantasy Land -compliant List type. Due to structural sharing it will perform better than arrays in some situations, and with a smaller memory footprint.

@davidchambers
Copy link
Member Author

Add Hoogle-like search to the website

With Hoogle one can often find the function one seeks by entering a type signature. Sanctuary's website should provide similar functionality.

@davidchambers davidchambers pinned this issue Apr 24, 2021
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

No branches or pull requests

1 participant