A quick thought: on Linux, '/' is the root directory, similarly to "C:\" on Windows. Perhaps this was the reason it's verboten. An opening slash should either be disallowed, or treated as a relative link.
Yes, macros aren't functions, unfortunately. Thinking of them as such is a rather leaky abstraction.[1] If you post the code that's breaking, we should be able to help you. Is it a stock hn install, or have you edited it? The stock install has worked every time I've tried it.
[1] For example, this code won't work: (apply obj (list "steve" "steve's value"))
You'll have to hack ac.scm to add a new function to arc. Racket's tcp-connect is the useful function here. I'm not at a computer where I've done this, but it's a matter of adding something like this:
(require racket/tcp)
;; xdef takes its second arg, which is Scheme code,
;; and binds itto the name given as the first arg.
;; The name is accessible only from Arc code, I think.
(xdef tcp-connect (lambda (hostname port)
(let-values (((from-server to-server)
(tcp-connect hostname port)))
(list from-server to-server))))
Then you use it as follows, in Arc code:
(let (from-server to-server) (tcp-connect "google.com" 80)
(disp "GET / HTTP/1.1\nHost: google.com\n\n" to-server)
;; I believe 'disp is the correct function
;; This, I believe, is a correct HTTP request. It works, at least.
(close to-server) ;; you won't be able to know when the response is done
;; unless you close the input port.
(whilet line (readline from-server)
(prn line)) ;; or whatever you want to do with the results.
(close from-server) ;; it'll work without it, but close your ports anyway.
Again, this is untested code; parts of it are from memory, and parts are from a previous comment: http://arclanguage.org/item?id=14817 . I'll check this when I get home; tryarc.org is down.
You're welcome! Weird, though -- I thought the 'require line had to be there so that racket would know what 'tcp-connect is. Apparently I'm wrong; I'll have to try my code without it.
Good luck with the rest of it, though -- this doesn't provide any sort of http header creation, which is somewhat annoying, but if you write some functions for it, I'm sure we'd be interested in seeing them.
But not for tcp-connect. If you make a library for Amazon interaction, that might be useful to other people. I'd be interested in seeing the code, at least.
I should probably poke around there, then. For whatever reason, the only Arc documentation I've used is arcfn.com, which isn't up to date with Arc3.1 anyway.
Only documentation I've used too. ^_^ With Arc documentation as it is today, part of Arc programming is being prepared to read the source code to get the whole story. The Arcfn documentation is still a good place to get to know the essential utilities.
Anarki provides "help" functionality too, in case that, uh, helps.
You first need to install the Scheme host that Arc runs on top of. If you're running Arc3, it's MzScheme v372; if you're running Arc3.1, Racket.
Then download and run Arc. I don't have Arc in front of me, but if I recall correctly, you start the news server with (nsv). There's a file distributed with Arc called how-to-run-news, or something like that. Read it; it's quite useful.
You can call (thread (nsv)) if you want the repl to come back so you can make further changes while the server's running.
That'll get it running, but you may have to open up ports in the firewall to let people connect from outside. You'll also need to customize some variables, like the name of the site, and colors, and the favicon.
Please, please, please give us more information when you have a question. If you want a 'readline exactly like Common Lisp's 'read-line, you'll have to write it yourself. If you want specific features, tell us what they are. It's hard to help when we have to guess what you actually want.
Arc code can be terse; English shouldn't be unnecessarily so.
Hi zck
Yes, I mean read-line like common lisp.
As I'm only learning arc, it will be not easy to me to write it, but I will try as i will be more familiar with Arc.
I like arc as it's code is simpler than common-lisp and is more readable.
ly
Re-reading, I don't know how I missed that the first line of output is a 'progn statement. Obviously arc will barf on it. I don't know what won't work because SLIME wasn't able to load 'swank and start it.
What makes you say that? What features would you consider "make it worth using", and why won't they work? It's quite possible that all that needs to be done is change a few variables or replace a few functions to use arc names instead of CL names. Case in point being progn -> do, etc.
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.