RSS

Summer of Lisp Code: Yazın Lisp ile para kazanmak; Emacs Versor; OpenMusic; IRC loglama; FireBug; The Aeolian Harp; How to Fish

31 May

Lisp ile nasıl balık tutulur? comp.lang.lisp Usenet grubunun müdavimlerinden Pascal Bourguignon’a göre şöyle tutulur:


 +~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-+
/                                                        
    Give a fish to a man, he'll eat one day;            /
/   Teach a man how to fish, he'll eat all his life.     
                                                        /
 +_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-+

;; Here is how to fish:

(asdf:oos 'asdf:load-op :trivial-http)

(defpackage "GOOGLE-GROUP"
  (:use "COMMON-LISP")
  (:export "URL-FOR-MESSAGE-ID"))
(in-package "GOOGLE-GROUP")

(defun url-for-message-id (message-id)
  (destructuring-bind (response header body)
      (trivial-http:http-get
       (format nil "http://groups.google.com/groups?selm=~A"
               (trivial-http:escape-url-query message-id)))
    (case response
      ((301) (cdr (assoc :location header)))
      (otherwise (error "Unexpected reponse code ~A~%~S~%~S~%"
                         response header body)))))

;; For example:

(in-package "COMMON-LISP-USER")
(print
 (GOOGLE-GROUP:URL-FOR-MESSAGE-ID "861x2q4pfx....@cawtech.freeserve.co.uk"))

;-)

Google’ın bu seneki Summer of Code etkinliğindeki Common Lisp projelerine ek olarak LispNYC’nin Google’dan bağımsız olarak birkaç projeyi daha destekleme durumu varmış. Dikkat çekici olan kısım ise:

If you have a worthwhile open source project that you would like to see funded, now is a good time to bring that to the attention of LispNYC. To do so, join the LispNYC mailing list: http://www.lispnyc.org:8080/mailman/listinfo/lisp

Note that you don’t have to be a member of LispNYC (or even a citizen of the US). The money will be used for Lisp projects only though.

Gün geçmiyor ki Emacs için garip garip şeyler çıkmasın. Geçen hafta keşfettiğim gariplik: Emacs Versor: Versatile Cursors

GNUemacs has many ways of navigating text buffers: words, expressions, sentences, functions, paragraphs… but they can be much harder to type than the ordinary cursor movements. Versor (Versatile Cursors) makes them more accessible, mapping pairs of these movement dimensions onto the cursor keys, and using the cursor keys themselves, with a modifier, to navigate around the space of possible movement types. It also provides an extended cursor, in the form of a whole unit of whatever your selected movement dimension is, and makes this the unit of copying, deletion or other changes, as well as of movement.

Uzun detaylı bir demoyu buradan izlemek ve aynı adamın yazdığı diğer Emacs güzelliklerine buradan erişmek mümkün. (Bunlara bakarken bir anda kendimi Emacs Lisp ve w3m-emacs işlevselliği ile (ve buradaki url-retrieve kodu ile) hava durumunu Emacs mode-line’da göstermeye çalışırken buldum. Hangi programlama ortamına gitsem ilk denediğim şeylerden biri bu oluyor ve bunda sanırım yıllardır dışarı bakan penceresi olmayan havasız bir ofiste çalışmanın yarattığı bilinçaltı durumlarının etkisi yadsınamaz diye düşünüyorum :))

Yazılım dünyasında dönüp dolaşıp benzer fikirlerin gündeme gelmesi ve güneşin altında söylenmiş yeni pek bir şeyin olmaması hali yine çıktı karşıma:

Montezuma is a Common Lisp port of Ferret. Ferret is a Ruby port of Lucene. Lucene is sort of Doug Cutting’s Java version of Text Database (TDB), which he and Jan Pedersen developed at Xerox PARC, and which, to complete the circle, was written in Common Lisp (see “An Object-Oriented Architecture for Text Retrieval”).

Lisp ağırlıklı günlük notlar. Lisp ve müzik. Notes from the Metalevel kitabı bitmek üzere. Son olarak An Algorithmic Model of György Ligeti’s Désordre ve Spectral Composition bölümlerini okuyup ilgili Common Music kodlarını denedim. Ligeti ile ilgili bölüm kitabın belki de müzik teorisi bakımından en eğır ve karmaşık bölümü. “Spectral composition” ise biraz daha rahat okunabilir, anlaşılabilir ve eğlenceli bölümlerden biri. Sabahın köründe bu bölümde anlatılan FM sentezleme tekniği temel alınarak gerçekleştirilmiş The Aeolian Harp – for piano and computer generated tape parçasını dinledim. 23 dakika 30 saniyelik bu olağanüstü eserin hikayesini herhalde uzunca süre unutmayacağım:

The Aeolian Harp is a mechanical instrument that creates musical sound from wind. As air passes through the harp its strings vibrate in sympathy with corresponding motion in the moving column of air. The result is an ethereal Aeolian resonance, a tonal memory of the wind’s chaotic motion that, like our own memory, is a colored artifact of a presence that has since departed. The ideas of transformation, resonance, memory and loss are all thematic currents in this work. The piece is dedicated to my sister, Marianna Christine Taube, who died in 1997 after a long and courageous battle with cancer. Although some elements of the composition relate specifically to her life, I think the piece is best described as simply being a reflection, or resonance, of my struggle to come to terms with her death, of the transformation we all undergo when emotional chaos, despair and anger gradually yield to the duller ache we tolerate and carry forward. The ideas of resonance, transformation and memory operate on many different levels in the composition.

Algoritmik besteleme, ses sentezleme ve Lisp programlama arakesitinde yer alan bir de OpenMusic varmış. Common Music’ten farklı olarak görsel kısmı ağır basıyor, biraz Max/MSP tarzı gibi görünüyor. Bunu da biraz kurcalamakta fayda var.

Kendime not: JavaScript debugger’ı FireBug‘ı kura ve incele!

Lisp ile başladık, Lisp ile bitireyim (full-circle? deja-vu? :)). IRC loglama ve Lisp gerçek hayatta ne işimize yarayacak üstüne:

Meme is a web application written by Kevin Rosenberg which displays Internet Relay Chat (IRC) logs. Currently, Meme is logging select channels from the freenode ircnet. Features of Meme include:

* Full-text searching with selectable number of surrounding minutes.
* Multiple viewing styles.
* Customizable filtering and highlighting.
* Auto-login avaiable with selectable start page.
* Graphs of channel activity.
* Stored user preferences.

Meme is written in Common Lisp and uses the following libraries:

CLSQL: SQL library
irc-logger: Logging daemon
cl-irc: IRC library
lml2: HTML generation
kmrcl: Utilities
base64: Base64 conversions
cl-ppcre: Regular expression library
Webactions/AllegroServe: Web server

Advertisements
 
Leave a comment

Posted by on May 31, 2006 in Emacs, General, Lisp, Music, Programlama

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: