DJMcMayhem / V

A golfing language inspired by everybody's favorite text editor, vim.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running on Mac results freezes

vihanb opened this issue · comments

commented

System: OS X 10.11.1 (El Capitan)
**

I created an empty file named "test.V" and I ran it through the latest version of the interpreter:

$ python main.py test.V
^CTraceback (most recent call last):
  File "main.py", line 71, in <module>
    main()
  File "main.py", line 60, in main
    v_instance.clean_up()
  File "/Users/vihan/Downloads/V/v.py", line 109, in clean_up
    if self.get_mode() == "i":
  File "/Users/vihan/Downloads/V/v.py", line 77, in get_mode
    return self.nvim_instance.eval("mode(1)")
  File "/usr/local/lib/python2.7/site-packages/neovim/api/nvim.py", line 209, in eval
    return self.request('vim_eval', string, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/neovim/api/nvim.py", line 129, in request
    res = self._session.request(name, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/neovim/msgpack_rpc/session.py", line 91, in request
    v = self._blocking_request(method, args)
  File "/usr/local/lib/python2.7/site-packages/neovim/msgpack_rpc/session.py", line 165, in _blocking_request
    self._enqueue_notification)
  File "/usr/local/lib/python2.7/site-packages/neovim/msgpack_rpc/async_session.py", line 65, in run
    self._msgpack_stream.run(self._on_message)
  File "/usr/local/lib/python2.7/site-packages/neovim/msgpack_rpc/msgpack_stream.py", line 43, in run
    self._event_loop.run(self._on_data)
  File "/usr/local/lib/python2.7/site-packages/neovim/msgpack_rpc/event_loop/base.py", line 134, in run
    raise err
KeyboardInterrupt: Received SIGINT

nothing actually even happened until I send SIGINT (^C)

commented

pls fix qwik i wana maek V program.

This is a different manifestation of a known nvim bug, although I've never seen it in this context before. This might be a big pain to fix since I can't repro on linux or windows, and I don't have a mac. =( What happens if you try it with a non-empty file? For example

iHello

If that does work, try commenting out lines 109-110 of V.py. That will slightly change V's behavior, but should generally work.

commented

Also question: are there docs yet? If no how to V

No, there are not docs yet. That could be it's own issue.

Really, its the same as vim-golf except:

  1. Some vim idioms are shorter (recursive macros, conditionals)
  2. A few normal mode commands are added (Duplicate, single insert)
  3. Regexes are a lot shorter.
  4. I'm in the middle of adding a global stack with some mathy operations. It sorta works, but not fantastically well.

At least for now. Some more things might changed but those are the biggest differences right now.

commented

okay brb trying the given rpgroam

commented

still happens on a non-empty program

Apparently, this problem magically fixed itself. \o/ I might revisit this later, but for now I'm closing it.

commented

you should have the emoji guy and then the period imo