¥È¥Ã¥× «Á°¤ÎÆüµ­(2006-09-13) ºÇ¿· ¼¡¤ÎÆüµ­(2006-09-15)» ÊÔ½¸

¤Ï¤¸¤á¤Æ¤Î¤Ë¤­

¤³¤³¤Î°ÌÃÖÉÕ¤±

2004|11|
2005|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|11|12|
2011|01|02|03|04|05|06|07|08|09|10|11|12|
2012|01|02|03|04|05|06|07|08|09|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|04|05|06|07|08|09|10|11|12|
2021|01|02|03|04|05|06|07|08|09|10|11|12|
2022|01|02|03|04|05|06|07|08|09|10|11|12|
2023|01|02|03|04|05|06|07|08|09|10|11|12|
2024|01|02|03|04|05|06|07|08|09|10|11|

ToDo:


2006-09-14

_ shinh.dyndns.org

¤Õ¤Ã¤«¤Ä

²¿¤ò¤â¤Ã¤ÆÉü³è¤È¸À¤¦¤Î¤«¤Ï˺¤ì¤¿¤±¤É¡¢ SVN¤ÏÆ°¤¤¤Æ¤ë¤¯¤µ¤¤¡£

(00:12)

_ x86_64

shinh@cf-amd64-linux:~> cat hoge.c
#include <stdio.h>
void hoge() { puts("hoge"); }
shinh@cf-amd64-linux:~> gcc -shared -o hoge.so hoge.c
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.1/../../../../x86_64-suse-linux/bin/ld: /tmp/ccaYZHDk.o: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
/tmp/ccaYZHDk.o: could not read symbols: Bad value
collect2: ld returned 1 exit status

¤½¤¦¤¤¤¦¤â¤ó¤Ê¤ó¤«¡Ä

(00:47)

_ ¤è¡¼¤ï¤«¤é¤ó¤¬

http://shinh.skr.jp/m/?date=200503

¤¢¤¿¤ê¤¬É½¼¨¤Ç¤­¤ó¤¯¤Ê¤Ã¤Æ¤¿¤Î¤Ç¥Ñ¥Ã¥Á¡£

defaultio.rb ¤Î

                                               diary = eval( "TDiary::WikiDiary::new( headers['Date'], headers['Title'], body, Time::at( headers['Last-Modified'].to_i ) )" )
                                               #diary = eval( "#{style( style_name )}::new( headers['Date'], headers['Title'], body, Time::at( headers['Last-Modified'].to_i ) )" )

¤è¡¼¤ï¤«¤é¤ó¤¬Æ°¤¯¡£

(01:28)

_ ¤¢¡¼

x86_64 ¤¬ PIC ¤À¤é¤±¤Ë¤Ê¤ë¤Î¤Ï¤ï¤«¤ë¤±¤É¡¢ OSX ¤â¤«¡¼¡Ä

http://d.hatena.ne.jp/w_o/20060913#p3

(01:30)

_ ¤¹¤´¤¤ÌÌÇò¤«¤Ã¤¿

> ¤³¤³¤é¤Ø¤ó

¤µ¤Æ¤Ê¤ó¤«2¤Ä¤Ë¤ï¤±¤¿Íýͳ¤È¤¤¤¦¤Î¤Ï º£¤Ï¤â¤¦Àµ³Î¤Ë»×¤¤½Ð¤»¤Ê¤¤¤±¤Éº£¸½ºß¤ÎÍýͳ¤È¤·¤Æ¤Ï

  • ¤Ï¤Æ¤Ê½Å¤¤
  • ¤Ï¤Æ¤Ê½Å¤¤
  • SNR¤òʬ¤±¤ë¤È½ñ¤­¤ä¤¹¤¤

¤Þ¤¡¤ß¤Ã¤Ä¤á°Ê³°¤Ï¤É¤¦¤Ç¤â¤¤¤¤¤È¤·¤Æ¡£ ¤É¤¦¤Ç¤â¤¤¤¤ËͤÎÆü¾ï¤È¤«¸«¤¿¤¤Æüì¤Ê¿Í¤Ï ¤³¤Ã¤Á¸«¤Æ¤â¤¤¤¤¤è ¤Ç¤â´ðËÜŪ¤Ëµ»½ÑŪ¤ËÌÌÇò¤¤¤³¤È¤¢¤Ã¤¿¤é ¤Ï¤Æ¤Ê¤ÎÊý¤Ë½ñ¤¯¤èŪ¤Ê¡£

¤É¤¦¤Ç¤â¤¤¤¤¤±¤É¤Ï¤Æ¤Ê¥¢¥«¥¦¥ó¥ÈÆó¤ÄÁàºî¤¹¤ë¤Î¤Ï ¤È¤Æ¤â¤á¤ó¤É¤¯¤µ¤½¤¦¡£

¤Þ¤¡¤³¤¦¤¤¤¦¥á¥â¤ò¥Ý¥ó¥Ý¥óÃÖ¤±¤ë¤Î¤ÏÊØÍø

(04:13)

_ ¤Ç¤âºÇ¶á

500½Ð¤ÆÃƤ«¤ì¤ë¤ó¤À¤è¤Ê¡£

500½Ð¤¿¾ì¹ç¤ÏºÆÁ÷¤¹¤ë¤è¤¦¤Ë ¥á¡¼¥ë¥Õ¥£¥ë¥¿¤ÎÊý¤Ç¤ä¤Ã¤Æ¤ª¤¯¤«¤Ê¤¡¡Ä

(04:14)

_ ¤ª¤ª

ËÜÅö¤Ë ¤¢¤¿¤é¤·¤¤¤Î¤¬ ¤¢¤ë

http://packages.debian.org/unstable/libdevel/libestraier-dev

(04:18)

_ ¼ÐÍÛ

¤ËÈ¿ÂФ¹¤ë¿Í¤¬¤¤¤ë¤Î¤«¡¼

http://d.hatena.ne.jp/yaneurao/20060913#c1158168608

(04:20)

_ ¤¤¤¤²Ã¸º¥Þ¥¸¥á¤ËÄɤäƤߤë¤È¤¤¤¤

Ëͤϥ¤¥ó¥¹¥È¥é¥¯¥·¥ç¥ó¥»¥Ã¥È¤È¤«¸«¤Æ¤Æ¤â²¿¤â¤ï¤«¤é¤ó¡£

shinh@cf-amd64-linux:~> cat hoge.c int main() {

 puts("hoge");
 puts("hoge");

}

°Ê²¼Î¬¡£

¤Ê¤ó¤ÀÉáÄ̤¸¤ã¤ó¡£¤Ä¡¼¤³¤È¤Ï¥³¡¼¥É¤Î¥Ð¥°¤À¡£ ¥ª¥±¥ª¥±¡£

jmpq *12345678(%rip)

¤ß¤¿¤¤¤ÊÌ¿Îá¤Ï¡¢ 12345678 ¤Ïñ¤Ê¤ë 32bit ¤ÎʪÂΤǡ¢ ¼Â¹ÔÁ°¤Ë¥ê¥í¥±¡¼¥·¥ç¥ó¤µ¤ì¤ë¤ó¤À¤±¤É¡¢ ¤½¤ÎÀè¤Ë 64bit ¤Î¥¢¥É¥ì¥¹¤¬¤¨¡¼¤È

0x500820 <_GLOBAL_OFFSET_TABLE_+16>:    0x955610e0      0x0000002a

¤Þ¤¡¤³¤ó¤Ê´¶¤¸¤ÇÃÖ¤¤¤Æ¤¢¤ë¤Î¤Ç¡¢ 0x0000002a955610e0 ¤ËÈô¤Ö¡Ä ¤Ã¤ÆÉáÄ̤˴ÖÀÜ¥¸¥ã¥ó¥×¤·¤Æ¤ë¤À¤±¤¸¤ã¤ó¡£

(04:50)

_ ¾¡¼ê¤Ë·è¤á¤Æ¤ë¤è¡ª

> 9.17

(04:52)

_ ¥¹¥¿¥Ã¥¯¤ò¶ô¤¤¤Ä¤Ö¤»¡¼¡ù

int main(int argc, char *argv[], char *envp[]) {
    int i;
    char buf[4096];
    void *fp = fopen("/proc/self/maps", "r");
    while (fgets(buf, 4095, fp))
        printf("%s", buf);
    for (i = 0; i < 10000; i++) {
        printf("%d %p %p\n", i, argv[i], &argv[i]);
    }
}

¤Ê¤ó¤«Ëè²óÁ´Á³°ã¤¦¤Ê¡£ ¤Þ¤¿¤Ê¤ó¤«¥»¥­¥å¥ê¥Æ¥£´Ø·¸¤Ç¤¢¤ê¤¬¤¿¤¤^H^H^H^H^H;·×¤Ê¤³¤È¤µ¤ì¤Æ¤ë¤ó¤À¤í¤¦¤«

ÉáÄ̤ȵդÎɽ¸½¤Î¤·¤«¤¿¤ò¤·¤Æ¤ß¤¿

¤Þ¤¡¤ï¤«¤ë¤³¤È¤Ï¤¨¤é¤¤¹­¤¤¤È¤¤¤¦¤³¤È¤À¤Ê¤¡¡£

(05:10)

_ 810

(15:41)

_ ¶â

¶Ã¤¯¤Û¤É̵¤¯¤Ê¤Ã¤Æ¤¿¡£

15Ëü¤È¤«¤½¤Î¤¯¤é¤¤¡£

Àè·î¤ÎµëͿ̵¤¤¤³¤È¹Í¤¨¤ë¤È¤Þ¤¡¤·¤Ð¤é¤¯¤Ï¤â¤Ä¤¬¡£

TODO: ÀáÌó

(18:07)

_ OCaml

´Ø¿ôÆâ¤Ç¡¢¥ë¡¼¥×¤Î¤¿¤á¤Ë let rec ¤Ê´Ø¿ô¤ò ¤â¤¦°ì¸Ä½ñ¤¯¤³¤È¤¬¤è¤¯¤¢¤ë¤±¤É¡¢ ¤³¤ì¤Ë¤Ä¤±¤ë̾Á°¤ÇǺ¤à¡£ ¸µ¤Î´Ø¿ô¤ÈƱ¤¸Ì¾Á°¤¬°ìÈÖ¼«Á³¤À¤Ã¤¿¤ê¤·¤Æ¤Í¡£

k.inaba¤µ¤ó¤¬ Python ¤Ç¤ä¤Ã¤Æ¤¿ _ ¤Ï¤¤¤¤¤Ê¤È»×¤Ã¤¿¤±¤É OCaml ¤Ë¤Ï¤ª¤³¤é¤ì¤¿¡£

  • hoge: Ť¤
  • x: ÊÑ¿ô¤È¤«¤Ö¤ê¤½¤¦
  • ´Ø¿ô¤ÈƱ¤¸Ì¾Á°: º®Í𤷤½¤¦¡¢Ä¹¤¤
  • ´Ø¿ô¤ÈƱ¤¸Ì¾Á°¤Ë _ ¤ò¤Ä¤±¤ë: Ť¤

¤à¡¼¡©

http://ocaml.jp/archive/document/intro1.html

iter ¤Í¤§¡Ä

¤à¡¼¡£

__ ¤Ï¤¤¤¤¤é¤·¤¤¡£ ¤à¤·¤í¤Ê¤ó¤Ç _ ¤¬¤¢¤«¤ó¤Í¤ó¡£

# let _ x = x;;
Syntax error
# let _ = 1;;
- : int = 1

http://www.sato.kuis.kyoto-u.ac.jp/~igarashi/class/isle4-05w/mltext/ocaml003.html#toc6

¤³¤³¤ÎÊÑ¿ô¤Î̾Á°¤Ë¤À¤á¤È½ñ¤¤¤Æ¤¢¤ë¤Ê¤¡¡£

_' ¤È¤«¡Ä

(18:45)

_ ¤à¤·¤í

lazy ¤Ç¥Ð¥°½Ð¤¹´Ø¿ô½ñ¤¯¤ÎÆñ¤·¤¤¤è¤¦¤Ê¡£

¤½¤ê¤ã¸Î°Õ¤Ë¤ä¤ì¤Ð¤Ç¤­¤ë¤À¤í¤¦¤±¤É¤Í¡Ä

(21:24)

_ ²¿¸Î¤«¸°¤¬¸«¤Ä¤«¤é¤Ê¤¯¤Æ

2000±ßÃ¥´Ô¼ºÇÔ¡Ä ¤Ä¤¤¤Ç¤Ë5000±ßÎÀÈñ̵Â̤Ëʧ¤Ã¤¿¤¯¤µ¤¤¡£

¤Ê¤ó¤Ç¤ä¤Í¤ó¡£

(21:25)

_ ¤Þ¤¡

¥í¥¯¤Ç¤â¤Ê¤¤¤³¤È¤Ð¤«¤ê¤À¤±¤Éµ¤Ê¬¤¬°­¤¯¤Ê¤¤¤Î¤Ï ¹¥¤­¤Êµ¨Àá¤À¤«¤é¤À¤í¤¦

(21:26)

_ ¤¢¤ì

OCaml ¤Î¥³¥ó¥¹¥È¥é¥¯¥¿¤Ã¤Æ´Ø¿ô¤È¤·¤Æ°·¤¨¤Ê¤¤¤Î¤«¤·¤é¤ó¡£

# type t = A of int | B of int;;
type t = A of int | B of int
# let x = A;;
The constructor A expects 1 argument(s), but is here applied to 0 argument(s)

(22:17)

_ variant ¤ÎÈæ³Ó

# type t = A of int | B of int;;
type t = A of int | B of int
# a = A 1;;
Unbound value a
# let a = A 1;;
val a : t = A 1
# let b = A 1;;
val b : t = A 1
# a == b;;
- : bool = false

¤½¤¦¤Ê¤Î¤Í¡Ä ¤ó¡¼¤È¡£

(22:55)

_ ¥Õ¥¡¥Ã¥­¥å¡¼

http://www.i.kyushu-u.ac.jp/~bannai/ocaml-intro/traps.html#equality

¤À¤Ã¤¿¡£ ¤Ä¡¼¤«Ëº¤ì¤¹¤®¡£

(22:56)

_ ¤µ¤¤¤­

let x =
  let rec x' v =

¤È¤«¤¬Îɤµ¤½¤¦¤À¤ï¡¼

(23:36)

¤ªÌ¾Á°:
E-mail:
¥³¥á¥ó¥È:
¿ÍÀ¸¡¢±§Ãè¡¢¤¹¤Ù¤Æ¤ÎÅú¤¨
ËÜÆü¤Î¥ê¥ó¥¯¸µ

Á° 2006ǯ
9·î
¼¡
Æü ·î ²Ð ¿å ÌÚ ¶â ÅÚ
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
1.shinh(2014-05-24 02:43) 2.k.inaba(2014-05-24 02:43) 3.YT(2014-05-24 02:43)
search / home / index

Á´¤Æ¥ê¥ó¥¯¥Õ¥ê¡¼¤Ç¤¹¡£ ¥³¡¼¥ÉÊҤϼ«Í³¤Ë»ÈÍѤ·¤Æ¤¤¤¿¤À¤¤¤Æ¹½¤¤¤Þ¤»¤ó¡£ ¤½¤Î¾¤Î¤â¤Î¤ÏGPL°·¤¤¤Ç¤¢¤ì¤Ð¤¢¤é¤æ¤ë»ÈÍѤ˴ؤ·¤Æʸ¶ç¤Ï¸À¤¤¤Þ¤»¤ó¡£ ¤Ê¤Ë¤«¤¢¤ì¤Ð²¼µ­¥á¡¼¥ë¥¢¥É¥ì¥¹¤Ø¡£

shinichiro.hamaji _at_ gmail.com / shinichiro.h