Component: Standard Library
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.2k
- Forks
- 115
- Avg merge
- 17h 28m
- Merged PRs (30d)
- 50
Description
Darklang's "standard library" is the suite of things (like many List functions) that the Dark team volunteers to steer and maintain, as opposed to functionality non-core, best designed and implemented by users. Much of these stdlib functionality is supported by Builtins for lower-level operations.
This issue is to organize work related to Darklang's "standard library."
Most of the tasks here are accessible to contributors, especially with a bit of discussion.
Numerics and Math
- division options are confusing (see #4627)
Strings
- add
String.trimStartandString.trimEnd- for RTL, it should work fine, as the RTL is just rendering, and "start" and "end" refer to the same place in both.
- see discussion in #3159
- Support "full" case mapping in Strings:
toLower/toUpper(see #3437)
Date and Time
- Date should be clear what granularity is available
- Are two Dates with the same second the same? Let's make sure they are, or expose enough detail so users can see why (eg, ticks or milliseconds or whatever).
- module should document timezone info / UTC (see #3574)
- higher-precision DateTimes
- add TimeSpans to Dark
- along with this, create a new version of
Date::subtractwhich returns a timespan
- along with this, create a new version of
- more date functions
- Date formatting
Collections
-
List.shuffle -
List.remove(some ergonomic way of removing an item) -
List.dropFirstif we don't have it already -
List.indexOf -
List.maxBy
Bytes
- add
Bytes.contains - add
Bytes.toList - add
Bytes.map - startsWith, endsWith (single)
- get byte at location
- set byte at location
- add
Base64.urlEncode - add
Bytes.slicebuiltin - add
Bytes.drop(usingBytes.slice) - add
Bytes.take(usingBytes.slice) - add
Bytes.append/Bytes.concat - add
Bytes.reverse - add
Bytes.containsSegment - add Bytes.encode and Bytes.decode, adopting patterns from Elm
- https://package.elm-lang.org/packages/elm/bytes/1.0.8/Bytes-Decode
- hex encode
- move Base64.encode & .decode from builtin to package
- add
Bytes.startsWith,Bytes.endsWith(segment) - add
Bytes.find - add
Bytes.indexOf - add
Bytes.lastIndexOf - add
Bytes.trim - add
Bytes.replace(either single byte or a segment of bytes)
Json
- #5447
URLs
- URL decoding function
- URL builder
Misc
- Add HTML parsing functionality to standard library (see #2811)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
This is an umbrella issue with no implementation file, test, or single entry point named. Start by selecting one unchecked item and reading its referenced issue or discussion, such as #4627, #3159, or #3437. Done means the selected standard-library task has a confirmed scope and corresponding implementation or documentation changes.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100