Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Implementando Lenguajes de Programación en Java...

Avatar for bogotajs bogotajs
October 20, 2012

Implementando Lenguajes de Programación en Javascript

Javascript es un lenguaje maduro y dinámico, que puede ejecutarse en distintas plataformas (clientes, servidor) y dispositivos. Hay docenas de lenguajes implementados en Javascript. Veremos algunas formas de implementación de intérpretes y máquinas virtuales, en navegadores y en Node.js como servidor.

Avatar for bogotajs

bogotajs

October 20, 2012
Tweet

More Decks by bogotajs

Other Decks in Programming

Transcript

  1. Agenda • Programming languages implemented in JavaScript • Lexer, Parser,

    Bytecodes, Code Generation • Interpreters – Lisp – Logo • Compiler – ClojureScript • Smalltalk VM – Amber • TypeScript Saturday, October 20, 12
  2. Links • JS/CC – http://jscc.phorward-software.com/ – The LALR(1) parser and

    lexical analyzer generator for JavaScript, written in JavaScrip – Used in http://www.playmycode.com/ • Metacompilers Tutorial – http://www.bayfronttechnologies.com/ mc_tutorial.html Saturday, October 20, 12
  3. Lisp as the Maxwell’s equations of software (by Alan Kay)

    http://tinyurl.com/jsconfmaxwell http://tinyurl.com/jsconfalankay Saturday, October 20, 12
  4. AjLispJs • https://github.com/ajlopez/AjLispJs • Interpreter in Javascript • TDD •

    Qunit tests • NodeUnit tests • Native Access Saturday, October 20, 12
  5. AjLogoJs • https://github.com/ajlopez/AjLogoJs • http://ajlopez.github.com/AjLogoJs/ demo.html • Interpreter • First

    tests: Node.js assert module • Refactored to: Node.js nodeunit • Procedures • Exposing Turtle via callbacks Saturday, October 20, 12
  6. ClojureScript • https://github.com/clojure/ clojurescript • Compiles Clojure to JavaScript. •

    Clojure (Java, CLR) • Clojurescript – Javascript repl – Compile .clj to .cljc • Browser demo Saturday, October 20, 12
  7. AjTalk • https://github.com/ajlopez/AjTalk • Smalltalk-like Interpreter • Based on Bytecodes

    (alternative: interpreter pattern) • Written in C# • Access to .NET types, objects, class libraries • Agents • Distributed Objects • Transactional Objects (STM-alike) • .NET Library and Console App (and ugly GUI ) Saturday, October 20, 12
  8. AjTalkJs • https://github.com/ajlopez/AjTalkJs • http://ajlopez.github.com/AjTalkJs/ demo.html • Smalltalk-like VM, compiling

    and executing bytecodes • Written in Javascript, using TDD • Access to Javascript native objects • Browser and Node.js • AjTalkJs compile .st files using Javascript • AjTalk compiles to Javascript and AjTalkJs Saturday, October 20, 12
  9. Amber (via N.Petton, • Amber (Jtalk) is (mostly) written in

    itself, including the parser & compiler • Full Smalltalk object system, including classes & metaclasses, etc • Core libraries (streams, collections, RegExp, etc) • Web related libraries: HTML Canvas, DOM manipulation • Full featured IDE • Advanced Smalltalk features, including #doesNotUnderstand: support and Saturday, October 20, 12
  10. TypeScript • http://www.typescriptlang.org • Syntactic sugar for JavaScript • Superset

    of Ecmascript 5 (ES5) syntax • Every JavaScript program is also a TypeScript program • Includes several proposed features of Ecmascript 6 (ES6), including classes and modules Saturday, October 20, 12