SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Downloaden Sie, um offline zu lesen
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)



                 .   .   .   .   .   .

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Ähnlich wie 肉体言語 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
 

Ähnlich wie 肉体言語 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
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
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
 
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
 
+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@
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
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
 
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
 
"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 ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
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
 
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
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
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
 
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
 
+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...
 
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
 
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...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

肉体言語 Tython