Error while run examples #14

Open
opened 2022-11-19 05:46:53 +00:00 by byulparan · 6 comments
byulparan commented 2022-11-19 05:46:53 +00:00 (Migrated from github.com)
;; osc-examples.lisp

(osc-examples::osc-send-test #(127 0 0 1) 6668)

The function OSC:ENCODE-MESSAGE is undefined.
   [Condition of type UNDEFINED-FUNCTION]
;; osc-device-examples.lisp

(defparameter *osc-server* (make-osc-server :protocol :udp
                                            :debug-mode t))

(boot *osc-server* 57127)

There is no class named OSC::INET-SOCKET.
   [Condition of type SB-PCL:CLASS-NOT-FOUND-ERROR]

I tested on macOS(12.6.1) / SBCL(2.2.10.32-eefe83e36) / OSC(osc-20221106-git from quicklisp).
Thanks for works!

```lisp ;; osc-examples.lisp (osc-examples::osc-send-test #(127 0 0 1) 6668) The function OSC:ENCODE-MESSAGE is undefined. [Condition of type UNDEFINED-FUNCTION] ``` ```lisp ;; osc-device-examples.lisp (defparameter *osc-server* (make-osc-server :protocol :udp :debug-mode t)) (boot *osc-server* 57127) There is no class named OSC::INET-SOCKET. [Condition of type SB-PCL:CLASS-NOT-FOUND-ERROR] ``` I tested on macOS(12.6.1) / SBCL(2.2.10.32-eefe83e36) / OSC(osc-20221106-git from quicklisp). Thanks for works!
zzkt commented 2022-12-09 13:48:35 +00:00 (Migrated from github.com)

looks like it might be package related. How are you loading or running the example?

do you get any errors if you (ql:quickload :osc) and then eval the defun for osc-send-test?

looks like it might be package related. How are you loading or running the example? do you get any errors if you `(ql:quickload :osc)` and then eval the defun for `osc-send-test`?
zzkt commented 2022-12-09 13:52:13 +00:00 (Migrated from github.com)

...and I just noticed the familiar username! so you might also be interested in #7

...and I just noticed the familiar username! so you might also be interested in #7
defaultxr commented 2023-11-14 09:35:55 +00:00 (Migrated from github.com)

When evaluating the osc-send-test function from osc-examples.lisp, I get this warning:

../../../../.sbcl/quicklisp/dists/quicklisp/software/osc-20230618-git/osc-examples.lisp:64:12:
  style-warning: undefined function: OSC:ENCODE-MESSAGE

When I grep this library for encode-message, I see no functions defined with that name. The only results are in osc-tests.lisp, package.lisp, and osc-examples.lisp. Looks like osc::encode-message does not exist. It does not seem to be a package issue.

Looks like the library was refactored without updating the tests or examples, nor package.lisp.

Looks like with the current version of this library, you're supposed to do something like this:

(osc:send-msg-to (osc:make-osc-transmitter) #(127 0 0 1) 48888 "/foo" 1 2 3)

But running that code gives this error:

The function OSC::SOCKET-SEND is undefined.
   [Condition of type UNDEFINED-FUNCTION]

Seems like usocket should be added to the (:use ...) of the (defpackage :osc ...).

When I load osc-tests.lisp and run (osc::run-tests), I get this error:

The function OSC::ENCODE-DATA is undefined.
   [Condition of type UNDEFINED-FUNCTION]
When evaluating the `osc-send-test` function from osc-examples.lisp, I get this warning: ``` ../../../../.sbcl/quicklisp/dists/quicklisp/software/osc-20230618-git/osc-examples.lisp:64:12: style-warning: undefined function: OSC:ENCODE-MESSAGE ``` When I grep this library for `encode-message`, I see no functions defined with that name. The only results are in osc-tests.lisp, package.lisp, and osc-examples.lisp. Looks like `osc::encode-message` [does not exist](https://github.com/search?q=repo%3Azzkt%2Fosc%20encode-message&type=code). It does not seem to be a package issue. Looks like the library was refactored without updating the tests or examples, nor package.lisp. Looks like with the current version of this library, you're supposed to do something like this: ```lisp (osc:send-msg-to (osc:make-osc-transmitter) #(127 0 0 1) 48888 "/foo" 1 2 3) ``` But running that code gives this error: ``` The function OSC::SOCKET-SEND is undefined. [Condition of type UNDEFINED-FUNCTION] ``` Seems like `usocket` should be added to the `(:use ...)` of the `(defpackage :osc ...)`. When I load osc-tests.lisp and run `(osc::run-tests)`, I get this error: ``` The function OSC::ENCODE-DATA is undefined. [Condition of type UNDEFINED-FUNCTION] ```
zzkt commented 2023-11-14 09:47:17 +00:00 (Migrated from github.com)

Thanks for the details @defaultxr

Looks like some of the changes introduced with 67118a4a14 need more attention. I should probably get onto #11

Thanks for the details @defaultxr Looks like some of the changes introduced with 67118a4a14e9defab5308eccec1f0db253015061 need more attention. I should probably get onto #11
defaultxr commented 2023-11-14 09:50:43 +00:00 (Migrated from github.com)

No prob, thanks for the quick response! Also, I was wrong in my previous comment; it looks like the socket-send function in use in this library has a signature that does not match that of usocket:socket-send. So it seems like it's from a different library, not usocket.

No prob, thanks for the quick response! Also, I was wrong in my previous comment; it looks like the `socket-send` function in use in this library has a signature that does not match that of `usocket:socket-send`. So it seems like it's from a different library, not usocket.
zzkt commented 2023-11-14 10:06:10 +00:00 (Migrated from github.com)

The initial plan was to to keep the data formatting (e.g. encode-bundle) and transport (the usocket stuff) separate. That's no longer the case, so not sure if it really makes much difference and seems like it could be simplified further...

The initial plan was to to keep the data formatting (e.g. `encode-bundle`) and transport (the usocket stuff) separate. That's no longer the case, so not sure if it really makes much difference and seems like it could be simplified further...
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: zzkt/osc#14
No description provided.