
oz (prograaming bhasha)

prograaming bhasha vidyaabhyaasathinaayi yooniversitti catholic dii luveynile prograaming systems labil vikasippichedutha oru multy paradigam prograaming bhaashayaan oos. ithinu oru canonical paatapusthakam undu ashayangal, saankethikavidyakal, computer prograaminginte modalukal.
1991ll gert smolka addehathinte vidyaarthikalum chernnaanu oos aadyamaayi roopakalppana cheythath. 1996ll sweedish instittyoott oof computer sayansile saif harridyudeyum peettar vaan royiyudeyum gaveshana grouppumaayi sahakarichu oosinte vikasanam thudarnnu. 1999 muthal, oos nirantharam oru anthaaraashtra grouppaaya mosart kansorshyam vikasippicheduthittundu, athil yadhaarthathil sarland yooniversitti, sweedish instittyoott oof computer sayans, yooniversitti cathalic dii luvan enniva ulppedunnu. 2005-ll, oru valia samoohathinu mosart vikasanam thurakkuka enna vyakthamaaya uddeshyathode mosart vikasanam kaikaaryam cheiyunnathinulla utharavaaditham oru coor grouppaaya mosart boardinu kaimari.
mosart prograaming sistamaanu oosinte praadhamika nadappaakkal. mosart kansorshyam ooppan sozhs licensodeyaanu ithu purathirakkunnathu. mosart unix, freebsd, linux, windos, maakokal ennivayilekku portt cheythittundu.
bhaashayude savisheshathakal.
lojik, functional (alasamaaya moolyanirnnayavum aakaamkshayode vilayiruthalum), imperative, object ooriyantad, kanstrayint, distributed, kankarant prograaming ennivayulppede pradhana prograaming maathrkakalude mikka ashayangalum oos ulkkollunnu. oosinu lalithamaaya aupachaarika ardhashaasthram undu (chuvade soochippicha pusthakatthinte 13-aamm adhyayam kaanuka), oos oru kankaransi-ooriyantad bhaashayaan, kaaranam eee padam erlang bhaashayude pradhana designaraaya joou amstrong avatharippichu. oru kankaransi-ooriyantad bhasha kankaransi upayogikkaan eluppavum kaaryakshamavumakkunnu. oru canonical graaphikkal user interface (jii. yuu. aii) bhashayaaya qtk-yeei oz pinthunaykkunnu.
multy-paradigam prograaminginu purame, oosinte pradhana shakti kanstrayint prograamingilum distributed prograamingilumaanu. athinte factor design kaaranam, network-sutharyamaaya distributed prograaming model vijayakaramaayi nadappilakkaan oosinu kazhiyum. eee maathruka bhashaykkullil thurannathum thettu sahishnuthayullathumaaya aaplikkeshanukal prograam cheiyunnathu eluppamaakkunnu. kanstreyint prograaminginaayi, oos "computation speysukal" enna ashayam avatharippikkunnu, ithu upayokthaav nirvachicha thirayal, vitharana thanthrangal kanstreyint domaine oorthoganal aayi anuvadikkunnu.
bhaashayude avalokanam.
daatta ghadana.
vaakyaghadana panchasaarayiloode kooduthal praayogikamaayavayilekku vyaapippikkaan kazhiyunna valare kurachu daatta typpukalulla oru pradhana bhasha adisthaanamaakkiyullathaanu oos.
adisthaana daatta ghadanakal
'|'(2')'|'(4')'|'(6')'|'(8 poojya)))% oru record aayi.
2|(4)|(6)|(8)|poojyam)))% kurachu vaakyaghadana panchasaarayodoppam
2|4|6|8|shoonyamaaya% kooduthal vaakyaghadana panchasaara
[2 4 6 8]% kooduthal vaakyaghadana panchasaara
aaa dattaa gadanakal moolyangal (sthiramaayathu), phastt klaas, dynamic type check ennivayaanu. oossile variable perukal oru valia aksharathil ninnu aarambikkukayum avaye ellaayppozhum cheria aksharathil aarambikkunna aksharasahithyangalil ninnu verthirichariyukayum cheiyunnu.
pravartthanangal.
uyarnna oordar functional prograaming anuvadikkunna phastt klaas moolyangalaanu functionukal
 n = <0 aanenkil pinne 1 mattenthenkilum n * {vastutha n-1} avasaanikkunnu
avasaanam
 {fact n} divi ({fact k} * {fact n-k})% poornnasamkhyakalkku oz ll overflo cheyyaan kazhiyilla (memory avasheshikkunnillenkil)
avasaanam
 poojyatthinte cases listt appol 0
 [] echu|t ennittu pattikakalil h + {sumlist t}% paatten poruthappedunnu
 avasaanam
avasaanam
free, boundu veriyabilukalkoppam functionukal upayogikkaam. staatik lexical scopping upayogichaanu free variable moolyangal kandethunnathu.
uyarnna kramatthilulla prograaming.
functionukal mattu oz objectukal poleyaanu. oru function mattu functionukalilekkulla attributaayi kaimaram allengil oru functionil thirike nalkaam. 
phann {square n}% oru pothu pravartthanam
 enn * enn
avasaanam
phann {mapp f xs}% f ivide oru functionaanu-haiyar oordar prograaming
 cases xs
 appol poojyathil ninnu
 avasaanam
avasaanam
% upayogam
anjjaathamaaya pravartthanangal.
mattu pala pravartthana bhaashakaleyum pole, anjjaatha functionukalude upayogathe oos pinthunaykkunnu (i.iii. uyarnna oordar prograaming ulla) perillaattha functionukal. ivaye soochippikkaan $enna chihnam upayogikkunnu.
thazhepparayunnavayil, square function anjjaathamaayi nirvachikkukayum paas cheyyukayum cheiyunnu, ithu cockways _ 3 brows cheyyaan kaaranamaakunnu.
anjjaatha functionukalkku perukallillaathathinaal, aavarthana anjjaatha functionukal nirvachikkaan kazhiyilla.
nadapadikramangal.
oossile functionukal athinte nirvvahana samayat functionte bodiyil kanda avasana prasthavanayil oru moolyam nalkanam. chuvadeyulla udaaharanathil, x> 0 aanenkil-5 enna function ritten 5 nalkunnu.
prakhyapikkuka
 x> 0 aanenkil 5 allengil 5 avasaanikkunnu
avasaanam
ennaal oru function moolyangal nalkendathilla enna saahacharyathil oos oru soukaryavum nalkunnu. atharam pravartthanangale nadapadikramangal ennu vilikkunnu. prok" enna nirmmaanam upayogichu nadapadikramangal inipparayunna reethiyil nirvachikkunnu
prakhyapikkuka
 x> 0 aanenkil {brows 5} allengil {brows ~ 5} avasaanikkunnu
avasaanam
mukalil paranja udaaharanam oru moolyavum nalkunnilla, ithu x-nte chinnathe aashrayich oz brouseril 5 allengil-5 print cheiyunnu.
dattaa phloo variabilukalum declarative kankaransiyum.
prograam oru anboundu variable neridumbol athu oru moolyathinaayi kaathirikkunnu. udaaharanathinu, thaazhe, z-nte moolyam kaanikkunnathin munbu x, y enniva oru moolyavumaayi bandhippikkunnathuvare thread kaathirikkum.
nool 
 z = x + y
avasaanam
thread x = 40 end
thread y = 2 end
oru daattaaflo veriyabilinte moolyam orikkal bandhippichukazhinjaal maattaan kazhiyilla
x = 1
x = 2 sathamaanam pishak
daattaaflo variableukal kankarant stream ejantumaar srishtikkunnathu eluppamaakkunnu
 n = = paramavadhi aanenkil poojyamaanu
 mattenthenkilum 
 avasaanam
avasaanam
 cases stream
 appol poojyathil ninnu
 avasaanam
avasaanam
praadeshika x y inn
 thread x = {ints 0 1000} avasaanam
 thread y = {sum 0 x} avasaanam
avasaanam
daattaaflo variableukal pravartthikkunna reethi kaaranam, oru prograamil evideyum threadukal sthaapikkaan kazhiyum, athinu athe phalam labhikkumenn urappunalkunnu. ithu kankarant prograaming valare eluppamaakkunnu. noolukal valare vilakuranjathaanu oresamayam 100,000 noolukal pravarthippikkaan kazhiyum.
udaaharanam trial division arippa.
eee udaaharanam trial division algoritam upayogichu prime nambarukal filter cheiyunna kankarant stream ejantumaar aavarthichu srishtikkunnathiloode prime nambarukalude oru stream kanakkaakkunnu
 cases xs oof neel pinne poojyamaanu
 [] x|xr pinne ys inn
 thread ys = {filter xr phann {$y} y mooad x\ = 0 end} end
 avasaanam
avasaanam
alasata.
oos sthirasthithiyaayi aakaamkshayode vilayiruthal upayogikkunnu, pakshe alasamaaya vilayiruthal saadhyamaan. thaazhe, y-yude moolyam kanakkakkaan x-nte moolyam aavashyamullappol maathrame vastutha kanakkaakkukayulloo.
 n = <0 aanenkil pinne 1 mattenthenkilum n * {vastutha n-1} avasaanikkunnu
avasaanam
praadeshika x y inn
 x = {vastutha 100} 
 y = x + 1
avasaanam
alasamaaya vilayiruthal yadhaarthathil ananthamaaya dattaa gadanakal oosil sambharikkanulla saadhyatha nalkunnu. thaazhepparayunna coode saambilil ninnu alasamaaya moolyanirnnayathinte shakti kaanaan kazhiyum
prakhyapikkuka
 cases xs#ys
 (x)|xr) #(y)|varsham) pinne
 avasaanam
 avasaanam
avasaanam
 cases xs
 appol poojyathil ninnu
 avasaanam
avasaanam
echu prakhyapikkuka
mukalilulla coode ananthamaaya pattikayile ellah saadhaarana samkhyakalum manoharamaayi kanakkakkunnu. yadhaartha samkhyakal aavashyamullappol maathrame kanakkaakkoo.
sandesham kaimarunna ekathaanatha.
lalithamaaya ardhashaasthrathiloode sandesham kaimaarunnathiloode declarative kankarant model vipuleekarikkaan kazhiyum
prakhyapikkuka
praadeshika stream portt
 {send portt 1}% stream ippol 1 aanu|_ ('_' ennathu bandhamillaathathum perillaathathumaaya oru variable soochippikkunnu)
 {send portt 2}% stream ippol 1 aanu|2|_ 
 {send portt n}% stream ippol 1 aanu|2| .. |enn.|_
avasaanam 
oru porttum oru thread upayogichu asinkranas ejantumaare nirvachikkaam
 emm. ezz. jii. outtu inn
 thread {foldl msg phann init out} end
avasaanam
samsthaanavum vasthukkalum.
valare lalithamaaya ardhashaasthram upayogichu stettu, object ooriyantad prograamingine pinthunaykkunnathinu declarative model veendum vipuleekarikkaan kazhiyum. cellukal ennu vilikkunna oru puthiya parivartthana daatta ghadana srishtikkaan
praadeshika a x inn
 a: = 1 sathamaanam a yude moolyam 1 aayi maattunnu
 x = @a% @ennathu oru moolyathinte moolyam axus cheyyaan upayogikkunnu.
avasaanam
eee lalithamaaya ardhamaattangaliloode, muzhuvan object-ooriyantad maathrkayeyum pinthunaykkaan kazhiyum. alppam vaakyaghadanayulla panchasaara upayogichu, oopu oosil nannayi samyojippikkappedunnu.
klaas kaundar
 aarr wall
 methu init (moolyam)
 walle = moolyam
 avasaanam
 methu brows cheyyuka
 avasaanam
 methu ink (moolyam)
 walle = @val + moolyam
 avasaanam
avasaanam
praadeshika sii inn
avasaanam
nirvvahana vegatha.
mosart compiler nirmmikkunna oru prograaminte execution vegatha (1.4.0 pathipp oaes 3 nadappilaakkunnu) valare mandagathiyilaanu. 2012 leeii oru koottam maanadandangalil ithu sii bhaashayude gnu compiler shekharathekkaal (jisisi) 50 madangu mandagathiyilaanu.

