Thursday, October 01, 2009

self = я or programming / программирование in Krestianstvo


EN: Just want to show, how Russian language is already could be used to program in Smalltalk using Krestianstvo.
Here is a program for building L-systems and drawing them with Pen or any other Object later in Smalltalk (for example Croquet's TObjects in OpenGL).
You will see some fragments of source code in Russian - all are the executable Smalltalk code. The whole version is available here (also it is available in update stream). The changeset (*.cs) or source code (*.st) files, which could contain Unicode symbols (russian here), could be exported or imported into the Krestianstvo system without any trouble.

RU: Представляю вашему вниманию пример, показывающий как уже сейчас можно программировать в среде Крестьянство на Smalltalk используя Русский язык. Мы запрограммируем алгоритм пострения L - систем и их рисования с помощью Карандаша или других объектов в дальнейшем (например Croquet TObjects в OpenGL).
Ниже приведены фрагменты исполняемого кода, полная версия доступна для скачивания здесь (так же в потоке обновлений для системы). Файлы изменений (*.cs) или исходного кода (*.st), содерджащие символы Unicode (в данном случае - русские), могут экспортироваться или импортироваться в систему Крестьянство без ошибок.

Smalltalk in Russian/ Smalltalk'а по Русски
self = я
to: do: = по: делай:
at: = в:
at: put: = в: значение:
ifNotNil:[] = еслиНеПусто:[]
ifTrue:[] = еслиИстина:[]
or:[] = или:[]

L - система (code fragments)/(фрагменты кода)

1. Объявление класса / Creating the class:
Объект подкласс: #ЛСистема
именаПеременныхЭкземпляраКласса: 'предложение наборПравил генерация'
именаПеременныхКласса: ''
глобальныеСловари: ''

категория: 'Математика-ЛСистемы'

3. Метод инициализаци / Initialization
ЛСистема>>определитьЛСистемуАксиома: аксиома наборПравил: набор

я предложение: аксиома.
я наборПравил: набор.
я генерация: 0.

2. Определение метода генерации / Defining the generation method:
ЛСистема>>генерировать

| текущийСимвол строкаЗамены заменаИзПравил следующаяГенерация |

следующаяГенерация := ''.
1 по: предложение размер делай:[:индекс|

текущийСимвол := (предложение в: индекс) какСтрока.
строкаЗамены := '',текущийСимвол.

заменаИзПравил := (я искатьИзНабораПравил: текущийСимвол).
заменаИзПравил еслиНеПусто:[ строкаЗамены := заменаИзПравил].

следующаяГенерация := следующаяГенерация, строкаЗамены.
].

предложение := следующаяГенерация.

генерация := генерация + 1.

4. Рисование / Painting:

ЛСистема>>нарисовать

| символ карандаш длинаЛинии уголПоворота |

карандаш := Карандаш новый.

длинаЛинии := 20.
уголПоворота := 60.

1 по: предложение размер делай:[:индекс|

символ := (предложение в: индекс) какСтрока.

((символ = 'F') или:[ (символ = 'G')]) еслиИстина:[

карандаш иди: длинаЛинии.

].

(символ = '+') еслиИстина:[

карандаш повернуть: уголПоворота.

].

(символ = '-') еслиИстина:[

карандаш повернуть: (-1) * уголПоворота.

].

].


5. Выполнение / Executing:

ЛСистема класс>>примерПостроенияЛСистемыСерпинский

| правила лСистема |

правила := Массив новый: 2.
правила в: 1 значение: ((ЛСистемаПравило новый) определитьПравило: 'F' строка: 'F--F--F--G').
правила в: 2 значение: ((ЛСистемаПравило новый) определитьПравило: 'G' строка: 'GG').

лСистема := (ЛСистема новый) определитьЛСистемуАксиома: 'F--F--F' наборПравил: правила.

"генерировать 5 раз"

1 по: 5 делай:[:i|
лСистема генерировать.
].
лСистема нарисовать.

18 Comments:

Blogger oakleyses said...

christian louboutin shoes, louis vuitton outlet, kate spade handbags, coach outlet, true religion, nike shoes, michael kors outlet store, tory burch outlet, oakley sunglasses, louis vuitton handbags, coach purses, louis vuitton outlet, michael kors outlet online, coach outlet store online, coach outlet, ray ban sunglasses, michael kors outlet online, burberry outlet online, louis vuitton, red bottom shoes, christian louboutin outlet, burberry outlet online, longchamp outlet, longchamp handbags, michael kors outlet online, true religion outlet, nike free, oakley vault, jordan shoes, longchamp outlet online, kate spade outlet online, ray ban outlet, chanel handbags, cheap oakley sunglasses, michael kors outlet, prada handbags, prada outlet, tiffany and co jewelry, louis vuitton outlet online, nike air max, tiffany jewelry, polo ralph lauren outlet, nike air max, christian louboutin, michael kors outlet online, gucci handbags, polo ralph lauren

7:19 am  
Blogger oakleyses said...

louis vuitton, converse pas cher, louis vuitton pas cher, lululemon, nike free pas cher, true religion jeans, louis vuitton uk, mulberry, air max, ray ban uk, nike air force, true religion outlet, ray ban pas cher, timberland, longchamp pas cher, scarpe hogan, north face, guess pas cher, michael kors uk, north face pas cher, nike air max, barbour, chaussure louboutin, burberry pas cher, hollister, hollister, sac vanessa bruno, nike blazer pas cher, lacoste pas cher, sac michael kors, hermes pas cher, michael kors canada, nike free, vans pas cher, air max pas cher, nike roshe, nike roshe run, oakley pas cher, tn pas cher, new balance pas cher, nike air max, air jordan, longchamp, sac louis vuitton, ralph lauren, abercrombie and fitch, ralph lauren pas cher

7:22 am  
Blogger oakleyses said...

roshe run, lululemon outlet, celine handbags, nfl jerseys, ugg, asics shoes, insanity workout, giuseppe zanotti, hollister, nike huarache, longchamp, ugg outlet, ugg soldes, uggs outlet, canada goose outlet, mont blanc pens, babyliss pro, canada goose outlet, canada goose, p90x workout, ghd, instyler ionic styler, marc jacobs outlet, beats headphones, chi flat iron, vans outlet, jimmy choo shoes, ugg boots, birkin bag, soccer jerseys, ferragamo shoes, abercrombie and fitch, valentino shoes, mcm handbags, new balance outlet, mac cosmetics, reebok shoes, nike trainers, bottega veneta, soccer shoes, canada goose outlet, north face jackets, herve leger, wedding dresses, rolex watches, uggs on sale, north face outlet

7:23 am  
Blogger oakleyses said...

timberland shoes, ugg, ralph lauren, supra shoes, wedding dress, parajumpers outlet, uggs canada, louboutin, converse, moncler, vans, canada goose, lancel, toms outlet, coach outlet, hollister canada, moncler, links of london uk, moncler outlet, swarovski jewelry, pandora uk, juicy couture outlet, karen millen, iphone 6 case, pandora charms, canada goose uk, hollister clothing, nike air max, ray ban, air max, gucci, montre femme, thomas sabo uk, canada goose, baseball bats, hollister, moncler, louis vuitton canada, pandora jewelry, canada goose pas cher, moncler, juicy couture outlet, moncler, replica watches, swarovski uk, oakley, moncler, converse shoes

7:25 am  
Blogger سما احمد said...

شركة تخزين عفش بالرياض
شركة مكافحة النمل الابيض بالرياض
شركة مكافحة النمل الابيض بالدمام
شركة كشف تسربات المياه بالدمام
شركة تسليك مجاري بالدمام
شركة تنظيف خزانات بالدمام
شركة تسليك مجاري بالدمام

شركة الريماس للاعمال المنزلية
شركة مكافحة حشرات ورش مبيدات بالرياض
شركة رش مبيدات بالرياض
شركة لكشف التسربات بالرياض
شركة مكافحة حشرات بالدمام
شركة رش مبيدات بالدمام
شركة تنظيف
شركة لتنظيف المجالس بالرياض
شركة تنظيف كنب بالمدينة المنورة
موقع ديجو
شركة مكافحة حشرات بخميس مشيط
شركة مكافحة حشرات بخميس مشيط

شركة رش مبيدات بخميس مشيط

شركة رش مبيدات بجازان
شركة مكافحة حشرات بجازان
شركة مكافحة حشرات بجازان
شركة مكافحة حشرات بابها
شركة عزل اسطح بالرياض

9:34 pm  
Blogger ninest123 Ninest said...

ninest123 09.04
michael kors outlet, nike air max, michael kors outlet, christian louboutin outlet, polo ralph lauren outlet, prada handbags, louboutin shoes, tory burch outlet, ugg boots, replica watches, ugg boots, prada outlet, nike free, ray ban sunglasses, jordan shoes, nike outlet, oakley sunglasses, longchamp outlet, replica watches, longchamp, polo ralph lauren outlet, michael kors, ugg boots, michael kors outlet, louboutin, oakley sunglasses, louis vuitton, louis vuitton, nike air max, uggs on sale, burberry outlet online, ugg boots, burberry, gucci outlet, longchamp outlet, michael kors outlet, tiffany jewelry, oakley sunglasses, louis vuitton outlet, louis vuitton outlet, louboutin outlet, michael kors outlet, louis vuitton, ray ban sunglasses, tiffany and co

2:28 am  
Blogger ninest123 Ninest said...

true religion jeans, vanessa bruno, hermes, coach purses, true religion jeans, converse pas cher, coach outlet, tn pas cher, longchamp pas cher, chanel handbags, nike air max, air jordan pas cher, louboutin pas cher, vans pas cher, ralph lauren pas cher, timberland, oakley pas cher, coach outlet, hogan, hollister, nike roshe run, north face, nike free, mulberry, ray ban pas cher, kate spade handbags, coach factory outlet, north face, true religion outlet, sac guess, lacoste pas cher, kate spade outlet, true religion jeans, michael kors, new balance pas cher, lululemon, nike blazer, air max, burberry, michael kors, sac longchamp, ray ban uk, hollister pas cher, michael kors, air force

2:30 am  
Blogger ninest123 Ninest said...

longchamp, baseball bats, nike huarache, vans shoes, ralph lauren uk, abercrombie and fitch, nike air max, reebok shoes, mont blanc, birkin bag, herve leger, ghd, jimmy choo shoes, mcm handbags, beats by dre, north face outlet, valentino shoes, new balance, nfl jerseys, hollister, lululemon, ferragamo shoes, nike air max, bottega veneta, nike roshe, soccer jerseys, p90x workout, asics running shoes, north face outlet, nike trainers, celine handbags, giuseppe zanotti, nike roshe, insanity workout, babyliss, iphone 6 cases, hollister, nike air max, wedding dresses, soccer shoes, nike free run uk, abercrombie and fitch, chi flat iron, instyler, mac cosmetics

2:32 am  
Blogger ninest123 Ninest said...

louboutin, ugg,uggs,uggs canada, ugg,ugg australia,ugg italia, pandora charms, ugg boots uk, swarovski crystal, pandora charms, timberland boots, louis vuitton, converse outlet, supra shoes, ralph lauren, gucci, michael kors handbags, swarovski, michael kors outlet online, coach outlet, marc jacobs, replica watches, ugg pas cher, bottes ugg, karen millen, juicy couture outlet, lancel, wedding dresses, vans, toms shoes, thomas sabo, pandora jewelry, juicy couture outlet, louis vuitton, nike air max, oakley, louis vuitton, ray ban, links of london, sac louis vuitton pas cher, hollister, michael kors outlet, louis vuitton, hollister, converse, doke gabbana outlet, montre pas cher
ninest123 09.04

2:33 am  
Blogger Meiqing Xu said...

1599meiqing
louboutin femme
louis vuitton handbags
ralph lauren outlet
adidas originals
tory burch outlet online
louis vuitton handbags
louis vuitton outlet
michael kors outlet
polo ralph lauren
jordan 13
nike sb
michael kors handbags
nike running shoes for women
michael kors outlet online
nike trainers uk
louis vuitton
uggs on sale
louis vuitton
ray bans
cheap jerseys
oakley sunglasses
toms outlet
swarovski jewelry
coach factory outlet
ugg sale
michael kors
burberry outlet
jordan 4
true religion
jordan concords

3:33 am  
Blogger dong dong said...

201510.13dongdong
toms outlet
hollister uk sale
hermes outlet
Cheap Michael Kors Handbags Outlet
coach outlet
cheap ugg boots
Louis Vuitton Online Shop Stores
abercrombie store
Jordan 8 Phoenix Suns
Coach Diaper Bag Outlet
ugg outlet
Official Coach Online Factory Sale
louis vuitton outlet stores
Authentic Louis Vuitton Handbags Outlet Sale
uggs sale
100% Authentic New Lerbron James Shoes
true religion outlet
michael kors uk
Louis Vuitton Neverfull Tote Bag
coach outlet online
Designer Louis Vuitton Bags Discount
Coach Factory Handbags Outlet Store
Jordan 3 Retro 2015
michael kors outlet
coach factory outlet
michael kors outlet online
timberland outlet
Louis vuitton Official Website Outlet Online
michael kors handbags
ugg boots
Toms Outlet Store Online
Authentic Air Jordan 13 shoes for sale

8:00 am  
Blogger Minko Chen said...

tiffany outlet
nike air max
longchamp outlet
cheap nba jerseys
nike air huarache
rolex uk
kate spade uk outlet
michael kors outlet online
fitflops clearance
michael kors handbags clearance
omega outlet
bottega veneta outlet
true religion jeans
louis vuitton bags
air jordan 13
ugg boots
rolex watches for sale
michael kors uk
rolex watches,rolex watches,swiss watches,watches for men,watches for women,omega watches,replica watches,rolex watches for sale,rolex replica,rolex watch,cartier watches,rolex submariner,fake rolex,rolex replica watches,replica rolex
mulberry handbags sale

2:41 am  
Blogger oakleyses said...

oakley sunglasses wholesale, chanel handbags, burberry pas cher, tory burch outlet, nike free, nike air max, nike outlet, michael kors pas cher, longchamp outlet, ugg boots, jordan shoes, replica watches, louboutin pas cher, christian louboutin shoes, polo outlet, jordan pas cher, nike air max, ray ban sunglasses, polo ralph lauren outlet online, longchamp pas cher, replica watches, louis vuitton, kate spade outlet, ray ban sunglasses, air max, gucci handbags, louis vuitton outlet, christian louboutin uk, uggs on sale, prada handbags, cheap oakley sunglasses, ray ban sunglasses, oakley sunglasses, sac longchamp pas cher, louis vuitton outlet, louis vuitton, ugg boots, louis vuitton outlet, tiffany jewelry, nike free run, nike roshe, tiffany and co, oakley sunglasses, christian louboutin outlet, prada outlet, polo ralph lauren, longchamp outlet, oakley sunglasses

5:48 am  
Blogger oakleyses said...

ralph lauren uk, nike air max, uggs outlet, michael kors, true religion jeans, coach purses, true religion outlet, north face uk, hogan outlet, ray ban pas cher, coach outlet store online, true religion outlet, michael kors outlet, michael kors outlet online, abercrombie and fitch uk, nike air force, timberland pas cher, true religion outlet, lululemon canada, nike roshe run uk, polo lacoste, michael kors outlet online, michael kors outlet, michael kors outlet online, sac vanessa bruno, nike blazer pas cher, coach outlet, hollister uk, nike free uk, north face, sac hermes, new balance, michael kors outlet online, hollister pas cher, michael kors, oakley pas cher, nike air max uk, burberry outlet, kate spade, nike tn, converse pas cher, uggs outlet, michael kors outlet, replica handbags, guess pas cher, burberry handbags

5:50 am  
Blogger oakleyses said...

iphone 6s plus cases, nike trainers uk, mont blanc pens, herve leger, new balance shoes, chi flat iron, nike huaraches, bottega veneta, soccer jerseys, iphone 6 plus cases, p90x workout, oakley, wedding dresses, lululemon, timberland boots, mcm handbags, louboutin, vans outlet, instyler, ralph lauren, north face outlet, hollister clothing, abercrombie and fitch, asics running shoes, iphone 6s cases, iphone cases, mac cosmetics, babyliss, iphone 5s cases, valentino shoes, nfl jerseys, jimmy choo outlet, soccer shoes, north face outlet, longchamp uk, giuseppe zanotti outlet, hermes belt, iphone 6 cases, baseball bats, insanity workout, reebok outlet, s6 case, ipad cases, celine handbags, hollister, beats by dre, ghd hair, nike roshe run, ferragamo shoes, nike air max

5:55 am  
Blogger oakleyses said...

ugg,ugg australia,ugg italia, moncler outlet, replica watches, thomas sabo, lancel, louis vuitton, juicy couture outlet, wedding dresses, moncler, ugg pas cher, louis vuitton, canada goose uk, ugg,uggs,uggs canada, swarovski crystal, vans, supra shoes, louis vuitton, pandora charms, pandora uk, toms shoes, moncler, canada goose jackets, pandora jewelry, ugg, converse, canada goose, barbour, juicy couture outlet, canada goose outlet, pandora jewelry, moncler, hollister, canada goose outlet, canada goose, canada goose, canada goose outlet, ugg uk, barbour uk, swarovski, marc jacobs, louis vuitton, louis vuitton, ray ban, moncler uk, converse outlet, nike air max, moncler outlet, doudoune moncler, karen millen uk, links of london, montre pas cher, coach outlet

7:37 am  
Blogger Liu Liu said...

Coming Nike Air Max 2015 Shoes off a Super Bowl loss, the Carolina Panthers were about salary-cap discipline. General manager Dave Gettleman preached patience and measure. And when it came to making roster decisions – like letting All-Pro cornerback Josh Norman walk Nike Free Run away – everything was about the overall financial design. “You have to balance the needs of the team now with the needs of the team in cheap nfl jerseys a couple of years,” Gettleman told Yahoo Sports in June. “You have to plan. I’m very wholesale nfl jerseys methodical Nike Roshe Run and intentional about what I do [and] nfl jerseys store about the decisions we make. You have to be that NFL Jerseys way with the salary cap, because Nike Air Max 90 it’s going to cost you.”

3:38 pm  
Blogger chenmeinv0 said...

toms shoes outlet
ugg outlet online
polo outlet
ugg canada
discount rolex watches
rolex watches
pandora charms outlet
ray bans uk
chanel handbags
oakley sunglasses
2016.12.6xukaimin

12:29 pm  

Post a Comment

<< Home