Skip to content
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

Failing to add better support for Nim #160

Closed
lf-araujo opened this issue Feb 26, 2024 · 2 comments
Closed

Failing to add better support for Nim #160

lf-araujo opened this issue Feb 26, 2024 · 2 comments

Comments

@lf-araujo
Copy link
Contributor

Hi,

Current Nim support works but it is painfully slow in files longer than 20loc. I am trying to add support to the improved llvm backend. Well, Codi recognizes the output in the repl, but it does not seem to call CodiUpdatePost.

So here are last lines of current implementation:

[11:41:55.541652] <SNR>74_codi_handle_data[14]: Matched prompt
[11:41:56.775971] <SNR>74_codi_handle_data[9]: [DATA] 55 == type int
[11:41:56.777490] <SNR>74_codi_handle_data[9]: [DATA] nim> 
[11:41:56.778554] <SNR>74_codi_handle_data[14]: Matched prompt
[11:41:56.779706] <SNR>74_codi_handle_data[17]: All prompts received
[11:41:56.781799] <SNR>74_stop_job_for_buf[8]: Stopping job for buffer 10
[11:41:56.787800] <SNR>74_user_au[1]: Doing autocommand CodiUpdatePost

The new configuration:

      \ 'nim': {
          \ 'bin': ['/home/luis/Documents/OneDrive/Coding/Nim/nlvm/nlvm/nlvm', 'r'],
          \ 'prompt': '>>> ',
         \ 'quitcmd': 'quit()',
          \ },
      \ }

And the final lines of the log:

[11:45:34.174951] <SNR>74_codi_handle_data[9]: [DATA] >>> >>> 5
[11:45:34.176310] <SNR>74_codi_handle_data[14]: Matched prompt
[11:45:34.177829] <SNR>74_codi_handle_data[9]: [DATA] >>> >>> ... ... >>> 3
[11:45:34.179108] <SNR>74_codi_handle_data[14]: Matched prompt
[11:45:34.183366] <SNR>74_codi_handle_data[9]: [DATA] >>> >>> >>> ... ... ... ... ... >>> 55: int
[11:45:34.184598] <SNR>74_codi_handle_data[14]: Matched prompt
[11:45:34.185989] <SNR>74_codi_handle_data[9]: [DATA] >>> >>> 
[11:45:34.187331] <SNR>74_codi_handle_data[14]: Matched prompt

It seems Codi is updating with the matched prompts.

  • Is anything else I could do to debug this?
@metakirby5
Copy link
Owner

It's been awhile since I've worked on Codi, so I unfortunately don't have a great answer 😢

However, I do think it may be worth checking the g:codi#raw option to help with debugging.

@lf-araujo
Copy link
Contributor Author

Thanks, will close this one and look into raw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants