Skip to content

salotz/scopes-newbs

Repository files navigation

Scopes Programming Language for Scripting Language Users (AKA newbs)

This guide is oriented mostly towards those coming from backgrounds primarily in scripting languages. I am personally heavily biased in Python rather than Lua or Ruby and this bias is obvious throughout.

It is organized as a series of levels of increasing complexity and difficuty. We start with the basics on about the same level of power as a language like Python and move onto more advanced language topics. I do not think it likely that you would feel that you would have a complete Python-like language after the first chapter since many of the more advanced structures in like classes are closer to C/C++ and so is deferred to those levels. Furthermore, the main incentive to use scopes lies not in simply building a better “blub” language and reinventing the Python/Lua/Ruby, C/C++/Rust, or Lisp/Scheme wheels, but in taking the core ideas of these languages and adding new and exciting features which are mostly novel, to my knowledge.

This is a work in progress as I myself learn the language. Currently Level 1 is mostly complete and quite thorough. The higher levels are much less so although the documents do contain some small snippets I have collected and may be of use until this guide becomes more polished.

Lastly there are a few typographical problems due to the use of org-mode. If you see some text wrapped in ‘~’ symbols that should be a code snippet. This might be fixed if I move to using a different format, but for now being able to execute code in org-mode source blocks results in higher quality content. So while there is an HTML rendered version in Github, I recommend reading it in an editor that understands org mode like Emacs.

That said feel free to contribute.

Table Of Contents

Level 0
Basics of the syntax format (Scopes List Notation (SLN)) and how best to execute Scopes code.
Level 1
Should bring you up to speed with the language basics and a fairly close equivalence to a scripting language like Python. The compilation/execution model is not clear at this point.
Level 2
Scopes features roughly equivalent with core C/C++ or Rust. Includes topics like arrays, constant vs. dynamic values, heap allocated data structures, type checking, and interfacing with C code.
Level 3
What it means for Scopes as a “Scheme-like” language beyond just the syntax. The main focus here is functional programming and some of the basic metaprogramming features.
Level 4
Novel Scopes features. Includes advanced metaprogramming, multi-stage programming, dynamic compilation, and achieving AOT compilation. Also covers the Scopes runtime API scopesrt and the borrow checker.

Official Resources

Homepage
http://scopes.rocks
Project Repository
https://hg.sr.ht/~duangle/scopes
Documentation
https://scopes.readthedocs.io/en/latest/

Helpful Links

Check out the scopes-lang topic on Github.

Some other interesting projects include:

Tukan Media Library & Visual Game Engine
https://hg.sr.ht/~duangle/tukan

Languages