120 likes | 342 Views
tata. Rafi Pelossof R-Temp Litvinovich Buko Obele Isaac Tozar. project objectives. To create a simple , robust, highly expressive language The language with only a few short lines of code should help programmers work with XML, HTTP and SOAP print hello world to the screen
E N D
tata Rafi Pelossof R-Temp Litvinovich Buko Obele Isaac Tozar
project objectives • To create a simple , robust, highly expressive language • The language with only a few short lines of code should help programmers work with XML, HTTP and SOAP • print hello world to the screen • DMWNQSM (Do More With Not Quite So Much)
function-ality • core • weak typing • println add 10 “5.0” • collections and currying • println filter “x” ( 1 2 3 4 5 6 ) • { eq mod get “x” 2 1 } • work with io, xml, http • io.save • “nyt_headlines.html” • xml.transform • io.file “rss2xhtml.xsl” • xml.doc url http://nyt.weblogs.com/rss.xml
function-ality pt 2 • object oriented programming! • set “greeter” • oo.object • set “greeting” “Hello!” • set “doGreet” • oo.function { println get “greeting!” } • oo.endobject • set “doorman” • oo.object inherits get “greeter” • set “exitGreeting” • Set “doExitGreet” • oo.function { println get “exitGreeting” } • oo.endobject
architecture • what’s the difference between an api and a language? • both allow the developer to do cool stuff • both provide a contract that the developer must respect • both are the same! in tata the language IS the api • huh?
architecture pt 2 • function function what’s your function? • everything is a function • functions have parameters and return values • ex: • println concat concat “tata says” concat “hello” “world” • functions live on a stack. scripts gets executed by popping and evaluating functions
architecture pt 3 • how does the parser go from words to functions? • easy! every token in a script represents some function • a parser examines a token and selects the function it represents and pushes it on the stack? • this is sexy! it’s possible for tata programs to generate, execute tata programs!
testing plan • “in theory, practice and theory are the same. in practice, they’re not.” • HLD, LLD and so on… • you sit down and design this cool architecture and make strict interfaces between components. it’s worthless. • You write a bunch of code. It kinda works. Then you want to change something. Boom!
test everything! • Unit testing! Write a little bit of code. Test it. Write a little bit more. Test that. Eventually you can print hello world Mission Accomplished! • Blackbox Testing! Does the language work like the LRM says or do we need to change the LRM? • Whitebox testing? Does hello world always print?
example blackbox test Println div 3 4 Println div 4 4 Println div 3.5 4 Println div 0 4 Println div 3 0 Println div 3.5 4 Println div 3 true Println div false 2 Println div “true” 2 Println div ( ) ( ) Println div ( ) “1” Println div “hell” 666 : :
lessons learned • when you don’t know what you’re doing write a test! • integration testing is a lie. programmers are dumb. Languages like java cant capture all assumptions and constraints. Write more tests! • buko’s hair is very fluffy
lessons learned 2 • Feature freeze! If you try to do everything and make everything perfect and wonderful you wont succeed • Don’t touch buko’s hair • Group work is a bitch. People don’t show up to meetings. They don’t call you back. • Designing languages is fun. Implementing them not so much.