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

Expand the standard library #2411

Closed
pbiggar opened this issue May 29, 2020 · 5 comments
Closed

Expand the standard library #2411

pbiggar opened this issue May 29, 2020 · 5 comments

Comments

@pbiggar
Copy link
Member

pbiggar commented May 29, 2020

The standard library has a batteries-included approach for the standard modules: List, String, Int, Float, Result, Option, UUID, Date, Dict, Bool, Bytes, DB, HTTPClient and HTTP (response) modules.

We generally copy the Elm standard library where it makes sense: https://package.elm-lang.org/packages/elm/core/1.0.5/. We no longer add functions that would make more sense in the package manager (such as calls to HTTP/REST/JSON APIs). We do add Crypto functions as they are very hard to do in userspace and have performance needs.

Contributions of just one function is very welcome, and is a great early bugs for contributors.

We have an internal document on how to write standard library functions, which I'll add to this ticket later.

This explains how to write docstrings: https://github.com/darklang/dark/blob/master/docs/writing-docstrings.md.

Requests for new functions should each be a separate issue.

https://github.com/darklang/dark/labels/stdlib

@pbiggar
Copy link
Member Author

pbiggar commented May 29, 2020

Users have asked for:

  • url decoding function
  • date functions
  • url builder
  • Date formatting
  • a bulk-add DB function

(TODO: make separate issues for these)

@tchak
Copy link

tchak commented Jun 2, 2020

  • List:shuffle
  • figure out an ergonomic way to remove items from list - List::remove maybe?

@pingiun
Copy link
Contributor

pingiun commented Jun 2, 2020

I did Crypto::md5 in #2483

And List::takeWhile in #2487

@mwz
Copy link
Contributor

mwz commented Jun 7, 2020

Date::atStartOfDay implemented in #2546.

@StachuDotNet
Copy link
Member

merged this into #5239

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

5 participants