HiTECNOLOGYs / cl-charms

More up-to-date version of cl-charms. Forked it because it was, apparently, abandoned by author and I couldn't contact him.
https://gitorious.org/cl-charms
Other
158 stars 29 forks source link

Error in curses call during disable-raw-input #21

Closed MatthewRock closed 9 years ago

MatthewRock commented 9 years ago

uname -a :

Linux Haskell 4.0.5-gentoo #8 SMP Wed Aug 5 23:26:20 CEST 2015 x86_64 Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz GenuineIntel GNU/Linux

Condition:

Error in curses call.
   [Condition of type SIMPLE-ERROR]

  0: (CL-CHARMS::CHECK-STATUS -1)
      Locals:
        SB-DEBUG::ARG-0 = -1
  1: (CL-CHARMS:DISABLE-RAW-INPUT)
      [No Locals]
  2: (CL-CHARMS:ENABLE-RAW-INPUT :INTERPRET-CONTROL-CHARACTERS T)
      Locals:
        #:INTERPRET-CONTROL-CHARACTERS-DEFAULTING-TEMP = T
  3: (CHARMS-TIMER:MAIN)

Problem:

When I compiled cl-charms, I wanted to see if it works. I installed and tried to run timer or paint; however, in every example I get this very meaningful error message and, as you can see, it hangs on disable-raw-input; However, I have other applications using ncurses that are working just fine. I'm not really sure what to do with this. Right now I'm tired and I just want to send this error report; after reviewing, please let me know what information should I provide.

glider-gun commented 9 years ago

Seems curses library function itself is failing. Where did you run examples from?

If you ran them from SLIME or so, calling curses library functions will fail, because it's not a terminal which curses can handle. If this applies, running it from terminal will resolve this problem. Then if you want slime repl, I do like following (its my own way, though),

  1. run sbcl from terminal
  2. (ql:quickload '(:swank) :silent t) ;; from terminal
  3. (swank:create-server :port 5555 :style :fd-handler :dont-close t) ;; from terminal, too
  4. go to emacs and M-x slime-connect RET localhost RET 5555 RET
  5. (ql:quickload :cl-charms-timer) ;; from emacs repl
  6. (charms-timer:main) ;; from emacs repl Now you should see timer running on terminal.

step 1. to 3. can be done as an one liner: sbcl --eval "(ql:quickload '(:swank) :silent t)" --eval "(swank:create-server :port 5555 :style :fd-handler :dont-close t)"

MatthewRock commented 9 years ago

So glad you answered. Thanks, that's right - it works perfectly. I will fork the project and add it to some README or examples, so that other people won't get WTF as I did. Thanks a lot once again!

stylewarning commented 9 years ago

@MatthewRock, any additional documentation on this would certainly be appreciated! Thanks for reporting your issues.