-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metaissue: Improve the interpreter #11555
Comments
I think pry doesn't work well in many cases. For example, block arguments are not visible. In general, I feel that pry has still a long way to go |
After #11578 is merged, the first thing I would do is to write at least one spec for My idea was to have tests specify three things:
For example: assert_interpreter_debugger(
code: "a = 1; debugger; a",
input: "a",
expected_output: "1",
) That is, after This will require adapting the interpreter so that the input and output are not tied to STDIN and STDERR, which might also eventually make it possible to hook the interpreter into code editors. These tests will also be independent of the underlying implementation, so they will be extremely useful and resilient to changes. With those tests in place, I could start working on some of them to fix existing bugs, like #11555 (comment) |
@asterite just to clarify, each of the lines stating BUG: missing handling... is a TODO waiting to be completed, right? (Just stumble across one of this). |
That's it! Maybe I should have put a TODO there 😅 |
I assume the issue that happens when attempting to If other people aren't having this problem for some reason I'll gladly make a new issue. |
#12119 does this for LLDB. We could probably use FileCheck here or even share the same test source files for multiple CLI debuggers (another one I have in my mind is GDB). |
Something really slow about channels. # START:p1
chan = Channel(String).new
i = 0
num = 10000
num.times do
spawn do
chan.send "fiber #{i}: I like crystals!"
end
i += 1
puts chan.receive
end
# =>
# fiber 1: I like crystals!
# fiber 2: I like crystals!
# fiber 3: I like crystals!
# fiber 4: I like crystals!
# ...
# fiber 10000: I like crystals!
# END:p1 |
Can confirm similar results on MacOS (Intel) with Crystal 1.5.0 |
Yes, the interpreter is slower than compiled mode. And I have no immediate plans to improve its speed. |
What's missing for the interpreter:
crystal i
, a Crystal interpreter #11159Crystal::Loader
integration (UseCrystal::Loader
in the interpreter #11579)YAML
#11801)Crystal::Loader
for MSVC #12140)asm
support (interpreter bytecode)src/compiler/crystal/repl
Feel free to post comments for additional items here.
No discussion on individual items. Thank you 🙇♂️
That should be moved to dedicated issues. If none exists, please open one or start an informal discussion at https://forum.crystal-lang.org/
The text was updated successfully, but these errors were encountered: