みんな大好き! hello, world

Download みんな大好き! Hello, World

If you can't read please download the document

Upload: naohiro-aota

Post on 19-May-2015

2.099 views

Category:

Technology


1 download

TRANSCRIPT

  • 1. ! Hello, World

2. Hello, World 3. % vim hello.py% chmod u+x hello.py% 4. % vim hello.py% chmod u+x hello.py% ./hello.py 5. ZSH 6. unsigned int 0x241001 0010 1 (00001) WC_LIST0xc02110 0000 2 (00010) WC_SUBLIST0x083000 0100 3 (00011) WC_PIPE0x026000 0001 6 (00110) WC_SIMPLE0x000WC_SIMPLE0x000000 0000 0 (00000) WC_END 7. WC_LIST01 00100: Z_SIMPLE1: Z_END0: Z_DISOWN0: Z_ASYNCtest -f hoge && 1: Z_SYNCfuga &0: Z_TIMED 8. WC_SUBLIST110 000011: SUBLIST0: WC_SUBLIST_SIMPLE0: WC_SUBLIST_NOT0: WC_SUBLIST_COPROCtest -f hoge && 0: WC_SUBLIST_OR... 0: WC_SUBLIST_AND 9. unsigned int 0x241001 0010 1 (00001) WC_LIST0xc02110 0000 2 (00010) WC_SUBLIST0x083000 0100 3 (00011) WC_PIPE0x026000 0001 6 (00110) WC_SIMPLE0x000WC_SIMPLE0x000000 0000 0 (00000) WC_END 10. WC_PIPE 000 0110 000011: 0: WC_PIPE_MIDtail -f hoge | ... 11. WC_SIMPLE 000 0001 test -f hoge 12. WC_SIMPLE 000 000000000: 0: 3?0: ?test 13. 3?abc 00000 0110 0011 (c) 0110 0010 (b) 0110 0001 (a) 010 14. PyQ....execve(./hello.py,...) 15. do_execve_common()128bytebinary handler 16. ./hello.py 17. load_script#!?/usr/bin/python/usr/bin/pythonopenbprmbinary_handler 18. /usr/bin/python 19. load_elfELF headerelf interpreter elf interpreter start_thread() 20. ELF 21. Python/usr/lib/python2.7/site-packages/PyQt4/QtGui.soinitQtGui()sipModule = Py_InitModule(sipName_PyQt4_QtGui, sip_methods); 22. C++int main( int argc, char **argv ){QApplication app(argc, argv);QPushButton w( "Hello world!");app.connect(&w, SIGNAL(clicked()), &w, SLOT(close()));w.show();return app.exec();} 23. QPushButtonQPushButton::QPushButton(const QString &text,QWidget *parent): QAbstractButton(*new QPushButtonPrivate, parent){Q_D(QPushButton);setText(text);d->init();} 24. Q_D#define Q_D(Class) Class##Private * const d = d_func()QpushButtonPrivate * const d = d_func();setText(text);d->init(); 25. Q_DECLARE_PRIVATEclass QpushButton ...{Q_DECLARE_PRIVATE(QPushButton)}inline const QPushButtonPrivate* d_func() const {return reinterpret_cast(qGetPtrHelper(d_ptr));} 26. 27. QWidgetparent == 0Q_WINDOWQWidget::create() create_sys()XCreateWindow() 28. connectapp.connect(&w, SIGNAL(clicked()), &w,SLOT(close())); 29. connectapp.connect(&w, SIGNAL(clicked()), &w,SLOT(close())); app.connect(&w, "2clicked()", &w, "1close()");meta-object 30. w.show()w.show(); == w.setVisible(true);type == Qt::Window?d->show_helper() show_sys() XMapWindow(X11->display, q->internalWinId()); 31. XMapWindow 32. Xxorg-server/dix/dispatch.c: Dispatch() 33. Need Scheduling ... 34. ID(& 0xff) : 20msec 40msecevent 35. Rendering..... 36. window 37. evdevvoidEvdevPostRelativeMotionEvents(InputInfoPtr pInfo, int num_v, int first_v, int v[MAX_VALUATORS]){EvdevPtr pEvdev = pInfo->private;if (pEvdev->rel_queued) {xf86PostMotionEventM(pInfo->dev, Relative, pEvdev->vals);}} 38. Qt signalconectionListsQt ! 39. Hello, World GentooHello, world