Bityi (translating code editor): Difference between revisions

From OLPC
Jump to navigation Jump to search
(branding)
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Source-code editor with transparent native-language display==
==Source-code editor with transparent native-language display==
Almost all programming is done in programming "languages" based on English. These are really codes, much less than languages, with a limited vocabulary. Still, it's a significant barrier for other-language programmers, especially young ones. A modern computer, even a cheap one, would have no trouble doing transparent, real-time translation into the user's natural language. For instance, on disk you'd have python "if ... else...", but on screen, you'd see (and write) "si... sino..." (spanish).
Almost all programming is done in programming "languages" based on English. These are really codes, much less than languages, with a limited vocabulary. Still, it's a significant barrier for other-language programmers, especially young ones. A modern computer, even a cheap one, would have no trouble doing transparent, real-time translation into the user's natural language. For instance, on disk you'd have python "if ... else...", but on screen, you'd see (and write) "si... sino..." (spanish).

Note that the problem is not quite THAT simple. It must deal not only with the keywords and the builtins of the language. It should have a facility for translating identifiers from modules also.


== Current design thoughts... ==
== Current design thoughts... ==
Line 9: Line 11:
has been moved to the [[Talk:Source-code editor with transparent native-language display|talk page]].
has been moved to the [[Talk:Source-code editor with transparent native-language display|talk page]].


==Branding==
==Name==

The word "bityi" is drawn from John Wilkins's 1664 artificial language. It is the word for language number 42 (bi-: discourse; -t-:5th of 9 subgenuses ; -yi: 8th of 9 subspecies): in Douglas Adams's world of the babel fish, this would be the Final Answer Language. Obviously, such a linguistically triumphalistic name is meant ironically: Wilkins's language is best known as the butt of one of Borges's intricate jokes, and the "final answer" of 42 is no good to anyone without a question. I hope that this project will be successful, but it can only avoid the pitfalls of previous Grand Linguistic Plans if it focuses on being as useful and unobtrusive as possible and NOT on being a total solution for everything.

===Possible criticism===
Several people with whom I have talked about this have voiced concern that this would mean that a programmer would be hamstrung by not learning "real" python (or other programming language), but the translated version. This is a valid criticism, but I have two responses.

# Most importantly, I intend this as a stepping stone, not as an end in itself. I expect users of this functionality to use it to help them to learn the English idioms, even if they continue to prefer to code in their languages. I also expect that as they get into programming, they will be more motivated to learn English for a thousand other reasons - more than they would have if learning (a few words of) English had been an initial hurdle.

# Secondly, I expect to make this a solid, useful, and ubiquitous enough functionality that, even though they will eventually have to learn to read English code and comments, they will never be forced to retrain their fingers to type 'if' in English unless they want to.

==Status==

A proof-of-concept based on IDLE is coming along decently at the [[git]] tree for idly-develop: //dev.laptop.org/git/projects/idly-develop .


*Translation works and tested
The name for this concept should not require translation, thus it should not be in a natural language. The word "bityi" is drawn whimsically from John Wilkins' artificial language - best known as the butt of Borges' sophisticated joke "El Idioma Analítico de John Wilkins". In a nod to Douglas Adams and his babel fish, it refers to discourse number 42 in Wilkins' tables (bi- discourse; t-5th of 9 subgenuses ; yi, 7th of 9 subspecies). This is intended to indicate that there will be no final answer to the problems presented by language differences, nor would one even be desirable (what good is 42?); yet the search is worthwhile.
*Adding / removing multiple dictionaries (in the future, for multiple files) seems to work but is not well tested.
*File IO for dictionaries is implemented for single files, work is underway to update it to use one file per language after the first two (english and preferred)
*Using the actual IDLE (with syntax coloring) in another language works, for shell and files. Currently the only dictionaries are spanish keywords and builtins.
*Dictionary changes with an open file are unimplemented.
*UI additions (tooltips and new menu items) are in process:
:*Preference dialog changes are working
:*one menu item which toggles the window from English to otherLang (this sometimes breaks the syntax coloring, currently.)
:*Tooltips only for keywords, using mousein/mouseout. Does not notice when you move your mouse between two contiguous keywords - to me, not a problem.

Latest revision as of 20:14, 5 March 2009

Source-code editor with transparent native-language display

Almost all programming is done in programming "languages" based on English. These are really codes, much less than languages, with a limited vocabulary. Still, it's a significant barrier for other-language programmers, especially young ones. A modern computer, even a cheap one, would have no trouble doing transparent, real-time translation into the user's natural language. For instance, on disk you'd have python "if ... else...", but on screen, you'd see (and write) "si... sino..." (spanish).

Note that the problem is not quite THAT simple. It must deal not only with the keywords and the builtins of the language. It should have a facility for translating identifiers from modules also.

Current design thoughts...

are at Source-code editor with transparent native-language display/design.

Older discussion

has been moved to the talk page.

Name

The word "bityi" is drawn from John Wilkins's 1664 artificial language. It is the word for language number 42 (bi-: discourse; -t-:5th of 9 subgenuses ; -yi: 8th of 9 subspecies): in Douglas Adams's world of the babel fish, this would be the Final Answer Language. Obviously, such a linguistically triumphalistic name is meant ironically: Wilkins's language is best known as the butt of one of Borges's intricate jokes, and the "final answer" of 42 is no good to anyone without a question. I hope that this project will be successful, but it can only avoid the pitfalls of previous Grand Linguistic Plans if it focuses on being as useful and unobtrusive as possible and NOT on being a total solution for everything.

Possible criticism

Several people with whom I have talked about this have voiced concern that this would mean that a programmer would be hamstrung by not learning "real" python (or other programming language), but the translated version. This is a valid criticism, but I have two responses.

  1. Most importantly, I intend this as a stepping stone, not as an end in itself. I expect users of this functionality to use it to help them to learn the English idioms, even if they continue to prefer to code in their languages. I also expect that as they get into programming, they will be more motivated to learn English for a thousand other reasons - more than they would have if learning (a few words of) English had been an initial hurdle.
  1. Secondly, I expect to make this a solid, useful, and ubiquitous enough functionality that, even though they will eventually have to learn to read English code and comments, they will never be forced to retrain their fingers to type 'if' in English unless they want to.

Status

A proof-of-concept based on IDLE is coming along decently at the git tree for idly-develop: //dev.laptop.org/git/projects/idly-develop .

  • Translation works and tested
  • Adding / removing multiple dictionaries (in the future, for multiple files) seems to work but is not well tested.
  • File IO for dictionaries is implemented for single files, work is underway to update it to use one file per language after the first two (english and preferred)
  • Using the actual IDLE (with syntax coloring) in another language works, for shell and files. Currently the only dictionaries are spanish keywords and builtins.
  • Dictionary changes with an open file are unimplemented.
  • UI additions (tooltips and new menu items) are in process:
  • Preference dialog changes are working
  • one menu item which toggles the window from English to otherLang (this sometimes breaks the syntax coloring, currently.)
  • Tooltips only for keywords, using mousein/mouseout. Does not notice when you move your mouse between two contiguous keywords - to me, not a problem.