4 ms·
This[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 litt
by swah 12y ago
This[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!
- agumonkey 12y agoMakes me think, when guile-emacs will be done, rust will be mature enough so we (by we I mean they) can rewrite emacs c core in it.
- thristian 12y agoWhat's the advantage of using the limited termbox interface over (n)curses, or just using the low-level terminfo library directly?
- tomjakubowski 12y agoTermbox can be implemented on non-POSIX platforms, whereas terminfo/termcap do not. See https://github.com/nsf/termbox-go https://github.com/nsf/termbox-go which runs on Windows. NB: The C implementation doesn't support Windows, AFAIK, which means this Rust library doesn't either, at least as long as it is based on bindings and not a pure Rust implementation of termbox.