6 ms·
WTF are you talking about? Vim have may have many demerits but segfaults is not on that list. If segfaults are that frequent you described then people would hav
by m2mdas 13y ago
WTF are you talking about? Vim have may have many demerits but segfaults is not on that list. If segfaults are that frequent you described then people would have jumped ship already.
I can't comment on the code structure of Vim but it does not matter to me because end product is working fine for me for 5+ years. Also bad code structure did not stop continuous development of Vim. Just for example there were 1000 patches added to the core before Vim version was changed from 7.3 to 7.4 within 2 years. Important features like more python binding, lua bindings were added during this time. Even if you see the current patch log of 7.4 ftp://ftp.vim.org/pub/vim/patches/7.4/README 68 patches were added since 7.4 release.
Though async future is not built-in there are several plugins for doing async operation, for example vim-dispatch[1] and vimproc. Vimproc is more widely used. See Unite.vim[3] , neocomplete[4], VimShell[5] for demonstration. I would specially point to VimShell because with the help of it you can run REPL inside Vim and pass buffer content to it. Also there is YouCompleteMe[6] which provides FAST autocomplete.
[1](https://github.com/tpope/vim-dispatch/ https://github.com/tpope/vim-dispatch/)
[2](https://github.com/Shougo/vimproc.vim/ https://github.com/Shougo/vimproc.vim/)
[3](https://github.com/Shougo/unite.vim https://github.com/Shougo/unite.vim)
[4](https://github.com/Shougo/neocomplete.vim https://github.com/Shougo/neocomplete.vim)
[5](https://github.com/Shougo/vimshell.vim https://github.com/Shougo/vimshell.vim)
[6](https://github.com/Valloric/YouCompleteMe/ https://github.com/Valloric/YouCompleteMe/)
- leokun 13y agoNope, and nope. > WTF are you talking about? Vim have may have many demerits but segfaults is not on that list. If segfaults are that frequent you described then people would have jumped ship already. Vim is all segfaults once you introduce async, and it's highly unstable during any dev work. On any given day visit the Vim dev mailing list and scroll down. Today I see: Scrolling in a c file segfaults: https://groups.google.com/forum/#!topic/vim_dev/teRV3RyDtzc https://groups.google.com/forum/#!topic/vim_dev/teRV3RyDtzc Referencing an old buffer seg faults: https://groups.google.com/forum/#!topic/vim_dev/Mssm8pKtnGM https://groups.google.com/forum/#!topic/vim_dev/Mssm8pKtnGM Segfault opening a readme: https://groups.google.com/forum/#!topic/vim_dev/SE31YUccJN4 https://groups.google.com/forum/#!topic/vim_dev/SE31YUccJN4 Segfault selecting a lot of text: https://groups.google.com/forum/#!topic/vim_dev/yzVqZ3qogho https://groups.google.com/forum/#!topic/vim_dev/yzVqZ3qogho Segfault on autocompletion: https://groups.google.com/forum/#!topic/vim_dev/lqcn57eRGGs https://groups.google.com/forum/#!topic/vim_dev/lqcn57eRGGs Segfault on tab switching: https://groups.google.com/forum/#!topic/vim_dev/Vc9Z8rfe22w https://groups.google.com/forum/#!topic/vim_dev/Vc9Z8rfe22w Just keep scrolling, the segfaults never stop. > Though async future is not built-in there are several plugins for doing async operation, for example... For your other point, some plugins fake async using a cursorhold hack that break vim for users who use leader keys. That is they insert fake key strokes. Vimproc actually quits on cursorhold: https://github.com/Shougo/vimproc.vim/blob/master/autoload/vimproc.vim#L1124 https://github.com/Shougo/vimproc.vim/blob/master/autoload/v... That's right thess plugins inserts keys to trigger autocommand. I would like you to go ahead and type a long vim command using leader keys and see if that works for you. When a plugin inserts keys while you are inserting keys everything stops and you have to start over. Go ahead, go implement a clock with a plugin that updates every second. I bet that plugin fakes user interaction. It doesn't work. Edit: Also nice on the downvotes, perhaps explain how my post is wrong in addition to downvoting. Everything I have said are matters of fact. Are my facts wrong?
- dllthomas 13y agoIt doesn't surprise me terribly that, in the sizable userbase, some people manage to make it segfault - particularly running unknown plugins &c. The first example you give is even found to be a bug in a compiled external extension. I've not read through any of the others... I've been using vim pretty much daily, across many versions, over roughly two decades, and I literally do not recall encountering a segfault. I would be hugely surprised if "segfaults all the time" is a more typical experience for an individual user.
- leokun 13y agoIt probably isn't. It's when you want to do async or timed things that things start to fall apart.
- weaksauce 13y agoWhat use case do you have for timed things or async things?
- to3m 13y agoFor good ideas for async stuff you should try emacs. You don't have to keep using it, just look at what it does with its built-in asynchronous subprocess handling. The interactive python shell is particularly neat, but it also has grep and compile functionality that doesn't block the editor as it runs, and a gdb mode that (based on my very brief go with it) seemed to work pretty well. One neat thing I use it for is TTY capture from a target system (usually games console or embedded device) over a serial or network cable. Run your terminal program in emacs at the start of the day, and emacs will dutifully capture all the terminal output as you work. Search, save and manipulate TTY output using all the commands you know and love. Well - except for `.'. Or `*'. emacs doesn't do those two...
- dllthomas 13y agoMy experience certainly doesn't make that implausible. I am pretty careful about async IO in terms of how my software interfaces with me, and this translates to less uncontrolled use of it generally.
- krakensden 13y agovim segfaults a lot on my copy of OS X. Never seen it happen on Linux or Windows though. Given the Macbook-heavy nature of HN, that's probably what leokun is talking about.
- super_mario 13y agoNever experienced VIM crash of any kind on Mac OS X, Linux or Windows. And I have been using it since Amiga days. On the other hand I don't use very many plugins, esp. not plugins that have native extensions.