summary refs log tree commit diff stats
path: root/compiler/pragmas.nim
<
# Teliva - an environment for end-user programming

> &ldquo;Enable all people to modify the software they use in the course of using it.&rdquo;
> &mdash; https://futureofcoding.org/episodes/033.html

> &ldquo;What if we, and all computer users, could reach in and modify our favorite apps?&rdquo;
> &mdash; https://www.inkandswitch.com/end-user-programming

> &ldquo;Software must be as easy to change as it is to use.&rdquo;
> &mdash; https://malleable.systems

## What's this, then?

An extremely naïve, [brutalist](https://en.wikipedia.org/wiki/Brutalist_architecture)
attempt at packaging up simple [Lua](http://www.lua.org) apps with almost all
the stuff needed to edit and build them. You will need some Unix-like
platform[1] with a C compiler and the ncurses and openssl libraries.

Here's how you run one of the example apps (the [Tower of Hanoi](https://en.wikipedia.org/wiki/Tower_of_Hanoi)):

```
git clone https://github.com/akkartik/teliva
cd teliva
make linux
src/teliva hanoi.tlv
```

<img alt='screenshot of Teliva running the Towers of Hanoi' src='doc/hanoi.png'>

No matter what app you run, you are always guaranteed access to a single
obvious, consistent way (currently the hotkey `ctrl-e`) to edit its sources.
And to run the updates after editing. ([video](https://archive.org/details/akkartik-2021-11-14))

[1] Tested so far on Linux, Mac OS X and OpenBSD; should also work on other
flavors of BSD, WSL on Windows, etc. with only minor modifications.

## Isn't this just an IDE?

There's one big difference: these apps are not intended to be runnable outside
of the Teliva environment. Editing the sources will always be a core feature
that's front and center in the UI.

A second, more subtle difference: it's primarily an environment for _running_
apps, and only secondarily for editing them. Starting up the environment puts
you in a running app by default. Creating an app from a clean slate is a
low-priority use case, as is lots of specialized support for developing
complex apps. The sweet spot for Teliva is simple apps that people will want
to edit after using for a while.

## Why Lua?

It's reputedly the fastest interpreted language per line of implementation
code.

## Will it run any Lua program?

Not quite. My priority is providing a good experience for newcomers to
comprehend and modify the programs they use. If it's not clear how to provide
that experience for some kinds of Lua programs, I'd rather disable support for
them in Teliva and let people use regular Lua. Or other platforms!

- This approach doesn't make sense for batch programs, I think. I also don't
  yet have a good story for building server 16-08-16
Commit message (Collapse)AuthorAgeFilesLines
* distinguish between 'reorder' and 'noforward'Andreas Rumpf2017-07-261-4/+5
|
* fixes #5846Andreas Rumpf2017-06-291-2/+3
|
* proper error reporting for concepts and the introduction of the {.explain.} ↵Zahary Karadjov2017-03-241-2/+4
| | | | pragma
* fixes #5529; don't merge type visibility flagsAraq2017-03-141-1/+1
|
* removed compiler internal list implementation (#5371)Arne Döring2017-02-221-19/+16
|
* Enabled explicitly unknown lock levels (#5409)Fabian Keller2017-02-201-1/+7
| | | | | | | * enabled explicitly unknown lock levels * allowing "unknown" as locks pragma * added test case for locks pragma * updated docs on locks pragma
* new feature: .used pragma to suppress declared-but-not-used warning1-0/+2
|/
* fixes a regression involving the .compile and .link pragmasAndreas Rumpf2016-08-051-1/+3
|
* fixes #4555Andreas Rumpf2016-08-021-2/+2
|
* stdlib and compiler don't use .immediate anymoreAndreas Rumpf2016-07-291-1/+4
|
* .base pragma works for generic methodsAndreas Rumpf2016-07-281-1/+1
|
* Fix typo. Remove unnecessary procJeff Ciesielski2016-07-051-1/+1
|
* Plumb {.intdefine.} and {.strdefine.} pragmas.Jeff Ciesielski2016-07-041-1/+6
| | | | Shorthand so that users won't need to use the .magic pragma
* fixes #1262Andreas Rumpf2016-05-311-10/+12
|
* Fix issue #4001: invalid pragma {. hint[]: off .}Andrei Formiga2016-05-271-0/+1
| | | | | | | | | | | | | | | The bug was in processNote, module pragmas. The code assumed that a nkBracketExpr AST node always had two children (without testing this), and tried to access elements with index 0 and 1 in the sons array of the nkBracketExpr node. The code that triggered the bug was just {. hint[]: off .} by itself in a module; in this case the nkBracketExpr has only one children in the sons array, so the code in processNote caused an out-of-bounds array access. This commit also adds a test to guarantee that this pragma is rejected, as is.
* fixes #3646Andreas Rumpf2016-04-041-2/+3
|
* first version of .partial objectsAndreas Rumpf2016-02-281-1/+10
|
* added experimental .this pragmaAndreas Rumpf2016-02-281-1/+6
|
* Dont warn about unused symbol if its used in emitYuriy Glukhov2016-02-151-0/+1
|
* added undocumented exportNims pragma for Nimscript supportAraq2015-10-031-7/+11
|
* implement bitsize pragma for bitfieldsAman Gupta2015-09-281-1/+6
|
* fixes #2590; methods now require a .base annotationAraq2015-09-061-1/+4
|
* Merge branch 'devel' into coroutinesrku2015-08-201-271/+273
|\
| * fixes #3171Araq2015-08-021-271/+273
| |
* | {.compile.} pragma accepts paths relative to file pragma is in.rku2015-07-311-0/+2
|/
* small steps for making --symbolFiles:on work againAraq2015-07-201-1/+2
|
* Introduce {.noRewrite.} expr pragma disabling TRAdam Strzelecki2015-06-021-1/+3
| | | | | | | | | | | | | | Term rewriting macros/templates are currently greedy and they will rewrite as long as there is a match. So there was no way to ensure some rewrite happens only once, eg. when rewriting term to same term plus extra content. With new macro we can actually prevent further rewriting on marked expr or stmts, eg. with given example echo(...) will be rewritten just once: template pwnEcho{echo(x)}(x: expr) = {.noRewrite.}: echo("pwned!") echo "ab"
* implements .goto support for variablesAraq2015-04-191-1/+6
|
* Get rid of deprecation warningsdef2015-04-071-3/+3
|
* Merge pull request #2428 from arnetheduck/comp-lib-ropesAndreas Rumpf2015-04-061-1/+1
|\ | | | | Comp lib ropes
| * compiler_ropes: ropeToStr -> $Jacek Sieka2015-04-011-1/+1
| |
* | better error message for implicit pragmasAraq2015-04-041-0/+2
|/
* 'constructor' pragma for C++ supportAraq2015-03-181-2/+5
|
* don't generate memset calls for C++ objectsAraq2015-03-181-129/+129
|