I'm going to be doing some hacking on z80 assembly via Yaze, and it would be great if I could have the editor I'm used to, natively on the platform (rather than having to edit in OSX or whatever).
Vim's 400 line function to wait for keyboard input
61–70 of 239 posts
Re: Vim's 400 line function to wait for keyboard input
#62Earlier quoted context omitted.
How do you know it works? Did you test it on every platform? What you would have to gain is maintainability. Maybe it's not worth it; maybe it is. But saying that there is nothing to be gained is just an opinion.
I bet that it contains fewer bugs than a rewrite of the code will have! That code represents years of tweaks, fixes and obscure workarounds. There are countless problems that you will re-introduce with a code rewrite, because the subtleties in aged, thoroughly-used code are not immediately obvious.
Re: Vim's 400 line function to wait for keyboard input
#63Re: Vim's 400 line function to wait for keyboard input
#64Earlier quoted context omitted.
I bet that it contains fewer bugs than a rewrite of the code will have! That code represents years of tweaks, fixes and obscure workarounds. There are countless problems that you will re-introduce with a code rewrite, because the subtleties in aged, thoroughly-used code are not immediately obvious.
I agree, I just think your initial statement was a bit extreme.
Re: Vim's 400 line function to wait for keyboard input
#65Re: Vim's 400 line function to wait for keyboard input
#66But the code works. It supports lots of platforms through choice. Yes, you could make the code prettier if you dropped some platforms. Yes, you could refactor it to use some abstracting libraries that now exist. But the code works . If you rewrote the code, the best result you could end up with is the same functionality that still works. All other possible results are bad. There is nothing to be gained.
Re: Vim's 400 line function to wait for keyboard input
#67But the code works. It supports lots of platforms through choice. Yes, you could make the code prettier if you dropped some platforms. Yes, you could refactor it to use some abstracting libraries that now exist. But the code works . If you rewrote the code, the best result you could end up with is the same functionality that still works. All other possible results are bad. There is nothing to be gained.
I made the page as a companion piece to a blog post[1]. The code works, but it's quite buggy. Also, it is almost certainly broken on outdated OSes. It's just that nobody uses the latest Vim on IRIX or VMS, so no bug reports get filed. A quick glance shows some obvious errors in RealWaitForChar(). For example: with typical preprocessor defines, it uses gettimeofday() in a select() loop. This will break if the system c…
Could you elaborate a bit? I've never experienced a bug related to keyboard input while using Vim, at least that I know of.
Re: Vim's 400 line function to wait for keyboard input
#68Re: Vim's 400 line function to wait for keyboard input
#69reference: https://www.openhub.net/p/vim https://www.openhub.net/p/emacs
Re: Vim's 400 line function to wait for keyboard input
#70If you are all such experts, why don't you "fix it" and then pull request it in.
Please, you can critique something even if you lack the skills to fix it, or the desire to fix it, or the time to fix it. Also, you can point out that something is broken even if you have no suggestions on how to fix it.