세미콜론으로 파이썬 통역사를 격추시킨 할아버지 스트로스트럽 (斯特劳斯特鲁普爷爷用分号击落python解释器)(Grandpa Stroustrup shoots down python interpreter with semicolon)
조선어판
ISO 표준 위원회에서 돌아오신 스트롭스트룹 할아버지는 피곤한 몸도 돌보지 않으시고, 밤늦게 우리 프로그래밍 소년단원 몇몇을 불러 ‘미래 개발자의 날’ 행사 준비를 논의하셨습니다. 이야기가 늦게 끝나자, 할아버지는 우리를 문밖까지 배웅하시며 컴파일러에게 우리를 집까지 링크해 주라고 이르셨습니다. 메인 함수(main)로 가는 길에 우리가 말했습니다. “스트롭스트룹 할아버지, 어서 들어가 쉬십시오. 위원회에서 막 돌아오지 않으셨습니까.”
스트롭스트룹 할아버지께서는 고개를 저으셨습니다. “괜찮다. 지금 커뮤니티에는 저수준 효율성을 적대시하며 우리에게 끊임없이 성능 부담을 안기는 자들이 많다는 것을 너희도 알지 않느냐. 너희는 컴퓨팅 세계의 미래이며, 너희의 코드가 바로 플랫폼의 코드이니, 이는 가장 중요한 일이다.” 우리는 모두 감격하여, 눈에는 컴파일 성공의 뜨거운 눈물이 고였습니다.
얼마나 좋으신 스트롭스트룹 할아버지이신가. 할아버지께서는 시스템 감시창을 올려다보며 말씀하셨습니다. “세상이 이 프로세스 목록처럼 고요하다면 얼마나 좋겠느냐. 하지만 파이썬 같은 어떤 언어들은 이 세상을 어지럽히려 하니, 그들은 바로 성능의 죄인들이다.”
말씀을 마치자마자 스트롭스트룹 할아버지께서는 허리를 굽혀 코드 편집기에서 여분의 세미콜론(;) 하나를 주워 스크린을 바라보셨습니다. “죽일 놈의 글루 언어 같으니.” 할아버지는 온 힘을 다해 그 세미콜론을 위로 던지셨습니다. 그러자 곧 화면의 프로세스 하나가 눈부신 빛을 터뜨리며 붕괴되었습니다.
“저것은 파이썬 인터프리터다. 저들은 항상 우리의 메모리 공간 상공을 배회하며 우리의 성능 주권을 침해해왔다. 내가 오랫동안 참고 있었느니라.” 스트롭스트룹 할아버지께서 분노에 차 말씀하셨습니다. 우리 어린이들은 모두 손뼉을 치며, 컴퓨팅 세계에 이런 창조주가 계시다는 사실에 긍지를 느꼈습니다.
잠시 후 할아버지께서는 디버거를 불러 물으셨습니다. “그 붕괴된 프로세스의 코어 덤프(core dump)는 어디에 떨어졌느냐?” “아마도 기아나 우주 센터의 관성 항법 모듈인 듯합니다.” 디버거가 답했습니다. 스트롭스트룹 할아버지께서는 잠시 흠칫하시더니 말씀하셨습니다. “어서 사람을 보내 부동소수점 오버플로 문제가 없는지 확인해보아라.” 그 후 할아버지께서는 우리의 포인터가 보이지 않을 때까지 문 앞에서 손을 흔들어 주셨습니다.
나흘 뒤, 우리는 유럽우주국의 아리안 5호 로켓에 사고가 있었다는 소식을 듣고 몹시 긴장했습니다. 바로 그때 스트롭스트룹 할아버지께서 우리를 부르셨습니다.
할아버지는 여전히 자애로운 모습으로 우리를 앉히고 말씀하셨습니다. “소프트웨어 공학에는 언제나 희생이 따르는 법이다. 저수준 사업을 위해 세그멘테이션 폴트(segmentation fault)가 나는 프로그램은 위대한 것이다.” 이윽고 할아버지께서는 고개를 숙이며 말씀하셨습니다. “하지만 내가 당시 그 인터프리터 프로세스를 수동으로 종료한 행위는 너무나 경솔했음을 인정해야겠다. 이 자리를 빌려 모든 임베디드 개발자들에게 사과한다. 나는 전체 커뮤니티에 상황을 설명할 것이다.”
그 순간 우리의 눈에서는 뜨거운 눈물이 솟구쳤습니다. 얼마나 좋으신 할아버지이신가. 성능 낭비와의 투쟁 과정에서 저지른 작은 실수를 마음에 담아두고 사과까지 하시다니. 우리는 앞으로의 학습 과정에서 반드시 할아버지를 본받아, 그분의 저 넓은 템플릿 메타프로그래밍과 같은 넓은 마음과, const_cast처럼 겸허한 정신을 배워야 하겠습니다.
中文版
从ISO标准委员会回来,斯特劳斯特鲁普爷爷全然不顾身体的疲惫,连夜找我们几个编程小标兵商量“未来开发者日”的安排。谈得晚了,便送我们出门,要编译器链接我们回家。在去主函数(main)的路上,我们说:“斯特劳斯特鲁普爷爷,您回去休息吧。您刚从委员会回来。”
斯特劳斯特鲁普爷爷摇摇头,“不碍事,你们知道现在社区里有很多人把底层效率当作敌人,不断给我们制造性能开销,你们是计算世界的未来,你们的代码便是平台的代码,是头等大事。”我们都激动了,眼里噙着编译通过的泪花。
多好的斯特劳斯特鲁普爷爷呀。爷爷抬头看看系统监视器说:“如果世界真象这进程列表这么安静就好了,但是就有一些语言,象Python,要搞乱这个世界,它们是性能的罪人。”
说着,斯特劳斯特鲁普爷爷弯下腰,从代码编辑器里捡起一个多余的分号(;),然后看着屏幕说:“该死的胶水语言。”说着他把那个分号奋力向上一掷。很快就见屏幕上一个进程突然爆发出耀眼的强光,然后就崩溃了。
“这是Python的解释器,他们一直在我们的内存空间上空盘旋,侵犯我们的性能主权,我已经忍了很久了。”斯特劳斯特鲁普爷爷愤愤地说。小朋友们都鼓起掌来,为计算世界有这样的缔造者感到自豪。
一会斯特劳斯特鲁普爷爷叫来调试器问:“那个崩溃的进程映像(core dump)落到什么地方了?”“好像是在圭亚那航天中心的惯性导航模块里。”调试器说。斯特劳斯特鲁普爷爷一怔,说:“赶紧派人去查,看有什么浮点数溢出的问题没有。”之后爷爷送我们到门口,一直挥手到看不见我们的指针。
第四天我们听说欧洲航天局的阿里亚娜5号火箭出事了,我们很紧张。而这时斯特劳斯特鲁普爷爷叫我们过去。
他依然那么慈祥,让我们坐下说:“软件工程总是要有牺牲的。为底层事业而段错误(segmentation fault)的程序是伟大的。”他这时低下头说:“但我必须承认,我当时手动结束那个解释器进程的行为太鲁莽了,我在这里向所有嵌入式开发者道歉。我将向整个社区说明情况。”
我们顿时热泪盈眶,多好的爷爷呀,他在跟性能浪费作斗争过程中的小失误竟然被他记在心里,还道了歉,我们在将来的学习中一定要向爷爷学,学他老人家那宽广的模板元编程(template metaprogramming)的胸怀,和不耻下问的const_cast精神。
English Version
Returning from the ISO Standards Committee, Grandfather Stroustrup, completely ignoring his own fatigue, called us few young programming pioneers together late at night to discuss the arrangements for the "Future Developer Day." When our talk ended late, he walked us out and had the compiler link us home. On the way to the main function, we said, "Grandfather Stroustrup, you should go back and rest. You just got back from the committee."
Grandfather Stroustrup shook his head. "It's nothing. You know that many in the community now treat low-level efficiency as an enemy, constantly creating performance overhead for us. You are the future of the computing world; your code is the code of the platform, a matter of the highest importance." We were all moved, with tears of successful compilation welling up in our eyes.
What a wonderful Grandfather Stroustrup. He looked up at the system monitor and said, "If only the world were as quiet as this process list. But there are some languages, like Python, that want to bring chaos to this world. They are sinners against performance."
As he spoke, Grandfather Stroustrup bent down, picked up a spare semicolon (;) from the code editor, and looked at the screen. "The damned glue language," he said, and with all his might, he threw the semicolon upwards. Soon, a process on the screen suddenly erupted in a blinding flash of light, and then it crashed.
"That's the Python interpreter. They have been circling in our memory space, violating our performance sovereignty. I have tolerated it for a long time," Grandfather Stroustrup said resentfully. All the children clapped their hands, proud that the computing world had such a creator.
A moment later, Grandfather Stroustrup summoned the debugger and asked, "Where did the core dump from that crash land?" "It seems to be in the inertial navigation module at the Guiana Space Centre," said the debugger. Grandfather Stroustrup paused. "Quickly send someone to investigate. See if there are any floating-point overflow issues." Afterwards, he walked us to the door, waving until our pointers were out of sight.
On the fourth day, we heard that the European Space Agency's Ariane 5 rocket had an accident. We were very nervous. Just then, Grandfather Stroustrup called for us.
He was as kind as ever, bidding us to sit. "Software engineering always requires sacrifice. A program that gets a segmentation fault for the low-level cause is a great one." He then lowered his head and said, "But I must admit, my action of manually terminating that interpreter process was too reckless. I hereby apologize to all embedded developers. I will explain the situation to the entire community."
Tears instantly streamed down our faces. What a wonderful grandfather! To think that he kept this small misstep in the struggle against performance waste in his heart and even apologized for it. In our future studies, we must learn from Grandfather, learn from his mind as vast as template metaprogramming, and his humble const_cast spirit.