8 ms·
Show HN: Iota – a text editor written in Rust
- leonardinius 12y agoGreat work, thank you. I was awaiting for something like this for a while. Thanks for sharing. As a side note: In the long term what I would really love to see - is Rust GUI for Neovim[1] (embedded library / service). Thus I would be able to both hack around my editor and get VIM's maturity and experience most of the times. [1]: http://neovim.org/ http://neovim.org/ * Update *: spelling and formatting
- Dewie 12y agoI don't get what a Rust GUI would give you, in this case?
- leonardinius 12y agoNothing besides convenience. As a rule of thumb I would love to have editor I find suiting my needs and ideally it would be easy to me to contribute/adjust it to my needs. Regarding [Neo]Vim - I don't think core is something I would touch a lot. Most likely UI/GUI stuff and plugins (vimscripts etc ..). Due to the nature of vimscripts I would prefer to hack around it in something like Python, Lua or Rust. My personal subjective judgement: - Disclaimer: I'm mostly Java, C#, Python developer - I find C++ codebase too hard to follow and understand. I like C, but it lacks syntax sugar etc... - I find Rust promising (hopefully it's something I will be able to read relatively easy and hopefully it would be easier to reason about,especially in regard to memory management).
- deleted 12y ago[deleted]
- gchp 12y agoThanks! It's still very much a work-in-progress, but I like it so far. Plus its been really fun writing it.
- deleted 12y ago[deleted]
- swah 12y agoThis[1] emacs inspired editor, written in Go, also uses termbox (pure go port: https://github.com/nsf/termbox-go https://github.com/nsf/termbox-go) - great little library. I'm rewriting a python command line utility using it and it makes writing text based interfaces much easier. [1] https://github.com/nsf/godit https://github.com/nsf/godit (screenshot: http://nosmileface.ru/images/godit-linux1.png http://nosmileface.ru/images/godit-linux1.png)
- gchp 12y agoI actually contributed quite a bit to a fork of godit called vigo [0]. It gave me lots of insight into how text editors work. When I went to start writing Iota, I found that there was no termbox-type library in Rust, so I created a wrapper [1]. My goal is to create a pure-Rust version, similar to termbox-go. It's a long way from that, but it will get there! [0]: http://github.com/kisielk/vigo http://github.com/kisielk/vigo [1]: http://github.com/gchp/rustbox http://github.com/gchp/rustbox.
- Argorak 12y agoWell, I had an implementation of termbox for `bisschen` (a mail viewer on top of notmuch), but that was pre-cargo and I don't work on it anymore: https://github.com/skade/bisschen/tree/master/src/libtermbox https://github.com/skade/bisschen/tree/master/src/libtermbox
- swah 12y agoCool! So, you're a perfect position to compare your experiences writing text editors in both languages :) (Although Go is more mature at this point)
- gchp 12y agoI guess you could say that! I initially found it much harder to work with Rust, as the language is more strict in a number of ways. But once I began to understand how it works, and began to grasp some of its concepts such as ownership and lifetimes I found it much more powerful than Go. Go has a larger community right now, many more libraries and resources openly available. That's probably one of Rust's downsides right now however its catching up, especially with the launch of crates.io. I don't think it will be long in maturing following the 1.0 release. Saying that, both are enjoyable to work with. But for me Rust wins out!
- brickmort 12y agoA text editor writing itself makes me think of M.C. Esher's 'Drawing Hands' http://en.wikipedia.org/wiki/Drawing_Hands http://en.wikipedia.org/wiki/Drawing_Hands
- krat0sprakhar 12y agoThanks for sharing Greg! I've been waiting for Rust to reach 1.0 so that I can dive-in and work on side projects. Text editors to me (a web programmer) look too intimidating to build from scratch. Can you point to any resources that you used (if any) to understand how text-editors work below-the-hood? Would totally love to build a side-project like this! Thanks!
- hnnewguy 12y agoI fat-finger down-voted you. Sorry.
- Patient0 12y agoI upvoted purely because I saw your comment: so now the balance is restored :-)
- libria 12y agoSince he had intended to upvote but is now back at net zero, I have applied a proxy upvote.
- illumen 12y agoI took one off to restore the natural mistake.
- dminor 12y agoReplying to a comment removes your vote on it, so you've put him at net +1.
- JoshTriplett 12y agoI really hope that's not true. This is not Slashdot. Any reference for that?
- deleted 12y ago[deleted]
- tatterdemalion 12y agoThis is cool & similar to a project I had thought about doing for a while. Have you read The Craft of Text Editing[1]? It's very informative. [1]: http://www.finseth.com/craft/ http://www.finseth.com/craft/
- gchp 12y agoI haven't, this is the first time I've heard of it. Will definitely check it out though, thanks!
- zedr 12y agoExcellent work, Greg!
- gchp 12y agoThank you!
- cjfont 12y agoGreat work, Greg! Kudos for using a language that has yet to see it's first stable release.
- gchp 12y agoThank you! In my experience it hasn't been very unstable. Every now and again something will change that will break things, but that's become more and more infrequent. Overall, rust is great!
- kolev 12y agoI'm so excited to see more and more projects in Rust, which will bring more speed and security in our digital lives. Thank you very much, Greg!
- gchp 12y agoThanks for checking it out! Rust is really exciting, I'm looking forward to seeing what the community can do with it.
- Animats 12y agoThat could be useful when you need an editor in a secure environment. Rustbox, though, still uses C code. A reasonable goal is to re-implement the utilities in Busybox in Rust. Lots of embedded systems use Busybox, and it has vulnerabilities.
- gchp 12y agoIts true that Rustbox uses C code right now. Its just a wrapper around the original termbox library. My goal for rustbox is to be a full Rust port of termbox, removing the reliance on C. Hadn't heard of busybox, will check it out. Thanks!
- paulmlewis 12y agoThere's a core-utils in rust repo https://github.com/uutils/coreutils https://github.com/uutils/coreutils
- bbcbasic 12y agoYou say on the readme: "Iota was born out of my frustrations with existing text editors. Over the years I've tried combinations of simple text editors, IDEs and everything in between. None of them felt right to me, however. Some were too slow & bulky, others were too difficult to customise and still others were platform specific and I couldn't use them on all my machines." So what is the advantage if Iota over Vim?