This domain may be for sale!
ï¼å¹´ã»ã©åã«ãRuby製ã®ã¯ãã¼ã©ã¼"anemone"ãç´¹ä»ãã¾ããããã®å½æããå®æ度ãé«ããRubyã§ã¯ãã¼ã©ã¼ã使ãå ´åã¯anemoneãå©ç¨ãã¦ãã¾ãããæè¿ãä»ã«æ°ããã¦è¯ãã®ããªãã調ã¹ã¾ããããæ©è½é¢ã®ç¶²ç¾ æ§ã¨ããæå³ã§anemoneãè¶ ãããã®ã¯è¦ã¤ãããã¾ããã§ãããããã§æ¹ãã¦anemoneã®ã½ã¼ã¹ãèªãã§ã¿ãã¨ãããã¯ãã¼ã©ã¼ãå¿ è¦ã¨ããæ©è½ãå¿ è¦æå°éã§å®è£ ããããã¯ãä¸ã è¯ãåºæ¥ã§ããå¬ä¼ã¿ã®å®¿é¡ã§ã¯ãªãã§ãããåå¼·ã®æå³ãå ¼ãã¦ã½ã¼ã¹ã追ã£ã¦ãããã¨ã«ãã¾ãã Anemoneãå©ç¨ãã¦ããã©ã¤ãã©ãªä¸è¦§ anemoneãå©ç¨ãã¦ããã©ã¤ãã©ãªã¯ãï¼ç¨®é¡ã«åé¡ã§ãã¾ãã Rubyæ¨æºorä¸è¬çãªã©ã¤ãã©ãª ãã¼ã¿åå¾ã§å©ç¨ãã¦ããã©ã¤ãã©ãª ãã¼ã¿è§£æã§å©ç¨ãã¦ããã©ã¤ãã©ãª ãã¼ã¿ä¿åã§å©ç¨ãã¦ããã©ã¤ãã©ãª ãã®åé¡å¥ã«æ§é ãã¿ãã¨ããããããã®ã§ãé çªã«è¿½ã£
ãã®è¨äºã«ã¯ãRubyãæ¸ãã¦ããã¨ãã«ãããã¯è¨èªåããããå ¬å¼åãããããã¦ããªãããã©åºæ¬çã«ã¯å¿ ããã®ãã¿ã¼ã³ã«åã£ã¦ããã°ã©ã ãæ¸ãã¦ãããªãã¨ãããã¨ããµã¨æãåºããã¨ãã«ãã£ã¦ãã¦ãã®ãã¿ã¼ã³ãæ¸ããå¤å3ãã¿ã¼ã³ãããã§çµããã¨æããã¦ã±ãè¯ããã°æãåºã確çãé«ããªãã¨æããé¡æããããã°ä½ãèããã«æ¸ããã®ã§ããããæ¸ãã³ã¹ãã¯å ¨ç¶é«ããªãã ååã"?"ã§çµããã¡ã½ããã¯å¿ ãtrueã¾ãã¯falseã®ã©ã¡ãããè¿ã trueã¨false以å¤(ä¾ãã°nil)ãè¿ãå¯è½æ§ãããå ´åã¯ãå¿ ãå¼ã®å é ã«!!ãä»ãã¦trueãfalseã«ãªãããã«ãã¦ãã ãã®ãã¿ã¼ã³ãå®ããã¨ãã¨ã¦ã大äºã ã¨ãã風ã«ã¯å ¨ãèãã¦ããªããã©ãããhas_user?ãuserãè¿ãã¨ãã¦ãhas_user?ã¨ããååã®ã¡ã½ãããUserãªãã¸ã§ã¯ããè¿ãã¨ããã®ã¯ä¸ä½ã©ãããæå³ãæã£ã¦ããã®ã
ref: https://github.com/mame/radiation-hardened-quine æ¾å°ç·ã¯ã¡ã¢ãªã¨ã©ã¼ãå¼ãèµ·ãããããã§ãããããªæ¾å°ç·ãé£ã³äº¤ãéé ·ãªç°å¢ã§ããã§ãããã¨ãªã Quine ãããã ã¨ãããã¨ã§ãããã°ã©ã å ã® 1 æåãã©ã³ãã ã«æ¶ãã¦ãå ã®ããã°ã©ã ãåºåããããªãã¨ãããã¹ã㪠Quine ãæ¸ãã¾ããã*1 ä½ãè¨ã£ã¦ãããããããªãã¨æãã¾ããããããªãµãã«åããã®ã§ãã # ã©ã³ãã ã« 1 æåæ¶ãã¹ã¯ãªãã $ cat mutate.rb src = $<.read src[rand(src.size), 1] = "" print src # rrquine.rb ããã©ã³ãã ã« 1 æåæ¶ããããã°ã©ã ãçæãã $ ruby mutate.rb rrquine.rb > broken.rb # å£ããããã°ã©ã ãå®è¡ãã (
http://samsaffron.com/archive/2013/11/22/demystifying-the-ruby-gc Ruby 2.1ã®ã¬ãã¼ã¸ã³ã¬ã¯ã¿ (GC) ã«ã¤ãã¦ã¯ããRubyã¨Pythonã®éãããã¬ãã¼ã¸ã³ã¬ã¯ã¿ãç解ãã [ãã®1] [ãã®2] ãã§åãä¸ãã¾ããããä»åã¯ãDiscourseã®Sam Saffronãã¾ã¨ãã¦ããRuby 2.0ã®GCãå©ç¨ããã«ããã£ã¦ã®å¦ã³ãç´¹ä»ãã¾ãã 1) Heaps of heaps MRIã¯ãã¼ãã«RVALUEã¨ãã¦ç¥ããã¦ãããªãã¸ã§ã¯ãããã¤ãåãã¼ãã¯ç´16KBãRVALUEæ§é ä½ã¯ããã·ã³ã®ã¢ã¼ããã¯ãã£ã«ãã£ã¦ç°ãªãéã®ã¡ã¢ãªãæ¶è²»ãããx64ãã·ã³ã§ã¯40 byteãx32ãã·ã³ã§ã¯ãµãã¢ã¼ããã¯ãã£ã¼æ¬¡ç¬¬ã§20 byteãã24 byteãRVALUEã¯ãã¸ã«ã«ãªCæ§é ä½ã§ãRubyã®æ§ã ãªãã¼ã¬ãã«
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}