Parrot in the Real World

Slides:



Advertisements
Similar presentations
OO in Parrot Dan Sugalski April 14, 2003.
Advertisements

© Copyright 2012 STI INNSBRUCK Apache Lucene Ioan Toma based on slides from Aaron Bannert
Parrot in a nutshell1 Parrot in a Nutshell Dan Sugalski
The Structure of the GNAT Compiler. A target-independent Ada95 front-end for GCC Ada components C components SyntaxSemExpandgigiGCC AST Annotated AST.
SM3121 Software Technology Mark Green School of Creative Media.
Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
M1G Introduction to Programming 2 4. Enhancing a class:Room.
AIT 616 Fall 2002 PHP. AIT 616 Fall 2002 PHP  Special scripting language used to dynamically generate web documents  Open source – Free!!!  Performs.
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 6: Assembler slide 1www.idc.ac.il/tecs Assembler Elements of Computing.
1 Alice DAQ Configuration DB
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
Developing software and hardware in parallel Vladimir Rubanov ISP RAS.
Lecture 4: MIPS Instruction Set Reminders: –Homework #1 posted: due next Wed. –Midterm #1 scheduled Friday September 26 th, 2014 Location: TODD 430 –Midterm.
Eagle: Maturation and Evolution 17th Annual Tcl Conference Joe Mistachkin.
Debugging and Profiling With some help from Software Carpentry resources.
Processes Introduction to Operating Systems: Module 3.
Storing Data. A Note About Creating Games Why do you want to store data? 1.Data files 2.Configuration files.
Kirk Scott Computer Science The University of Alaska Anchorage 1.
Implementing an Interpreter Dan Sugalski
EPICS to TANGO Translator Rok Šabjan on behalf of Rok Štefanič Presented at ICALEPCS, Knoxville, October.
Parrot in a nutshell1 Parrot in a Nutshell Dan Sugalski
Easy ETL with Andrzej Kukuła – Marcin Szeliga –
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
The purpose of a CPU is to process data Custom written software is created for a user to meet exact purpose Off the shelf software is developed by a software.
A Single Intermediate Language That Supports Multiple Implemtntation of Exceptions Delvin Defoe Washington University in Saint Louis Department of Computer.
The heavyweight parts of lightweight languages LL1 Workshop November 17, 2001.
CIS 234: Object-Oriented Programming with Java
Chapter Goals Describe the application development process and the role of methodologies, models, and tools Compare and contrast programming language generations.
The Holmes Platform and Applications
SPiiPlus Training Class
Programs, Instructions, and Registers
Agenda:- DevOps Tools Chef Jenkins Puppet Apache Ant Apache Maven Logstash Docker New Relic Gradle Git.
COMP 2100 From Python to Java
Zuse’s Plankalkül – 1945 Never implemented Problems Zuse Solved
Visual Studio Database Tools (aka SQL Server Data Tools)
CS/COE 0447 (term 2181) Jarrett Billingsley
Cleveland SQL Saturday Catch-All or Sometimes Queries
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
Introduction to Web Assembly
Week 9 - Monday CS 113.
Introduction to Python
Mobile Application Test Case Automation
The heavyweight parts of lightweight languages
Workshop in Nihzny Novgorod State University Activity Report
Introduction Enosis Learning.
Application Development Theory
SharePoint-Hosted Apps and JavaScript
TRANSLATORS AND IDEs Key Revision Points.
Introduction Enosis Learning.
Compiler Construction
Mobile Development Workshop
Compiler 薛智文 TH 6 7 8, DTH Spring.
Fundamentals of Programming
Chapter 3: Operating-System Structures
The University of Sheffield data migration
Lecture 1: Multi-tier Architecture Overview
Welcome back to Software Development!
Genome Workbench Chuong Huynh NIH/NLM/NCBI New Delhi, India
Compiler 薛智文 TH 6 7 8, DTH Spring.
MySQL Migration Toolkit
CSE 403, Winter 2003 Software Engineering
Outline Chapter 2 (cont) OS Design OS structure
Eagle: Maturation and Evolution
System calls….. C-program->POSIX call
CS703 – Advanced Operating Systems
Compiler 薛智文 M 2 3 4, DTH Spring.
The Lua Chunk Vault, an enhancement to epics base
9/27: Lecture Topics Memory Data transfer instructions
Design of the Parrot Virtual Machine The OO-ish bits
Presentation transcript:

Parrot in the Real World Dan Sugalski dan@sidhe.org April 29, 2019

A Presentation in two parts Part 1 - The practical project Part 2 - The ramifications

Yarde Metals Metals wholesaling company $200M+ year 400K+ items/year 400+ employees 6 branches

Metaltraq Whole company run on a package called Metaltraq Handles sales, shipping, tracking, invoicing--pretty much everything We have the source, all 460K lines of it Unfortunately it’s in DecisionPlus

System Setup Whole company runs on a single server All terminal-based access ISAM database, one index per data file Only access to data through DecisionPlus

DecisionPlus Language Basic Architecture DecisionPlus Language Reports Screens Engine Database Screen

The Problems The underlying database engine has size issues Integrated database is all ISAM DecisonPlus, as a language, is nasty Stuck on SCO Unix as a platform

The size issues Each data file has a maximum size limit Our most active only holds about 17 months of data That was 18 months a while back Good for the company, bad for MIS

ISAM. Ick The only access to the data is via DecisionPlus One index per table Serious performance issues if you don’t use that index Any data queries need MIS help

DecisionPlus Antique 4GL Slightly more primitive than Parrot’s assembly language No subroutines, just labels, goto, and gosub No blocks, just continued lines Limits on the length of a single line No lexicals. Or, really, globals Phenomenally primitive array access

Two language versions Forms, with screen interface Reports, with looping, totalling, and cross-reference file support Two versions of the same language, subtly different

SCO Unix as our platform Need anything more be said?

The Original Plan Move database to Postgres Compile all programs into Perl Dump original source Do all new work in Perl

So, of course it was doomed to failure It was a good plan… So, of course it was doomed to failure Sort of

Transition to Postgres worked We play trigger games to simulate ISAM behaviour Auto-generate the “ISAM key” DB thunking layer knows how to use this info Nightly transfer gives us an up-to-date data warehouse Already in production use

Destination: Perl… not so good DecisionPlus is really primitive No subroutines or functions, just labels you can goto and gosub to No lexical variables either Or, technically, any variables at all The generated perl was horrible

Perl really isn’t a target language Working around the scoping issues was… interesting The resulting code looked like machine-generated code and wasn’t really editable It was so non-perl that working with it would’ve really hurt Performance penalties with no win

The New Plan Target Parrot instead We had the parser We had a working compiler Parrot was working fine

Balancing the Issues Parrot gave us multi-language capabilities Most of which were theoretical Engine was fast But… untested So we did the sensible thing--a test run

The Test Get a simple screen running Jan 9th deadline Made it with hours to spare

Pretty big test Working DB access library Working screen access library 70% of the language

What we have 6K lines of PIR code in support libraries and class libraries ~660 line DecisionPlus Parse::RecDescent grammar 5K line compiler in perl Full interface to Postgres & ncurses No C code at all

Project Status Currently in-house beta August general beta Looking for a September or October rollout Still got some things to thump, but they’re almost all compiler and runtime things One big parrot bug

What this did for Parrot Didn’t alter the design, though it did change the timetable some Multimethod dispatch Objects Dynamic bytecode loading Stress-tested Parrot a lot

The Ramifications Really nice target for many languages Generating code is really, really easy Interfacing’s simple Dynaloading’s handy

Nice target Parrot maps well to procedural languages Object and MMD systems makes custom data types simple Surprisingly stable

Easy code generation AST->PIR translation is trivial Parrot hides a lot of the tricky stuff Calling Conventions Register coloring Instruction set maps nicely to most languages

C interfacing’s dead-easy No C code needed All with Parrot’s NCI interface For a 2 hour hack it’s stood up really well

Dynamic loading games work Parrot’s built-in compilation system’s easy to use Loading bytecode, assembly, or PIR work the same way Bit limited with compilers right now, alas

End conclusions Compilers really aren’t tough Parrot’s a nice target for compilers Our cross-language features do work as we’d hoped Moving a 4GL to Parrot is reasonably (potentially easily) doable

Questions ?