SciRuby / iruby

Official gem repository: Ruby kernel for Jupyter/IPython Notebook
https://github.com/SciRuby/iruby
MIT License
890 stars 27 forks source link

Replace Bond with IRB #276

Closed cfis closed 3 years ago

cfis commented 4 years ago

This pull request replaces bond with IRB. Bond is a gem that hasn't been updated in 6 years, requires a native extension, and does not compile with MSVC. Instead, the PlainBackend is switched over to IRB which is installed with Ruby.

kojix2 commented 4 years ago

Hi @cfis Thank you for your Pull request. It would be great if we could replace bond with IRB. I'll show it to someone familiar with the IRB... So please wait.

cfis commented 4 years ago

Thoughts?

kojix2 commented 4 years ago

I agree with dropping bond. But there may be some issues.

  1. in case of an error, Backend class objects should return eval_path.
def eval_path
  @irb.context.irb_path
end

The current pull request causes problems here.

https://github.com/SciRuby/iruby/blob/f494ef1b048b26dadea614ea360fc06a999363e2/lib/iruby/kernel.rb#L114

  1. IRB execute code at Binding in the Object::TOPLEVEL_BINDING function. This causes the history module to fail. But I think the original approach may not be so appropriate...

image

  1. Are these codes necessary? I don't know well...
IRB.conf[:MAIN_CONTEXT] = @irb.context
# Called by irb
def set_encoding(extern, intern)
  a = extern
end

ping @mrkn, what do you think?

mrkn commented 3 years ago

I cannot continue to work this pull request because this repository was detached from minrk/iruby. I'll continue to work this in the new pull request.

mrkn commented 3 years ago

I fixed this by #297.