koji-kojiro / cl-repl

A full-featured repl implementation designed to work with Roswell
GNU General Public License v3.0
153 stars 22 forks source link

Rainbow parentheses? #35

Open m-bob opened 6 years ago

m-bob commented 6 years ago

I'd appreciate an option to have rainbow parentheses in the repl. For me, it would make the repl seem more "alive."

koji-kojiro commented 6 years ago

Thanks for suggestion.

Currently, it is difficult to implement immediately because the repl doesn't count parentheses to check input, though that sounds very nice.

m-bob commented 6 years ago

Thanks for your quick and kind reply. Thanks also for making this repl!

Rainbow parentheses are more a "it would be nice to have" feature, rather than a high-priority issue.

Yours,

Murray

PS: I can probably figure this out sometime, but when I start the repl I always get

Lock on package COMMON-LISP violated when setting the value of VALUES while in

package COMMON-LISP-USER.

I can fix that (for the remainder of the session by choosing restart 2), but perhaps there's a better solution?

Example:

06:57:00 ~ 501 > cl-repl


/ )( ) __ ( ( )( _ ( )

( ( / (/\ () ) / ) _) ) _// (/\

_)__/ (_\)()() __/

cl-repl 0.5.0 on Roswell 18.1.10.87, SBCL 1.4.4

(C) 2017-2018 TANI Kojiro kojiro0531@gmail.com

CL-USER> (+ (* 3 5) 4)

Lock on package COMMON-LISP violated when setting the value of VALUES while in

package COMMON-LISP-USER.

See also: The SBCL Manual, Node "Package Locks" The ANSI Standard, Section 11.1.2.1.2

[Condition of type SYMBOL-PACKAGE-LOCKED-ERROR]

Restarts:

0: [CONTINUE] Ignore the package lock.

1: [IGNORE-ALL] Ignore all package locks in the context of this operation.

2: [UNLOCK-PACKAGE] Unlock the package.

3: [*ABORT] Deduce debugger level.

4: [*EXIT] Exit CL-REPL.

5: [*RETRY] Try evaluating again.

6: [RETRY] Retry EVAL of current toplevel form.

7: [CONTINUE] Ignore error and continue loading file NIL.

8: [ABORT] Abort loading file NIL.

9: [CONTINUE] Ignore runtime option --eval "(ros:run '((:eval\"(ros:quicklisp)\")(:script \"/Users/murray/.roswell/bin/cl-repl\")(:quit ())))".

10: [ABORT] Skip rest of --eval and --load options.

11: [ABORT] Skip to toplevel READ/EVAL/PRINT loop.

12: [EXIT] Exit SBCL (calling #'EXIT, killing the process).

Usage:

Ctrl+r: select restart. Ctrl+t: show backtrace.

[1]CL-USER>

On Thu, Feb 22, 2018 at 12:11 AM, TANI Kojiro notifications@github.com wrote:

Thanks for suggestion.

Currently, it is difficult to implement immediately because the repl doesn't count parentheses to check input, though that sounds very nice.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/koji-kojiro/cl-repl/issues/35#issuecomment-367587950, or mute the thread https://github.com/notifications/unsubscribe-auth/AdKwMvbOoNOy2pUIOj8VuS9OQFP_3LbVks5tXRMHgaJpZM4SOtpS .

koji-kojiro commented 6 years ago

That should be treated as another issue. Could you open the issue and give backtraces also?

m-bob commented 6 years ago

Will do. (Not sure about what you mean by backtraces: but I'll include the output I sent you, with a bit more explanation of what happens.

Again, thanks!

Yours,

Murray

On Thu, Feb 22, 2018 at 8:36 AM, TANI Kojiro notifications@github.com wrote:

That should be treated as another issue. Could you open the issue and give backtraces also?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/koji-kojiro/cl-repl/issues/35#issuecomment-367719343, or mute the thread https://github.com/notifications/unsubscribe-auth/AdKwMnV2eL0YD32LFBrU64gNbMG34j5Rks5tXYlegaJpZM4SOtpS .

koji-kojiro commented 6 years ago

You can get backtraces by Ctrl-t before exiting debugger. Sorry for the lack of explanation. Anyway, thank you for the bug report.

vindarel commented 1 year ago

related: it is now possible to add two parens ( ) and move the cursor in-between, I just added cursor movement commands to cl-readline: [backward, forward]-[char, world].

https://vindarel.github.io/cl-readline/#Moving-the-cursor