Pure Python Vim clone
11–20 of 85 posts
Re: Pure Python Vim clone
#12Was this more of a blackbox re-implementation, or is more of a 1:1 code port?
Re: Pure Python Vim clone
#13 Q: Why Python?
A: The only alternative would be Haskell, but I still have to learn that.
Wow, that would be interesting.Re: Pure Python Vim clone
#14Re: Pure Python Vim clone
#15My thought process upon seeing this: "Python, huh? Seems like typos in uncommon branches of the code would cause it to randomly fail at runtime, losing your work!" "Now evmar, don't be such a internet nay-sayer, plenty of people write reliable Python code. You just need tests and... yep, there's a tests directory right there in the repository." "Let's take a look. ...there's only one test!?" It looks pretty neat othe…
In the process I have been writing unit tests. Previously the program didn't have any, which was really dumb. It was dumb because, in the three days I've spent doing this, I have found (and fixed) so, _so_ many bugs.
And now I have a decent set of tests, I can change something, rerun them, and have a pretty good idea of whether it worked or not. I don't even have to run the program!
Unit tests. They Will Save You Time™.
Re: Pure Python Vim clone
#16Q: Why Python? A: The only alternative would be Haskell, but I still have to learn that. Wow, that would be interesting.
However I managed to build a _very_ basic proof-of-concept editor (no dependencies) in just a few hundreds lines of code which I could explain, but until now I was too shy to share it as it did not involve magic abstract Haskell-foo ... ;)
Re: Pure Python Vim clone
#17Q: Why Python? A: The only alternative would be Haskell, but I still have to learn that. Wow, that would be interesting.
Re: Pure Python Vim clone
#18Re: Pure Python Vim clone
#19My thought process upon seeing this: "Python, huh? Seems like typos in uncommon branches of the code would cause it to randomly fail at runtime, losing your work!" "Now evmar, don't be such a internet nay-sayer, plenty of people write reliable Python code. You just need tests and... yep, there's a tests directory right there in the repository." "Let's take a look. ...there's only one test!?" It looks pretty neat othe…
I am, right now, or at least two minutes ago before I started reading HN, refactoring big chunks of _my_ text editor, WordGrinder. It's a almost-pure-Lua word processor. In the process I have been writing unit tests. Previously the program didn't have any, which was really dumb. It was dumb because, in the three days I've spent doing this, I have found (and fixed) so, _so_ many bugs. And now I have a decent set of te…
Re: Pure Python Vim clone
#20Earlier quoted context omitted.
I am, right now, or at least two minutes ago before I started reading HN, refactoring big chunks of _my_ text editor, WordGrinder. It's a almost-pure-Lua word processor. In the process I have been writing unit tests. Previously the program didn't have any, which was really dumb. It was dumb because, in the three days I've spent doing this, I have found (and fixed) so, _so_ many bugs. And now I have a decent set of te…
Types. They Will Save You Tests™ :-)