-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new terminfo parser #45
Comments
I don't like the idea of removing the fallback database. Why do you want to do so? It''s very small and doesn't hurt anyone. And why do we actually need to parse all the terminfo? What kind of additional information termbox could use from it? |
http://godoc.org/github.com/taylorchu/terminfo#Number I just dont want to have a partial hand-coded definition from terminfo as fallback database. We can just copy some selected terminfo in /usr/share/terminfo/. They are complete, and we can solve desync problem by simply copying. |
Yes, I know terminfo has various entries. Which ones are useful to termbox in your opinion? Because so far we use none of them and there are no problems with that. What problem are you trying to solve? Desync problem is an imaginary one - features termbox uses were not changing for years. |
just some general ideas on less hard coding. for example, Line 83 in 9057ff8
I am unsure that whether all terminals behave this way to this escape I think it is better to respect terminfo more, and only guess if that non-string string On Fri, Aug 15, 2014 at 2:43 PM, nsf notifications@github.com wrote:
|
Find one which doesn't. My problem with terminfo is that it's a turing complete language in there. And I wanted to avoid this complexity at all costs. First, it was just a built-in database. I've collected it by installing all of the terminals I could find in my linux distribution and testing on all of them. Then @guelfey wrote a simple terminfo parser, which was okay for me, because it was parsing only the part which doesn't require any evaluation (like SGR stuff), so here it was. Initially it deleted the fallback database, but we found out, that there are actually people with broken terminfos and I decided to put it back in. Using full terminfo database means for me accepting the bullshit terminals are. I want this to be over, not supporting it. In practice what I do - works, because most people use gnome-based, kde-based, xfce4-based terminals or a handful of standalone ones like xterm, urxvt, aterm, eterm, screen, linux console. I think it's a much better idea to limit the amount of supported terminals, than adding effectively a scripting language interpreter into the library. Unless you have a very convincing argument for full terminfo support, I'm not chaning things the way they are. I see very little value in adding it. The best it gives us - a way to figure out that things do not work. Well, it's nice to know that, but I'm sure users can figure that out. When things do not work - they do not work. I do not need a boolean flag which tells me so. |
sorry for a side question. why is terminfo turing complete? it is just a On Fri, Aug 15, 2014 at 4:27 PM, nsf notifications@github.com wrote:
|
Just a quote from
Does it remind you something? A programming language description. So, the color setting you were talking about (SGR). In order to actually interpret everything terminfo can possibly have written in that field, one has to implement an interpreter for this little scripting language. |
I see. I thought you mean the file format. Maybe dropping terminfo is an extreme but better option :) On Fri, Aug 15, 2014 at 7:04 PM, nsf notifications@github.com wrote:
|
Well, I don't want to drop it completly. I like what we have right now. A simple parser which parses only what we need and it all works nicely. There are areas which require some work. Mostly testing to see what's wrong and how we can fix it, e.g. putty and ssh usage on windows, but overall it all works just fine. |
https://github.com/taylorchu/terminfo
I write a parser that parses entire terminfo file, so it gives more information in boolean and number part. This implementation also does not read in the whole file to slice to save memory.
I would like to remove custom hand-coded definition, and just use system-provided terminfo file. If system does not have terminfo file ready, termbox-go can copy existed terminfo to the project.
The text was updated successfully, but these errors were encountered: