CS 199 Computers Unplugged

Total Page:16

File Type:pdf, Size:1020Kb

CS 199 Computers Unplugged How Many Programming Languages are there in this CS 199 Computers Unplugged World? Course Notes1 Week 4: Natural and Programming Languages Lecture 2: Programming Languages Anton Setzer I Number of languages linked from at HOPL: http://www.cs.swan.ac.uk/∼csetzer/index.html I Same problems as for natural languages: I Families of languages. http://www.cs.swan.ac.uk/∼csetzer/lectures/ I Dialects. computersUnplugged/10/index.html I Different versions. I Different compilers for the same language execute differently. November 5, 2010 1Substantially based on Stephen Anderson: How many languages are there in the world. Available from http://www.lsadc.org/info/pdf files/howmany.pdf CS 199 1/ 30 CS 199 2/ 30 What is a Programming Language? What is a Programming Language? I Britannica Online I The Free Dictionary http://www.thefreedictionary.com: http://www.britannica.com/EBchecked/topic/130670/computer- programming-language I An artificial language used to write instructions that can be translated into machine language and then executed by a computer. I Computer programming language, any of various languages for I Wikipedia http://en.wikipedia.org/wiki/Programming language expressing a set of detailed instructions for a digital computer. I A programming language is an artificial language designed to express computations that can be performed by a machine, particularly a I Webopedia computer http://www.webopedia.com/TERM/P/programming language.html I A vocabulary and set of grammatical rules for instructing a computer to perform specific tasks CS 199 3/ 30 CS 199 4/ 30 What is a Programming Language? What is a Language? I My definition: I An ::::::::::alphabet is a finite set. I A ::::::::::::::programming::::::::::language is a set of descriptions such that each description can be used to instruct a computer or other mechanical I A :::::::formal:::::::::::language is a set of strings over a given alphabet. device to perform a specific task. CS 199 5/ 30 CS 199 6/ 30 What is a Programming Language? Adjustment Mechanism of a Mechanical Watch { An Analogue Programming Language I Is mp3 a programming language? I Analogue computer languages. I Not formal languages. I Is English a programming language? CS 199 7/ 30 CS 199 7a/ 30 Vynil Record { Analogue Programming Language Antikythera Mechanism CS 199 7b/ 30 CS 199 8/ 30 Antikythera Mechanism Antikythera Mechanism (around 150 - 100 BCE) I From http://en.wikipedia.org/wiki/Computer programming: I The Antikythera mechanism from ancient Greece was a calculator utilizing gears of various sizes and configuration to determine its operation, which tracked the metonic cycle still used in lunar-to-solar calendars, and which is consistent for calculating the dates of the Olympiads. I From Mark Wonnacott: Analogue Computers: The First Declarative Programming. http://ragzouken.com/compsci/languages.pdf I The first machine computable delcarative program is within the earliest mechanical computer, the Antikythera mechanism (c. 70 BC). Changing the date with the mechanism's hand-crank turned a complex arrangement of gears to compute astronomical positions. Different gearing rations between connected gears dictate the relationships between them and ultimately between the date and calculated astronomical positions. These relationships are invariantly satisfied by the turning of the gears, making the gears a form of declarative program. CS 199 9/ 30 CS 199 10/ 30 Al-Jazari Musical Robots { A Digital Programming History of Programming Languages Language I Wikipedia, http://en.wikipedia.org/wiki/Al-Jazari I l-Jazari created a musical automaton, which was a boat with four automatic musicians that floated on a lake to entertain guests at royal drinking parties. Professor Noel Sharkey has argued that it is quite likely that it was an early programmable automata and has produced a possible reconstruction of the mechanism; it has a programmable drum machine with pegs (cams) that bump into little levers that operated the percussion. The drummer could be made to play different rhythms and different drum patterns if the pegs were moved around. According to Charles B. Fowler, the automata were a "robot band" which performed "more than fifty facial and body actions during each musical selection." CS 199 11/ 30 CS 199 12/ 30 Jacquard Loom (Invented 1801) Babbage's Analytical Engine (1834) Jacquard Loom, invented by Joseqph Marie Jacquard 1801 CS 199 13/ 30 CS 199 14/ 30 Babbage's Analytical Engine { First Turing Complete Ada Lovelace - The first Computer Programmer Language I It's Turing complete. I More in CS-236 Lanugage and Computation. I Any computable function can be computed in principle using Babbage's Analytical Engine. I The language for Babbage's Analytical Engine is probably the first Turing-Complete Programming Language. CS 199 15/ 30 CS 199 16/ 30 Hello World Program 99 Bottles of Beer CS 199 17/ 30 CS 199 18/ 30 Popular Languages Scripting Languages I Java I Perl I C I Python I C++ I Pascal CS 199 19/ 30 CS 199 20/ 30 Easy to Use Languages Functional Programming Languages I Haskell I BASIC I SML I Visual Basic I Coq (dependently typed) CS 199 21/ 30 CS 199 22/ 30 Logic Programming Markup Languages/Spreadsheets I HTML I Prolog I Excel CS 199 23/ 30 CS 199 24/ 30 Misc Historically Famous Languages I Babbage's Analytical Language I Database Languages I ENIAC I SQL I FORTRAN I Graphical Languages I LISP I LabVIEW I Cobol I Simula CS 199 25/ 30 CS 199 26/ 30 Assembler Theoretical Languages I Turing Machine I CSP CS 199 27/ 30 CS 199 28/ 30 Extreme Languages Esoteric Languages I SheerPower. I Aimed at having the fastest compilation. I Cow. I What does this mean? I LOLCODE. I Brainfuck. I Aimed at having thesmallest compiler. I Piet. I What does this mean? I Whitespace. I Malbolge I Aimed at having the most incomprehensible language. CS 199 29/ 30 CS 199 30/ 30.
Recommended publications
  • Narciso Martí Oliet Universidad Complutense De Madrid, 2018 Resumen
    BF y el asombroso mundo de los lenguajes esotéricos Narciso Martí Oliet Universidad Complutense de Madrid, 2018 Resumen Entre los miles de lenguajes de programación que existen, hay una especie que se ha hecho más visible en los últimos años, la de los lenguajes esotéricos. Se trata de lenguajes que no pretenden facilitarle la vida al programador o al menos facilitar la programación de ciertos sistemas, sino precisamente todo lo contrario; en la creación de muchos de ellos ha primado la diversión sobre la utilidad. En esta presentación veremos un panorama general de esta especie de lenguajes, prestando un poco más de atención a BF, uno de los lenguajes más famosos entre ellos. GitHub’s most popular PLs Ruby C++ C PHP Shell scripts Python TypeScript Java C# JavaScript PL Explorations (textbook) JavaScript Java CoffeeScript Clojure Lua Elm Python Erlang Ruby Go Julia Swift PL Explorations (more langs) Fortran C++ ML TypeScript COBOL Rust OCaml Dart Lisp CLU Haskell APL Algol Ada F# Prolog Simula C# Elixir K Smalltalk Scala PHP Io C Perl Hack Factor Lenguajes esotéricos Naturaleza ofuscada Utilidad dudosa Características poco comunes Prueba de concepto Según algunos APL, Lisp, Haskell, Oz (multiparadigma), JavaScript son buenos ejemplos. Lenguajes esotéricos Lenguaje de programación minimalista Sintaxis muy básica Alfabeto restringido Desafío para la creación e implementación Desafío para la programación Lenguajes esotéricos Cercanos a conceptos esenciales en computación Máquinas de Turing y máquinas de registros Turing computabilidad y
    [Show full text]
  • James K. Kurtz 424.255.8789
    [email protected] kurtz.es/work James K. Kurtz 424.255.8789 Drexel University Philadelphia, PA Bachelor of Science, Computer Engineering Class of June 2016 Minor, Entertainment Engineering School Minor, Business Administration Software: Amazon Web Services (EC2, S3, RDS, EB, Route 53, SES, SNS), Apache, Git, Hg, IIS, Illustrator, IntelliJ IDEA, InDesign, MATLAB, Microsoft Office (Access, Excel, PowerPoint, Publisher, Visio, Word), Photoshop, Reaper, Visual Studio (preferred with ReSharper), WebMatrix, Wireshark, and Dev Tools of Chrome, Firefox & IE Skills Languages: Bash, C, C++, C#, CSS3, Go, HTML5, Java, JavaScript, LOLCODE, MATLAB, PHP, PowerShell, Python, SQL, VB Operating Systems: Windows, MacOS, Ubuntu, Raspbian, iOS, Android, Windows IOT, Windows Server Freelance Web Development Valley Forge, PA CMS, CRM & Web App Developer June 2010 to Present General web design and development work, mostly for small businesses and non-profits Conceptualized and developed a PHP-based content and customer management system for non-profits Enabled e-commerce and web payments through several payment processors Currently handle about 400k page views and 1.1M API calls per month Experience Comcast Corporation Centennial, CO Comcast Labs Research Engineer July 2016 to May 2017 Prototyped methods for identifying and locating individuals in a home through RF (internally published) Researched viability of Software Defined Radios for consumer applications (internally published) Developed method to automate home automation rule creation (patent paperwork filed internally) Researched and prototyped system for geolocating LoRa transmissions (patent paperwork filed internally) Developed system for measuring, interpolating, and mapping LoRa coverage, accounting for topography Developed lab test tools for MPEG, especially validating MPEG-TS packetization Developed prototypes of alternative UI systems, such as electrodes on skin to detect arm motions Contributed to Comcast Labs internal website and documentation Analytics Graphics, Inc.
    [Show full text]
  • Hackim 2014 Write-Up Author: Nick Clark Trivia 1
    HackIM 2014 Write-Up Author: Nick Clark Trivia 1 This esoteric programming language uses AWSUM THX and O NOES as error handling. A simple google search leads us to LOLCODE as the answer. Trivia 2 What software is used to hack into ENCOM's computer system? Googling ENCOM leads us to the fictional company within the movie Tron. Going to Tron’s Wiki (http://en.wikipedia.org/wiki/Tron) we see that the main actor, “Jeff Bridges also portrays Clu (Codified Likeness Utility), a hacking program intended to find evidence of Dillinger's theft in the mainframe.” CLU is the answer to this challenge. Trivia 3 Outcome of Stealth Project to make coffee. Searching for Stealth Project “Coffee” leads us to this page: http://www.sis.pitt.edu/~icucart/fshi/java_introduction.html . In the conclusion of the story we see that the project ultimately became Java. Java is the answer. Trivia 4 Successor of the DEAD persistent object format Googling DEAD persistent object format leads us to the Wikipedia article on the Java class file: http://en.wikipedia.org/wiki/Java_class_file . Under Magic Number we see the story behind DEAD and that it was replaced by RMI. RMI is the answer. Trivia 5 Oheebhtuf O6700 "havavgvnyvmrq" zrzbel (48-ovg) My first guess was to google the whole thing, but that led to no results. I then googled havavgvnyvmrq which lead to the Caeser Cipher word for uninitialized (http://easyciphers.com/uninitialized). This whole phrase has been ciphered. To decipher it I used http://web.forret.com/tools/rot13.asp and just pasted in the cipher text.
    [Show full text]
  • Compiler-Construction
    compiler-construction #compiler- construction 1 1: 2 Examples 2 : 2 2 2 2 2: 3 3 3 Examples 3 3 ? 3 . 4 4 ? 4 . 5 7 You can share this PDF with anyone you feel could benefit from it, downloaded the latest version from: compiler-construction It is an unofficial and free compiler-construction ebook created for educational purposes. All the content is extracted from Stack Overflow Documentation, which is written by many hardworking individuals at Stack Overflow. It is neither affiliated with Stack Overflow nor official compiler- construction. The content is released under Creative Commons BY-SA, and the list of contributors to each chapter are provided in the credits section at the end of this book. Images may be copyright of their respective owners unless otherwise specified. All trademarks and registered trademarks are the property of their respective company owners. Use the content presented in this book at your own risk; it is not guaranteed to be correct nor accurate, please send your feedback and corrections to [email protected] https://riptutorial.com/ko/home 1 1: Examples : • , C, C ++, . • IDE ( : VSCode ) • . • : . Whitespace , Lolcode , Brainfuck . • : . Swift , C++ Python . , . • (Ebook) ○ + ○ + ○ + Coffeescript Rubby Coffeescript Rubby • : , (The Dragon Book) ○ , . • ( ) ○ . : https://riptutorial.com/ko/compiler-construction/topic/6845/-- https://riptutorial.com/ko/home 2 2: . 4 2 4 . • . • (AST) . Examples python . ? ( ) . ['INTEGER', '178'] . : int result = 100; python : import re # for performing regex expressions tokens
    [Show full text]
  • Hands-On Ethical Hacking and Network Defense 3 Edition
    Hands-On Ethical Hacking and Network Defense 3nd edition Chapter 7 Programming for Security Professionals Last modified 1-11-17 Objectives ■ Explain basic programming concepts ■ Write a simple C program ■ Explain how Web pages are created with HTML ■ Describe and create basic Perl programs ■ Explain basic object-oriented programming concepts 2 Introduction to Computer Programming ■ Computer programmers must understand the rules of programming languages ■ Programmers deal with syntax errors ■ One minor mistake and the program will not run ■ Or worse, it will produce unpredictable results ■ Being a good programmer takes time and patience 3 Computer Programming Fundamentals ■ Fundamental concepts ■ Branching, Looping, and Testing (BLT) ■ Documentation ■ Function ■ Mini program within a main program that carries out a task 4 Branching, Looping, and Testing (BLT) ■ Branching ■ Takes you from one area of the program to another area ■ Looping ■ Act of performing a task over and over ■ Testing ■ Verifies some condition and returns true or false 5 A C Program ■ Filename ends in .c ■ It's hard to read at first ■ A single missing semicolon can ruin a program 6 Comments ■ Comments make code easier to read 7 Branching and Testing main() Diagram of branches See links Ch 7b, 7c printf() scanf() 8 Looping 9 Branching, Looping, and Testing (BLT) ■ Algorithm ■ Defines steps for performing a task ■ Keep it as simple as possible ■ Bug ■ An error that causes unpredictable results ■ Pseudocode ■ English-like language used to create the structure of a program
    [Show full text]
  • IDOL Keyview Filter SDK 12.8 C++ Programming Guide
    IDOL KeyView Software Version 12.8 Filter SDK C++ Programming Guide Document Release Date: February 2021 Software Release Date: February 2021 Filter SDK C++ Programming Guide Legal notices Copyright notice © Copyright 2016-2021 Micro Focus or one of its affiliates. The only warranties for products and services of Micro Focus and its affiliates and licensors (“Micro Focus”) are as may be set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. Micro Focus shall not be liable for technical or editorial errors or omissions contained herein. The information contained herein is subject to change without notice. Documentation updates The title page of this document contains the following identifying information: l Software Version number, which indicates the software version. l Document Release Date, which changes each time the document is updated. l Software Release Date, which indicates the release date of this version of the software. To check for updated documentation, visit https://www.microfocus.com/support-and-services/documentation/. Support Visit the MySupport portal to access contact information and details about the products, services, and support that Micro Focus offers. This portal also provides customer self-solve capabilities. It gives you a fast and efficient way to access interactive technical support tools needed to manage your business. As a valued support customer, you can benefit by using the MySupport portal to: l Search for knowledge documents of interest l Access product documentation l View software vulnerability alerts l Enter into discussions with other software customers l Download software patches l Manage software licenses, downloads, and support contracts l Submit and track service requests l Contact customer support l View information about all services that Support offers Many areas of the portal require you to sign in.
    [Show full text]
  • Meowlang Programming Language Proposal
    Meowlang Programming Language Proposal Language Guru: Carolyn Chen (cec2192) Manager: Megan Frenkel (mmf2171) System Architects: William Penney (wjp2114) & Lauren Pham (lyp2106) Tester: Michelle Lin (ml4080) Programming Languages and Translators, Spring 2021 1 Introduction and Overview Meowlang is an esoteric programming language inspired by LOLCODE, a language created by Adam Lindsay based on internet lolspeak. Our goal is to push the boundaries of language design in a creative, humorous way while still providing functionality and usability. Considering the nature of internet lolspeak (deliberately misspelled natural language), Meowlang improves on the safety and functionality of LOLCODE. Firstly in safety, unlike LOLCODE's dynamic typing, Meowlang enforces strong static typing to reinforce the integrity of user's code. Secondly in functionality, Meowlang provides an implementation of arrays and limited sup- port for object-oriented programming, both which LOLCODE currently lacks. Both goals for improving on LOLCODE's functionality (arrays and limited OOP) involve implementing entirely new features to the original language. We hope to implement arrays because they are necessary, versatile building blocks and to implement OOP because it illustrates the creativity of the esolang. We would greatly appreciate feedback on the feasibility of this plan. TLDR: Meowlang is an imperative, high-level, object-oriented programming language with static scoping, strong static typing and strict left-to-right evaluation order. 2 Language Paradigm Meowlang is a pared-down version of LOLCODE, sharing similar syntax, but with some changes to its lan- guage paradigm. Meowlang shares similarities with both C and Java, with its lack of garbage collection and object-oriented programming features, respectively.
    [Show full text]
  • IDOL Keyview PDF Export SDK 12.4 C Programming Guide
    KeyView Software Version 12.4 PDF Export SDK C Programming Guide Document Release Date: October 2019 Software Release Date: October 2019 PDF Export SDK C Programming Guide Legal notices Copyright notice © Copyright 2006-2019 Micro Focus or one of its affiliates. The only warranties for products and services of Micro Focus and its affiliates and licensors (“Micro Focus”) are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. Micro Focus shall not be liable for technical or editorial errors or omissions contained herein. The information contained herein is subject to change without notice. Documentation updates The title page of this document contains the following identifying information: l Software Version number, which indicates the software version. l Document Release Date, which changes each time the document is updated. l Software Release Date, which indicates the release date of this version of the software. To check for updated documentation, visit https://www.microfocus.com/support-and-services/documentation/. Support Visit the MySupport portal to access contact information and details about the products, services, and support that Micro Focus offers. This portal also provides customer self-solve capabilities. It gives you a fast and efficient way to access interactive technical support tools needed to manage your business. As a valued support customer, you can benefit by using the MySupport portal to: l Search for knowledge documents of interest l Access product documentation l View software vulnerability alerts l Enter into discussions with other software customers l Download software patches l Manage software licenses, downloads, and support contracts l Submit and track service requests l Contact customer support l View information about all services that Support offers Many areas of the portal require you to sign in.
    [Show full text]
  • Compiler-Construction
    compiler-construction #compiler- construction Table of Contents About 1 Chapter 1: Getting started with compiler-construction 2 Examples 2 Getting Started: Introduction 2 Prerequisites 2 Language Categories 2 Resources 2 Chapter 2: Basics of Compiler Construction 4 Introduction 4 Syntax 4 Examples 4 Simple Lexical Analyser 4 What does the lexical analyser do? 4 Let's break it down 5 Simple Parser 6 What is a parser? 6 Let's break it down 7 Credits 8 About You can share this PDF with anyone you feel could benefit from it, downloaded the latest version from: compiler-construction It is an unofficial and free compiler-construction ebook created for educational purposes. All the content is extracted from Stack Overflow Documentation, which is written by many hardworking individuals at Stack Overflow. It is neither affiliated with Stack Overflow nor official compiler- construction. The content is released under Creative Commons BY-SA, and the list of contributors to each chapter are provided in the credits section at the end of this book. Images may be copyright of their respective owners unless otherwise specified. All trademarks and registered trademarks are the property of their respective company owners. Use the content presented in this book at your own risk; it is not guaranteed to be correct nor accurate, please send your feedback and corrections to [email protected] https://riptutorial.com/ 1 Chapter 1: Getting started with compiler- construction Examples Getting Started: Introduction Prerequisites • Have a strong grasp of a programming language such as Python, C, C++, Ruby, or any of the other languages out there.
    [Show full text]
  • LOLCODE Is an Esoteric Programming Language Inspired by the Funny Things on the Internet
    LOLCODE i LOLCODE About the Tutorial LOLCODE is an esoteric programming language inspired by the funny things on the Internet. LOLCODE is designed to test the boundaries of programming language design. This tutorial provides a basic level understanding of the LOLCODE programming language. Audience This tutorial is meant for people who want to explore beyond general boring programming syntax. Readers of this tutorial can learn the programming language in simple and easy ways. This tutorial will also be helpful for all those developers who want to learn the basics of LOLCODE. Prerequisites The tutorial assumes that the readers have a knowhow about programming languages. If you have worked on any other programming language, it will be easier for you to learn LOLCODE. Copyright & Disclaimer Copyright 2016 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or in this tutorial, please notify us at [email protected]
    [Show full text]
  • Rakudo Perl 6 and Parrot
    Rakudo Perl 6 and Parrot Jonathan Worthington Linuxwochenende 2008 Rakudo Perl 6 and Parrot Me From England Rakudo Perl 6 and Parrot Me From England And yes, I do like tea… Rakudo Perl 6 and Parrot Me From England And yes, I do like tea… …but I prefer it without milk in. Rakudo Perl 6 and Parrot Me From England And yes, I do like tea… …but I prefer it without milk in. Currently living in Bratislava, Slovakia. Rakudo Perl 6 and Parrot Me From England And yes, I do like tea… …but I prefer it without milk in. Currently living in Bratislava, Slovakia Just an hour from here Like Vienna, it's beautiful… Rakudo Perl 6 and Parrot Me From England And yes, I do like tea… …but I prefer it without milk in. Currently living in Bratislava, Slovakia Just an hour from here Like Vienna, it's beautiful… …but beer only costs 1 euro a pint ☺ Rakudo Perl 6 and Parrot Me From England And yes, I do like tea… …but I prefer it without milk in. Currently living in Bratislava, Slovakia Just an hour from here Like Vienna, it's beautiful… …but beer only costs 1 euro a pint ☺ Er , half litre Rakudo Perl 6 and Parrot My Talk An overview of three technologies The Parrot VM – a virtual machine for dynamic languages The Parrot Compiler Toolkit (= PCT) – a tool chain for rapidly developing compilers targeting Parrot Rakudo, a Perl 6 implementation on Parrot built using PCT Rakudo Perl 6 and Parrot Parrot Rakudo Perl 6 and Parrot Parrot Is A Virtual Machine Virtual instruction set Hides away the details of the underlying hardware Interface to IO, threading, etc.
    [Show full text]
  • Esolangs As Experiential Art Daniel Temkin
    Esolangs as Experiential Art Daniel Temkin New York, NY [email protected] Abstract Languages like LOLCODE and INTERCAL both make Esolangs (for “esoteric programming languages”) are a class of strange use of keywords, although with very different languages made by programmers at play, not intended for approaches. INTERCAL, created in 1972 (and generally practical use. Ben Olmstead (creator of the Malbolge language) considered the first esolang), functions as a parody of describes them as “pushing the boundaries of programming, languages of the time. It asks the programmer to beg and but not in useful directions.” [1] This paper looks at how these plead with the machine, personifying the compiler as a strange languages function as experiential art pieces, with capricious autocrat who allows programs to compile or similarities to Oulipean systems and Fluxus event scores. not based on how much groveling is done. Its language is cryptic and confusing, a puzzle for the programmer. Keywords [3] Esolangs, Esoteric Programming Languages, Language, Concept Art, Fluxus, Ouipo, Code Art Introduction Esolangs have been described as jokes, parodies, impractical research, scenarios of the improbable, or what can only be defined as programming languages by butchering the very definition of a programming Figure 2. Hello World in LOLCODE (Adam Lindsay) language. [2] LOLCODE (Adam Lindsay, 2007) personifies the "lolcats" meme. Starting every program with "HAI" and ending with "KTHXBYE", the script in between is full of the familiar mix of baby talk and internet slang of lolcats. [4] These languages ridicule the authority of the machine through the actual text of the programs created within them.
    [Show full text]