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

Component: Standard Library #5239

Open
36 tasks
StachuDotNet opened this issue Jan 8, 2024 · 0 comments
Open
36 tasks

Component: Standard Library #5239

StachuDotNet opened this issue Jan 8, 2024 · 0 comments
Labels
ready-for-contribs There's work here that's relatively approachable, if you're interested!

Comments

@StachuDotNet
Copy link
Member

StachuDotNet commented Jan 8, 2024

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

Strings

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 Date module should document timezone info / UTC #3574)
  • higher-precision DateTimes
  • add TimeSpans to Dark
    • along with this, create a new version of Date::subtract which returns a timespan
  • more date functions
  • Date formatting

Collections

  • List.shuffle
  • List.remove (some ergonomic way of removing an item)
  • List.dropFirst if we don't have it already
  • List.indexOf

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.slice builtin
  • add Bytes.drop (using Bytes.slice)
  • add Bytes.take (using Bytes.slice)
  • add Bytes.append / Bytes.concat
  • add Bytes.reverse
  • add Bytes.containsSegment
  • add Bytes.encode and Bytes.decode, adopting patterns from Elm
  • 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)

URLs

  • URL decoding function
  • URL builder

Misc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-contribs There's work here that's relatively approachable, if you're interested!
Projects
None yet
Development

No branches or pull requests

1 participant