Skip to content

breck7/scrollsdk

Repository files navigation

import header.scroll
permalink index.html
title ScrollSDK: software for building on Scroll
startColumns 4
import ciBadges.scroll

# Links
Scroll Homepage
 https://scroll.pub
Scroll Notation Sandbox
 https://sdk.scroll.pub/sandbox
Scroll Designer
 https://sdk.scroll.pub/designer
ScrollSDK
 https://github.com/breck7/scrollsdk
Scroll Notation Homepage
 https://notation.scroll.pub
Scroll Notation FAQ
 https://faq.scroll.pub
SDK Release Notes
 https://sdk.scroll.pub/releaseNotes.html
Scroll Subreddit
 https://reddit.com/r/treenotation
Ohayo - A data science studio powered by Scroll Notation
 https://github.com/breck7/ohayo
ScrollSDK UnitTests
 https://sdk.scroll.pub/sandbox/test.html
ScrollSDK PerfTests
 https://sdk.scroll.pub/sandbox/perfTests.html

? Who is this package built for?
The ScrollSDK is for people who want to build on top of Scroll.

? How do I build Scroll Parsers?
You can try the Grammar tutorial.
 link grammarTutorial.html Grammar tutorial

# Writing Scroll Parsers
The ScrollSDK contains a language for building Scroll Parsers temporarily called "Grammar". You can write new Grammar files to extend your version of Scroll. By creating ScrollParsers with Grammar file you get a parser, a type checker, syntax highlighting, autocomplete, a compiler, and virtual machine for executing your version of Scroll. The ScrollSDK also includes a simple web IDE for writing Scroll Parsers called Scroll Designer.
 https://sdk.scroll.pub/designer Scroll Designer

At this point in time, to make your Scroll Parsers do very useful things, you also need to use another language that you know. The ScrollSDK lets you create new languages using just Scroll or Scroll + Javascript. Scroll Parsers can include code from any programming language, not just Javascript. Though at the moment only Scroll + Javascript is supported by Breck's Lab.
 https://breckyunits.com/lab.html Breck's Lab

# Using the ScrollSDK

## Try on a virtual machine
- Open https://gitpod.io/#https://github.com/breck7/scrollsdk
- Run:
code
 npm install -g ts-node
 npm install .
 npm run test

The ScrollSDK currently includes a number of libraries and apps to use (scripts in the "products" folder).

# Basic Scroll Notation library for npm projects:
code
 // Currently still called TreeNode, but will be renamed ScrollNode in a future update.
 const {TreeNode} = require("scrollsdk/products/TreeNode.js")
 const tree = new TreeNode("hello world")
 console.log(tree.asString)

# Basic Scroll Notation Library + Grammar for the browser:
code
 <script src="../../products/Utils.browser.js"></script>
 <script src="../../products/TreeNode.browser.js"></script>
 <script src="../../products/GrammarLanguage.browser.js"></script>

## Scroll Notation Sandbox web app for exploring base Scroll Notation
code
 npm install .
 npm run local
 open http://localhost:3333/

## Scroll Designer web app for building new Scroll Parsers
code
 npm install .
 npm run local
 open http://localhost:3333/designer

##  Build Tools
If you look at the source, you will also see a set of build tools (such as Builder and TypeScriptRewriter). These are currently undocumented and not recommended for external use.

## Building all tools and running tests
code
 npm run build
 npm test

# Monorepo
The ScrollSDK is a monorepo. With on average over 1 major version released each month for the past 2.5 years, it would take a lot of overhead to constantly be updating 10+ different repositories and modules every month. Once we're more confident in the theory and best practices, it might make sense to break this repo into independent modules.
That being said, we despise unnecessary dependencies as much as anyone. If anyone wants to create some automated submodules built from the projects in this monorepo, to allow for consuming of a smaller subset of the code and dependencies in this module, feel free to do so.

## Visualization of the code base
 https://mango-dune-07a8b7110.1.azurestaticapps.net/?repo=breck7%2Fscrollsdk Visualization
image images/diagram.svg

# Development Status
All breaking changes are mentioned in the releaseNotes. We follow semantic versioning, so breaking changes should not happen if you stay on the same major version.
 link releaseNotes.html releaseNotes

# Scroll Notation Libraries in Other Languages
If you build a Scroll Notation library/SDK in another language, let us know and we'll add a link.

If you are working on a Scroll Notation library in a new host language, feel free to post an issue or ask for help in the  Scroll subreddit.
 https://reddit.com/r/scroll-lang subreddit

## How to bump versions
code
 npm run updateVersion NEW_NUMBER

# Former Name
Scroll Notation was originally called Tree Notation. Scroll is the name of combined languages which were previously called Grammar and Scrolldown.

# Alternatives Considered
This is the first Scroll library in existence, so there were no alternative implementations. Note and Space were predecessors to Scroll Notation. If a better alternative low level notation to Scroll Notation is possible, it has yet to be discovered.

All that said, the important part of this repo is not the code but the design patterns. Scroll Notation is very simple, and you can implement the patterns contained here in your own code without using this library. In fact, that is often the best way to use Scroll Notation!

## Editing in Sublime Text
It is helpful to set `"goto_anything_exclude_gitignore": true` to ignore files in gitignore. Read more here.
 https://breckyunits.com/code/my-sublime-setttings.html here

# ❤️ Public Domain ❤️

import footer.scroll