Jay Taylor's notes

back to listing index

laarc/laarc: https://www.laarc.io/

[web search]
Original source (github.com)
Tags: programming-languages paul-graham hackernews arc github.com
Clipped on: 2020-02-05

Skip to content
Image (Asset 1/4) alt= You have unread notifications
Arc Scheme C++ JavaScript CSS C Other
Branch: master
New pull request
Clone or download
Image (Asset 3/4) alt= bin Add bin/arc.cmd and bin/laarc.cmd 12 months ago src/bcrypt Update bcrypt to compile on windows 12 months ago static Ellipsize comment urls using css 12 months ago .gitignore Update traffic plot scripts 12 months ago README.md Update traffic plot scripts 12 months ago ac.scm Disable SYSTEM on Windows for now 12 months ago algolia.arc Add algolia library 12 months ago app.arc Fix occasional login problem 12 months ago arc.arc Define and use RANDB; make RAND-STRING work on Windows 12 months ago arc.scm Make ac.scm reloadable 12 months ago as.scm Update to racket language 12 months ago blog.arc Switch ^ to OR= 12 months ago brackets.scm arc3.2.tar 15 months ago code.arc Update ACCUM 12 months ago colors.arc Add a debugger 12 months ago copyright MIT license per pg 15 months ago dbg.arc Switch ^ to OR= 12 months ago firebase.arc Add firebase API 13 months ago git.arc Define git utilities in git.arc 13 months ago glob.arc Update GLOB to remove the cwd from each result 12 months ago html.arc Add some default html attributes 12 months ago libs.arc Add glob.arc 12 months ago ln.scm Use eval-syntax 12 months ago make.cmd Update bcrypt to compile on windows 12 months ago makefile Define BCRYPT (#1) 14 months ago makefile.bat Add makefile.bat 12 months ago news.arc news.arc: Add a link at the bottom of the page to the site source code. 11 months ago package.json 1.0.8 13 months ago pprint.arc Switch ^ to OR= 12 months ago prompt.arc Define REPL-HISTORY-MAX* 12 months ago srv.arc Define and use STATIC-SRC 12 months ago strings.arc Optimize LINES 12 months ago test.arc Switch ^ to OR= 12 months ago


To run laarc

git clone http://github.com/laarc/laarc
cd laarc
mkdir arc
echo "myname" > arc/admins
NOISY=1 DEV=1 rlwrap bin/arc # rlwrap is optional

at the arc prompt:

((load "news.arc"))

go to http://localhost:8080

click on login, and create an account called myname

you should now be logged in as an admin

To customize News

change the variables at the top of news.arc

To improve performance

(= static-max-age* 7200)    ; browsers can cache static files for 7200 sec

(declare 'direct-calls t)   ; you promise not to redefine fns as tables

(declare 'explicit-flush t) ; you take responsibility for flushing output
                            ; (all existing news code already does)

Production installation

# some prereqs
sudo pkg install racket shuf rlwrap

# prereqs for plotting traffic graphs
sudo pkg install moreutils # sponge
sudo pkg install gnuplot

# for email
sudo pkg install python # then install pip
sudo pip install --upgrade google-api-python-client oauth2client

# PULL=10 means `git pull` every 10 seconds
PULL=10 FLUSH=nil bin/laarc