I managed to run arc-news, thanks to all your help.
After running it, I have a few more questions, I hope you aren't frustrated with me yet :)
1. What is the difference between "racket -m -f" (this one doesn't work, but used to work with mzscheme) and just "racket -f"? The manpage asks to visit the webpage and i went to this page to look for help, but I dont seem to be able to locate it: http://docs.racket-lang.org/guide/racket.html
2. In the arc prompt, after loading "news.arc", I would like to run the news server on a different thread, eg: "(= app (thread (nsv)))" (read on the web), but it doesnt return me the arc prompt.
3. Just to test what happens under increased load, I went to localhost:8080 and repeatedly hit the refresh button on my browser. After many repeated refreshes, the news page was no longer served. Here's what was happening in the arc screen: http://pastebin.com/TcBa2SuM and here's the tail of logs/srv-* file: http://pastebin.com/Xiym77sR (i wonder who the strange user 0PgEaESj is :))
How can I configure arc to continue working under heavy load (maybe by denying requests only from the client that's flooding)?
Hi,
Thanks a lot to your earlier comment, about running "racket -f as.scm"- I found out that racket couldnt be located by the system. Something must be unclear with the description of Ubuntu/Debian packages- I got an impression that "plt-scheme" contained racket. I manually installed racket by downloading from here: http://racket-lang.org/download/ .
I must have done some mistake then. I admit that I didnt see akkartik's link before posting that reply. I think my downloaded files are older than October- the directory has a timestamp from October and the ac.scm file has a timestamp from August 2009. The diff is here: http://pastebin.com/BLp6p69v
Yes, I would like to use something that works, and something that is as latest as possible :) I seem to be using Racket (in the form of plt-scheme) and it seems to work for an older version of arc. The point of my question was if I needed to do something to keep up with the changes made in Arc.
Hi Markkat, thank you very much for your detailed reply. If you don't mind, I'd like to ask more questions.
- If I want to start hacking into the news code, is news.arc the only file I start with? I would also like to change the css, make email field compulsory, send email confirmation and so on. If you could show me some direction, it would be very helpful.
- by integration with other services, I mean allowing likes, +1, commenting, log-in etc. I think I will have to look into the code to start understanding this more, so it is related to the above point.
- about identifying video URLs- how would you recommend expanding something like, say a bit.ly link?
- Yes, I haven't done anything with the code yet because it looks a little unfamiliar at this point. But I'd love to.
I see some changes in in as.scm and ac.scm (esp the one that is being reported in the error message).
The debian package description of racket (http://packages.debian.org/sid/racket) says that the package was previously plt-scheme. So, I seem to be using it :(
The debian package description of racket (http://packages.debian.org/sid/racket) says that the package was previously plt-scheme. So, I seem to be using it :(
which package provides racket in Ubuntu/Debian systems? I am running the October version on a Debian 6 system and it is running fine. apt-cache search racket returns no relevant package.
Sorry if I'm hijacking the discussion. Also sorry if i am asking too many questions.
I am also working on creating a discussion forum based on arc news. I have programming and web development experience but none with arc or list-like languages. I saw hubski's site and liked it a lot. I have some specific questions:
- like the OP asked, how difficult would it be to add open-id, facebook, twitter, g+ integration?
- how does hubski distinguish text submissions vs videos and so on? How do I group/categorize all of them?
- how do I add tags to submissions or allow admins to add tags?
- how do i decrease the karma required to downvote?
- how do i mimic HN's job page, ie: no name of the poster and no comment field- just link and text. How to group all such posts?
Thanks for your detailed response. I have a development background - mostly scripting on mainframe systems, but no web development experience. The HN format seems so clean and simple I figured there would be a lot of support for it somewhere even if it is not written in ARC in the same way that Digg has a bunch of open source options for someone who wants to 'clone' the site. Yes site administration would be a big consideration for me too - Is HN as simple on the backend for the admin as it is for users on the front end. If developing and deploying the site turns out to be out of my depth I would gladly outsource it to someone else but knowing where to start in terms of what open source options are out there that are currently closest to the goal of what I want to achieve comes first. The PHP bbs wont work for me. So, still looking...
$c declares the constants;
$v declares the variables;
$f are floating hypotheses, used to give types to variables;
$a are axiomatic assertions;
$p are provable assertions.
demo.mm's content is:
$( demo0.mm 1-Jan-04 $)
$(
PUBLIC DOMAIN DEDICATION
This file is placed in the public domain per the Creative Commons Public
Domain Dedication. http://creativecommons.org/licenses/publicdomain/
Norman Megill - email: nm at alum.mit.edu
$)
$( This file is the introductory formal system example described
in Chapter 2 of the Meamath book. $)
$( Declare the constant symbols we will use $)
$c 0 + = -> ( ) term wff |- $.
$( Declare the metavariables we will use $)
$v t r s P Q $.
$( Specify properties of the metavariables $)
tt $f term t $.
tr $f term r $.
ts $f term s $.
wp $f wff P $.
wq $f wff Q $.
$( Define "term" (part 1) $)
tze $a term 0 $.
$( Define "term" (part 2) $)
tpl $a term ( t + r ) $.
$( Define "wff" (part 1) $)
weq $a wff t = r $.
$( Define "wff" (part 2) $)
wim $a wff ( P -> Q ) $.
$( State axiom a1 $)
a1 $a |- ( t = r -> ( t = s -> r = s ) ) $.
$( State axiom a2 $)
a2 $a |- ( t + 0 ) = t $.
${
min $e |- P $.
maj $e |- ( P -> Q ) $.
$( Define the modus ponens inference rule $)
mp $a |- Q $.
$}
$( Prove a theorem $)
th1 $p |- t = t $=
$( Here is its proof: $)
tt tze tpl tt weq tt tt weq tt a2 tt tze tpl
tt weq tt tze tpl tt weq tt tt weq wim tt a2
tt tze tpl tt tt a1 mp mp
$.
These should give you some pointers to follow, besides Shutt's writings (which can be intimidating at first, but are perfectly clear once your fexpr juices are flowing.)
Unlike version 372, the mzscheme language does not include set-car! or set-cdr!, and cons makes immutable pairs, as in scheme/base; those changes make modules built on mzscheme reasonably compatible with modules built on scheme/base.
The file gave error on set-car! when I removed from start (module ac mzscheme and the ) in the end.
swank is the lisp package that does all of the slime heavy lifting on the lisp runtime. It manages threads, executes code, interfaces with the debugger, does various reference/definition lookups, etc. It consists of a large CL package with a smaller, environment specific set of functions that are defined for each lisp environment (SBCL, Clozure, etc.) In addition, slime and swank are tightly bound, and changes to one requires changes to the other. One or the other change fairly frequently. Porting swank to work with something like ARC would be a major undertaking, maintaining it would probably be worse. It's probably not worth the effort. It would probably be just as fast to create a new arc editing interface.
If not ':' then '..' is also possibility, like (a 5..9),
but to be honest i like your version, it's more Lispy. But maybe syntax '..' could improve readability? Compare:
(a b c)
(a b..c)
You write (about ar) "Much of Arc remains unimplemented", so is it better to use mzsheme version for now?
Great that it's already there. Is there a way to do foo[5:]?
And about docs - you are right, the best is to read the source-code. But the problem (as you pointed out) is when you have something you want to solve, it's hard to search for it in source-code. If you want to append strings and you don't know that + does it, source code will not give you an answer (unless you read the whole thing carefully). In Racket, you can search using human language in Racket Reference or Racket Guide.
Anyway, is there a centralized page, where you can get most links to Arc resources?
Hi
As there is no slime support for Arc I tried to load
arc.el to emacs but, it failed with this message:
arc.el:411:30:Error: Required feature `cl-macs' was not provided.
Hi
Thanks for your reply.
Yes I want get slime working with Arc...
I run clisp/sbcl/ccl in Emacs as follow:
1-Using lispBox or lisp-cabinet.(with slime and quicklisp)
2.Using emacs with my own .emacs configuration.(with slime)
ly