�ŋ߂� Raspberry Pi �� LuaJIT �������G��܂������A �ȑO Apache2.4.1 �� mod_lua ���lj����ꂽ�Ƃ��ɂ� �������� Lua ��G���Ă��܂����B
Lua �����\�����Ƃ������ƂŁA ���̎��� ���̌���� ���ȒP�ȑ��x��r�����Ă����̂ł����A ����� LuaJIT ���܂߂� Raspberry Pi ��Ŕ�r���Ă݂����Ǝv���܂��B
$ time bash -c 'for ((i=0;i<1000000;i++)) do j=i; done' real 2m51.676s user 2m46.940s sys 0m3.620s $ time perl -e 'for($i=0;$i<1000000;$i++){$j=$i;}' real 0m2.782s user 0m2.740s sys 0m0.020s $ time lua -e 'for i=1,1000000 do j=i end' real 0m0.337s user 0m0.330s sys 0m0.010s $ time luajit -e 'for i=1,1000000 do j=i end' real 0m0.041s user 0m0.010s sys 0m0.000s
luajit �� �����ł��ˁB
�ϐ����Ǐ����������������Ȃ邻���Ȃ̂� ��������������B
$ time lua -e 'local i, j; for i=1,1000000 do j=i end' real 0m0.171s user 0m0.160s sys 0m0.010s $ time luajit -e 'local i, j; for i=1,1000000 do j=i end' real 0m0.022s user 0m0.010s sys 0m0.000s
���Ȃ葬���Ȃ�܂����B
�悭����l�^�ł����A���������Ƃ��āB
Const ssfDESKTOP = &H0 ' Desktop Const ssfPERSONAL = &H5 ' My Documents Const ssfMYPICTURES = &H27 ' My Pictures Const ssfWINDOWS = &H24 ' Windows Function GetNewFolderPath(IstrMessage, IlngRoot) GetNewFolderPath = "" Dim objWShell, objFolder Set objWShell = WScript.CreateObject("Shell.Application") Set objFolder = objWShell.BrowseForFolder(0, IstrMessage, 0, IlngRoot) If (Not objFolder Is Nothing) Then GetNewFolderPath = objFolder.Self.Path End If Set objFolder = Nothing Set objWShell = Nothing End Function Msgbox GetNewFolderPath("Select Folder", ssfPERSONAL)
�L�����Z������Ƌ��Ԃ��Ă���݂����ȁB
�ȑO������ LjES �� ver.2.00 �ɂȂ����Ƃ������Ƃ� �������������Ă݂����Ǝv���܂��B
[�Q�l]
Raspberry Pi ���� (29) - LuaJIT�ł���y3D (5)
����̃o�[�W�����ł� Blender �ō쐬�� Collada �`���ŃG�N�X�|�[�g���� 3D ���f����ǂݍ��ދ@�\���lj�����Ă��� ����y�� 3D �A�j���[�V���� ���ł��邻���ł��B
��L�T�C�g�ɂ������Ă���܂����A �ȉ��̃R�}���h�����s���邾���� �f���������Ƃ��ł��܂��B
$ cd /tmp $ curl -O http://www.mztn.org/rpi/ljes-2.00.tar.gz $ tar zxf ljes-2.00.tar.gz $ cd ljes-2.00 $ cd examples $ luajit hand.lua
2014-01-07-wheezy-raspbian ��Ŏ����܂����� �ȒP�ɓ����܂����B
[1] �` [6] �������ƁA�w�������܂��B �I���������Ƃ��� [q] �������܂��B ���̑��A����� [h] �ŕ\������܂��B
3D ���f���ƃA�j���[�V�����̒�`�� ��荞�߂� Lua �̃v���O�����ŗ��p�ł���悤�ɂȂ��Ă���̂͂������ł��ˁB
�O��̑��� SNMP �̐ݒ�ł��B �Ƃ肠���� SNMP ����f�[�^���擾�ł���悤�ɐݒ肵�Ă����܂��B
�܂� snmpd �̐ݒ�t�@�C����ҏW���܂��B
$ sudo vi /etc/snmp/snmpd.conf
���e�͎��̂悤�Ȋ����ł��i�S���j�B
############################################################################### # # AGENT BEHAVIOUR # # Listen for connections from the local system only agentaddress udp:161 ############################################################################### # # ACCESS CONTROL # # sec.name source community com2sec PI_LOCAL localhost RASPBERRY_PI com2sec PI_NETWOEK 192.168.3.0/24 RASPBERRY_PI # group.name sec.model sec.name group LOCAL_GROUP v1 PI_LOCAL group LOCAL_GROUP v2c PI_LOCAL group LOCAL_GROUP usm PI_LOCAL group NETWORK_GROUP v1 PI_NETWOEK group NETWORK_GROUP v2c PI_NETWOEK group NETWORK_GROUP usm PI_NETWOEK # view.name incl/excl subtree mask view all included .1 80 # group.name context sec.model sec.level match read write notif access LOCAL_GROUP "" any noauth exact all none none access NETWORK_GROUP "" any noauth exact all none none ############################################################################### # # SYSTEM INFORMATION # syslocation Raspberry Pi raspbian syscontact Studio ODIN <xxxxx@xxxxx.xx.xx> sysservices 72
�l�b�g���[�N�� 192.168.3.x ���g�p���Ă���̂ŁA���͈̔͂���̃A�N�Z�X�������Ă��܂��B community ���� "RASPBERRY_PI" �̓p�X���[�h�̈Ӗ����܂܂�Ă���̂ŁA �R�s�y����ꍇ�́A�K�X�ύX���Ă��������B
syslocation �� syscontact �́A�����̏��ł��̂œK���ɁB
�ݒ�t�@�C���̕ҏW���I������� �T�[�r�X���ċN�����܂��B
$ sudo service snmpd restart
���Ƃ͎����� snmpd �ɃA�N�Z�X���Ă݂܂��B
$ sudo snmpwalk -v 2c -c RASPBERRY_PI localhost 1.3.6.1.4.1.2021
"RASPBERRY_PI" �́A�ݒ�t�@�C������ community ���A "1.3.6.1.4.1.2021" ���擾������̎��ʎq�ł��B
���̃R�}���h�����s���āA�����_�[���ƋA���Ă����琬���ł��B
����͂����܂ŁB