GithubHelp home page GithubHelp logo

rdr8 / anarki Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arclanguage/anarki

0.0 2.0 0.0 2.63 MB

Community-managed fork of the Arc dialect of Lisp; for commit privileges submit a pull request.

Home Page: http://arclanguage.github.io

License: MIT License

Scheme 9.77% Arc 72.84% Perl 6 4.76% Batchfile 0.13% Shell 0.51% Emacs Lisp 4.74% Vim Script 3.09% Python 0.43% Prolog 0.16% XSLT 0.43% Racket 0.73% Terra 0.59% Perl 1.81%

anarki's Introduction

Anarki

Travis build

Anarki: a publicly modifiable 'wiki-like' fork of Arc Lisp (http://www.paulgraham.com/arc.html)

The intention is to be extremely permissive in accepting patches. For commit privileges, just submit your first pull request or ask on http://arclanguage.org/forum.

Installation

Warning: If you are already running a HN-like site, migrating to this fork might mess up your site's data. Come talk to us first, and be sure to make a backup before the migration.

To run, install Racket (v6.8 or later) from http://racket-lang.org, then:

$ git clone http://github.com/arclanguage/anarki
$ cd anarki
$ ./arc.sh  # interactive repl
arc> (quit)
$

Tests:

Anarki has thorough automated tests. To run them, install Mercurial, then:

# start in the anarki directory
$ hg clone https://bitbucket.org/zck/unit-test.arc
$ ./arc.sh
arc> (load "tests.arc")

Anarki is explicitly not constrained to maintain compatibility with upstream releases, and compatibility status may swing wildly from commit to commit depending on who takes an interest. To see a list of what's different, type (incompatibilities) at the repl. If you make an incompatible change, please update this list.

If you run into trouble: http://sites.google.com/site/arclanguagewiki; http://arclanguage.org/forum

Documentation

https://arclanguage.github.io/ref/

Racket interop

Racket expressions can be evaluated with the ($ ...) syntax. For instance, (($ crypto-random-bytes) 16) obtains the crypto-random-bytes function from Racket and makes a call to it.

If you write lots of Racket code and you just want to use Anarki for part of a bigger project, you can raco pkg install anarki and use Anarki to write Racket modules:

#lang anarki
(:provide function-for-use-in-racket)

(= racket-import ($.dynamic-require ...))
(load "relative/path.arc")

(def utility-for-use-in-racket (x)
  (* x (racket-import x))

Note that Anarki does not have private module scopes; the (:provide ...) section is just there to make it easy to require an Anarki-based library from Racket.


Hacker News Site

Anarki comes bundled with a Hacker News style app. To run the HN server, first pick your (the admin's) username:

$ mkdir www
$ echo __username__ > www/admins

You can have multiple admins. Add them all to www/admins, separated by whitespace.

By clicking on the domain name of a submitted link admins may tag the domain. The color of a domain name indicates its tag:

  • gray default
  • darkred ignore
  • darkblue kill

The HN server will use the openssl command. If you're on Windows, first install OpenSSL and make sure it's on your PATH. Other systems should be distributed with OpenSSL already.

Now bring up the server:

$ ./run-news

There'll be a pause while the server loads up, with some messages, then you'll see the 'arc> ' prompt.

Go to http://localhost:8080. Click on login, and create the account for your username. You should now be logged in as an admin.

Don't worry about "user break" or "error writing" messages.

To customize News, change the variables at the top of lib/news.arc. To change the port your server runs at, modify lib/run-news.arc.

Any interactive changes to the prompt will be reflected immediately in the server, without needing to restart it. Don't forget to add them to the .arc files as appropriate, otherwise they'll be lost when you stop the server or it dies for some reason.

anarki's People

Contributors

acieroid avatar akkartik avatar alimoeeny avatar awwx avatar axiak avatar blackstag avatar brandonbloom avatar brianru avatar camden-smallwood avatar dijonkitchen avatar dram avatar eikes avatar hasenj avatar hjek avatar huetsch avatar jazzdev avatar kinnardian avatar malisper avatar nex3 avatar oscar-belletti avatar prozion avatar rntz avatar rocketnia avatar shader avatar shirriff avatar svetlyak40wt avatar twilightsentry avatar waterhouse avatar womble avatar zck avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.