Arc Forumnew | comments | leaders | submit | ncommentslogin
301.

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)?

302.

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/ .

Now it works :) Thanks again !

303.

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.

Thanks a lot for your reply :)

304.

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.

Thank you very much for your help.

305.

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 :(

306.

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.

307.

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 :)

308.
3 points by Sol2Sol 5269 days ago | link | parent | on: Best way to implement a HN themed site?

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...
309.
3 points by xiaoqiao 5291 days ago | link | parent | on: Can purely newbie learn Arc?

Thank you, akkartik! Gonna try it!
310.
1 point by jes5199 5305 days ago | link | parent | on: A lisp using json

(thanks for the repost.)
311.

demo_mm.arc is based on demo0.mm in metamath, which is explained in http://us.metamath.org/downloads/metamath.pdf section 2.2 "Your First Formal System"

$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
       $.
312.
1 point by vu3rdd 5325 days ago | link | parent | on: Arc noob

Is there a mailing list or is this forum the place to ask questions?

Thanks.

313.
1 point by vu3rdd 5325 days ago | link | parent | on: Arc noob

Great! Thanks.
314.
1 point by vu3rdd 5325 days ago | link | parent | on: Arc noob

Thanks. I updated the email.
315.
3 points by msimoni 5326 days ago | link | parent | on: The Kernel Underground

Howdy, I'm a big fan of Kernel, and I've written a couple of posts on Kernel, the most propaganda-ish (and thus most readable being):

http://axisofeval.blogspot.com/2011/08/praising-kernel.html

The others are here:

http://axisofeval.blogspot.com/search/label/kernel

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.)

316.
1 point by pyTony 5352 days ago | link | parent | on: How to get Racket to run arc?

I got arc3.1, installed in arc3.1 in Racket directory, now I got (I am running Windows XP in Finnish)

I:\Lisps\Racket\arc3.1>..\racket -f as.scm ffi-obj: couldn't get "setuid" from #f (Määritetty proseduuria ei löydy .; errno=127)

=== context === I:\Lisps\Racket\collects\ffi\unsafe.rkt:178:2: get-ffi-obj* I:\Lisps\Racket\arc3.1\ac.scm: [running body]

317.

Anariki error!
318.
1 point by pyTony 5354 days ago | link | parent | on: How to get Racket to run arc?

Also the document in Racket tells differences:

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.

319.
1 point by pyTony 5354 days ago | link | parent | on: How to get Racket to run arc?

I tried to run it from IDE, maybe the command switches would work from command line with Racket?

Did not:

I:\Lisps\Racket>mzscheme.exe -m -f arc3\as.scm main: not defined or required into the top-level environment

I:\Lisps\Racket>

320.

It stock hn install I already change httpd port to 8887 [ error talk me that 8080 buse]. Forum work, login form not

1005 stroke ac.scm

  (define (ar-coerce x type . args)
    (let ((x-type (ar-type x)))
      (if (eqv? type x-type) x
          (let* ((fail        (lambda () (err "Can't coerce " x type)))
                 (conversions (hash-table-get coercions type fail))
                 (converter   (hash-table-get conversions x-type fail)))
            (ar-apply converter (cons x args))))))
321.

I posted it on Hacker News and it didn't receive any comments, even though the content is very good. Maybe this forum is a better place for it?
322.
1 point by HankR 5404 days ago | link | parent | on: Arc, Emacs, and SLIME

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.
323.

Thanks for the help, guys!
324.
1 point by vladimir 5413 days ago | link | parent | on: Syntax for list ranges

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?

325.
1 point by vladimir 5413 days ago | link | parent | on: Syntax for list ranges

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?

326.

Yes, the idea came to mind when I saw some Stylish themes for Hacker News.
327.
1 point by avast 5423 days ago | link | parent | on: [noob] install arc forum on vps?

Sorry for gramatical mistakes.
328.
1 point by ly47 5431 days ago | link | parent | on: Emacs+arc on windows

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.
329.
1 point by ly47 5432 days ago | link | parent | on: Emacs+arc on windows

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
330.

cbcbilliter05@gmail.com
More