1 Search Results for "Ramos, Pedro Palma"


Document
Implementing Python for DrRacket

Authors: Pedro Palma Ramos and António Menezes Leitão

Published in: OASIcs, Volume 38, 3rd Symposium on Languages, Applications and Technologies (2014)


Abstract
The Python programming language is becoming increasingly popular in a variety of areas, most notably among novice programmers. On the other hand, Racket and other Scheme dialects are considered excellent vehicles for introducing Computer Science concepts. This paper presents an implementation of Python for Racket and the DrRacket IDE. This allows Python programmers to use Racket libraries and vice versa, as well as using DrRacket's pedagogic features. In particular, it allows architects and designers to use Python as a front-end programming language for Rosetta, an IDE for computer-aided design, whose modelling primitives are defined in Racket. Our proposed solution involves compiling Python code into equivalent Racket source code. For the runtime implementation, we present two different strategies: (1) using a foreign function interface to borrow the data types and primitives from Python's virtual machine or (2) implementing Python's data model over Racket data types. While the first strategy is easily implemented and provides immediate support for Python's standard library and existing third-party libraries, it suffers from performance issues: it runs, at least, one order of magnitude slower when compared to Python’s reference implementation. The second strategy requires us to implement Python's data model in Racket and port all of Python's standard library, but it succeeds in solving the former's performance issues. Furthermore, it makes interoperability between Python and Racket code easier to implement and simpler to use.

Cite as

Pedro Palma Ramos and António Menezes Leitão. Implementing Python for DrRacket. In 3rd Symposium on Languages, Applications and Technologies. Open Access Series in Informatics (OASIcs), Volume 38, pp. 127-141, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2014)


Copy BibTex To Clipboard

@InProceedings{ramos_et_al:OASIcs.SLATE.2014.127,
  author =	{Ramos, Pedro Palma and Leit\~{a}o, Ant\'{o}nio Menezes},
  title =	{{Implementing Python for DrRacket}},
  booktitle =	{3rd Symposium on Languages, Applications and Technologies},
  pages =	{127--141},
  series =	{Open Access Series in Informatics (OASIcs)},
  ISBN =	{978-3-939897-68-2},
  ISSN =	{2190-6807},
  year =	{2014},
  volume =	{38},
  editor =	{Pereira, Maria Jo\~{a}o Varanda and Leal, Jos\'{e} Paulo and Sim\~{o}es, Alberto},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops-dev.dagstuhl.de/entities/document/10.4230/OASIcs.SLATE.2014.127},
  URN =		{urn:nbn:de:0030-drops-45656},
  doi =		{10.4230/OASIcs.SLATE.2014.127},
  annote =	{Keywords: Python, Racket, language implementations, compilers}
}
  • Refine by Author
  • 1 Leitão, António Menezes
  • 1 Ramos, Pedro Palma

  • Refine by Classification

  • Refine by Keyword
  • 1 Python
  • 1 Racket
  • 1 compilers
  • 1 language implementations

  • Refine by Type
  • 1 document

  • Refine by Publication Year
  • 1 2014

Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail