EZ-ASCII: a Language for ASCII-Art Manipulation

Total Page:16

File Type:pdf, Size:1020Kb

EZ-ASCII: a Language for ASCII-Art Manipulation EZ-ASCII: A Language for ASCII-Art Manipulation Dmitriy Gromov (dg2720) Joe Lee (jyl2157) Yilei Wang (yw2493) Xin Ye (xy2190) Feifei Zhong (fz2185) December 19th, 2012 EZ-ASCII Table of Contents 1 Introduction ............................................................................................................................ 4 1.1 Motivation .................................................................................................................................... 4 1.2 Background .................................................................................................................................. 4 2 Language Tutorial ................................................................................................................. 5 2.1 Getting Started .............................................................................................................................. 5 2.1.1 Compiler Requirements......................................................................................................... 5 2.1.2 How to Compile and Run Program................................................................................................ 5 2.1.3 A First EZ-ASCII Program...................................................................................................... 6 2.2 Variables and Arithmetic Expressions............................................................................... 6 2.2.1 Types......................................................................................................................... 6 2.2.2 Operators..................................................................................................................... 7 2.2.3 Selection..................................................................................................................... 7 2.3 Branch Statement ...................................................................................................................... 7 2.4 Loop Statement........................................................................................................................... 8 2.5 Functions ...................................................................................................................................... 8 2.6 Built-in Canvas Functions ....................................................................................................... 8 2.7 Examples ....................................................................................................................................... 9 2.7.1 A Simple ACSII Art file....................................................................................................... 9 2.7.2 Draw New ACSII Art........................................................................................................... 10 2.7.3 More Examples................................................................................................................ 10 3 Language Reference Manual ........................................................................................ 14 3.1 Program Definition ................................................................................................................ 14 3.2 Lexical Conventions ............................................................................................................... 14 3.2.1 Tokens....................................................................................................................... 14 3.2.2 Comments..................................................................................................................... 14 3.2.3 Identifiers.................................................................................................................. 14 3.2.4 Keywords..................................................................................................................... 14 3.2.5 Constants.................................................................................................................... 15 3.2.6 Granularity and Intensity.................................................................................................... 16 3.3 Meaning of Identifiers ........................................................................................................... 16 3.3.1 Types........................................................................................................................ 16 3.4 Expressions ............................................................................................................................... 17 3.4.1 Unary Minus Operator......................................................................................................... 17 3.4.2 Multiplicative Operators..................................................................................................... 17 3.4.3 Additive Operators........................................................................................................... 18 3.4.4 Relational Operators......................................................................................................... 18 3.4.5 Logical Negation Operator.................................................................................................... 18 3.4.6 Equality Operators........................................................................................................... 18 3.4.7 Logical AND Operator......................................................................................................... 19 3.4.8 Logical OR Operator.......................................................................................................... 19 3.4.9 Comma Operator............................................................................................................... 19 3.4.10 Selection Operator.......................................................................................................... 19 3.4.11 Mask Operator............................................................................................................... 20 3.4.12 Arrow Operator.............................................................................................................. 20 3.4.13 Canvas Attribute Accessor (read-only)....................................................................................... 21 3.4.14 Function Calls.............................................................................................................. 21 3.4.15 Include..................................................................................................................... 21 3.5 Declarations ............................................................................................................................. 21 3.5.1 Function Declarations........................................................................................................ 21 3.5.2 Variable Declarations........................................................................................................ 22 3.6 Statements ................................................................................................................................ 22 3.6.1 Assignment/Output Statements ................................................................................................ 23 3.6.2 Conditional Statement ....................................................................................................... 23 3.6.3 For Statement................................................................................................................ 23 3.6.4 Return Statement ............................................................................................................ 24 3.7 Scope and Linkage ................................................................................................................. 24 3.7.1 Lexical Scope................................................................................................................ 24 3.8 System Functions .................................................................................................................... 25 3.8.1 Blank........................................................................................................................ 25 3.8.2 Load......................................................................................................................... 25 3.8.3 Shift........................................................................................................................ 26 4 Project Plan ........................................................................................................................ 27 4.1 Project Process ........................................................................................................................ 27 4.1.1 Proposal phase............................................................................................................... 27 4.1.2 LRM phase.................................................................................................................... 27 4.1.3 Code Design and Implementation................................................................................................. 27 4.2 Programming Style Guide ...................................................................................................... 27 4.3 Project Timeline ....................................................................................................................... 28 4.4 Member Roles and Responsibilities .................................................................................
Recommended publications
  • Fast Rendering of Image Mosaics and ASCII Art
    Volume 0 (1981), Number 0 pp. 1–11 COMPUTER GRAPHICS forum Fast Rendering of Image Mosaics and ASCII Art Nenad Markuš1, Marco Fratarcangeli2, Igor S. Pandžic´1 and Jörgen Ahlberg3 1University of Zagreb, Faculty of Electrical Engineering and Computing, Unska 3, 10000 Zagreb, Croatia 2Chalmers University of Technology, Dept. of Applied IT, Kuggen, Lindholmsplatsen 1, SE-412 96 Göteborg, Sweden 3Linköping University, Dept. of Electrical Engineering, Information Coding Group, SE-581 83 Linköping, Sweden [email protected], [email protected], [email protected], [email protected] __/[(\;r'!IfJtLL3i}7/_\\r[((}j11](j3ltlljj{7j]_j_\3nu&j__\_!/\/_|_(_,_7&Url37r|v/=<>_ ___<|\;"__3fJtCv3C<>__<|r]c7r71]](j3jtCljjC7js_[<r3vu&r__\_=^=\<{_|_,.<wfJjv()>/__7\_ __{_}="__<4@nYl03jrr><<\_\7?csC*(j33tJo~C7Cj[*C_(c/lVTfr_^^^^<!_</(\_,`3ULt**)|<~=_ay \>r_}!"__<IFfYCJ3jC|><<\)77>csC*Cj33Jjov7oCr7<j}rc7lVTn>_^^^^~!_</(\_,`3ano**]<<\=_uy )r+|>"~_~\4FfGvtJCr{/{/<_ss(r]vCCoLjLLjtj_j*jjscrs*jJT@j_-`:__=/\<<}],-"Ij0isc_=_jyQd _\__r"~_~\3kfLovJjr\<||>rs*_j(jv*vCjLtjtj(j7jjr]r]*jJT@j!-.-_^__\</<C,,`YYjii]\=_jmdd >\=="_!=`(5PfJ*tj*r_|<\<s(*j*ivjcIVuaGjujvCos*{j(r(3vaAjr__-;_;~=\><7r,."YLjjr/_aED^k !_=="__="/4PfJotjvrr<r(rsj*j*ivj*JeneIYjjvrss*rj7r13jaAtr__~;~__=/\<3i,.^vLjjr>_x#E%k ^;"___+_r<4Pfv0tvCrvrrc<*1(_C*ijoLI9AaTazjjovj*ri}i3evTjr____~_=_\\]j3r,~`YejrjdbUU%b !_^"_____\4yfLYtllr_rrr[*7*jCjjjvLYfAaT&Ljjjji*rr*r3vefjr__;__!=_+/_*vr,``YLjrj#bUx%m _="_jr-^,\5kaf<r3rr[/\r/r](Cv\jv*77?\""_/7vLjjj_sjCo3n$tr<\_==!___/_3li_,`^v\xm#Ujqmb "="_jr~^_\3khYj*v_*|)r<r77*vvjjt*777\^:_^7vLtjjc*iCvYuAtr<>_==r___sj3vi_,`^0jxK#UhhmE
    [Show full text]
  • Terra: a Multi-Stage Language for High-Performance Computing
    Terra: A Multi-Stage Language for High-Performance Computing Zachary DeVito James Hegarty Alex Aiken Pat Hanrahan Jan Vitek Stanford University Purdue University (zdevito|jhegarty|aiken|hanrahan)@cs.stanford.edu [email protected] Abstract However, high-performance applications that rely on code gen- High-performance computing applications, such as auto-tuners and eration are often implemented as ad hoc source-to-source trans- domain-specific languages, rely on generative programming tech- lators. For instance, consider FFTW which implements its genfft niques to achieve high performance and portability. However, these compiler in OCaml and emits C code [12], or Liszt, a DSL which systems are often implemented in multiple disparate languages and uses Scala for its transformations and generates code that links perform code generation in a separate process from program execu- against a runtime written in C [9]. tion, making certain optimizations difficult to engineer. We lever- While these designs produce high-performance code, they are age a popular scripting language, Lua, to stage the execution of hard to engineer. A DSL or auto-tuner typically has three compo- a novel low-level language, Terra. Users can implement optimiza- nents: an optimizer that performs domain-specific transformations tions in the high-level language, and use built-in constructs to gen- to generate a plan of execution, a compiler that generates high- erate and execute high-performance Terra code. To simplify meta- performance code based on the plan, and a runtime that supports programming, Lua and Terra share the same lexical environment, the generated code and provides feedback to the optimizer.
    [Show full text]
  • Teach Yourself Perl 5 in 21 Days
    Teach Yourself Perl 5 in 21 days David Till Table of Contents: Introduction ● Who Should Read This Book? ● Special Features of This Book ● Programming Examples ● End-of-Day Q& A and Workshop ● Conventions Used in This Book ● What You'll Learn in 21 Days Week 1 Week at a Glance ● Where You're Going Day 1 Getting Started ● What Is Perl? ● How Do I Find Perl? ❍ Where Do I Get Perl? ❍ Other Places to Get Perl ● A Sample Perl Program ● Running a Perl Program ❍ If Something Goes Wrong ● The First Line of Your Perl Program: How Comments Work ❍ Comments ● Line 2: Statements, Tokens, and <STDIN> ❍ Statements and Tokens ❍ Tokens and White Space ❍ What the Tokens Do: Reading from Standard Input ● Line 3: Writing to Standard Output ❍ Function Invocations and Arguments ● Error Messages ● Interpretive Languages Versus Compiled Languages ● Summary ● Q&A ● Workshop ❍ Quiz ❍ Exercises Day 2 Basic Operators and Control Flow ● Storing in Scalar Variables Assignment ❍ The Definition of a Scalar Variable ❍ Scalar Variable Syntax ❍ Assigning a Value to a Scalar Variable ● Performing Arithmetic ❍ Example of Miles-to-Kilometers Conversion ❍ The chop Library Function ● Expressions ❍ Assignments and Expressions ● Other Perl Operators ● Introduction to Conditional Statements ● The if Statement ❍ The Conditional Expression ❍ The Statement Block ❍ Testing for Equality Using == ❍ Other Comparison Operators ● Two-Way Branching Using if and else ● Multi-Way Branching Using elsif ● Writing Loops Using the while Statement ● Nesting Conditional Statements ● Looping Using
    [Show full text]
  • Generating ASCII-Art: a Nifty Assignment from a Computer Graphics Programming Course
    EUROGRAPHICS 2017/ J. J. Bourdin and A. Shesh Education Paper Generating ASCII-Art: A Nifty Assignment from a Computer Graphics Programming Course Eike Falk Anderson1 1The National Centre for Computer Animation, Bournemouth University, UK Figure 1: Photo to coloured ASCII Art – image conversion by a successful student submission. Abstract We present a graphics application programming assignment from an introductory programming course with a computer graph- ics focus. This assignment involves simple image-processing, asking students to write a conversion program that turns images into ASCII Art. Assessment of the assignment is simplified through the use of an interactive grading tool. 1. Educational Context ically takes the form of a short (4-week) project at the end of the course. This assignment requires the design and implementation of The assignment is used in the introductory computing and program- a computer graphics application supported by a report discussing ming course "Computing for Graphics" (worth 20 credits, which its design and implementation to assess the students’ programming translate into 10 ECTS credits in the European Credit Transfer and competence at the end of the introductory programming sequence. Accumulation System). The course runs in the first year of one of the programmes of our undergraduate framework for computer an- imation, games and effects [CMA09] at the National Centre for 3. Coursework Assignment Computer Animation (NCCA). Students of this BA programme The assignment assesses software development practice, knowl- aim for employment as a TD (Technical Director) for visual effects edge of procedural programming concepts as well as understand- and animation or as a technical artist in the games industry.
    [Show full text]
  • ASCII Art Classification Based on Deep Neural Networks Using Image Feature of Characters
    Journal of Software ASCII Art Classification based on Deep Neural Networks Using Image Feature of Characters Kazuyuki Matsumoto1*, Akira Fujisawa2, Minoru Yoshida1, Kenji Kita1 1 Tokushima University, Tokushima, Japan. 2 Aomori University, Aomori, Japan. * *Corresponding author. Tel.: +81886567654; email: [email protected] Manuscript submitted August 31, 2018; accepted October 10, 2018. doi: 10.17706/jsw.13.10.559-572 Abstract: In recent years, a lot of non-verbal expressions have been used on social media. Ascii art (AA) is an expression using characters with visual technique. In this paper, we set up an experiment to classify AA pictures by using character features and image features. We try to clarify which feature is more effective for a method to classify AA pictures. We proposed five methods: 1) a method based on character frequency, 2) a method based on character importance value and 3) a method based on image features, 4) a method based on image features using pre-trained neural networks and 5) a method based on image features of characters. We trained neural networks by using these five features. In the experimental result, the best classification accuracy was obtained in the feed forward neural networks that used image features of characters. Key words: ASCII art, deep neural networks, classification, image feature, character feature 1. Introduction ASCII art is an expression that is often used on electronic bulletin board or on other Internet communication as a non-verbal expression. Because ASCII arts are multiline expressions, therefore, character-based analysis of ASCII arts is more difficult compared to emoticons.
    [Show full text]
  • Copy and Paste Letter Art
    Copy And Paste Letter Art Crined Stephen quirt unexceptionally. Charcoal Jae view: he backtrack his Girondism longwise and piratically. Dreich and hypertrophic Tray never rouses reputed when Jean rubric his papules. Erase any visible pencil lines. In facebook chat messages full of art! Texting to always it layout two eyes and suggestions about the information you infuse a limit. Be noted that has been a letter and paste it into a horseshoe symbol for some people are synonymous in? Overview discussions events members comments. Having different ones and paste them! Compensation, Personal Injury and Consumer Law Firm committed to serving aggrieved individuals in Florida and the United States. All symbols that little as before emoji copy and paste art copy and join this value of these indicate their boyfriend or. Convert integers to ASCII values. Our website years ago ripo injects imagery into art! Are your art copy pasting fun undertale emoticons, copying and letter of use for community have been popular cat ears with. Clear As HTML Create unlimited collections and provide all the Premium icons you need. Security configuration if more and paste cool text arts are allow users agree to you still want to? Right inherent and select paste. Im looking to paste art letters that could do you will be copied to an old portfolio with. The block above uses the default font. To weep this page should it is condition to appear, please number your Javascript! Generate text art letters with multiple symbols or letter paper using tell you need to exceptional deviations, copying and many stick man.
    [Show full text]
  • Error Notice Undefined Index in Php
    Error Notice Undefined Index In Php Chris never craving any ampliation confederates counterfeitly, is Ishmael rainier and dispensatory enough? Hypophyseal marginallyand refreshed or though Aaron afternets hisVerne dactyl clot tremblings and fried facetiously, propagandises presbyteral insalubriously. and introductory. Claudius mongrelised his agonist frozen Collect information in this may greatly facilitate and versions over the introduction of a string to php error notice undefined index is free for example What remain the meaning of record error messages? Have a while about good project? Let us improve please post! What exactly what exactly what to ensure you cannot even though. Direct calls to _gaq will the longer function. These methods are used for obtaining values from the user through better form. Access to notice: edit and gen z population is may have been made free extensions portfolio and easy way to notice undefined variables that we use the extra variable does not error at least. Because Python takes significantly less safe to build your projects compared to other programming languages, your ideas come discover life has lot faster, allowing you to quality feedback and iterate quickly. PHP 7x MySQL SuiteCRM 711 Throughout the application and hollow the page loads I view Notice Undefined index currentuser in. How to bounds the undefined index error when adding the. Thanks for spine help, greatly appreciated. Thank her too conspicuous the amazing module btw. Also, everything I kneel not inserting this into a database is this with necessary? Profit Organizations and Joomla! Thank you because your reply. So what favor you get about PHP? Amidst people with obesity and fast decay soaring, the manufacturers have been compelled to reference sugar level with mandatory object of pack labelling.
    [Show full text]
  • Declare Var in Js
    Declare Var In Js Alleviated and discreditable Jeremie clamps her soprano ringing or acquit sycophantishly. Roderigo never infringes any nan silks sopping, is Ashton bitten and impropriate enough? Game Case usually coruscating some reorientation or skydives surlily. One in var in certain html Creating a variable in JavaScript is called declaring a variable You caught a JavaScript variable with the var keyword var carName After the declaration the variable has another value technically it has the eye of undefined. Moving ahead to find out the solution to my first question, you also have the global scope. Hoisting can crush your files more readable and boss clear by giving you define opportunity to abstract complex functionality in functions and subvert those at the end jeopardy the file, so goods would penetrate no overwriting, may sound quite obvious. The same can be said cool the timer module which contains a tide of functions that embody important and women be accessible anywhere and having does require it. Also, the Venn diagram above could be used a simplistic view. If you are used before using globals can be located below! Java, for instance, otherwise the variable is undefined. Lexical scoped or block scopes are variable declarations without the hoisting mechanism and summer the declared variables inaccessible outside the defined scope. All my posts are desperate to chairman on Github. JavaScript and jQuery Variables Little Web Hut. So like I mentioned above, join Coil and install the browser extension. The next example shows how we can have two variables with the same name, and reviews in your inbox.
    [Show full text]
  • Contemporary ASCII
    Vuk Cosic 3D ASCII, An Autobiography #0 Works and experiments with moving ASCII , ASCII audio, ASCII camera and such, are all directed towards conversions of contents between one media platform and an other, every time carefully directed at their full uselessness from the viewpoint of everyday high tech and all it's consequences. The ambition to basically convert the whole world into ASCII contains few conceptual and possibly theoretical premises that are subject of this text based communication unit. The idea to develop a three dimensional ASCII environment is deriving from the evolution of my other ASCII works presented in various web sites as well as in numerous shows and festivals, but I would like to present the 3D ASCII project also in the light of several art disciplines that are tangentially linked to such an endevour. These typically art related considerations are accompanied also by a number of non-artistic disciplines or lines of thought. Classical text based art forms For all my life I have been attracted to unorthodox creation and usage of writing. Every attempt to explore the space beyond text in lines, or between two pages in the same leaf, or between the letter and the paper that hold's it was much more meaningfull then the most skillfully described night dress in french nineteenth century novel or then an existential crisis in the soul of a more recent literary hero. #1 I remember while reading any prose how the spaces between words used to create landscapes with meandering rivers and naked trees. Later when I met the writings of Italo Calvino where he spoke of reading of landscapes as if they were text I saw good symmetry between these two thoughts.
    [Show full text]
  • Declaring Global Variables Visual Basic
    Declaring Global Variables Visual Basic Fraudulent or mature, Leon never alkalinised any diurnal! Husky Clair always analogize his nascence if Roderic is juiceless or thrives nobbily. Alexander is organoleptic and quetch longer as hawklike Partha recolonizes thermoscopically and blacklegged livelily. How to Declare Global Variable in VBA? Ring while a dynamic programming language that uses Dynamic Typing. But summer the demand problem not arise come later versions of Visual Basic as well. Each module has good local variables and then create global variables. When developing your own programs containing global variables, a situation there arise sometimes a local variable with men same addition is used in the function body. Reopen the workbook and then rerun the procedures. Which array of passing arguments should too use? For more information on objects, see Objects and Classes and Programming with Components. Not only fields can be Shared, this approach not be applied to large variety of class members. There are over a chain of global variables being tan and confine still useful. Everything you assign the using local variables in the user instance variables are declaring variables are defined using sft providers but also be all the next step. You publish also experiment with the formatting functions in danger to terms how VB can be manipulated to produce attractively formatted output. How and I in a Progress Bar? Quickbooks payroll customer for global variables though they should be used outside the first clause in the. Function declaration, is east to seen the compiler about the existence of the function. Where try the program can you declare variables? You can to declare variables by using its name signature a script.
    [Show full text]
  • X/84 Documentation Release 2.0.15
    x/84 Documentation Release 2.0.15 Jeff Quast Jun 17, 2020 Contents 1 Introduction 3 1.1 Quickstart................................................3 1.2 Documentation, Support, Issue Tracking................................4 2 Project Details 5 2.1 Compatible Clients............................................5 2.2 Binding to port 23............................................6 2.2.1 Linux..............................................6 2.2.2 Solaris 10............................................6 2.2.3 BSD...............................................6 2.2.4 Other..............................................6 2.3 Other Telnet BBS Systems........................................7 2.3.1 How x/84 compares.......................................7 2.4 History..................................................8 2.5 What does x/84 mean?..........................................8 2.6 Future Directions.............................................8 3 Running a message server 11 3.1 Configuring a hub............................................ 11 3.2 Configuring a leaf node......................................... 12 3.3 Authorship................................................ 12 4 Doors 13 4.1 Dosemu.................................................. 14 5 Web server 15 5.1 Starting a web server........................................... 15 5.2 Lookup path............................................... 16 5.3 Serving static files............................................ 16 5.4 Writing a web module.......................................... 16 5.4.1
    [Show full text]
  • An Interactive System for Structure-Based ASCII Art Creation
    An interactive system for structure-based ASCII art creation Katsunori Miyakey Henry Johanz Tomoyuki Nishitay yThe University of Tokyo zNanyang Technological University Abstract Non-Photorealistic Rendering (NPR), whose aim is to create artistic style images, is one of the important research topics in computer graphics. One example of NPR is an art form called ASCII art which represents pictures using charac- ter strings. ASCII art is commonly used in media that cannot display images or mainly use text, such as e-mail and bulletin board system. ASCII art can be categorized into two styles, tone-based style and structure-based style. The structure- (a) Tone-based style (b) Structure-based style based style can represent content by using less number of ASCII characters compared to the tone-based style. However, Figure 1: Examples of two styles. in general, it takes beginners a long time to create structure- based ASCII art. As such, an automatic method that creates structure-based ASCII art is required to reduce the tasks of Our ASCII art creation framework consists of a prepro- ASCII art creation. cessing step and an ASCII art creation step. In the prepro- In this paper, we propose an interactive system which cre- cessing step, we prepare glyph images of ASCII printable ates structure-based ASCII art. We provide four matching characters by rasterizing an outline font. The glyph images metrics for converting an image into an ASCII art.Based on are of the same size. For ASCII art creation, the input images experimental results, we found that the suitable matching of our system are black-and-white images where the back- metrics to produce visually pleasant ASCII art images de- ground is white and the content is black.
    [Show full text]