Closed bevo009 closed 3 years ago
The error is because read-line
does not read CRLF line endings properly by default (default mode is 'linefeed
))), so it's including the CR in the number, hence causing string->number
to return false. I don't think this is fixable on the extension side, it's up to the editor sending CRLFs (which of course it will, it's Windows).
You can fix it by specifying 'mode
of read-line
:
(define guess (string->number (read-line (current-input-port) 'any)))
I agree with Runi. As per your other issues:
racket
executable documentation, but I don't see nay flags that would hide the module name from the prompt. If you find something, let me know, and we can implement it.Seeing that all the issues you mentioned are either not fixable by Magic Racket, or tracked already, I'm closing this issue. Let me know if you have any further problems, @bevo009 .
Environment
Error message
Insert a number: ; >: contract violation ; expected: real? ; given: #f ; argument position: 2nd ; [,bt for context]
Additional context
User Input seems to not work in the Magic extension This is on Windows, and also on WSL 2 Ubuntu The code below runs correctly in Dr Racket and Emacs
Additional problems:
[Win only], the
Load File in REPL
button only opens the repl, you have to press it again to actually load the file [works fine in ubuntu][Win only] Ctrl-L doesn't clear the screen (works fine in ubuntu)
[Win & Linux] The prompt appends the filename when loading a file,, which is kinda messy Not ideal with long filenames, and not how Emacs and Dr Racket do it I prefer the simple
>