Coder Social home page Coder Social logo

ndebug's People

Contributors

aartaka avatar ambrevar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

pinkdiamond1

ndebug's Issues

Removing swank dep

Seems quite easy, really, although it may not work with ABCL:

(defclass slime-input-stream (fundamental-character-input-stream)
  ((input-fn :initarg :input-fn)
   (buffer :initform "") (index :initform 0)
   (lock :initform (make-lock :name "buffer read lock"))))

(defun make-output-stream (write-string)
  (make-instance 'slime-output-stream :output-fn write-string))

(defun make-input-stream (read-string)
  (make-instance 'slime-input-stream :input-fn read-string))

For ABCL:

(progn
  (defimplementation make-output-stream (write-string)
    (ext:make-slime-output-stream write-string))

  (defimplementation make-input-stream (read-string)
    (ext:make-slime-input-stream read-string
                                 (make-synonym-stream '*standard-output*))))

Removing lparallel dep

Indeed, depending on Lparallel for library has some drawbacks, namely the kernel instantiation!

One way to do this properly is to wrap the lparallel calls in (let ((lparallel:*kernel* MY-KERNEL)) ...), with MY-KERNEL being something you initialize for instance with condition-wrapper.

But really we barely need Lparallel here, as far as I can tell it's only used to pass one restart.
To replace Lparallel with BT, you can replace (lparallel:receive-result channel) with bt:condition-wait. Instead of one channel slot, you'll need 2 slots: one for the bt:condition, one of the value.

Rebind `invoke-debugger` instead of this whole library?

So it seems that invoke-debugger is a function being the sole entry point into toplevel debugger. Redefining invoke-debugger should be a simple way to allow any debugger, including a GUI one. Which kind of makes this library useless, because we can set Nyxt-internal (not internal really, it's image-global) invoke-debugger to invoke GUI. Will be much cleaner too, I believe...

CC @Shinmera (because I remember you expressing the need in custom debuggers, tell me if that's not relevant anymore.)

Tests are failing

Using latest ndebug, and loading all dependencies using latest quicklisp, I get the following errors:

CL-USER> (asdf:test-system :ndebug)
; compiling file "/Users/user/code/common-lisp/ndebug/tests/package.lisp" (written 03 JUN 2023 01:24:28 AM):

; wrote /Users/user/.cache/common-lisp/sbcl-2.3.5.nixos-macosx-arm64/Users/user/code/common-lisp/ndebug/tests/package-tmpGA31XWNO.fasl
; compilation finished in 0:00:00.007
; compiling file "/Users/user/code/common-lisp/ndebug/tests/tests.lisp" (written 03 JUN 2023 01:24:28 AM):

; wrote /Users/user/.cache/common-lisp/sbcl-2.3.5.nixos-macosx-arm64/Users/user/code/common-lisp/ndebug/tests/tests-tmp5HT23M6C.fasl
; compilation finished in 0:00:00.016

------- STARTING Testing: NDEBUG/TESTS 

Starting: NDEBUG/TESTS::DEBUGGER-HANDLER-BIND
NDEBUG/TESTS::DEBUGGER-HANDLER-BIND - ERRORS (0.00s) : 2 assertions passed
  | ERRORS (1)
  | ERROR: The file
  |        #P"/var/folders/t0/t7hdj3915fbcz6r2ldrp6w580000gn/T/tmpA60KLDKY.tmp"
  |        already exists:
  |          File exists
  | #<FILE-EXISTS {70086DA323}>
  |
  |
Starting: NDEBUG/TESTS::MULTITHREADED
NDEBUG/TESTS::MULTITHREADED - ERRORS (0.00s) : 0 assertions passed
  | ERRORS (1)
  | ERROR: The value
  |          "hello"
  |        is not of type
  |          NUMBER
  | #<TYPE-ERROR expected-type: NUMBER datum: "hello">
  |
  |
Starting: NDEBUG/TESTS::WITH-DEBUGGER-HOOK-EXPANSION
NDEBUG/TESTS::WITH-DEBUGGER-HOOK-EXPANSION - ERRORS (0.00s) : 0 assertions passed
  | ERRORS (1)
  | ERROR: The value
  |          "hello"
  |        is not of type
  |          NUMBER
  | #<TYPE-ERROR expected-type: NUMBER datum: "hello">
  |
  |
Starting: NDEBUG/TESTS::CLASS-BASED-DEBUGGING
NDEBUG/TESTS::CLASS-BASED-DEBUGGING - ERRORS (0.00s) : 0 assertions passed
  | ERRORS (1)
  | ERROR: The value
  |          "hello"
  |        is not of type
  |          NUMBER
  | #<TYPE-ERROR expected-type: NUMBER datum: "hello">
  |
  |
Starting: NDEBUG/TESTS::CLASS-BASED-DEBUGGING-OVERRIDEN
NDEBUG/TESTS::CLASS-BASED-DEBUGGING-OVERRIDEN - ERRORS (0.00s) : 0 assertions passed
  | ERRORS (1)
  | ERROR: The value
  |          "hello"
  |        is not of type
  |          NUMBER
  | #<TYPE-ERROR expected-type: NUMBER datum: "hello">
  |
  |
Starting: NDEBUG/TESTS::TRY-EVALUATE
NDEBUG/TESTS::TRY-EVALUATE - ERRORS (0.01s) : 3 assertions passed
  | ERRORS (1)
  | ERROR: The file
  |        #P"/var/folders/t0/t7hdj3915fbcz6r2ldrp6w580000gn/T/tmpD801X3GJ.tmp"
  |        already exists:
  |          File exists
  | #<FILE-EXISTS {7008D98323}>
  |
  |
Test Summary for :NDEBUG/TESTS (6 tests 0.02 sec)
  | 5 assertions total
  | 5 passed
  | 0 failed
  | 6 execution errors
  | 0 warnings
  | 0 empty
  | 0 missing tests

-------   ENDING Testing: NDEBUG/TESTS 
; 
; compilation unit aborted
;   caught 1 fatal ERROR condition
; Evaluation aborted on #<LISP-UNIT2:ALL-TESTS-COMPLETE {7008D99DF3}>.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.