Personal tools

Savuros dialog

From HaskellWiki

Revision as of 22:38, 25 January 2008 by Ha$kell (Talk | contribs)

Jump to: navigation, search

Happy.gif

Personajele: Studentii mei "tzintzi" (nickname) si "adi" care au de facut o tema despre extinderea unui interpretor de limbaj imperativ, scris in Haskell, cu o instructiune "for". (Evident, nu este nevoie de for cand programezi in Haskell, recursia fiind un concept suficient de puternic spre a-l inlocui dar un limbaj imperativ pe care il implementezi nu strica sa aiba si un "for".). Insa interlocutorii nu inteleg (sau studentii nu spun suficient de clar) ca in discutie este realizarea unui limbaj. Se crede asadar ca cei doi vor neaparat sa programeze cu for si while IN limbajul Haskell. :))
Alte personaje: <dmead> - grabit sa mai vada o bucata de cod
si <Igel>

for...?
11:09:39 <dmead> paste it
11:09:42 <dmead> @paste
11:09:48 <dmead> ?paste
11:09:51 <adi> :)
11:09:54 <dmead> where is that thing...
11:09:59 <adi> http://tzintzi.info/haskell.hs
11:10:05 <Igel> paste.lisp.org?
11:10:05 <adi> I have the code here
11:11:17 <lambdabot> --removed--
11:11:19 <lambdabot> -- removed--
11:11:44 <dmead> mm
11:11:50 <dmead> can you translate the header into english?
11:12:34 <adi> the code is taken from 'DSL Implementation using staging and monads' by Tim Sheared, Zine-el-abidine Benaisa, Emir Pasalic
11:12:34 <adi> -- Pacific Software Research Center, Oregon Graduate Institute

Aici studentii fac prima gafa lipind cu paste doua portiuni de cod din care doar prima era inspirata de lucrarea mentionata. Cei care au citit lucrarea mentionata stiu probabil ca ea este ilustrata cu programe in Meta ML, nu in Haskell. :) A doua parte, front-end-ul este realizat de profesor dupa alte surse, necitate de studenti.

11:12:38 <adi> I guess
11:13:06 <adi> and I declared some funtions like 'while' there, but I can't figure out how to do the same with 'for'

Adi omite sa spuna ca ei lucreaza, ghidati de profesor, la constructia unui limbaj! Iar interlocutorul nu-si da seama !


11:13:29 <dmead> i dont think you'd want to use while and for in haskell
11:13:39 <psnl> -- removed --
11:13:52 <adi> why not ?
11:15:32 <Igel> recursion's all you need ;)
11:15:50 <dmead> beecause iteration is usually not good in a functional language

11:16:15 <adi> :|
11:16:41 <dmead> why do you need iteration?
11:16:59 <adi> the teacher told us to try to do 'for'
!!

Nota: In discutie era un fragment de cod din planificata viitoare carte a profesorului acestora, Dan Popa, aflata in curs de elaborare si folosita deja la Universitatea Bacau in cadrul cursului de limbaje formale. Fragmentul a fost pus iute de grabitul "tzintzi" pe Internet (cu nerespectarea legii copyright-ului). si mai putea fi inca gasit la http://tzintzi.info/haskell.hs. Intre timp a fost retras.

<= Inapoi la inceputul paginii principale Ro/Haskell