read write.as

from schizodefective

إستحضرت الشيطان فسألنى، عَمّا أريد مقابل ان أبيع روحى؟ فى لحظة وجْدُ وجدتنى أطلُب، ما أنقصه، حبُّ يداوى جروحى. طلبت أن يجعلنى أتقى المؤمنين، أن يُذهب الشك و يوقف جنوحى، و أن يعمر قلبى باليقين، وحب صرف لرب العالمين.

وحين أيقن الشيطان أن الطلب، ليس بمزاح وليس بمَقْلب، توقف عن الضحك ثم شَخَرَ، بركان من خَشَمُه انفجر، فلّ الحديد والحجر، إقتلع جذور الشجر، و قال “قد أخطأ من ذكر، إسم الإله فى حضرتى، فالإسم ذاته إن ذُكر، قد ذهبت معه قوّتى.”

#شعر #عربى #poetry

 
Read more...

from Rye Meetings

– “What are you thinking about, my love?” + “Mmm... Just you, me, and the future.” – “Love, don’t think about that.” + “Huh? Why not?” – “Because you shouldn’t.” + “Don’t you? – “… No.”
#Poetry #SmallStories #SmallPoems

 
Read more...

from bsmall2 Learning Racket

It was a good exercise to make slides that show Japanese characters going from top to bottom and the lines going from right to left.

TomiMatsu YoshiO YamaNiYosete slide

都城の詩人、 富松良夫は「南九州の宮沢賢治」と呼ばれているようです。興味深い人です。

The motivation for the exercise came from last week's opportunity to see a talk about a local poet. Paul Goodman wrote somewhere about the importance of “incidental poetry.” His example was the dedication of a local monument or park. The comment about incidental poetry came to mind again when the speaker said that the local poet Tomimatu Yoshia wrote the local school's song. The writers Ueno Hidenobu and Kawahara Kazuyuki are known for singing a school song by Miyazawa Kenji.

TomiMatsu YoshiO AkiToKirishima slide

Unless I get a chance to read Beautiful Typography (by the writer who also did Beautiful Racket, the troubles with punctuation will make me display these poems with html and css3. But in the meantime this code works for the contemplation of simple Japanese poems on a screen.

I had to write an extra utility, character->string and then kept acclimating myself to naming conventions with string-separate. It was while working on these poems that I saw the similarities among the empty list '() and (blank 0) along with cons and vc-append . There never seems to be a need for iteration loops once you get used to recursive procedures, aux or helper functions, and accumulator or keep expressions. Maybe I can use this approach as part of a Ogden's Basic English-style approach to a Basic Scheme (or Basic Racket) that gives humanities students the most widely useful expressions for programming tasks on computers. DrRacket JaText to Slideshow

code

#! /usr/bin/env racket
#lang slideshow

(define poem-list '("秋と霧島.txt" "山によせて.txt" "秋.txt" "呼ぶ.txt"))
;;(define poem-list (vector->list (current-command-line-arguments)))
;; slideshow: expects [<slide-module-file>] on the command line, given 2 arguments: 秋と霧島.txt 山によせて.txt 

;; text-imput
(define text-file (car poem-list))

(define (str->path str)
  (build-path (current-directory-for-user) str))
(define (get-text str)
  (define inp (open-input-file (str->path str)))
  (port->string inp))

;; slideshow settings
(define text-size 30)
;;(define t-style (cons 'italic 'roman))
(define t-style 'roman)
(define (char-style s)
  (text s t-style text-size))

(define (character->string c)
  (list->string (list c)))
(define (string-separate s)
  (map character->string
      (string->list s)))

(define (text-ttb s) ; top to bottom
  (define l (string-separate s))
  (define (helper str-chrs kept-pics)
    (cond
      ((empty? str-chrs) kept-pics)
      ((string=? "、" (car str-chrs))
       (helper (cdr str-chrs) (vc-append kept-pics
					 (rotate (char-style (car str-chrs))
						 (/ pi 1)) )))
      ((string=? "-" (car str-chrs))
       (helper (cdr str-chrs) (vc-append kept-pics
					 (vline 1 90))))
;					 (rotate (char-style "---")
;						 (/ pi 2)) )))
      ;; later to string=? "(" and ")"
      (#t (helper (cdr str-chrs) (vc-append kept-pics
                                           (char-style (car str-chrs)))))))
    (helper (string-separate s) (blank 0))) 

(define title-body-gap (blank 40))
(define sect-sect-gap (blank 20))
(define line-line-gap (blank 12))

(define (text-ttb-rtl s) ; right to left
  (define sl (string-split s "\n"))
  (define p-title (car sl))
  (define p-body (cdr sl))
  (define (helper p-lines kept-pics)
    (cond
      ((empty?  p-lines) kept-pics)
      ((= 0 (string-length (car p-lines)))
       (helper (cdr p-lines) (ht-append sect-sect-gap kept-pics)))
      (#t (helper (cdr p-lines)
                 (ht-append
                  (ht-append line-line-gap (text-ttb (car p-lines)))
                  kept-pics)))))
   (helper p-body (ht-append title-body-gap (text-ttb p-title))))

#;(define Kirishima-Poem
  (get-text text-file))

(define (make-slide str)
  (define poem (get-text str))
  (slide
   (text-ttb-rtl poem)))

(map make-slide poem-list)
#;(slide
 (text-ttb-rtl Kirishima-Poem))

Poems

呼ぶ.txt

呼ぶ  - 亡き妹に

冬ぞらの 雲のはてなる死
かすかなるほのほでもあらば
かえてくるにいいときだ
凍てついた白い椿  
そなたが残していった たったひとりの僕

秋.txt

秋

銀河はるばる帯にまいて
あの人は嫁入ってしまった
桔梗いろの封筒が
きれぎれな雲影を封じてよこした

山によせて.txt

山によせて

ひかりの箭をはなつ朝
山は霧のなかに生れ
むらさきの山体は
こんじきの匂ひをもつ
あたらしい日を信じ
あたらしい世界のきたるを信じ
にんげんの哀しさも
国の面する悲運のかげも
世界の精神的下降の現実も
わすれはてるわけではないが
いまこのあざやかな
朝のひかりにおぼれ
悠々と非情の勁さにそびえている
山にまなぼう

秋と霧島.txt

秋と霧島

風に洗われるので
山も痩せてきた
おまえも旅人、 わたしも旅人
空にいんえいのない深い時がきた
その胸のうちには冷たい水
口にふくむのはわたしひとり

岩石をななめに削り
掘っても掘っても炎にはとどかぬ
ここは山のもろ腰だ
もう少しわけ入って見よう
しきよくの世界のおそろしさ
純血精のように紅葉の谷

風におそわれるので
山も痩せてきた
ただことでないその痩せかた
だれかのきようの似すがただ

おまえも旅人、 わたし旅人
さっさっと何を急ごう
山膚をなで、 山の根をさすり
わが胸の底の炎は消されはせぬ

#Racket #DrRacket #slideshow #poem #poetry #富松良夫 #都城市 #宮崎県 #CKOgden #BasicEnglish #BasicScheme #BasicProgramming

 
もっと読む…

from bsmall2 Learning Racket

Last week's talk about a local poet reminded me of I.A. Richards. I read that he used to put a poem on a slide up before large groups of people. William Empson may have written a poem about the slides.

Yeats King and No King slide

I like the simple slides, maybe I'll use them to contemplate poetry while staring at a screen. On the other hand commercial presentation software ( PP ) seems too flashy.

Yeats The Witch Slide

The loud colors distract from contemplation on the poem. If putting poems up on a screen can be constructive, a simple way to see simple slides may be useful.

Using DrRacket to show poems in the tradition of I.A. Richards seems appropriate. As learners of poetry and programming we want grounds to approach an “overwhelming sense of correctness” (fn:1) ... to reach a judgment that we can have confidence with.

DrRacket Slideshow for Poems

It felt good to discover that basic ideas about recursion with simple lists from The Little Schemer could be used with picts in Racket's slideshow language. Instead of the empty list '() and cons : (blank 0) and vl-append ....

code

#lang slideshow

(define poem-files-for-slides
  "Yeats-MaidQuiet.txt Yeats-SternerConscience.txt Yeats-KingAndNoKing.txt Yeats-ACoat.txt Yeats-TheWitch.txt Yeats-TheSecondComing.txt Yeats-TheSecondComing.txt Yeats-TheseAreTheClouds.txt Yeats-WellAndTree.txt Yeats-WorkToNothing.txt")
(define poem-files-list (string-split poem-files-for-slides))
; (define poem-lines (string-split poem-str "\n"))
(define (str->path str)
  (build-path (current-directory-for-user) str))

(define (get-poem-lines str)
  (define inp (open-input-file (str->path str)))
  (define lines (port->lines inp))
  (close-input-port inp)
  lines)

(define line-text-size 30)
(define title-text-size (* 1.2 line-text-size))
(define poem-style 'roman)
  ;;alternate style (cons 'italic 'roman))

(define (string-empty? str)
  (if (non-empty-string? str)
     #f
     #t))

(define (end-with-space line)
  (if (string-empty? line)
     ""
     (string-append line " ")))

(define (poem-line->pict-text line)
  (text
   (end-with-space line)
       poem-style line-text-size))

(define (poem->pict lines)
  (define title (first lines))
  (define poem (cdr lines))
  (define (helper lines keep)
    (cond
      ((empty? lines) keep)
      ((string-empty? (car lines))
       (helper (cdr lines) (vl-append keep (car lines))))
      (#t (helper (cdr lines)
                 (vl-append keep (car lines))))))
  (vl-append
   (text title poem-style title-text-size)
   (helper
    (map poem-line->pict-text poem) (blank 0))))

(define (poem-slide pict)
  (slide #:layout 'top
        pict))

(define (file-str->poem-slide str)
  (define poem-lines (get-poem-lines str))
  (poem-slide      
   (poem->pict (map end-with-space poem-lines))))

(map file-str->poem-slide poem-files-list)

Poems from:

  • Responsibilities, and other poems by W. B. Yeats: gutenberg
  • The Green Helmet and Other Poems by W. B. Yeats: gutenberg
  • (fn:1) Daniel P. Friedman in the Introduction to The Schemer's Guide (1990)

#slideshow #DrRacket #Racket #Pict #poetry #poem #Yeats #WEBYeats #FreeSoftware #IaR #IaRichards

 
Read more...

Join the writers and thinkers on Write.as

Start writing or create a public blog