Implementing Python for DrRacket
Pedro Palma Ramos,António Menezes Leitão +1 more
- 01 Jan 2014
- Vol. 38, pp 127-141
TL;DR: An implementation of Python for Racket and the DrRackets IDE is presented, which allows Python programmers to use Racket libraries and vice versa, as well as using DrRacket's pedagogic features.
read more
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.
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
Python on the Landscape of Programming Tools for Design and Architectural Education
Alexandre Barrozo do Amaral Villares,Daniel de Carvalho Moreira +1 more
- 01 Nov 2017
TL;DR: This is an early report on collecting data about software applications and coding tools geared towards the educational environment, preparing a listing for further evaluation and analysis of platforms.
Macros for domain-specific languages
Michael Ballantyne,Alexis King,Matthias Felleisen +2 more
- 13 Nov 2020
TL;DR: This paper presents an architecture for implementers of macros, a powerful means of extending languages that has proven useful in both general-purpose and domain-specific programming contexts.
References
•Book
PostgreSQL: Introduction and Concepts
Bruce Momjian
- 15 Dec 2000
TL;DR: The history of POSTGRESQL and its applications, including its development at the University of California at Berkeley, and its use in Java and other programming languages, is reviewed.
256
Languages as libraries
Sam Tobin-Hochstadt,Vincent St-Amour,Ryan Culpepper,Matthew Flatt,Matthias Felleisen +4 more
- 04 Jun 2011
TL;DR: Racket's language extension API is explained via an implementation of a small typed sister language that provides a rich type system that accommodates the idioms of untyped Racket and includes a type-based optimizer that achieves promising speedups.
•Book
Python Essential Reference
David Martin Beazley,Guido Van Rossum +1 more
- 01 Oct 1999
TL;DR: This review concludes that Python users who are tired of chasing questions through hyperlinked online documents will benefit from the expansive random-access index, and Python the book captures the orderliness of Python the language.
168
•Book
An Introduction to Python
Guido van Rossum,Fred L. Drake +1 more
- 01 Apr 2003
TL;DR: This revised edition of the official Python tutorial provides an introduction to Python, an easy to learn object-oriented programming language that has modules, classes, exceptions, very high level data types, and dynamic typing.
Portable Generative Design for CAD Applications
José Lopes,António Menezes Leitão,Susana Martins +2 more
- 01 Jan 2011
TL;DR: Rosetta ensures that a single program can be used to create identical geometric models in different CAD applications, thus facilitating the dissemination of the programs and of the underlying ideas.
33