<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4074164940287215450</id><updated>2024-09-09T18:23:10.584+03:00</updated><title type='text'>asdr</title><subtitle type='html'>(list &#39;cikolatalar &#39;puskevitler)</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://load-asdr.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4074164940287215450/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://load-asdr.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>asdr</name><uri>http://www.blogger.com/profile/09337201940403413841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4074164940287215450.post-4265355923083219440</id><published>2010-12-30T03:30:00.000+02:00</published><updated>2010-12-30T03:30:15.925+02:00</updated><title type='text'>Web icin Common Lisp</title><content type='html'>Lisple ugrasmaya basladigimdan beri yapmak istedigim bir sey vardi kafamda. Tamamen lisple bir web uygulamasi yazmak. Bir lisp server ve kolay html ciktisi alabilecegim bir lisp kutuphanesi ile baslayayim dedim. En bastan bir web server yazcak degilim, daha dili tam bilmiyorum ...&lt;br /&gt;
&lt;br /&gt;
O yuzden bir pure lisp web server olan &lt;a href=&quot;http://weitz.de/hunchentoot/&quot;&gt;Hunchentoot&lt;/a&gt;&amp;nbsp;kurmakla basladim ise... Yok yaa... yalan konusuyorum..&amp;nbsp;Ilk once lisp icin ortam hazirlamakla basladim. Gorundugu kadar kolay degil... Konsoldan calismaya alisik degilseniz ise hic kolay degil. Hele &lt;a href=&quot;http://www.quicklisp.org/&quot;&gt;Quicklisp&lt;/a&gt;&#39;ten once isler daha da zordu. (&lt;a href=&quot;http://www.xach.com/&quot;&gt;xach&lt;/a&gt;&#39;ten Allah razi olsun :))&lt;br /&gt;
Neyse kurulum islerini gecicem. Orda vakit harcamak istemem. Ozetle su an lispe baslicak birisi icin en ideal ortam: SBCL + Quicklisp + Emacs + Slime (:quicklisp-slime-helper). Tabi bir de Debian-based bir Linuxunuz olursa ya da bir BSDniz cok daha iyi olur. (paket isleri kolay oluyor o yuzden)&lt;br /&gt;
&lt;br /&gt;
Hunchentoot&#39;ta kalmistik ... Quicklisp kurduktan sonra sisteme Hunchentoot kurmak:&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;i&gt;(ql:quickload :hunchentoot)&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
gibi tek satirlik bir komut. Quicklisp sayesinde tum dependencylerle birlikte Hunchentoot geliyor. Ama onu calisir hale getirmek icin biraz ugrasmak gerekti. Kendim bayagi ugrastiktan sonra Googledan bir &lt;a href=&quot;http://zaries.wordpress.com/2010/11/09/lisp-web-server-from-scratch-using-hunchentoot-and-nginx/&quot;&gt;blog&lt;/a&gt;a denk geldim. Kurulumu cok guzel ozetlemis. Onun da yardimiyla Huncentootu calisir hale getirebildim.&lt;br /&gt;
&lt;br /&gt;
Kurulum icin linkini verdigim bu blogu takip edebilirsiniz. Benim burda yaptigim ufak tefek bazi degisiklikler oldu. Ilk olarak, kuruluma basladigimda Common Lisp implementation olarak SBCL kullanmiyordum, CMUCL kullaniyordum o yuzden SBCL&#39;e ozel kodlari her yerde calisacak sekilde duzenledim.&lt;br /&gt;
&lt;br /&gt;
Ilk basta CMUCL kullanmamin sebebi de SBCL + Debian + Quicklisp uclusunde sorun yasamamdi. Debian paketleri zamanin bir hayli gerisinde oldugu icin sorunlar cikiyordu. O yuzden kisa yoldan bi CMUCL source indirip kurdum. Ama CMUCL ile Hunchentoot arasinda hizla ilgili bir sorun oldu. Hunchentoot requestlere cok gec cevap veriyor hatta bazen vermiyordu. Bu yuzden tekrar SBCLe dondum.&lt;br /&gt;
&lt;br /&gt;
Bu sefer &lt;i&gt;apt-get install sbcl&lt;/i&gt; yerine kaynak koddan derlemek zorunda kalarak SBCLin guncel versiyonunu yukledim. Bu sefer her sey yolunda gibiydi ve oyle de oldu. Ama daha once SBCLe ozel kodlari geri aldim cunku onlarin performansi daha iyiydi.&lt;br /&gt;
&lt;br /&gt;
Neyse ki artik weble ilgili bir seyler yapmaya baslayabilirdim.&lt;br /&gt;
&lt;br /&gt;
Blog&#39;da anlatildigi gibi Remote REPL&#39;e baglandiktan sonra ilk denedigim kod:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;(hunchentoot:define-easy-handler (my-page :uri &quot;/lisp&quot;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;()&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&quot;lisp...&quot;)&lt;/i&gt;&lt;br /&gt;
oldu. Yani &lt;i&gt;http://localhost/lisp &lt;/i&gt;linkine gittigimde karsima &lt;i&gt;lisp... &lt;/i&gt;yazan sayfa cikmaya basladi... :)&lt;br /&gt;
&lt;br /&gt;
Daha sonra biraz html yazayim dedim... Elle html yazmak hic hos degil... buyuktur kucuktur filan yazarak yapilacak is degil yani... O yuzden biraz arastirdim &lt;i&gt;cl-who&lt;/i&gt;&amp;nbsp;kutuphanesi varmis. Lisp kutuphaneleriyle ilgili cok fazla dokuman bulamadigim icin en iyi dokumantasyon kodun kendisidir mantigiyla&amp;nbsp;dogrudan kaynak koduna baktim. Kod gayet anlasilir ama nedense biraz uzun geldi bana... yani &quot;ne gerek var yahuu&quot; gibilerinden bir dusunce gecti icimden. Daha sonra da kisasini kendim yazmaya basladim... :) Yazdimda gercekten de benim isime yarayacak olan seyi 65 satirlik bir kodla yazdim. (bknz :&lt;a href=&quot;https://github.com/asdr/dsgner&quot;&gt;dsgner&lt;/a&gt;) Elbette ki &lt;i&gt;cl-who&lt;/i&gt;&amp;nbsp;benim &lt;i&gt;:dsgner&lt;/i&gt; &#39;dan daha kapsamli ama benim isime bu kadari yetiyor su an.. Hem yazmasi zevkliydi ...&lt;br /&gt;
&lt;br /&gt;
En son&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;(hunchentoot:define-easy-handler (my-page :uri &quot;/lisp/mypage&quot;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (msg) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (:html () &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (:head () &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (:title () &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Welcome-to-lisp&quot;)) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (:body (:bgcolor &quot;#CCCCCC&quot;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (:a (:href &quot;http://asdr.me/lisp/mypage?msg=here&quot;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (format nil &quot;Click baby... ~A&quot; msg)))))&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
gibi bir kod yazabilecek duruma geldim. Peki sirada ne var? Sirada verilerini Cassandra&#39;da saklayan bir blog yazma isi var. Ama once bir Coomon Lisp Cassandra Client yazmam gerekecek... :)&lt;br /&gt;
&lt;br /&gt;
--asdr&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4074164940287215450/posts/default/4265355923083219440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4074164940287215450/posts/default/4265355923083219440'/><link rel='alternate' type='text/html' href='http://load-asdr.blogspot.com/2010/12/web-icin-common-lisp.html' title='Web icin Common Lisp'/><author><name>asdr</name><uri>http://www.blogger.com/profile/09337201940403413841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4074164940287215450.post-4336224132095074621</id><published>2010-11-24T01:52:00.003+02:00</published><updated>2010-11-24T01:55:33.274+02:00</updated><title type='text'>Dynamic Scoping in Lisp</title><content type='html'>Iki hafta once siparis verdigim kitap dun elime gecti: Let Over Lambda, Doug HOYTE.&lt;br /&gt;
Bekledigimden cok daha guzel bir kitap cikti. Ilk okudugum bolumunden dikkatimi ceken seyleri yazmak istedim.&lt;br /&gt;
&lt;br /&gt;
Bolum closure&#39;lar uzerine.. Ben closure&#39;lari JavaScriptten hatirladigim icin ilk olarak ordaki gibi dusundum ama asagidaki ornek JS de implicit olarak yapilmiyor. JSdeki closure&#39;la Lisp&#39;i karistirmamak lazimmis (zaten tam closure degil dynamic scoping) . Lisp&#39;in bunu bu sekilde yapmasi nedense hosuma gitti...&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;;;LISP KODU;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;(&lt;b&gt;defvar&lt;/b&gt; *temp-special* 1)&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;(&lt;b&gt;defun&lt;/b&gt; temp-special-returner()&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;*temp-special*)&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
(temp-special-returner) ;;;donen deger: 1&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
;; let ile normalde lexical variable yaratiyoruz&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;;; ama asagida durum farkli...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;(&lt;b&gt;let&lt;/b&gt; ((*temp-special* 2))&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;(temp-special-returner));;donen deger: 2 ****&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
(temp-special-returner);;donen deger: 1 *****&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Bunu JSde yaziyim dedim bir de; bakalim sonuc ne olacak diye.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;special = 1;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;function&lt;/b&gt; specialReturner() {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;return&lt;/b&gt; special;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;}&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;alert&lt;/b&gt;(specialReturner());//donen deger: 1&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;alert&lt;/b&gt;(&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;(&lt;b&gt;function&lt;/b&gt;(special) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;return&lt;/b&gt; &lt;b&gt;function&lt;/b&gt;() {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;b&gt;return&lt;/b&gt; specialReturner();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;})(2)()&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;);//donen deger: 1&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;alert&lt;/b&gt;(specialReturner());//donen deger: 1&lt;/span&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4074164940287215450/posts/default/4336224132095074621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4074164940287215450/posts/default/4336224132095074621'/><link rel='alternate' type='text/html' href='http://load-asdr.blogspot.com/2010/11/dynamic-scoping-in-lisp.html' title='Dynamic Scoping in Lisp'/><author><name>asdr</name><uri>http://www.blogger.com/profile/09337201940403413841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>