Author Topic: VrrtepCLI  (Read 21112 times)

0 Members and 1 Guest are viewing this topic.

Offline `Eylan Ayfalulukanä

  • Palulukan Makto
  • *****
  • *
  • *
  • Posts: 4757
  • us United States
  • Karma: 44
  • Palulukan alu Kenya 06/23/1996 - 01/15/2017
    • The Lionlamb website
Re: VrrtepCLI: Translator+
« Reply #80 on: May 25, 2011, 03:47:35 pm »
Wou Wou Wou nang

What a way cool tool!

I have seen you post windows from this program is different places; now I know what it is.

I can't wait to read the whole thread, and then deploy it on all the machines I normally use (Two Linux (Fedora 14), one Window$ XP, one Window$ 7) But sadly, this will probably have to wait until the weekend.

Yawey ngahu!
pamrel si ro eylan.falulukana@gmail.com

Offline Blue Elf

  • Palulukan Makto
  • *****
  • *
  • *
  • Posts: 5499
  • cz Czech Republic
  • Karma: 112
    • My attempt for blog
Re: VrrtepCLI: Translator+
« Reply #81 on: May 25, 2011, 04:16:02 pm »
I'm not 100% sure what would be causing that issue. and this is ONLY for the scramble game? Linux had that problem before, but that was Python's fault and I fixed it. it was scrambling the components of ì and ä. (ì is actually \xc3\xac to python, two characters in one. and ä is \xc3\xa4)

as for the options, I can look into printing the local language translation of the currently scrambled word.

Actually, already, you are able to play the quiz game in both directions:
na'vi question, local language answers OR local language question, na'vi answers. you can play in any language. for example, try running:

(note that if you use the -l parameter with no language flag, -eng is the default)

vrrtepcli -l -q (english questions, na'vi answers)

vrrtepcli -de -q (na'vi questions, german answers)

this is all in the README
Great! But help doesn't say anything about -q switch. Readme is ok (unfortunately, it is not read earlier than everything goes wrong way :))

I tried to set default locale for nonUnicode progs to English/USA. Now everything seems to be printed Ok, but problem with entering reply persists. It seems to be problem when reading keyboard inside program, reading from console works:
Code: [Select]
C:\Documents and Settings\Administrator>vrrtepcli -n nìn

C:\Documents and Settings\Administrator>echo off
Vrrtep CLI v1.9 by Tirea Aean. run 'vrrtepcli -h' for usage.
Windows version by Swoka Ikran
Standalone version

vtr. look at


C:\Documents and Settings\Administrator>vrrtepcli -n 'ärìp

C:\Documents and Settings\Administrator>echo off
Vrrtep CLI v1.9 by Tirea Aean. run 'vrrtepcli -h' for usage.
Windows version by Swoka Ikran
Standalone version

vtr. move

Maybe you should create debug version which prints what users entered during scramble game, it could help
Oe lu skxawng skxakep. Slä oe nerume mi.
"Oe tasyätxaw ulte koren za'u oehu" (Limonádový Joe)


Offline Blue Elf

  • Palulukan Makto
  • *****
  • *
  • *
  • Posts: 5499
  • cz Czech Republic
  • Karma: 112
    • My attempt for blog
Re: VrrtepCLI: Translator+
« Reply #82 on: May 25, 2011, 04:23:35 pm »
And one interesting output:
Code: [Select]
Word: game, uvan letokx sport

1 - swaw
2 - meyp
3 - uvan

vrrtep[1-5]:> 3

Srane! >:D score: 7
I looked into dictionary - it is written there in the same way. I think uvan letokx should be independent word (headword), on the different line (otherwise user has a hint)
Oe lu skxawng skxakep. Slä oe nerume mi.
"Oe tasyätxaw ulte koren za'u oehu" (Limonádový Joe)


Offline Swoka Ikran

  • Palulukan Makto
  • *****
  • *
  • Posts: 1642
  • Karma: 29
Re: VrrtepCLI: Translator+
« Reply #83 on: May 25, 2011, 05:10:38 pm »
Great! But help doesn't say anything about -q switch. Readme is ok (unfortunately, it is not read earlier than everything goes wrong way :))
By help I'm assuming you mean the -h option? I'll add a note indicating that -l and other such can be used with -q...

Maybe you should create debug version which prints what users entered during scramble game, it could help
http://swokaikran.skxawng.lu/files/vcli_win_debug.zip - Standalone version only to keep size down.

When you enter an answer, you'll get "Response: <What you typed>" directly below it. The output should be EXACTLY what you enter. The output is not altered in any way.
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!

 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Offline Tirea Aean

  • The Blue One
  • Olo'eyktan Anawm
  • Palulukan Makto
  • *****
  • *
  • *
  • *
  • Posts: 9913
  • nv Eywa'eveng
  • Karma: 243
  • Oeri ran lu srung
    • Tirea Aean
Re: VrrtepCLI: Translator+
« Reply #84 on: May 25, 2011, 08:15:11 pm »
Great! But help doesn't say anything about -q switch. Readme is ok (unfortunately, it is not read earlier than everything goes wrong way :))
By help I'm assuming you mean the -h option? I'll add a note indicating that -l and other such can be used with -q...

Maybe you should create debug version which prints what users entered during scramble game, it could help
http://swokaikran.skxawng.lu/files/vcli_win_debug.zip - Standalone version only to keep size down.

When you enter an answer, you'll get "Response: <What you typed>" directly below it. The output should be EXACTLY what you enter. The output is not altered in any way.


way to beat me on that. ;D can you send me the files that you changed? I'm tryin my best to keep the linux/mac and windows versions parallel.

kelku ikranä a hawnventi yom podcast (na'vi-only): https://tirearadio.com/podcast
Learn Na'vi Discord Chat: https://discord.gg/WF6qcmv

Offline Swoka Ikran

  • Palulukan Makto
  • *****
  • *
  • Posts: 1642
  • Karma: 29
Re: VrrtepCLI: Translator+
« Reply #85 on: May 25, 2011, 09:29:28 pm »
way to beat me on that. ;D can you send me the files that you changed? I'm tryin my best to keep the linux/mac and windows versions parallel.
That debug version shouldn't be a public release...I hacked it together in ~2min for Blue Elf to test his unicode issue with. All the changes do is echo exactly what is typed in. If the program isn't receiving ä or ì properly, it'll echo garbage in place of them...

As for files changed, the only difference is in scramble.py. In the game() function, the bold line was added:
Quote
a = raw_input("vrrtep:> ")
print "Response: "+a+"\n"
while a!= word and a!= "ans" and a!= "/quit" a

If you mean the help screen changes...that's not done yet.
« Last Edit: May 25, 2011, 10:08:23 pm by Swoka Ikran »
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!

 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Offline Tirea Aean

  • The Blue One
  • Olo'eyktan Anawm
  • Palulukan Makto
  • *****
  • *
  • *
  • *
  • Posts: 9913
  • nv Eywa'eveng
  • Karma: 243
  • Oeri ran lu srung
    • Tirea Aean
Re: VrrtepCLI: Translator+
« Reply #86 on: May 25, 2011, 10:39:14 pm »
way to beat me on that. ;D can you send me the files that you changed? I'm tryin my best to keep the linux/mac and windows versions parallel.
That debug version shouldn't be a public release...I hacked it together in ~2min for Blue Elf to test his unicode issue with. All the changes do is echo exactly what is typed in. If the program isn't receiving ä or ì properly, it'll echo garbage in place of them...

As for files changed, the only difference is in scramble.py. In the game() function, the bold line was added:
Quote
a = raw_input("vrrtep:> ")
print "Response: "+a+"\n"
while a!= word and a!= "ans" and a!= "/quit" a

If you mean the help screen changes...that's not done yet.

oh, okay.

I'll take care of the help screen for all versions

I also just took care of some things at request of a user:

clear the screen to make it look cleaner
use sleep to see program's response to your answer
record scores in both scramble and quiz in fraction and percents instead of integer accumulation

EDIT: also, I wanna actually get to antiprefix() and lenition before releasing again. this will be a major release.
« Last Edit: May 25, 2011, 10:44:28 pm by Tirea Aean »

kelku ikranä a hawnventi yom podcast (na'vi-only): https://tirearadio.com/podcast
Learn Na'vi Discord Chat: https://discord.gg/WF6qcmv

Offline Swoka Ikran

  • Palulukan Makto
  • *****
  • *
  • Posts: 1642
  • Karma: 29
Re: VrrtepCLI: Translator+
« Reply #87 on: May 25, 2011, 11:04:28 pm »
I'll take care of the help screen for all versions
See end of this post.

I also just took care of some things at request of a user:

clear the screen to make it look cleaner
I'm assuming this is only in the quiz/scramble?

record scores in both scramble and quiz in fraction and percents instead of integer accumulation
Good idea :)

EDIT: also, I wanna actually get to antiprefix() and lenition before releasing again. this will be a major release.
I just finished a bugfix release before I found your post. It eliminates the Python error that Blue Elf had about character mapping (the CMD now does a CHCP 437 when on non-English OSes to prevent a crash), and adds -q to the help screen. Do you want it or should I delete it and just wait?
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!

 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Offline Tirea Aean

  • The Blue One
  • Olo'eyktan Anawm
  • Palulukan Makto
  • *****
  • *
  • *
  • *
  • Posts: 9913
  • nv Eywa'eveng
  • Karma: 243
  • Oeri ran lu srung
    • Tirea Aean
Re: VrrtepCLI: Translator+
« Reply #88 on: May 25, 2011, 11:12:07 pm »
yes, those changes are in the games.

uhm... sure, I'll take that and upload real quick.

Okay. seeing how things are going so far, is it even a good idea to have users download this? it gets updated extremely often.

EDIT: I will not be adding local translation to scramble. that makes it obvious what the answer is, defeating the purpose.

DOUBLE EDIT: How did you get the loop to work when using the -l param?
« Last Edit: May 25, 2011, 11:22:36 pm by Tirea Aean »

kelku ikranä a hawnventi yom podcast (na'vi-only): https://tirearadio.com/podcast
Learn Na'vi Discord Chat: https://discord.gg/WF6qcmv

Offline Swoka Ikran

  • Palulukan Makto
  • *****
  • *
  • Posts: 1642
  • Karma: 29
Re: VrrtepCLI: Translator+
« Reply #89 on: May 25, 2011, 11:22:38 pm »
yes, those changes are in the games.

uhm... sure, I'll take that and upload real quick.
http://swokaikran.skxawng.lu/files/vcli_win.zip - That has the codepage and help screen fixes.

Okay. seeing how things are going so far, is it even a good idea to have users download this? it gets updated extremely often.
Assuming there's no further issues, I don't see any reason why not. It works perfectly on English systems, and everything except scramble works on localized systems (when their locale is set to U.S. English.)

EDIT: I will not be adding local translation to scramble. that makes it obvious what the answer is, defeating the purpose.
Agreed...I'd leave that out.
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!

 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Offline Tirea Aean

  • The Blue One
  • Olo'eyktan Anawm
  • Palulukan Makto
  • *****
  • *
  • *
  • *
  • Posts: 9913
  • nv Eywa'eveng
  • Karma: 243
  • Oeri ran lu srung
    • Tirea Aean
Re: VrrtepCLI: Translator+
« Reply #90 on: May 25, 2011, 11:24:35 pm »
does that contain both source and compiled? or is it just the compiled?

also, see my double edit.

kelku ikranä a hawnventi yom podcast (na'vi-only): https://tirearadio.com/podcast
Learn Na'vi Discord Chat: https://discord.gg/WF6qcmv

Offline Swoka Ikran

  • Palulukan Makto
  • *****
  • *
  • Posts: 1642
  • Karma: 29
Re: VrrtepCLI: Translator+
« Reply #91 on: May 25, 2011, 11:40:05 pm »
does that contain both source and compiled? or is it just the compiled?

also, see my double edit.
Both versions.

DOUBLE EDIT: How did you get the loop to work when using the -l param?
The code looks to see if the first argument is a number. If so, I just call the program X number of times with whatever parameters the user set. Looping does not support putting the words on the command line right now. There's ways to support it, but the code is more complex and will come at a later date.

Off topic...Phillies game is in the 18th inning...last time a game went 17+ was in Baltimore in 2003.
« Last Edit: May 25, 2011, 11:46:23 pm by Swoka Ikran »
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!

 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Offline Blue Elf

  • Palulukan Makto
  • *****
  • *
  • *
  • Posts: 5499
  • cz Czech Republic
  • Karma: 112
    • My attempt for blog
Re: VrrtepCLI: Translator+
« Reply #92 on: May 26, 2011, 01:12:29 am »
Today's test with version from 12:10 am:
Code: [Select]
C:\WINDOWS>chcp 437
Active code page: 437

C:\WINDOWS>vrrtepcli -s

C:\WINDOWS>echo off
Vrrtep CLI v1.9 by Tirea Aean. run 'vrrtepcli -h' for usage.
Windows version by Swoka Ikran
Standalone version

*DEBUG VERSION*
word: zkeäw

vrrtep:> zekwä
Response: zekwä


Kehe. :\ score: -1

vrrtep:> ans
zekwä
score: -2
---trimmed-----
Srane! >:D score: 2

word: fro?txl -> ? not shown

vrrtep:> ans
Response: ans

ftx?lor -> ? not shown
score: 1
My thoughts:
1/ Windows$ MUST have set default nonUnicode locale to English, otherwise äì is not displayed correctly (on THIS computer i have set it to Czech, yesterday i tested on my home PC). Or there is some error in text output.....
2/ user input seems to be received correctly (according debug output), so problem seems to be in comparison. What about printing both entered and expected word as serie of hexa numbers?
Oe lu skxawng skxakep. Slä oe nerume mi.
"Oe tasyätxaw ulte koren za'u oehu" (Limonádový Joe)


Offline Swoka Ikran

  • Palulukan Makto
  • *****
  • *
  • Posts: 1642
  • Karma: 29
Re: VrrtepCLI: Translator+
« Reply #93 on: May 26, 2011, 01:57:39 am »
My thoughts:
1/ Windows$ MUST have set default nonUnicode locale to English, otherwise äì is not displayed correctly (on THIS computer i have set it to Czech, yesterday i tested on my home PC). Or there is some error in text output.....
Yes it does...the East Europe code-pages (which are what is used by Czech) don't contain the characters you need, so Python mangles the output.

What about printing both entered and expected word as serie of hexa numbers?
Having just tried it for a few minutes, I just discovered that scramble is broken on English Windows as well...it marks right answers as wrong when they contain ä or ì. Unicode()'ing various things does not help and causes crashes. I need to look at it when I'm more alert (it's 3am here...)

Here's another debug version that gives the answer, as well as hex dumps of correct word and input: http://swokaikran.skxawng.lu/files/vcli_win_debug.zip

...using that version, the problem is VERY obvious on words with ì and ä...
« Last Edit: May 26, 2011, 02:00:10 am by Swoka Ikran »
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!

 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Offline Blue Elf

  • Palulukan Makto
  • *****
  • *
  • *
  • Posts: 5499
  • cz Czech Republic
  • Karma: 112
    • My attempt for blog
Re: VrrtepCLI: Translator+
« Reply #94 on: May 26, 2011, 05:49:33 am »
Well, tried, here's result:
Code: [Select]
word: mphäeìt

debug: answer: tìpähem

debug: expected word as hex: 0000  74 c3 ac 70 c3 a4 68 65 6d
     t..p..hem

vrrtep:> tìpähem
debug: entered data: 0000  74 8d 70 84 68 65 6d                              t.p.hem

Kehe. :\ score: 1

vrrtep:> ans
tìpähem
score: 0

word: ìaxph

debug: answer: hapxì

debug: expected word as hex: 0000  68 61 70 78 c3 ac
     hapx..

vrrtep:> hapxì
debug: entered data: 0000  68 61 70 78 8d                                    hapx.

Kehe. :\ score: -1
Seems, that you get response like ANSI coded string, but compare it with UTF-8 coded string.
Oe lu skxawng skxakep. Slä oe nerume mi.
"Oe tasyätxaw ulte koren za'u oehu" (Limonádový Joe)


Offline Blue Elf

  • Palulukan Makto
  • *****
  • *
  • *
  • Posts: 5499
  • cz Czech Republic
  • Karma: 112
    • My attempt for blog
Re: VrrtepCLI: Translator+
« Reply #95 on: May 26, 2011, 09:44:16 am »
and another improvement is needed for quiz game:
Code: [Select]
Word: group of people, party

1 - kaym
2 - pongu
3 - pongu

vrrtep[1-5]:>
two options are the same - occurred once during several hundreds of rounds, but is better to fix it.
Oe lu skxawng skxakep. Slä oe nerume mi.
"Oe tasyätxaw ulte koren za'u oehu" (Limonádový Joe)


Offline Swoka Ikran

  • Palulukan Makto
  • *****
  • *
  • Posts: 1642
  • Karma: 29
Re: VrrtepCLI: Translator+
« Reply #96 on: May 26, 2011, 11:50:03 am »
Well, tried, here's result:
Code: [Select]
word: mphäeìt

debug: answer: tìpähem

debug: expected word as hex: 0000  74 c3 ac 70 c3 a4 68 65 6d
     t..p..hem

vrrtep:> tìpähem
debug: entered data: 0000  74 8d 70 84 68 65 6d                              t.p.hem

Kehe. :\ score: 1

vrrtep:> ans
tìpähem
score: 0

word: ìaxph

debug: answer: hapxì

debug: expected word as hex: 0000  68 61 70 78 c3 ac
     hapx..

vrrtep:> hapxì
debug: entered data: 0000  68 61 70 78 8d                                    hapx.

Kehe. :\ score: -1
Seems, that you get response like ANSI coded string, but compare it with UTF-8 coded string.
That appears to be it...looks like it's unicode() time...

and another improvement is needed for quiz game:
Code: [Select]
Word: group of people, party

1 - kaym
2 - pongu
3 - pongu

vrrtep[1-5]:>
two options are the same - occurred once during several hundreds of rounds, but is better to fix it.
I had that happen once...does need fixing because it gives away the answer :P
« Last Edit: May 26, 2011, 11:52:18 am by Swoka Ikran »
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!

 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Offline Tirea Aean

  • The Blue One
  • Olo'eyktan Anawm
  • Palulukan Makto
  • *****
  • *
  • *
  • *
  • Posts: 9913
  • nv Eywa'eveng
  • Karma: 243
  • Oeri ran lu srung
    • Tirea Aean
Re: VrrtepCLI: Translator+
« Reply #97 on: May 26, 2011, 11:58:53 am »
and another improvement is needed for quiz game:
Code: [Select]
Word: group of people, party

1 - kaym
2 - pongu
3 - pongu

vrrtep[1-5]:>
two options are the same - occurred once during several hundreds of rounds, but is better to fix it.


they are both actually correct.

I could only find a way to heavily reduce the chances of this, not 100% get rid of all chance for it to happen. it probably happens now like 1 in a million or something. (linux version, not released yet)

kelku ikranä a hawnventi yom podcast (na'vi-only): https://tirearadio.com/podcast
Learn Na'vi Discord Chat: https://discord.gg/WF6qcmv

Offline Swoka Ikran

  • Palulukan Makto
  • *****
  • *
  • Posts: 1642
  • Karma: 29
Re: VrrtepCLI: Translator+
« Reply #98 on: May 26, 2011, 12:54:21 pm »
I could only find a way to heavily reduce the chances of this, not 100% get rid of all chance for it to happen. it probably happens now like 1 in a million or something. (linux version, not released yet)
Reducing odds is better than nothing :) but there may be a way to fully eliminate the issue. Not sure about Python, but in Autoit...(Comments added for clarity):


Can you send me your fix so I can put it in my version? As soon as I finish helping my friend with a crashed PC, I'm going to look into a fix for the unicode issue in scramble.
« Last Edit: May 26, 2011, 01:00:00 pm by Swoka Ikran »
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!

 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Offline Tirea Aean

  • The Blue One
  • Olo'eyktan Anawm
  • Palulukan Makto
  • *****
  • *
  • *
  • *
  • Posts: 9913
  • nv Eywa'eveng
  • Karma: 243
  • Oeri ran lu srung
    • Tirea Aean
Re: VrrtepCLI: Translator+
« Reply #99 on: May 26, 2011, 02:01:01 pm »

Can you send me your fix so I can put it in my version? As soon as I finish helping my friend with a crashed PC, I'm going to look into a fix for the unicode issue in scramble.

I've ported your code and credited you in the comments and did some re-writing of the quiz module to make it fit. it currently works on the linux version.

kelku ikranä a hawnventi yom podcast (na'vi-only): https://tirearadio.com/podcast
Learn Na'vi Discord Chat: https://discord.gg/WF6qcmv

 

Become LearnNavi's friend on Facebook Follow LearnNavi on Twitter! Watch LearnNavi's videos on YouTube

SMF 2.0.15 | SMF © 2017, Simple Machines
Privacy Policy
| XHTML | RSS | WAP2 | Site Rules

LearnNavi is not affiliated with the official Avatar website,
James Cameron, LightStorm Entertainment or The Walt Disney Company.
All trademarks and servicemarks are the properties of their respective owners.
Images in the LearnNavi.org Forums and Gallery may not be used without permission.

LearnNavi Affiliates:
ToS

LearnNavi is the community to learn Na'vi, the Avatar Language
"A place where real friendships are made." -Paul Frommer

AvatarMeet | Learn Na'vi Forum | Learn Na'vi Wiki | Na'viteri

LearnNavi