Skip to content

Commit

Permalink
Merge pull request #545 from masak/masak/rename-alma
Browse files Browse the repository at this point in the history
Rename the language
  • Loading branch information
Carl Mäsak committed Aug 25, 2019
2 parents eb4e1d9 + 053450a commit a31aafc
Show file tree
Hide file tree
Showing 119 changed files with 580 additions and 579 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ sudo: false
perl6:
- latest
env:
- FLAG_007_REGEX=1 FLAG_007_CLASS=1
- FLAG_ALMA_REGEX=1 FLAG_ALMA_CLASS=1
30 changes: 15 additions & 15 deletions META6.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"name" : "007",
"name" : "Alma",
"perl" : "6.c",
"version" : "*",
"auth" : "github:masak",
"description" : "Small experimental language with a license to macro",
"depends" : [],
"license" : "Artistic-2.0",
"provides" : {
"_007" : "lib/_007.pm6",
"_007::Backend::JavaScript" : "lib/_007/Backend/JavaScript.pm6",
"_007::Equal" : "lib/_007/Equal.pm6",
"_007::Linter" : "lib/_007/Linter.pm6",
"_007::OpScope" : "lib/_007/OpScope.pm6",
"_007::Parser" : "lib/_007/Parser.pm6",
"_007::Parser::Actions" : "lib/_007/Parser/Actions.pm6",
"_007::Parser::Syntax" : "lib/_007/Parser/Syntax.pm6",
"_007::Precedence" : "lib/_007/Precedence.pm6",
"_007::Q" : "lib/_007/Q.pm6",
"_007::Runtime" : "lib/_007/Runtime.pm6",
"_007::Builtins" : "lib/_007/Builtins.pm6",
"_007::Test" : "lib/_007/Test.pm6",
"_007::Val" : "lib/_007/Val.pm6"
"Alma" : "lib/Alma.pm6",
"Alma::Builtins" : "lib/Alma/Builtins.pm6",
"Alma::Backend::JavaScript" : "lib/Alma/Backend/JavaScript.pm6",
"Alma::Equal" : "lib/Alma/Equal.pm6",
"Alma::Linter" : "lib/Alma/Linter.pm6",
"Alma::OpScope" : "lib/Alma/OpScope.pm6",
"Alma::Parser" : "lib/Alma/Parser.pm6",
"Alma::Parser::Actions" : "lib/Alma/Parser/Actions.pm6",
"Alma::Parser::Syntax" : "lib/Alma/Parser/Syntax.pm6",
"Alma::Precedence" : "lib/Alma/Precedence.pm6",
"Alma::Q" : "lib/Alma/Q.pm6",
"Alma::Runtime" : "lib/Alma/Runtime.pm6",
"Alma::Test" : "lib/Alma/Test.pm6",
"Alma::Val" : "lib/Alma/Val.pm6"
},
"support" : { "source" : "git://github.com/masak/007.git" }
}
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# 007 [![Build Status](https://secure.travis-ci.org/masak/007.svg?branch=master)](http://travis-ci.org/masak/007)
# Alma [![Build Status](https://secure.travis-ci.org/masak/007.svg?branch=master)](http://travis-ci.org/masak/007)

007 is a small language created as a testbed for Perl 6 macros. Its goal as a
Alma is a small language created as a testbed for Perl 6 macros. Its goal as a
language is to inform the implementation of macros in Perl 6, by means of being
a faster-moving code base and easier to iterate on towards good solutions.

Rakudo already contains a rudimentary implementation of macros, but at this
point the most mature macro implementation for Perl 6 is embodied in 007.
point the most mature macro implementation for Perl 6 is embodied in Alma.

The name "007" was chosen because the data type representing program fragments
is called `Q`.
Alma was previously known as "007", in reference to the "Q" data structure
which represents program fragments.

## Get it

If you're just planning to be a 007 end user, `zef` is the recommended way to
install 007:
If you're just planning to be a Alma end user, `zef` is the recommended way to
install Alma:

```sh
zef install 007
zef install alma
```

(If you want to install from source, see [the
Expand All @@ -27,34 +27,34 @@ documentation](http://masak.github.io/007/#installation-from-source).)
Now this should work:

```sh
$ 007 -e='say("OH HAI")'
$ alma -e='say("OH HAI")'
OH HAI

$ 007 examples/format.007
$ alma examples/format.alma
abracadabra
foo{1}bar
```

## Status

007 is currently in development.
Alma is currently in development.

The explicit goal is to reach some level of feature completeness for macros in
007, and then to backport that solution to Rakudo.
Alma, and then to backport that solution to Rakudo.

## Useful links

* [Documentation](http://masak.github.io/007/) (🔧 under construction 🔧 )
* [examples/ directory](https://github.com/masak/007/tree/master/examples)
* The [Roadmap](https://github.com/masak/007/blob/master/ROADMAP.md) outlines short- and long-term goals of the 007 project
* The [Roadmap](https://github.com/masak/007/blob/master/ROADMAP.md) outlines short- and long-term goals of the Alma project

To learn more about macros:

* [Hague grant application: Implementation of Macros in Rakudo](http://news.perlfoundation.org/2011/09/hague-grant-application-implem.html)
* [Macros progress report: after a long break](http://strangelyconsistent.org/blog/macros-progress-report-after-a-long-break)
* [Macros: what the FAQ are they?](http://strangelyconsistent.org/blog/macros-what-the-faq-are-they)

To learn more about 007:
To learn more about Alma:

* [Double oh seven](http://strangelyconsistent.org/blog/double-oh-seven) blog post
* [Has it been three years?](http://strangelyconsistent.org/blog/has-it-been-three-years) blog post
Expand Down
20 changes: 10 additions & 10 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Stability and backwards compatibility stand in conflict with the need to
iterate on ideas and replace newly discovered better ideas with old
worse ideas.

007 is still a v0.x.x product. There are no guarantees about backwards
Alma is still a v0.x.x product. There are no guarantees about backwards
compatibility, as the need for inwards fluidity exceeds the need for
outwards stability.

Expand Down Expand Up @@ -54,15 +54,15 @@ ordering. That's what this roadmap is for.
## `is parsed` macros

After most of the rest of the roadmap was written, one issue in particular
emerged as setting the agenda for what needs to be done short-term with 007:
[#194](https://github.com/masak/007/issues/194). It has proved to be important because it re-focuses 007 to get useful
emerged as setting the agenda for what needs to be done short-term with Alma:
[#194](https://github.com/masak/007/issues/194). It has proved to be important because it re-focuses Alma to get useful
and usable macros ASAP.

Most of those were mentioned above, but here are the ones that require some
form of `is parsed` mechanism, the underpinnings of which has a slightly more
uncertain time plan:

* Reduction metaoperator, such as `[+](1, 2, 3)`. In 007, the `[+]` would
* Reduction metaoperator, such as `[+](1, 2, 3)`. In Alma, the `[+]` would
parse into a code-generated anonymous subroutine. This one is interesting
for two reasons. It *really* uses closures and hygiene all-out.
([#176](https://github.com/masak/007/issues/176))
Expand All @@ -83,13 +83,13 @@ uncertain time plan:

## Pre-v1.0.0

Work on 007 falls into two main tracks:
Work on Alma falls into two main tracks:

* Features that help explore macro-like things (ultimately for Perl 6)
* Features for 007 the language (ultimately for 007)
* Features for Alma the language (ultimately for Alma)

The first track is still the *raison d'être* for 007. The second track rounds
007 off as a nicer tool to work with.
The first track was the *raison d'être* for 007. The second track rounds
Alma off as a nicer tool to work with.

See also the [Reach Hacker News
completeness](https://github.com/masak/007/issues/335) issue, which outlines
Expand Down Expand Up @@ -141,9 +141,9 @@ expected areas of focus after v1.0.0.
* [007 parser in 007](https://github.com/masak/007/issues/38)
* [syntax macros](https://github.com/masak/007/issues/80)

Two things would be worthy enough to produce a v2.0.0 version. Either 007 being
Two things would be worthy enough to produce a v2.0.0 version. Either Alma being
bootstrapping enough to have both a runtime and a parser written in itself; or
007 having all three of regular macros, syntax macros, and visitor macros.
Alma having all three of regular macros, syntax macros, and contextual macros.

## Various protocols

Expand Down
22 changes: 11 additions & 11 deletions bin/007 → bin/alma
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env perl6
use v6;
use _007;
use _007::Backend::JavaScript;
use Alma;
use Alma::Backend::JavaScript;

class Ref {
has Str $.deref;
Expand All @@ -14,18 +14,18 @@ sub ref($deref) {
constant %BACKENDS = hash
"default" => ref("runtime"),
"runtime" => { $^runtime.run($^ast) },
"javascript" => -> $ast, $ { print _007::Backend::JavaScript.new.emit($ast) },
"javascript" => -> $ast, $ { print Alma::Backend::JavaScript.new.emit($ast) },
"js" => ref("javascript"),
"ast" => -> $ast, $ { say ~$ast },
"unexpanded-ast" => -> $ast, $ { say ~$ast },
;

constant $REPL_PROGRAM = q:to/./;
use _007;
my $runtime = _007.runtime;
use Alma;
my $runtime = Alma.runtime;
while defined my $program = prompt "> " {
my $ast = _007.parser(:$runtime).parse($program);
my $ast = Alma.parser(:$runtime).parse($program);
$runtime.run($ast);
CATCH {
default {
Expand All @@ -35,15 +35,15 @@ constant $REPL_PROGRAM = q:to/./;
}
.

sub run_007($program, Str $backend is copy, @arguments) {
sub run-alma($program, Str $backend is copy, @arguments) {
die "Unknown backend '$backend'"
unless %BACKENDS{$backend} :exists;
$backend = %BACKENDS{$backend}.deref
while %BACKENDS{$backend} ~~ Ref;

my $runtime = _007.runtime(:@arguments);
my $runtime = Alma.runtime(:@arguments);
my $unexpanded = $backend eq "unexpanded-ast";
my $ast = _007.parser(:$runtime).parse($program, :$unexpanded);
my $ast = Alma.parser(:$runtime).parse($program, :$unexpanded);
%BACKENDS{$backend}($ast, $runtime);
exit($runtime.exit-code);
}
Expand All @@ -59,9 +59,9 @@ multi MAIN(Str :$backend = "default") {
}

multi MAIN($path, Str :$backend = "default", *@arguments) {
run_007(slurp($path), $backend, @arguments);
run-alma(slurp($path), $backend, @arguments);
}

multi MAIN(Str :e($program)!, Str :$backend = "default", *@arguments) {
run_007($program, $backend, @arguments);
run-alma($program, $backend, @arguments);
}
4 changes: 2 additions & 2 deletions bin/lint-007 → bin/lint-alma
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env perl6
use v6;
use _007;
use Alma;

multi MAIN($path, Bool :$lint!) {
my $program = slurp($path);
for _007.linter.lint($program) -> $complaint {
for Alma.linter.lint($program) -> $complaint {
say "line N, column N: $complaint.message()";
}
}

0 comments on commit a31aafc

Please sign in to comment.