Coder Social home page Coder Social logo

Comments (12)

fukamachi avatar fukamachi commented on August 15, 2024

What's the value of *READ-DEFAULT-FLOAT-FORMAT* in your environment?

from dexador.

shixiongfei avatar shixiongfei commented on August 15, 2024

CL-USER> READ-DEFAULT-FLOAT-FORMAT
SINGLE-FLOAT

from dexador.

fukamachi avatar fukamachi commented on August 15, 2024

I suppose that you loaded & compiled dexador with setting *READ-DEFAULT-FLOAT-FORMAT* 'double-float.

Can you try (dex:get "http://lisp.org" :version 1.1s0) ?

from dexador.

shixiongfei avatar shixiongfei commented on August 15, 2024
(dex:get "http://lisp.org" :version 1.1s0)

1.1 fell through ECASE expression. Wanted one of (1.1d0 1.0d0).
   [Condition of type SB-KERNEL:CASE-FAILURE]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {1001E81B93}>)

Backtrace:
  0: (DEXADOR.UTIL:WRITE-FIRST-LINE :GET #<QURI.URI.HTTP:URI-HTTP http://lisp.org> NIL 1.1 #S(FAST-IO:OUTPUT-BUFFER :VECTOR #(71 69 84 32 47 32 ...) :FILL 6 :LEN 6 :QUEUE NIL :LAST NIL :OUTPUT NIL))
  1: (DEXADOR.BACKEND.USOCKET:REQUEST #<unavailable argument> :METHOD :GET :VERSION 1.1)
  2: (SB-INT:SIMPLE-EVAL-IN-LEXENV (DEXADOR:GET "http://lisp.org" :VERSION 1.1) #<NULL-LEXENV>)
  3: (EVAL (DEXADOR:GET "http://lisp.org" :VERSION 1.1))
 --more--

from dexador.

shixiongfei avatar shixiongfei commented on August 15, 2024

I set *READ-DEFAULT-FLOAT-FORMAT* to double-float and reloaded dexador, but I got the same error.

from dexador.

fukamachi avatar fukamachi commented on August 15, 2024

Did you delete fasl caches before reloading?

from dexador.

shixiongfei avatar shixiongfei commented on August 15, 2024

Yes, I deleted the cache and got the same error.

from dexador.

fukamachi avatar fukamachi commented on August 15, 2024

Then, that may not because of the setting of *read-default-float-format*, which I could reproduce.

from dexador.

shixiongfei avatar shixiongfei commented on August 15, 2024

Em, what shall I do next?

from dexador.

jnc-nj avatar jnc-nj commented on August 15, 2024

Can confirm this occurs in dockerized container running ubuntu 16.04.

; cc -o /root/.cache/common-lisp/sbcl-1.5.6-linux-x64/root/.roswell/lisp/quicklisp/dists/quicklisp/software/woo-20190813-git/src/syscall/types__grovel-tmpIRDHF4NY.o -c -g -Wall -Wundef -Wsign-compare -Wpointer-arith -O3 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wunused-parameter -fno-omit-frame-pointer -momit-leaf-frame-pointer -fno-pie -fPIC -I/root/.roswell/lisp/quicklisp/dists/quicklisp/software/cffi_0.20.1/ /root/.cache/common-lisp/sbcl-1.5.6-linux-x64/root/.roswell/lisp/quicklisp/dists/quicklisp/software/woo-20190813-git/src/syscall/types__grovel.c
/root/.cache/common-lisp/sbcl-1.5.6-linux-x64/root/.roswell/lisp/quicklisp/dists/quicklisp/software/woo-20190813-git/src/syscall/types__grovel.c: In function ‘main’:
/root/.cache/common-lisp/sbcl-1.5.6-linux-x64/root/.roswell/lisp/quicklisp/dists/quicklisp/software/woo-20190813-git/src/syscall/types__grovel.c:12:7: warning: unused variable ‘autotype_tmp’ [-Wunused-variable]
   int autotype_tmp;
       ^
; cc -o /root/.cache/common-lisp/sbcl-1.5.6-linux-x64/root/.roswell/lisp/quicklisp/dists/quicklisp/software/woo-20190813-git/src/syscall/types__grovel-tmpZQGFPZZG -g -Wl,--export-dynamic -no-pie /root/.cache/common-lisp/sbcl-1.5.6-linux-x64/root/.roswell/lisp/quicklisp/dists/quicklisp/software/woo-20190813-git/src/syscall/types__grovel.o
; /root/.cache/common-lisp/sbcl-1.5.6-linux-x64/root/.roswell/lisp/quicklisp/dists/quicklisp/software/woo-20190813-git/src/syscall/types__grovel /root/.cache/common-lisp/sbcl-1.5.6-linux-x64/root/.roswell/lisp/quicklisp/dists/quicklisp/software/woo-20190813-git/src/syscall/types__grovel.grovel-tmp.lisp
; cc -o /root/.cache/common-lisp/sbcl-1.5.6-linux-x64/root/.roswell/lisp/quicklisp/dists/quicklisp/software/woo-20190813-git/src/llsocket/grovel__grovel-tmpOP8PI1I.o -c -g -Wall -Wundef -Wsign-compare -Wpointer-arith -O3 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wunused-parameter -fno-omit-frame-pointer -momit-leaf-frame-pointer -fno-pie -fPIC -I/root/.roswell/lisp/quicklisp/dists/quicklisp/software/cffi_0.20.1/ /root/.cache/common-lisp/sbcl-1.5.6-linux-x64/root/.roswell/lisp/quicklisp/dists/quicklisp/software/woo-20190813-git/src/llsocket/grovel__grovel.c
/root/.cache/common-lisp/sbcl-1.5.6-linux-x64/root/.roswell/lisp/quicklisp/dists/quicklisp/software/woo-20190813-git/src/llsocket/grovel__grovel.c: In function ‘main’:
/root/.cache/common-lisp/sbcl-1.5.6-linux-x64/root/.roswell/lisp/quicklisp/dists/quicklisp/software/woo-20190813-git/src/llsocket/grovel__grovel.c:14:7: warning: unused variable ‘autotype_tmp’ [-Wunused-variable]
   int autotype_tmp;
       ^
; cc -o /root/.cache/common-lisp/sbcl-1.5.6-linux-x64/root/.roswell/lisp/quicklisp/dists/quicklisp/software/woo-20190813-git/src/llsocket/grovel__grovel-tmp5WHUATJM -g -Wl,--export-dynamic -no-pie /root/.cache/common-lisp/sbcl-1.5.6-linux-x64/root/.roswell/lisp/quicklisp/dists/quicklisp/software/woo-20190813-git/src/llsocket/grovel__grovel.o
; /root/.cache/common-lisp/sbcl-1.5.6-linux-x64/root/.roswell/lisp/quicklisp/dists/quicklisp/software/woo-20190813-git/src/llsocket/grovel__grovel /root/.cache/common-lisp/sbcl-1.5.6-linux-x64/root/.roswell/lisp/quicklisp/dists/quicklisp/software/woo-20190813-git/src/llsocket/grovel__grovel.grovel-tmp.lisp
Woo server is started.
Listening on 0.0.0.0:9001.
Unhandled TYPE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
                                  {10005104C3}>:
  The value
    1.1
  is not of type
    SINGLE-FLOAT

Calling RUN ros run -Q -s mercatus -e "(dex:get \"http://lisp.org\" :version 1.1s0)" --quit in the docker file gives the following output:

Step 5/8 : RUN ros run -Q -s mercatus -e "(dex:get \"http://lisp.org\" :version 1.1s0)" --quit
 ---> Running in 276fdcfc4f4d

debugger invoked on a SB-KERNEL:CASE-FAILURE in thread
#<THREAD "main thread" RUNNING {10004F04C3}>:
  1.1 fell through ECASE expression. Wanted one of (1.1d0 1.0d0).

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Ignore runtime option --eval "(ros:run '((:eval\"(ros:quicklisp)\")(:system \"mercatus\")(:eval \"(dex:get \\\"http://lisp.org\\\" :version 1.1s0)\")(:quit)))".
  1: [ABORT   ] Skip rest of --eval and --load options.
  2:            Skip to toplevel READ/EVAL/PRINT loop.
  3: [EXIT    ] Exit SBCL (calling #'EXIT, killing the process).

(DEXADOR.UTIL:WRITE-FIRST-LINE #<unavailable argument> #<unavailable argument> #<unavailable argument> #<unavailable argument> #<unavailable argument>)
0] 

The relevant .ros files are headed with

(declaim (sb-ext:muffle-conditions cl:style-warning))
(declaim (optimize (speed 3) (space 0) (debug 0) (safety 0) (compilation-speed 0)))
(declaim (sb-ext:muffle-conditions sb-ext:compiler-note))

(eval-when (:compile-toplevel :load-toplevel :execute)
  (setf sb-impl::*default-external-format* :utf-8)
  (setf sb-alien::*default-c-string-external-format* :utf-8) 
  (setf *read-default-float-format* 'double-float))

before library loading, if that's any help.

from dexador.

jnc-nj avatar jnc-nj commented on August 15, 2024

@shixiongfei
This is a bad temporary workaround, but see jnc-nj/dexador@a81de22

Step 6/9 : RUN ros run -Q -s mercatus -e "(print (dex:get \"http://lisp.org\" :version 1.1))" --quit
 ---> Running in 270b432cee0b

"<HTML>
<HEAD>
  <title>John McCarthy, 1927-2011</title>
  <STYLE type=\"text/css\">
    BODY {text-align: center}
  </STYLE>
</HEAD>
<BODY>
<h1>John McCarthy</h1>
<img src=\"jmccolor.jpg\" alt=\"a picture of John McCarthy, from his website\"/>
<h3>1927-2011</h3>
<br><br>
<a href=\"http://www-formal.stanford.edu/jmc/\">John McCarthy's Home Page</a><br>
<a href=\"http://news.stanford.edu/news/2011/october/john-mccarthy-obit-102511.html\">Obituary</a>
</BODY>
</HTML>
" Removing intermediate container 270b432cee0b

@fukamachi
This is probably incorrect, but the problem I see is if dexador isn't compiled properly, backend/usocket.lisp declares version to be type single-float, which will raise an error when you manually set *read-default-float-format* and give :version 1.1d0

from dexador.

shixiongfei avatar shixiongfei commented on August 15, 2024

@jnc-nj Glad to see that the problem is moving forward, thanks a lot.

from dexador.

Related Issues (20)

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.