Do you refer to the fact that Arc's readline is a bit funky when handling blank lines [and that if you're reading from the terminal, it interprets the input as starting at the end of the s-expression on the current line, so the first character it reads will be the newline], as in:
arc> (n-of 5 (readline))
cheese
is
good
and
blah
("\ncheese" "\nis" "good" "and" "blah")
; SBCL
* (n-of 5 (read-line)) ;n-of isn't standard CL, of course
cheese
is
good
and
("cheese" "" "is" "good" "and")
Or are you talking about the various extra little options you can supply to "read-line", like "eof-error-p" or "recursive-p"? [For reference: http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node195.html] Can you describe precisely what is it that you want read-line to do? (It can then be implemented in terms of primitives like readc and peekc. Documentation: http://files.arcfn.com/doc/io.html)
I think newlines you're entering into your console are \r\n, and you're using a version of 'readline that only supports \n newlines (and treats \r as a normal character). Andrew Wilcox has made a fixed version: http://awwx.ws/readline1
Furthermore, you're reading from stdin, the same stream the commands are read from, so what you're reading actually starts right after the ')' character and includes the same newline you used to enter the command. I think someone here might have made a fix for this too (probably Pauan or aw), but you might be able to work around it like this:
arc> (do (readline) (...now your *actual* stdin-reading code...))
The first (readline) should hopefully get rid of whatever was left over from the input after reading the command.
Hi
readline1 dose not function as read-line in common lisp.
I type (read-line) and and arc is waiting to enter something so I type my string including spaces like:
Hi there.
output is:
"Hi there"
NIL
Thanks
ly
Right, I expect the version I linked you to doesn't behave exactly like Common Lisp's readline. I just hope it can help. :)
I don't fully understand your example. Did you try something like (do (readline) (readline)), like I was talking about? I'm guessing that since Arc's REPL takes commands and other input from the same stream, it's already different from the REPL you're used to, regardless of how readline works.
You can insert links like *this*... http://arclanguage.org/formatdoc
...separate paragraphs like *this*...
...and indent code like *this*:
You can insert links like *this*... http://arclanguage.org/formatdoc
...separate paragraphs like *this*...
...and indent code like *this*:
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
(if (< (rand) 0.5)
(do (prn "No, Mr. Bond, I expect you to die...")
(-- mi6 007)))
Some of your questions may be answered if you read through the tutorial: http://ycombinator.com/arc/tut.txt There's stuff you won't pick up on the first time that you'll want to know later.
>2.find with a :key in Arc
An example in Common Lisp, just to make sure we're talking about the same thing:
As a side note, you asked [2] about getting SLIME set up on Windows. I wrote up a guide on how to set it up on Linux; you can probably plunder it for information about how to set it up on Windows. I also had a few questions about your setup; it's not at all like mine.
[1]Yes, this is just 'when. Shush, it's an example.
Hi zck
Thanks a lot .
Problems of find with :key and progn in Arc solved.
About emacs and Arc still don't work.
I use emacs for common-lisp with lisp-cabinet.
For an editor I use scite which i configured to work with Arc(I had to make write some scripts with AutoIt)
Thanks again
ly
Could you answer my questions in your other thread? http://arclanguage.com/item?id=15002 It's really hard to try to help you without more details than "emacs and Arc still don't work".
Hi
Thanks.
'keep is good but it does not work with my code as I use a loacl function inside before using 'keep.
So what to use instead of labels or flet in ARC ?
Thanks again
ly
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
I do keep meaning to get SLIME set up, but haven't actually tried yet. If you list what problems you run into, people will be able to help you more easily.
You know, every once in a while I consider setting up slime, or at least looking at it, but I've never used slime before and I don't really know what it offers.
What are your favorite features of slime, and why would I want to use it over just emacs + arc.el + repl-in-shell?
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
I'm using emacs Emacs 23.3.1 and cl-macs.el is installed.
I type arc-mode and I get Arc in the menu, but when i choose Run inferior-arc error message:error: Required feature `cl-macs' was not provide.
Thanks
What is arc.el? There's no arc-mode for Emacs that I know of. What are you expecting to happen when you type M-x arc ? Where did you get arc.el?
I wrote up instructions on how to get SLIME working with Arc, but I don't have a Windows box to test on. Can you translate the directions to Windows, and then see if it works for you? http://arclanguage.org/item?id=14998 Notably, you don't start SLIME by typing M-x arc-mode; you start it by typing M-x slime .
Ah. This isn't SLIME. As akkartik said, it's likely that no one here uses it. If you want to try SLIME, follow my instructions here: http://arclanguage.org/item?id=14998
I definitely use arc.el on a regular basis, though I won't claim to be familiar with the finer points of its capabilities. As far as I'm concerned, it offers reasonable highlighting and indentation for arc code; I haven't tried to get it to do much else. For most of my lisp editing needs, I rely on paredit.