• This repository has been archived on 15/Mar/2019
  • Stars
    star
    326
  • Rank 124,220 (Top 3 %)
  • Language
    Go
  • License
    BSD 3-Clause "New...
  • Created almost 11 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

a dynamically typed, garbage collected, embeddable programming language built with Go

The agora programming language

Agora is a dynamically typed, garbage collected, embeddable programming language. It is built with the Go programming language, and is meant to provide a syntactically similar, loose and dynamic companion to the statically typed, machine compiled Go language - somewhat like Lua is to C.

Installation

go get -t github.com/PuerkitoBio/agora/...

This will install the agora packages as well as the agora command-line tool. See agora -h for help, provided the $GOPATH/bin path is in your exported path. The -t flag installs the test dependencies, it works only on Go 1.2 and later, omit it otherwise.

Example

Much more examples are available in the wiki and the source code under /testdata/src, but to give a taste of the syntax, here is the mandatory hello world:

// Output: Hello, Agora !
fmt := import("fmt")
func greet(name) {
	fmt.Println("Hello,", name, "!")
}
greet("Agora")

A few things to note:

  • It looks very similar to Go, minus the types.
  • import is a built-in function, not a keyword. This is important with dynamically-loaded modules, it gives you control of where this overhead of loading and compiling the code is done. It returns the value exported by the module - in this case, an object that exposes methods like Println.
  • Obviously, since this is a dynamically-typed language, arguments have no types.
  • := introduces a new variable. Using an undefined variable is an error, so this statement could not have been =.
  • Statements are valid in the top-level (module) scope. That's because a module (the name for an agora file) is an implicit (top-level) function.
  • Semicolons are managed just like in Go, so although they are inserted in the scanning stage, they are optional (and usually omitted) in the source code.

Resources

Changelog

v0.2.0 / 2013-10-08

v0.1.0 / 2013-09-17

License

Agora is licensed under the BSD 3-Clause License, the same as the Go programming language. The full text of the license is available in the LICENSE file at the root of the repository.

More Repositories

1

pigeon

Command pigeon generates parsers in Go from a PEG grammar.
Go
804
star
2

martini-api-example

An example RESTful API application built with Martini.
Go
272
star
3

redisc

A Go redis cluster client built on top of redigo.
Go
228
star
4

trofaf

Super simple live static blog generator in Go. Vraiment trofaf.
CSS
130
star
5

express-boilerplate

Basic structure of a node.js web application with Express. Started out as a blog post about how to structure code in an Express web app (in French, see the URL below).
JavaScript
64
star
6

gocostmodel

Benchmarks of common basic operations for the Go language.
Go
61
star
7

juggler

Juggler: a websocket-based, redis-backed RPC and pub-sub server.
Go
61
star
8

specter

a (tiny) VM project built with Go
Go
59
star
9

ghost

Lego blocks for web servers.
Go
52
star
10

lune

A pure Go implementation of the Lua virtual machine.
Go
44
star
11

advice

Advice functional mixin based on Twitter's Angus Croll presentation (How we learned to stop worrying and love Javascript).
JavaScript
39
star
12

upstashdis

A Go client and a compatible server for local testing for the Upstash Redis REST API interface.
Go
21
star
13

gred

A pure Go concurrent implementation of the Redis server
Go
20
star
14

implement.js

Strong type-checking for dependency injection and method arguments.
JavaScript
20
star
15

Networking

Low-level Swift package for POSIX sockets and Epoll/Kqueue.
Swift
19
star
16

luashell

A small Lua module to help write what would be shell scripts in Lua. (mirror)
Lua
12
star
17

gocoro

Lua coroutine implementation in Go
Go
7
star
18

angular-gtd

An example app for Getting Things Done built with AngularJS.
JavaScript
6
star
19

tulip

Lua web framework based on lua-http and PostgreSQL. (mirror)
Lua
6
star
20

algo

Fundamental algorithms and data structures using Go generics.
Go
6
star
21

mainer

Package mainer defines types relevant to flag parsing and command entrypoint implementation.
Go
5
star
22

assnatapi

API pour exploiter les données de l'Assemblée nationale du Québec.
JavaScript
5
star
23

assnat

Extracteur des données du site de l'Assemblée Nationale du Québec, pour nourrir assnatapi.
JavaScript
4
star
24

swiftodo

iOS ToDo list tutorial in Swift
Swift
4
star
25

starstruct

Starlark to Go struct converter.
Go
3
star
26

httpcmw

Package httpcmw supports creating middleware chains for HTTP clients.
Go
3
star
27

runes

Command to print Unicode code point information.
Go
3
star
28

see-no-evil

Tiny callback cleaner library for node.js, so that error management gets out of the way.
JavaScript
2
star
29

setupjs

Personal setup for javascript frontend projects.
JavaScript
2
star
30

myvim

my vim setup
Vim Script
2
star
31

zzterm

Zero-allocation terminal input key and mouse decoder in Go (mirror).
Go
2
star
32

nitfind

ack-style finder in Nit, mostly to experiment with the language
Nit
2
star
33

httpmw

Package httpmw is a collection of bite-sized middleware with chaining support.
Go
2
star
34

luafn

Functional programming fundamentals for Lua. (mirror)
Lua
1
star
35

sendkeys

Simulate sending user input in a terminal (mirror).
Go
1
star
36

luasock99

Lua module for the socket99 C library. (mirror)
C
1
star
37

nenuphar

wip
Go
1
star
38

bookify

Make a book out of URLs, basically. Exploring node.js, express and socket.io along the way!
JavaScript
1
star
39

tcheck

Simple Lua module of sanity-checks for types (mirror)
Lua
1
star
40

0value

files for my 0value.com blog
HTML
1
star
41

Provok.in-issues

Issues repository for the Provok.in website.
1
star
42

exp

Go
1
star
43

xpgsql

Lua module providing a straightforward API to the luapgsql library. (mirror)
Lua
1
star
44

feedbuilder

JavaScript
1
star
45

mna.dev

Mirror of git.sr.ht/~mna/mna.dev
Go
1
star
46

vim-trefle

Vim syntax highlighting, filetype detection and indentation for trefle.
Vim Script
1
star
47

zzcsi

Control Sequence Introducer (CSI) functions for xterm-compatible terminals. (mirror)
Go
1
star
48

httpparms

Package httpparms provides helper functions and mechanisms to load the content of an HTTP request into a Go struct.
Go
1
star
49

ungeekenorbite

Blog exploratoire d'un geek qui découvre avec stupeur et tremblements le merveilleux monde des nouvelles technologies.
JavaScript
1
star