Arc Forumnew | comments | leaders | submitlogin
3 points by rocketnia 5140 days ago | link | parent

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.


1 point by ly47 5139 days ago | link

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

-----

1 point by rocketnia 5139 days ago | link

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.

-----

1 point by ly47 5139 days ago | link

Hi (do (readline) (readline)) works !!! Thanks ly

-----

1 point by rocketnia 5139 days ago | link

Awesome! ^_^

-----