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

What should a standard library include? #2

Open
capr opened this issue Jan 25, 2019 · 1 comment
Open

What should a standard library include? #2

capr opened this issue Jan 25, 2019 · 1 comment

Comments

@capr
Copy link
Member

capr commented Jan 25, 2019

I think there needs to be a "tier-0" lib that all other libs would depend upon. This is the lib that defines a common (preferably flat) vocabulary of the most basic tools. Unfortunately, getting two people to agree upon what exactly those tools are and what names to give them is usually very hard. OTOH, I find that not having this vocabulary makes writing any code very tedious as one has to reinvent all these little wheels all the time.

Here's my own "tier-0" stdlib: https://github.com/luapower/low/blob/master/low.t -- it contains symbols for both Lua and Terra runtimes (some names even overlap, like assert() and print()). We could maybe use it as a starting point to decide what we want to include? I have one for Lua too, just for comparison: https://luapower.com/glue

Possible stuff that comes to mind as tire-1 libs:

@aiverson
Copy link
Collaborator

aiverson commented Jan 25, 2019

I think we should also have

  • Linked List (intrusive and extrusive or just extrusive?)
  • Basic parsing, serialization, and IO
    • Replacement for printf/scanf & friends
    • PEG or Pratt style metaprogrammed parser+serializer generator
  • Timing
  • Filter-Map-Reduce operators on iterators that are metaprogrammed for efficiency
  • Balanced binary trees
  • A flexible performance autotuner that can search parameter spaces for the fastest/most efficient version of a function.
  • Performance optimization metaprogramming tools.
  • Portable parallelism
  • Memory allocators suitable for use in various circumstances such as embedded, desktop, WASM, and optimization

Longer term, a nice library of recursion schemes and monadic tools would be helpful, but that is difficult to make immediately.

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

2 participants