It's a clever hack but I'm not crazy about the inline CSS and JS in news.arc. I would just serve static files and as a bonus you'll get all the benefits of the CSS and JS modes of your text editor while editing the stuff. Perhaps pg just wanted to keep the arc dir tidy and doesn't actually do that on news.yc.
You can use git as a frontend to an svn repo but I haven't heard about doing it the other way. Because git is a superset of svn it may be possible but a quick search turns up nothing. Setting up cygwin is a snap. I am still a git noob. After an hour or two of reading you'll be able to use the git basics and after a few hours more reading you'll be able to use the basics and actually know wtf is going on underneath.
Me neither, but I gave it a shot. I use it and it works, there may be bugs though. Maybe an Emacs guru will be kind enough to point out the errors I may have introduced while adapting cmuscheme.el.
it's a good start. the bugs i see immediately are it lets you erase the prompt and the prompt appears when results are printed too. i might see if there is a way to solve these problems.
the latest changes in anarki for the --no-rl option fix the problem with the repeated prompt. so now it's just that the prompt can be deleted, which is a really minor issue.
If you get the git "wiki"[1] (open commit access) there are docstrings for many fns & macros, and the docs can be accessed from the repl using (help <name>), fns matching a prefix can be listed, e.g. (fns "m").
As a bonus, if you fire up (asv) and browse to http://localhost:8080/help there's some online help that links the bracketed "see also" [[names]] in the docstrings to their documentation.
You just do your own separation of logic & design, using Arc as the template language. I know it sounds PHP-esque but in practice it seems rather elegant so far.
e.g.
;; the controller-ish part
(defop problems req
(display-probs (get-user req)))
;; the view-ish fn
(def display-probs (u)
(mypage ; a layout-ish macro
(each id (keys probs*) (display-prob u (probs* id)))))
;; a partial-ish fn
(def display-prob (u p)
(tag (div class "prob")
(tag (span class "pid") (pr (p 'id) "."))
(tag (span class "text") (pr (p 'text)))
(tag (div class "links")
(let bar* " • "
(w/bars
(link "details"
(string "http://someurl/foo?bar=1&id=" (p 'id)))
(link "solve" (newsolnlink (p 'id)))
(link "solutions" (solnlink 'p (p 'id))))))))
This is great, thank you. If I have to wait any time I get antsy so I changed the interval to 3s. I also changed map to each and got rid of the "* redefining foo" noise.
(def reload-check (paths (o mtimes (table)))
(sleep 3)
(each p paths
(if (no (mtimes p))
(= (mtimes p) (mtime p))
(isnt (mtimes p) (mtime p))
(do
(= (mtimes p) (mtime p))
(tostring (load p)))))
(reload-check paths mtimes))