SlideShare a Scribd company logo
1 of 41
Download to read offline
Tython
Wataru MIYAGUNI


 2011-05-13 Fri




                  .   .   .   .   .   .
Outline

Introduction


Tython Structure


Tython Test Environment


Conclusion




                                    .   .   .   .   .   .
Introduction



Tython




                        .   .   .   .   .   .
What ?




Body.... Muscle Language




                    .   .   .   .   .   .
Muscle Language




                 -
    -

•       -




                        .     .   .   .   .   .
Example




              (               )




          .       .   .   .       .   .
Tython is …


• Interface
     • Not use keyboard
     • Not use mouse
     • Use own body ! muscle !
• Programming Style
     • Exercise
     • No experience welcome !




                                  .   .   .   .   .   .
Demo



YouTube -   Tython   Hello, World!




                                     .   .   .   .   .   .
’Hello, World’ source code




                   .   .   .   .   .   .
Number of typing




191 shots




                    .     .   .   .   .   .
Takes for success




90 minutes




                     .     .   .   .   .   .
Impression



Exercise!!
 •
 •
 •




                          .   .   .   .   .   .
License
MAHALO License (based on MIT License)
Copyright (c) 2011 Wataru MIYAGUNI



(       )
    •


    •                           (                      )


           .(
https://github.com/gongo/Tython/raw/development/LICENSE )


                                          .    .   .   .    .   .
Tython Structure




Tython




                       .    .   .   .   .   .
Structure diagram




              .     .   .   .   .   .
Tython Detector



• Kinect
•




                        .    .   .   .   .   .
Detector                 Vector




   − · − = |− ||− | cos θ
   → →
    a b     → →
             a b
            →·−
            − →
   ..
  . cos θ =
             a b
             →||→|
             − −
            |a b
       −
       →
   − · b = x x +y y +z z
   →a        1 2     1 2  1 2
       −| =
       →
      |a      x  2+y 2+z 2
                1    1        1
                          .       .   .   .   .   .
PoseDetector



• Kinect           (                    )   xyz

•              (                )
    Detect




                        .   .       .   .   .     .
Tythoh PoseDetector Sample
Tython / src / Detector / OwataPoseDetector.cc




                                                 .   .   .   .   .   .
CommandDetector



•       PoseDetector
    •                  ->
•                               Detect




                            .       .    .   .   .   .
Tython CommandDetector Sample
Tython / src / Detector / LeftJabCommandDetector.cc




                                             .   .    .   .   .   .
InputMethod

Detector

           Detector        Command         input string
           LeftJab                         “a”
           RightStraight                   “@”
           RightUpper                      “g”
           LeftHook                        ““

               Detector

                      Detector   Command
                      Thanks



                                            .    .    .   .   .   .
InputMethod Sample




Tython / src / InputMethod / DefaultInputMethod.cc




                                             .       .   .   .   .   .
Others (Like Typhon)
• Compiler
    •            Typhon
             Typhon       Middle language       explain
             aa#{NUM}g    pushNUM               add to stack
             a@a#{NUM}g   copyNUM               copy stack value
                          ..                    ..

    •            Typhon
                     string    binary   decimal
                     aa@a@     +0101    5
                     @@a@a     -1010    -10
• VM (Virtual Machine)
        Typhon

                                            .     .    .    .      .   .
Source Code Reading




https://github.com/gongo/Tython/tree/development




                                            .      .   .   .   .   .
Future (Other Language)




.NET Framework




                          .   .   .   .   .   .
IronPython + Tython = ?




IronTython

                              .   .   .   .   .   .
Future (LocusDetector)




                 .   .   .   .   .   .
LocusDetector Example




                .   .   .   .   .   .
Future (Partner)




(        )




                  .    .   .   .   .   .
Partner Example




             .    .   .   .   .   .
Tython Test Environment




Tython




                          .   .   .   .   .   .
Using Testing Framework



• GoogleTest
    • Google C++ Testing Framework
      http://code.google.com/p/googletest/
    • Google Test
      http://opencv.jp/googletestdocs/




                                             .   .   .   .   .   .
GoogleTest Sample 1
             ASSERT

TEST_F(VectorTest, TestDot) {
  Vector vec1(3.0f, 0.0f, 0.0f);
  Vector vec2(0.0f, 1.0f, 0.0f);
  Vector vec3(1.0f, 1.0f, 1.0f);
  Vector vec4(-12.0f, 0.0f, 0.0f);

    ASSERT_EQ( 1.0f, vec1.dot(vec1)); //   (       )
    ASSERT_EQ( 0.0f, vec1.dot(vec2)); //
    ASSERT_LT( 0.0f, vec1.dot(vec3)); //
    ASSERT_EQ(-1.0f, vec1.dot(vec4)); //   (       )
    ASSERT_GT( 0.0f, vec3.dot(vec4)); //
}

                                           .   .       .   .   .   .
GoogleTest Sample 2

/**
 *
 * 1. push 7 #=> aaaaaag
 * 2. push 2 #=> aaa@a@g
 * 3. add #=> @aaa stack top 2+7 = 9
 * 4. num_out #=> @ a@ stack top
 */
insns = compiler->compile("aaaaaagaaa@a@g@aaa@ a@");
testing::internal::CaptureStdout();
object->run(insns);
ASSERT_STREQ("9", testing::internal::GetCapturedStdout().c_str());


                                            .    .   .    .   .      .
Problem about testing

      …
1
..   PoseDetector
       •
       •               (Kinect)
2
..   CommandDetector
       •                   hogehoge
       • sleep()
       •
            • 1,2
       • Kinect                   (30           )
            •




                                        .   .       .   .   .   .
GoogleMock
  • Google C++ Mocking Framework
   http://code.google.com/p/googlemock/
  • Google Mock
   http://opencv.jp/googlemockdocs/




                                          .   .   .   .   .   .
How?



•
    Tython / test / CommandDetectorTest.cc
•
    Tython / test / LeftJabCommandDetectorTest.cc




                                             .   .   .   .   .   .
Coverage




http://gongo.github.com/hago/30_tython_coverage/index.html




                                            .   .    .   .   .   .
Conclusion

• Kinect
    •
    •
•
    •
    •          ( o )
• TDD
    • Kinect
    •




                               .   .   .   .   .   .
Finish!!



         GKD
(Gongo Kinect Diet)



                 .   .   .   .   .   .

More Related Content

What's hot

matplotlib-installatin-interactive-contour-example-guide
matplotlib-installatin-interactive-contour-example-guidematplotlib-installatin-interactive-contour-example-guide
matplotlib-installatin-interactive-contour-example-guide
Arulalan T
 

What's hot (9)

Tiramisu をちょっと、味見してみました。
Tiramisu をちょっと、味見してみました。Tiramisu をちょっと、味見してみました。
Tiramisu をちょっと、味見してみました。
 
Tensor comprehensions
Tensor comprehensionsTensor comprehensions
Tensor comprehensions
 
Neurotech Solutions Ltd: Рекомендации по Stage3D: выбор наиболее подходящего ...
Neurotech Solutions Ltd: Рекомендации по Stage3D: выбор наиболее подходящего ...Neurotech Solutions Ltd: Рекомендации по Stage3D: выбор наиболее подходящего ...
Neurotech Solutions Ltd: Рекомендации по Stage3D: выбор наиболее подходящего ...
 
Tiramisu概要
Tiramisu概要Tiramisu概要
Tiramisu概要
 
Intro to Python (High School) Unit #3
Intro to Python (High School) Unit #3Intro to Python (High School) Unit #3
Intro to Python (High School) Unit #3
 
matplotlib-installatin-interactive-contour-example-guide
matplotlib-installatin-interactive-contour-example-guidematplotlib-installatin-interactive-contour-example-guide
matplotlib-installatin-interactive-contour-example-guide
 
Pytest - testing tips and useful plugins
Pytest - testing tips and useful pluginsPytest - testing tips and useful plugins
Pytest - testing tips and useful plugins
 
from java to c
from java to cfrom java to c
from java to c
 
EuroPython 2016 - Do I Need To Switch To Golang
EuroPython 2016 - Do I Need To Switch To GolangEuroPython 2016 - Do I Need To Switch To Golang
EuroPython 2016 - Do I Need To Switch To Golang
 

Similar to 肉体言語 Tython

Web Developing In Search
Web Developing In SearchWeb Developing In Search
Web Developing In Search
Frank Xu
 
Python-GTK
Python-GTKPython-GTK
Python-GTK
Yuren Ju
 
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみたスマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
Taro Matsuzawa
 
Python GTK (Hacking Camp)
Python GTK (Hacking Camp)Python GTK (Hacking Camp)
Python GTK (Hacking Camp)
Yuren Ju
 

Similar to 肉体言語 Tython (20)

Swift for tensorflow
Swift for tensorflowSwift for tensorflow
Swift for tensorflow
 
Web Developing In Search
Web Developing In SearchWeb Developing In Search
Web Developing In Search
 
Static Analysis in Go
Static Analysis in GoStatic Analysis in Go
Static Analysis in Go
 
TinyOS 2.1 Tutorial: Hands-on Session
TinyOS 2.1 Tutorial: Hands-on SessionTinyOS 2.1 Tutorial: Hands-on Session
TinyOS 2.1 Tutorial: Hands-on Session
 
Overview of Python - Bsides Detroit 2012
Overview of Python - Bsides Detroit 2012Overview of Python - Bsides Detroit 2012
Overview of Python - Bsides Detroit 2012
 
Python-GTK
Python-GTKPython-GTK
Python-GTK
 
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみたスマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
 
Numba: Array-oriented Python Compiler for NumPy
Numba: Array-oriented Python Compiler for NumPyNumba: Array-oriented Python Compiler for NumPy
Numba: Array-oriented Python Compiler for NumPy
 
JIT compilation for CPython
JIT compilation for CPythonJIT compilation for CPython
JIT compilation for CPython
 
The hangover: A "modern" (?) high performance approach to build an offensive ...
The hangover: A "modern" (?) high performance approach to build an offensive ...The hangover: A "modern" (?) high performance approach to build an offensive ...
The hangover: A "modern" (?) high performance approach to build an offensive ...
 
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
 
Thinking Outside The [Sand]Box
Thinking Outside The [Sand]BoxThinking Outside The [Sand]Box
Thinking Outside The [Sand]Box
 
Leaning on the two Ts
Leaning on the two TsLeaning on the two Ts
Leaning on the two Ts
 
图解Git
图解Git图解Git
图解Git
 
Python GTK (Hacking Camp)
Python GTK (Hacking Camp)Python GTK (Hacking Camp)
Python GTK (Hacking Camp)
 
[Ruxcon 2011] Post Memory Corruption Memory Analysis
[Ruxcon 2011] Post Memory Corruption Memory Analysis[Ruxcon 2011] Post Memory Corruption Memory Analysis
[Ruxcon 2011] Post Memory Corruption Memory Analysis
 
Golang
GolangGolang
Golang
 
Kyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdfKyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdf
 
0507 057 01 98 * Adana Cukurova Klima Servisleri
0507 057 01 98 * Adana Cukurova Klima Servisleri0507 057 01 98 * Adana Cukurova Klima Servisleri
0507 057 01 98 * Adana Cukurova Klima Servisleri
 
Optimizing mobile applications - Ian Dundore, Mark Harkness
Optimizing mobile applications - Ian Dundore, Mark HarknessOptimizing mobile applications - Ian Dundore, Mark Harkness
Optimizing mobile applications - Ian Dundore, Mark Harkness
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

肉体言語 Tython