48 TUGboat, Volume 36 (2015), No. 1

Size: px
Start display at page:

Download "48 TUGboat, Volume 36 (2015), No. 1"

Transcription

1 48 TUGboat, Volume 36 (2015), No. 1 1 Introduction Tokens are the building blocks of the input for TEX and they drive the process of expansion which in turn results in typesetting. If you want to manipulate the input, intercepting tokens is one approach. Other solutions are preprocessing or writing macros that do something with their picked-up arguments. In Con- TEXt MkIV we often forget about manipulating the input but manipulate the intermediate typesetting results instead. The advantage is that only at that moment do you know what you re truly dealing with, but a disadvantage is that parsing the so-called node lists is not always efficient and it can even be rather complex, for instance in math. It remains a fact that until LuaTEX version 0.80 ConTEXt hardly used the token interface. In version 0.80 a new scanner interface was introduced, demonstrated by Taco Hoekwater at the ConTEXt conference Luigi Scarso and I integrated that code and I added a few more functions. Eventually the team will kick out the old token library and overhaul the input-related code in LuaTEX, because no callback is needed any more (and also because the current code still has traces of multiple Lua instances). This will happen stepwise to give users who use the old mechanism an opportunity to adapt. Here I will show a bit of the new token scanners and explain how they can be used in ConTEXt. Some of the additional scanners written on top of the builtin ones will probably up in the generic LuaTEX code that ships with ConTEXt. 2 The TEX scanner The new token scanner library of LuaTEX provides a way to hook Lua into TEX in a rather natural way. I have to admit that I never had any real demand for such a feature but now that we have it, it is worth exploring. The TEX scanner roughly provides the following sub-scanners that are used to implement primitives: keyword, token, token list, dimension, glue and integer. Deep down there are specific variants for scanning, for instance, font dimensions and special numbers. A token is a unit of input, and one or more characters are turned into a token. How a character is interpreted is determined by its current catcode. For instance a backslash is normally tagged as escape character which means that it starts a control sequence: a macro name or primitive. This means that once it is scanned a macro name travels as one token through the system. Take this: \def\foo#1{\scratchcounter=123#1\relax Here TEX scans \def and turns it into a token. This particular token triggers a specific branch in the scanner. First a name is scanned with optionally an argument specification. Then the body is scanned and the macro is stored in memory. Because \scratchcounter, \relax, and #1 are turned into tokens, this body has 7 tokens. When the macro \foo is referenced the body gets expanded which here means that the scanner will scan for an argument first and uses that in the replacement. So, the scanner switches between different states. Sometimes tokens are just collected and stored, in other cases they get expanded immediately into some action. 3 Scanning from Lua The basic building blocks of the scanner are available at the Lua, for instance: \directlua{print(token.scan_int()) 123 This will print 123 to the console. Or, you can store the number and use it later: \directlua{savednumber = token.scan_int()) 123 We saved: \directlua{tex.print(savednumber) The number of scanner functions is (on purpose) limited but you can use them to write additional ones as you can just grab tokens, interpret them and act accordingly. The scan_int function picks up a number. This can also be a counter, a named (math) character or a numeric expression. In TEX, numbers are integers; floating-point is not supported naturally. With scan_dimen a dimension is grabbed, where a dimen is either a number (float) followed by a unit, a dimen register or a dimen expression (internally, all become integers). Of course internal quantities are also okay. There are two optional arguments, the first indicating that we accept a filler as unit, while the second indicates that math units are expected. When an integer or dimension is scanned, tokens are expanded till the input is a valid number or dimension. The scan_glue function takes one optional argument: a boolean indicating if the units are math. The scan_toks function picks up a (normally) brace-delimited sequence of tokens and (LuaTEX 0.80) returns them as a table of tokens. The function get_token returns one (unexpanded) token while scan_token returns an expanded one.

2 TUGboat, Volume 36 (2015), No Because strings are natural to Lua we also have scan_string. This one converts a following bracedelimited sequence of tokens into a proper string. The function scan_keyword looks for the given keyword and when found skips over it and returns true. Here is an example of usage: 1 function ScanPair() local one = 0 local two = "" if token.scan_keyword("one") then one = token.scan_int() if token.scan_keyword("two") then two = token.scan_string() tex.print("one: ",one,"\\par") tex.print("two: ",two,"\\par") This can be used as: \directlua{scanpair() You can scan for an explicit character (class) with scan_code. This function takes a positive number as argument and returns a character or nil. 1 0 escape 2 1 begingroup 4 2 group 8 3 mathshift 16 4 alignment 32 5 ofline 64 6 parameter superscript subscript ignore space letter other active comment invalid So, if you want to grab the character you can say: local c = token.scan_code(2^10 + 2^11 + 2^12) In ConTEXt you can say: local c = tokens.scanners.code( tokens.bits.space + tokens.bits.letter + tokens.bits.other ) When no argument is given, the next character with catcode letter or other is returned (if found). token. 1 In LuaTEX 0.80 you should use newtoken instead of In ConTEXt we use the tokens namespace which has additional scanners available. That way we can remain compatible. I can add more scanners when needed, although it is not expected that users will use this mechanism directly. (new)token tokens. arguments scanners.boolean scan_code scanners.code (bits) scan_dimen scanners.dimension (fill,math) scan_glue scanners.glue (math) scan_int scanners.integer scan_keyword scanners.keyword scanners.number scan_token scanners.token scan_tokens scanners.tokens scan_string scanners.string scanners.word get_token getters.token set_macro setters.macro (catcodes,cs, str,global) All except get_token (or its alias getters.token) expand tokens in order to satisfy the demands. Here are some examples of how we can use the scanners. When we would call Foo with regular arguments we do this: \def\foo#1{% \directlua { Foo("whatever","#1",{n = 1) but when Foo uses the scanners it becomes: \def\foo#1{% \directlua{foo() {whatever {#1 n {1\relax In the first case we have a function Foo like this: function Foo(what,str,n) -- do something with these three parameters and in the second variant we have (using the tokens namespace): function Foo() local what = tokens.scanners.string() local str = tokens.scanners.string() local n = tokens.scanners.keyword("n") and tokens.scanners.integer() or 0 -- do something with these three parameters The string scanned is a bit special as the result deps on what is seen. Given the following definition: \def\bar {bar \unexpanded\def\ubar {ubar % that s \protected in e-tex etc. \def\foo {foo-\bar-\ubar

3 50 TUGboat, Volume 36 (2015), No. 1 We get: foo foo-\bar foo-\bar foo$bar$ \foo \wrap \uwrap \def\wrap {{foo-\bar \def\uwrap{{ foo foo-bar foo-bar foo-ubar foobar foo-bar-ubar foo-bar Because scanners look ahead the following happens: when an open brace is seen (or any character marked as left brace) the scanner picks up tokens and expands them unless they are protected; so, effectively, it scans as if the body of an \edef is scanned. However, when the next token is a control sequence it will be expanded first to see if there is a left brace, so there we get the full expansion. In practice this is convenient behaviour because the braced variant permits us to pick up meanings honouring protection. Of course this is all a side effect of how TEX scans. 2 With the braced variant one can of course use primitives like \detokenize and \unexpanded (in ConTEXt: \normalunexpanded, as we already had this mechanism before it was added to the engine). 4 Considerations Performance-wise there is not much difference between these methods. With some effort you can make the second approach faster than the first but in practice you will not notice much gain. So, the main motivation for using the scanner is that it provides a more TEX-ified interface. When playing with the initial version of the scanners I did some tests with performance-sensitive ConTEXt calls and the difference was measurable (positive) but deciding if and when to use the scanner approach was not easy. Sometimes embedded Lua code looks better, and sometimes TEX code. Eventually we will up with a mix. Here are some considerations: In both cases there is the overhead of a Lua call. 2 This lookahead expansion can sometimes give unexpected side effects because often TEX pushes back a token when a condition is not met. For instance when it scans a number, scanning stops when no digits are seen but the scanner has to look at the next (expanded) token in order to come to that conclusion. In the process it will, for instance, expand conditionals. This means that intermediate catcode changes will not be effective (or applied) to already-seen tokens that were pushed back into the input. This also happens with, for instance, \futurelet. In the pure Lua case the whole argument is tokenized by TEX and then converted to a string that gets compiled by Lua and executed. When the scan happens in Lua there are extra calls to functions but scanning still happens in TEX; some token to string conversion is avoided and compilation can be more efficient. When data comes from external files, parsing with Lua is in most cases more efficient than parsing by TEX. A macro package like ConTEXt wraps functionality in macros and is controlled by key/value specifications. There is often no benefit in terms of performance when delegating to the mentioned scanners. Another consideration is that when using macros, parameters are often passed between {: \def\foo#1#2#3% {... \foo {a{123{b and suddenly changing that to \def\foo{\directlua{foo() and using that as: \foo {a {b n 123 means that 123 will fail. So, eventually you will up with something: \def\myfakeprimitive{\directlua{foo() \def\foo#1#2#3{\myfakeprimitive {#1 {#2 n #3 and: \foo {a {b {123 So in the you don t gain much here apart from the fact that the fake primitive can be made more clever and accept optional arguments. But such new features are often hidden for the user who uses higher-level wrappers. When you code in pure TEX and want to grab a number directly you need to test for the braced case; when you use the Lua scanner method you still need to test for braces. The scanners are consistent with the way TEX works. Of course you can write helpers that do some checking for braces in Lua, so there are no real limitations, but it adds some overhead (and maybe also confusion). One way to speed up the call is to use the \luafunction primitive in combinations with predefined functions and although both mechanisms can benefit from this, the scanner approach gets more out of that as this method cannot be used with regular function calls that get arguments. In (rather low level) Lua it looks like this: luafunctions[1] = function()

4 TUGboat, Volume 36 (2015), No local a token.scan_string() local n token.scan_int() local b token.scan_string() -- whatever -- And in TEX: \luafunction1 {a 123 {b This can of course be wrapped as: \def\myprimitive{\luafunction1 5 Applications The question now pops up: where can this be used? Can you really make new primitives? The answer is yes. You can write code that exclusively stays on the Lua side but you can also do some magic and then print back something to TEX. Here we use the basic token interface, not ConTEXt: \directlua { local token = newtoken or token function ColoredRule() local w, h, d, c, t if token.scan_keyword("width") then w = token.scan_dimen() if token.scan_keyword("height") then h = token.scan_dimen() if token.scan_keyword("depth") then d = token.scan_dimen() if token.scan_keyword("color") then c = token.scan_string() if token.scan_keyword("type") then t = token.scan_string() if c then tex.sprint("\\color[",c,"]{"); if t == "vertical" then tex.sprint("\\vrule") tex.sprint("\\hrule") if w then tex.sprint("width ",w,"sp"); if h then tex.sprint("height ",h,"sp"); if d then tex.sprint("depth ",d,"sp"); if c then tex.sprint("\\relax"); This can be given a TEX interface like: \def\myhrule{\directlua{coloredrule() type {horizontal \def\myvrule{\directlua{coloredrule() type {vertical And then used as: \myhrule width \hsize height 1cm color {darkred giving (grayscaled for TUGboat on paper, sorry): Of course ConTEXt users can use the following commands to color an otherwise-black rule (likewise): \blackrule[width=\hsize,height=1cm, color=darkgreen] The official ConTEXt way to define such a new command is the following. The conversion back to verbose dimensions is needed because we pass back to TEX. \startluacode local myrule = tokens.compile { { { "width", "dimension", "todimen", { "height", "dimension", "todimen", { "depth", "dimension", "todimen", { "color", "string", { "type", "string", interfaces.scanners.coloredrule = function() local t = myrule() context.blackrule { color = t.color, width = t.width, height = t.height, depth = t.depth, \stopluacode With: \unprotect \let\myrule\scan_coloredrule \protect and \myrule width \textwidth height 1cm color {darkblue \relax we get: There are many ways to use the scanners and each has its charm. We will look at some alternatives from the perspective of performance. The timings are more meant as relative measures than absolute

5 52 TUGboat, Volume 36 (2015), No. 1 ones. After all it deps on the hardware. We assume the following shortcuts: local scannumber = tokens.scanners.number local scankeyword = tokens.scanners.keyword local scanword = tokens.scanners.word We will scan for four different keys and values. The number is scanned using a helper scannumber that scans for a number that is acceptable for Lua. Thus, 1.23 is valid, as are 0x1234 and 12.12E4. local sx, sy = 1, 1 local rx, ry = 0, 0 if scankeyword("sx") then sx = scannumber() if scankeyword("sy") then sy = scannumber() if scankeyword("rx") then rx = scannumber() if scankeyword("ry") then ry = scannumber() Scanning the following specification times takes 1.00 seconds: sx 1.23 sy 4.5 rx 1.23 ry 4.5 The tight case (no spaces) takes 0.94 seconds: sx1.23 sy4.5 rx1.23 ry4.5 We can compare this to scanning without keywords. In that case there have to be exactly four arguments. These have to be given in the right order which is no big deal as often such helpers are encapsulated in a user-frily macro. local sx, sy = scannumber(), scannumber() local rx, ry = scannumber(), scannumber() As expected, this is more efficient than the previous examples. It takes 0.80 seconds to scan this times: A third alternative is the following: local sx, sy = 1, 1 local rx, ry = 0, 0 local kw = scanword() if kw == "sx" then sx = scannumber() if kw == "sy" then sy = scannumber() if kw == "rx" then rx = scannumber() if kw == "ry" then ry = scannumber() Here we scan for a keyword and assign a number to the right variable. This one call happens to be less efficient than calling scan_keyword 10 times ( ) for the explicit scan. This run takes 1.11 seconds for the next line. The spaces are really needed as words can be anything that has no space. 3 sx 1.23 sy 4.5 rx 1.23 ry 4.5 Of course these numbers need to be compared to a baseline of no scanning (i.e. the overhead of a Lua call which here amounts to 0.10 seconds. This brings us to the following table. keyword checks 0.9 sec no keywords 0.7 sec word checks 1.0 sec The differences are not that impressive given the number of calls. Even in a complex document the overhead of scanning can be negligible compared to the actions involved in typesetting the document. In fact, there will always be some kind of scanning for such macros so we re talking about even less impact. So you can just use the method you like most. In practice, the extra overhead of using keywords in combination with explicit checks (the first case) is rather convenient. If you don t want to have many tests you can do something like this: local keys = { sx = scannumber, sy = scannumber, rx = scannumber, ry = scannumber, local values = { for key, scan in next, keys do if scankeyword(key) then values[key] = scan() 3 Hard-coding the word scan in a C code helper makes little sense, as different macro packages can have different assumptions about what a word is. And we don t ext LuaTEX for specific macro packages.

6 TUGboat, Volume 36 (2015), No This is still quite fast although one now has to access the values in a table. Working with specifications like this is clean anyway so in ConTEXt we have a way to abstract the previous definition. local specification = tokens.compile { { { "sx", "number", { "sy", "number", { "rx", "number", { "ry", "number",, local values = specification() -- action using values.sx etc -- Although one can make complex definitions this way, the question remains if it is a better approach than passing Lua tables. The standard ConTEXt way for controlling features is: \getmatrix[sx=1.2,sy=3.4] So it doesn t matter much if deep down we see: \def\getmatrix[#1]{% \getparameters[@@matrix][sx=1,sy=1, rx=1,ry=1,#1]% \domatrix \@@matrixsx \@@matrixsy \@@matrixrx \@@matrixry \relax or: \def\getmatrix[#1]{% \getparameters[@@matrix][sx=1,sy=1, rx=1,ry=1,#1]% \domatrix sx \@@matrixsx sy \@@matrixsy rx \@@matrixrx ry \@@matrixry \relax In the second variant (with keywords) can be a scanner like we defined before: \def\domatrix#1#2#3#4% {\directlua{getmatrix() but also: \def\domatrix#1#2#3#4% {\directlua{getmatrix(#1,#2,#3,#4) given: function getmatrix(sx,sy,rx,ry) -- action using sx etc -- or maybe nicer: \def\domatrix#1#2#3#4% {\directlua{domatrix{ sx = #1, sy = #2, rx = #3, ry = #4 assuming: function getmatrix(values) -- action using values.sx etc -- If you go for speed the scanner variant without keywords is the most efficient one. For readability the scanner variant with keywords or the last shown example where a table is passed is better. For flexibility the table variant is best as it makes no assumptions about the scanner the token scanner can quit on unknown keys, unless that is intercepted of course. But as mentioned before, even the advantage of the fast one should not be overestimated. When you trace usage it can be that the (in this case matrix) macro is called only a few thousand times and that doesn t really add up. Of course many different spedup calls can make a difference but then one really needs to optimize consistently the whole code base and that can conflict with readability. The token library presents us with a nice chicken egg problem but nevertheless is fun to play with. 6 Assigning meanings The token library also provides a way to create tokens and access properties but that interface can change with upcoming versions when the old library is replaced by the new one and the input handling is cleaned up. One experimental function is worth mentioning: token.set_macro("foo","the meaning of bar") This will turn the given string into tokens that get assigned to \foo. Here are some alternative calls: set_macro("foo") \def \foo { set_macro("foo", "meaning") \def \foo {meaning set_macro("foo", "meaning", "global") \gdef \foo {meaning The conversion to tokens happens under the current catcode regime. You can enforce a different regime by passing a number of an allocated catcode

7 54 TUGboat, Volume 36 (2015), No. 1 table as the first argument, as with tex.print. As we mentioned performance before, setting at the Lua like this: token.set_macro("foo","meaning") is about two times as fast as: tex.sprint("\\def\\foo{meaning") or (with slightly more overhead) in ConTEXt terms: context("\\def\\foo{meaning") The next variant is actually slower (even when we alias setvalue): context.setvalue("foo","meaning") but although 0.4 versus 0.8 seconds looks like a lot on a TEX run I need a million calls to see such a difference, and a million macro definitions during a run is a lot. The different assignments involved in, for instance, 3000 entries in a bibliography (with an average of 5 assignments per entry) can hardly be measured as we re talking about milliseconds. So again, it s mostly a matter of convenience when using this function, not a necessity. 7 Conclusion For sure we will see usage of the new scanner code in ConTEXt, but to what extent remains to be seen. The performance gain is not impressive enough to justify many changes to the code but as the low-level interfacing can sometimes become a bit cleaner it will be used in specific places, even if we sacrifice some speed (which then probably will be compensated for by a little gain where). The scanners will probably never be used by users directly simply because there are no such low level interfaces in ConTEXt and because manipulating input is easier in Lua. Even deep down in the internals of ConTEXt we will use wrappers and additional helpers around the scanner code. Of course there is the fun-factor and playing with these scanners is fun indeed. The macro setters have as their main benefit that using them can be nicer in the Lua source, and of course setting a macro this way is also conceptually cleaner (just like we can set registers). Of course there are some challenges left, like determining if we are scanning input of already converted tokens (for instance in a macro body or token list expansion). Once we can properly feed back tokens we can also look ahead like \futurelet does. But for that to happen we will first clean up the LuaTEX input scanner code and error handler. Pragma ADE ConTEXt 2015 Nasbinals, France September 14 18, 2015 meeting.contextgarden.net/2015

Manuel Pégourié-Gonnard v1.2a 2012/01/23

Manuel Pégourié-Gonnard v1.2a 2012/01/23 The luacode package Manuel Pégourié-Gonnard v1.2a 2012/01/23 Abstract Executing Lua code from within TEX with \directlua can sometimes be tricky: there is no easy way to use the percent

More information

Simple Spreadsheets A11 E11 H11 I11 L11 B11 F11 D11 K11 A14 B14 K14 H14 F14 L14 I14 D14 E14 J11 B12 D12 L12 E12 A12 I12 F12 H12 K12 J14 J15 B15 D15

Simple Spreadsheets A11 E11 H11 I11 L11 B11 F11 D11 K11 A14 B14 K14 H14 F14 L14 I14 D14 E14 J11 B12 D12 L12 E12 A12 I12 F12 H12 K12 J14 J15 B15 D15 A01 A02 A03 A04 A05 A06 A07 A08 A09 A10 A11 A12 A13 A14 A15 A16 B01 B02 B03 B04 B05 B06 B07 B08 B09 B10 B11 B12 B13 B14 B15 B16 C01 C02 C03 C04 C05 C06 C07 C08 C09 C10 C11 C12 C13 C14 C15 C16 D01 D02 D03

More information

The language mix. E72 MAPS 39 Hans Hagen

The language mix. E72 MAPS 39 Hans Hagen E72 MAPS 39 Hans Hagen The language mix Abstract During the third ConTEXt conference that ran in parallel to EuroTEX 2009 in The Hague we had several sessions where mkiv was discussed and a few upcoming

More information

LuaTEX says goodbye to Pascal

LuaTEX says goodbye to Pascal Taco Hoekwater EUROTEX 2009 E1 LuaTEX says goodbye to Pascal Abstract LuaTEX 0.50 features a complete departure from Pascal source code. This article explains a little of the why and how of this change.

More information

The L A TEX3 Programming Language A syntax proposal for TEX macro programming

The L A TEX3 Programming Language A syntax proposal for TEX macro programming The L A TEX3 Programming Language A syntax proposal for TEX macro programming The L A TEX3 Project latex-l@urz.uni-heidelberg.de Abstract This paper proposes a new set of programming conventions suitable

More information

LuaTEX: Howling to the moon

LuaTEX: Howling to the moon Hans Hagen Pragma ADE, The Netherlands pragma@wxs.nl 1 Some observations Abstract Occasionally we reach the boundaries of TEX and programming then becomes rather cumbersome. This is partly due to the limitations

More information

CSCI S-Q Lecture #12 7/29/98 Data Structures and I/O

CSCI S-Q Lecture #12 7/29/98 Data Structures and I/O CSCI S-Q Lecture #12 7/29/98 Data Structures and I/O Introduction The WRITE and READ ADT Operations Case Studies: Arrays Strings Binary Trees Binary Search Trees Unordered Search Trees Page 1 Introduction

More information

The ted package. Manuel Pégourié-Gonnard v1.06 (2008/03/07) 1 Introduction 1. 2 Usage 1. 3 Implementation 3

The ted package. Manuel Pégourié-Gonnard v1.06 (2008/03/07) 1 Introduction 1. 2 Usage 1. 3 Implementation 3 The ted package Manuel Pégourié-Gonnard mpg@elzevir.fr v1.06 (2008/03/07) Contents 1 Introduction 1 2 Usage 1 3 Implementation 3 1 Introduction Just like sed is a stream editor, ted is a token list editor.

More information

6.001 Notes: Section 15.1

6.001 Notes: Section 15.1 6.001 Notes: Section 15.1 Slide 15.1.1 Our goal over the next few lectures is to build an interpreter, which in a very basic sense is the ultimate in programming, since doing so will allow us to define

More information

Typing Data. Chapter Recursive Types Declaring Recursive Types

Typing Data. Chapter Recursive Types Declaring Recursive Types Chapter 27 Typing Data 27.1 Recursive Types 27.1.1 Declaring Recursive Types We saw in the previous lecture how rec was necessary to write recursive programs. But what about defining recursive types? Recursive

More information

(Refer Slide Time 01:41 min)

(Refer Slide Time 01:41 min) Programming and Data Structure Dr. P.P.Chakraborty Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture # 03 C Programming - II We shall continue our study of

More information

What s new since TEX?

What s new since TEX? Based on Frank Mittelbach Guidelines for Future TEX Extensions Revisited TUGboat 34:1, 2013 Raphael Finkel CS Department, UK November 20, 2013 All versions of TEX Raphael Finkel (CS Department, UK) What

More information

qstest.sty QuinScape Unit Test Package version

qstest.sty QuinScape Unit Test Package version qstest.sty QuinScape Unit Test Package version 1.7896 David Kastrup 2007/02/21 1 Using qstest The basic idea of qstest is to let the user specify a number of tests that can be performed either at package

More information

TUGboat, Volume 30 (2009), No

TUGboat, Volume 30 (2009), No TUGboat, Volume 30 (2009), No. 2 247 LuaTEX: A user s perspective Aditya Mahajan Abstract In this article, I explain how to use Lua to write macros in LuaTEX. I give some examples of macros that are complicated

More information

Visual Debugging in TEX Part 1: The Story

Visual Debugging in TEX Part 1: The Story Visual Debugging in TEX Part 1: The Story Hans Hagen PRAGMA ADE Ridderstraat 17 8061GH Hasselt NL pragma@wxs.nl Abstract This article shows some features of the visual debugging module I wrote in 1996

More information

qstest, a L A TEX package for unit tests

qstest, a L A TEX package for unit tests qstest, a L A TEX package for unit tests David Kastrup David dot Kastrup (at) QuinScape dot de Abstract The qstest package was created because of the need to verify in a large L A TEX project that no regressions

More information

These are notes for the third lecture; if statements and loops.

These are notes for the third lecture; if statements and loops. These are notes for the third lecture; if statements and loops. 1 Yeah, this is going to be the second slide in a lot of lectures. 2 - Dominant language for desktop application development - Most modern

More information

The widetable package

The widetable package The widetable package Claudio Beccari Version number v.1.4; last revision 2017/09/09. Contents 1 Legalese 1 2 Introduction 1 3 Usage 2 4 The method 3 5 The long division algorithm 3 6 Using the εtex facilies

More information

The xtemplate package Prototype document functions

The xtemplate package Prototype document functions The xtemplate package Prototype document functions The L A TEX3 Project Released 2018-05-12 There are three broad layers between putting down ideas into a source file and ending up with a typeset document.

More information

252 TUGboat, Volume 39 (2018), No. 3

252 TUGboat, Volume 39 (2018), No. 3 252 TUGboat, Volume 39 (2018), No. 3 Abstract checks page or column breaks for issues with widow or orphan lines and issues warnings if such problems are detected. In addition, it checks and complains

More information

Abstracts without papers

Abstracts without papers Abstracts without papers Introducing Continuous Integration (CI) to TeX binaries Mojca Miklavec TeX Live binaries are being built once per year for about 20 different platforms by a number of volunteers

More information

redis-lua Documentation

redis-lua Documentation redis-lua Documentation Release 2.0.8 Julien Kauffmann October 12, 2016 Contents 1 Quick start 3 1.1 Step-by-step analysis........................................... 3 2 What s the magic at play here?

More information

Martin Scharrer Version v /09/19

Martin Scharrer   Version v /09/19 The filemod Package Martin Scharrer martin@scharrer-online.de http://www.ctan.org/pkg/filemod Version v1.2 2011/09/19 Abstract This package provides macros to read and compare the modification dates of

More information

S2P. Eetex executable changes

S2P. Eetex executable changes S2P category: Eetex Documentation version: 2000.12.20 date: December 20, 2000 author: Taco Hoekwater copyright: WKAP / Taco Hoekwater 1 Introduction This article gives an introduction to eetex. Eetex

More information

CSE413: Programming Languages and Implementation Racket structs Implementing languages with interpreters Implementing closures

CSE413: Programming Languages and Implementation Racket structs Implementing languages with interpreters Implementing closures CSE413: Programming Languages and Implementation Racket structs Implementing languages with interpreters Implementing closures Dan Grossman Fall 2014 Hi! I m not Hal J I love this stuff and have taught

More information

The qrcode package: Quick Response code generation in L A TEX

The qrcode package: Quick Response code generation in L A TEX The qrcode package: Quick Response code generation in L A TEX Anders Hendrickson St. Norbert College, De Pere, WI, USA anders.hendrickson@snc.edu September 26, 2014 1 Introduction The proliferation of

More information

Contents. Slide Set 1. About these slides. Outline of Slide Set 1. Typographical conventions: Italics. Typographical conventions. About these slides

Contents. Slide Set 1. About these slides. Outline of Slide Set 1. Typographical conventions: Italics. Typographical conventions. About these slides Slide Set 1 for ENCM 369 Winter 2014 Lecture Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Winter Term, 2014 ENCM 369 W14 Section

More information

TUGboat, Volume 37 (2016), No. 1 53

TUGboat, Volume 37 (2016), No. 1 53 TUGboat, Volume 37 (2016), No. 1 53 LuaTEX 0.90 back changes for PDF and more Abstract LuaTEX 0.90 brings a sweeping reorganization of the back, especially PDF-related features. Many fundamental primitives,

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Winter 2017 Lecture 7b Andrew Tolmach Portland State University 1994-2017 Values and Types We divide the universe of values according to types A type is a set of values and

More information

Intro. Scheme Basics. scm> 5 5. scm>

Intro. Scheme Basics. scm> 5 5. scm> Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

More information

COSC 2P91. Bringing it all together... Week 4b. Brock University. Brock University (Week 4b) Bringing it all together... 1 / 22

COSC 2P91. Bringing it all together... Week 4b. Brock University. Brock University (Week 4b) Bringing it all together... 1 / 22 COSC 2P91 Bringing it all together... Week 4b Brock University Brock University (Week 4b) Bringing it all together... 1 / 22 A note on practicality and program design... Writing a single, monolithic source

More information

(Refer Slide Time: 01:25)

(Refer Slide Time: 01:25) Computer Architecture Prof. Anshul Kumar Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture - 32 Memory Hierarchy: Virtual Memory (contd.) We have discussed virtual

More information

L A TEX Primer. Randall R. Holmes. August 17, 2018

L A TEX Primer. Randall R. Holmes. August 17, 2018 L A TEX Primer Randall R. Holmes August 17, 2018 Note: For this to make sense it needs to be read with the code and the compiled output side by side. And in order for the compiling to be successful, the

More information

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras Lecture 16 Cutting Plane Algorithm We shall continue the discussion on integer programming,

More information

Module 10A Lecture - 20 What is a function? Why use functions Example: power (base, n)

Module 10A Lecture - 20 What is a function? Why use functions Example: power (base, n) Programming, Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science and Engineering Indian Institute of Technology, Madras Module 10A Lecture - 20 What is a function?

More information

32 TUGboat, Volume 36 (2015), No. 1

32 TUGboat, Volume 36 (2015), No. 1 32 TUGboat, Volume 36 (2015), No. 1 The box-glue-penalty algebra of TEX and its use of \prevdepth Contents 1 The box-glue-penalty algebra 32 2 Splitting lists 32 3 Assembling a vertical box or galley 33

More information

The wiki2beamer example. October 19, 2012

The wiki2beamer example. October 19, 2012 The wiki2beamer example October 19, 2012 Welcome Welcome to the wiki2beamer example presentation. We will do our best to document and demonstrate all features of wiki2beamer in this file. It is not meant

More information

The calc package Infix notation arithmetic in L A TEX

The calc package Infix notation arithmetic in L A TEX The calc package Infix notation arithmetic in L A TEX Kresten Krab Thorup, Frank Jensen (and Chris Rowley) 1998/07/07 Abstract The calc package reimplements the L A TEX commands \setcounter, \addtocounter,

More information

Data type built into Python. Dictionaries are sometimes found in other languages as associative memories or associative arrays.

Data type built into Python. Dictionaries are sometimes found in other languages as associative memories or associative arrays. NETB 329 Lecture 4 Data Structures in Python Dictionaries Data type built into Python. Dictionaries are sometimes found in other languages as associative memories or associative arrays. 1 of 70 Unlike

More information

Using Text in Photoshop

Using Text in Photoshop Using Text in Photoshop So, we re going to take a break for a while from talking about photographs and how to manipulate them, and instead focus on some design elements! We re going to spend a while talking

More information

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #43. Multidimensional Arrays

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #43. Multidimensional Arrays Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #43 Multidimensional Arrays In this video will look at multi-dimensional arrays. (Refer Slide Time: 00:03) In

More information

CS112 Lecture: Variables, Expressions, Computation, Constants, Numeric Input-Output

CS112 Lecture: Variables, Expressions, Computation, Constants, Numeric Input-Output CS112 Lecture: Variables, Expressions, Computation, Constants, Numeric Input-Output Last revised January 12, 2006 Objectives: 1. To introduce arithmetic operators and expressions 2. To introduce variables

More information

Trees in TEX David Eppstein; February 6, 1985

Trees in TEX David Eppstein; February 6, 1985 Introduction Trees in TEX David Eppstein; February 6, 1985 There are many possible uses for trees in typeset text. The following taxonomy illustrates some of them. Data Structures Search Tree Priority

More information

VARIABLES. Aim Understanding how computer programs store values, and how they are accessed and used in computer programs.

VARIABLES. Aim Understanding how computer programs store values, and how they are accessed and used in computer programs. Lesson 2 VARIABLES Aim Understanding how computer programs store values, and how they are accessed and used in computer programs. WHAT ARE VARIABLES? When you input data (i.e. information) into a computer

More information

Maciej Sobieraj. Lecture 1

Maciej Sobieraj. Lecture 1 Maciej Sobieraj Lecture 1 Outline 1. Introduction to computer programming 2. Advanced flow control and data aggregates Your first program First we need to define our expectations for the program. They

More information

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Table of Contents Introduction!... 1 Part 1: Entering Data!... 2 1.a: Typing!... 2 1.b: Editing

More information

D Programming Language

D Programming Language Group 14 Muazam Ali Anil Ozdemir D Programming Language Introduction and Why D? It doesn t come with a religion this is written somewhere along the overview of D programming language. If you actually take

More information

Absolute C++ Walter Savitch

Absolute C++ Walter Savitch Absolute C++ sixth edition Walter Savitch Global edition This page intentionally left blank Absolute C++, Global Edition Cover Title Page Copyright Page Preface Acknowledgments Brief Contents Contents

More information

CSE 413 Languages & Implementation. Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341)

CSE 413 Languages & Implementation. Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341) CSE 413 Languages & Implementation Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341) 1 Goals Representing programs as data Racket structs as a better way to represent

More information

The mathstyle package

The mathstyle package The mathstyle package Authors: Michael J. Downes, Morten Høgholm Maintained by Morten Høgholm, Will Robertson Feedback: https://github.com/wspr/breqn/issues 2017/01/27 0.98e User s guide This package exists

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

QUIZ. How could we disable the automatic creation of copyconstructors

QUIZ. How could we disable the automatic creation of copyconstructors QUIZ How could we disable the automatic creation of copyconstructors pre-c++11? What syntax feature did C++11 introduce to make the disabling clearer and more permanent? Give a code example. QUIZ How

More information

The listproc package

The listproc package The listproc package Jesse A. Tov tov@ccs.neu.edu This document corresponds to listproc v0.2, dated 2011/08/03. Contents 1 Introduction 1 2 Command Reference 2 2.1 List Definition.............................

More information

Lecture 2 Tao Wang 1

Lecture 2 Tao Wang 1 Lecture 2 Tao Wang 1 Objectives In this chapter, you will learn about: Modular programs Programming style Data types Arithmetic operations Variables and declaration statements Common programming errors

More information

1. The Joy of TEX. Check out this example!

1. The Joy of TEX. Check out this example! 1. The Joy of TEX 1. TEX is typesetting language for scientific documents. It is incredibly customizable and allows you define your own styles, shortcuts, etc, so that it rapidly becomes a time-saver.

More information

Bash command shell language interpreter

Bash command shell language interpreter Principles of Programming Languages Bash command shell language interpreter Advanced seminar topic Louis Sugy & Baptiste Thémine Presentation on December 8th, 2017 Table of contents I. General information

More information

MITOCW watch?v=kz7jjltq9r4

MITOCW watch?v=kz7jjltq9r4 MITOCW watch?v=kz7jjltq9r4 PROFESSOR: We're going to look at the most fundamental of all mathematical data types, namely sets, and let's begin with the definitions. So informally, a set is a collection

More information

CS112 Lecture: Primitive Types, Operators, Strings

CS112 Lecture: Primitive Types, Operators, Strings CS112 Lecture: Primitive Types, Operators, Strings Last revised 1/24/06 Objectives: 1. To explain the fundamental distinction between primitive types and reference types, and to introduce the Java primitive

More information

The TEX Lua mix. Hans Hagen Pragma ADE Abstract An introduction to the combination of TEX and the scripting language Lua.

The TEX Lua mix. Hans Hagen Pragma ADE  Abstract An introduction to the combination of TEX and the scripting language Lua. Hans Hagen Pragma ADE http://pragma-ade.com Abstract An introduction to the combination of TEX and the scripting language Lua. 1 Introduction The idea of embedding Lua into TEX originates in some experiments

More information

The xargs package. Manuel Pégourié-Gonnard v1.1 (2008/03/22) 1 Introduction 1. 2 Usage 1

The xargs package. Manuel Pégourié-Gonnard v1.1 (2008/03/22) 1 Introduction 1. 2 Usage 1 The xargs package Manuel Pégourié-Gonnard mpg@elzevir.fr v1.1 (2008/03/22) Contents 1 Introduction 1 2 Usage 1 3 Implementation 4 Important note for French users: a French version of the user documentation

More information

How to approach a computational problem

How to approach a computational problem How to approach a computational problem A lot of people find computer programming difficult, especially when they first get started with it. Sometimes the problems are problems specifically related to

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Fall 2017 Lecture 7b Andrew Tolmach Portland State University 1994-2017 Type Inference Some statically typed languages, like ML (and to a lesser extent Scala), offer alternative

More information

Personal Information Manager Overview & Installation Guide

Personal Information Manager Overview & Installation Guide Personal Information Manager Overview & Installation Guide Intended Audience This article and starter kit are aimed at medium and advanced level Backbase developers. It is assumed that you already have

More information

Learning LaTeX: The Basics

Learning LaTeX: The Basics Learning LaTeX: The Basics The best way to learn LaTeX is by trial and error, with a lot of experimenting, and using other people s.tex files as a model. Google is also a good source: for example, googling

More information

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Sorting lower bound and Linear-time sorting Date: 9/19/17

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Sorting lower bound and Linear-time sorting Date: 9/19/17 601.433/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Sorting lower bound and Linear-time sorting Date: 9/19/17 5.1 Introduction You should all know a few ways of sorting in O(n log n)

More information

CSCI-GA Compiler Construction Lecture 4: Lexical Analysis I. Hubertus Franke

CSCI-GA Compiler Construction Lecture 4: Lexical Analysis I. Hubertus Franke CSCI-GA.2130-001 Compiler Construction Lecture 4: Lexical Analysis I Hubertus Franke frankeh@cs.nyu.edu Role of the Lexical Analyzer Remove comments and white spaces (aka scanning) Macros expansion Read

More information

C Language Programming

C Language Programming Experiment 2 C Language Programming During the infancy years of microprocessor based systems, programs were developed using assemblers and fused into the EPROMs. There used to be no mechanism to find what

More information

The afterpage package

The afterpage package The afterpage package David Carlisle 2014/10/28 This file is maintained by the L A TEX Project team. Bug reports can be opened (category tools) at https://latex-project.org/bugs.html. This package implements

More information

6.001 Notes: Section 6.1

6.001 Notes: Section 6.1 6.001 Notes: Section 6.1 Slide 6.1.1 When we first starting talking about Scheme expressions, you may recall we said that (almost) every Scheme expression had three components, a syntax (legal ways of

More information

Program Fundamentals

Program Fundamentals Program Fundamentals /* HelloWorld.java * The classic Hello, world! program */ class HelloWorld { public static void main (String[ ] args) { System.out.println( Hello, world! ); } } /* HelloWorld.java

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Winter 2018 Lecture 7b Andrew Tolmach Portland State University 1994-2018 Dynamic Type Checking Static type checking offers the great advantage of catching errors early And

More information

QUIZ. How could we disable the automatic creation of copyconstructors

QUIZ. How could we disable the automatic creation of copyconstructors QUIZ How could we disable the automatic creation of copyconstructors pre-c++11? What syntax feature did C++11 introduce to make the disabling clearer and more permanent? Give a code example. Ch. 14: Inheritance

More information

Threaded Language As a Form of Partial Evaluator

Threaded Language As a Form of Partial Evaluator Threaded Language As a Form of Partial Evaluator Prabhas Chongstitvatana Department of Computer Engineering, Chulalongkorn University Bangkok 10330, Thailand Email: prabhas@chula.ac.th Abstract This work

More information

INF4820: Algorithms for Artificial Intelligence and Natural Language Processing. Common Lisp Fundamentals

INF4820: Algorithms for Artificial Intelligence and Natural Language Processing. Common Lisp Fundamentals INF4820: Algorithms for Artificial Intelligence and Natural Language Processing Common Lisp Fundamentals Stephan Oepen & Murhaf Fares Language Technology Group (LTG) August 30, 2017 Last Week: What is

More information

Practical 2: Ray Tracing

Practical 2: Ray Tracing 2017/2018, 4th quarter INFOGR: Graphics Practical 2: Ray Tracing Author: Jacco Bikker The assignment: The purpose of this assignment is to create a small Whitted-style ray tracer. The renderer should be

More information

Macros. 194 TUGboat, Volume 25 (2004), No. 2

Macros. 194 TUGboat, Volume 25 (2004), No. 2 194 TUGboat, Volume 25 (2004), No. 2 Macros xkeyval new developments and mechanisms in key processing Hendri Adriaens and Uwe Kern Abstract This article introduces the xkeyval (L A )TEX package, an extension

More information

Full file at

Full file at Java Programming, Fifth Edition 2-1 Chapter 2 Using Data within a Program At a Glance Instructor s Manual Table of Contents Overview Objectives Teaching Tips Quick Quizzes Class Discussion Topics Additional

More information

Section 2: Introduction to Java. Historical note

Section 2: Introduction to Java. Historical note The only way to learn a new programming language is by writing programs in it. - B. Kernighan & D. Ritchie Section 2: Introduction to Java Objectives: Data Types Characters and Strings Operators and Precedence

More information

Text. Text metrics. There are some important metrics that we must consider when working with text. Figure 4-1 shows the basics.

Text. Text metrics. There are some important metrics that we must consider when working with text. Figure 4-1 shows the basics. Text Drawing text has some special properties and thus is treated in a separate chapter. We first need to talk about the sizing of text. Then we discuss fonts and how text is actually drawn. There is then

More information

Operating System Principles: Memory Management Swapping, Paging, and Virtual Memory CS 111. Operating Systems Peter Reiher

Operating System Principles: Memory Management Swapping, Paging, and Virtual Memory CS 111. Operating Systems Peter Reiher Operating System Principles: Memory Management Swapping, Paging, and Virtual Memory Operating Systems Peter Reiher Page 1 Outline Swapping Paging Virtual memory Page 2 Swapping What if we don t have enough

More information

CSE 374 Programming Concepts & Tools

CSE 374 Programming Concepts & Tools CSE 374 Programming Concepts & Tools Hal Perkins Fall 2017 Lecture 8 C: Miscellanea Control, Declarations, Preprocessor, printf/scanf 1 The story so far The low-level execution model of a process (one

More information

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture 04 Programs with IO and Loop We will now discuss the module 2,

More information

Test Requirement Catalog. Generic Clues, Developer Version

Test Requirement Catalog. Generic Clues, Developer Version Version 4..0 PART 1: DATA TYPES Test Requirement Catalog SIMPLE DATA TYPES... 4 BOOLEAN... 4 CASES... 4 COUNTS... 5 INTERVALS... 5 [LOW, HIGH] an interval that contains both LOW and HIGH... 6 [LOW, HIGH)

More information

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */ Overview Language Basics This chapter describes the basic elements of Rexx. It discusses the simple components that make up the language. These include script structure, elements of the language, operators,

More information

Decision Management Community

Decision Management Community Decision Management Community Challenge Jan-2016 INTRO I was happy to see a large number of submissions to the challenge. Just to make things clear, I did not start the challenge and I did not pick the

More information

6.001 Notes: Section 8.1

6.001 Notes: Section 8.1 6.001 Notes: Section 8.1 Slide 8.1.1 In this lecture we are going to introduce a new data type, specifically to deal with symbols. This may sound a bit odd, but if you step back, you may realize that everything

More information

Although this code is under construction the interfaces are unlikely to change, if only because we use it in production.

Although this code is under construction the interfaces are unlikely to change, if only because we use it in production. SQL CONTEXT 1 Contents 1 Introduction 1 2 Presets 1 3 Templates 2 4 Queries 3 5 Converters 4 6 Typesetting 6 7 Methods 7 8 Helpers 7 9 Example 7 10 Colofon 9 1 Introduction Although ConT E Xt is a likely

More information

A Sample L A TEX Document

A Sample L A TEX Document A Sample L A TEX Document Math 300 October 11, 2006 1 Typing Text Since L A TEX is a markup language, any text we type appears on the page, unless it contains one of the nine reserved characters of L A

More information

15-122: Principles of Imperative Computation, Fall 2015

15-122: Principles of Imperative Computation, Fall 2015 15-122 Programming 5 Page 1 of 10 15-122: Principles of Imperative Computation, Fall 2015 Homework 5 Programming: Clac Due: Thursday, October 15, 2015 by 22:00 In this assignment, you will implement a

More information

TUGboat, Volume 31 (2010), No. 1 83

TUGboat, Volume 31 (2010), No. 1 83 TUGboat, Volume 31 (2010), No. 1 83 1 Introduction Key value entry, in which a series of key = value statements are given in a comma-separated list, is a powerful method for specifying a flexible range

More information

Computer Programming. Basic Control Flow - Loops. Adapted from C++ for Everyone and Big C++ by Cay Horstmann, John Wiley & Sons

Computer Programming. Basic Control Flow - Loops. Adapted from C++ for Everyone and Big C++ by Cay Horstmann, John Wiley & Sons Computer Programming Basic Control Flow - Loops Adapted from C++ for Everyone and Big C++ by Cay Horstmann, John Wiley & Sons Objectives To learn about the three types of loops: while for do To avoid infinite

More information

G Compiler Construction Lecture 4: Lexical Analysis. Mohamed Zahran (aka Z)

G Compiler Construction Lecture 4: Lexical Analysis. Mohamed Zahran (aka Z) G22.2130-001 Compiler Construction Lecture 4: Lexical Analysis Mohamed Zahran (aka Z) mzahran@cs.nyu.edu Role of the Lexical Analyzer Remove comments and white spaces (aka scanning) Macros expansion Read

More information

CHAPTER 7 OBJECTS AND CLASSES

CHAPTER 7 OBJECTS AND CLASSES CHAPTER 7 OBJECTS AND CLASSES OBJECTIVES After completing Objects and Classes, you will be able to: Explain the use of classes in Java for representing structured data. Distinguish between objects and

More information

development Introducing Eetex

development Introducing Eetex Introducing Eetex Taco Hoekwater Hans Hagen NTG T E X Future Group ntg-toekomsttex@ntg.nl abstract This article gives an introduction to eetex. Eetex is an extension to e-tex 2.0 that defines a collection

More information

Chapter 9 :: Data Abstraction and Object Orientation

Chapter 9 :: Data Abstraction and Object Orientation Chapter 9 :: Data Abstraction and Object Orientation Programming Language Pragmatics Michael L. Scott Control or PROCESS abstraction is a very old idea (subroutines!), though few languages provide it in

More information

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming Intro to Programming Unit 7 Intro to Programming 1 What is Programming? 1. Programming Languages 2. Markup vs. Programming 1. Introduction 2. Print Statement 3. Strings 4. Types and Values 5. Math Externals

More information

The MathType Window. The picture below shows MathType with all parts of its toolbar visible: Small bar. Tabs. Ruler. Selection.

The MathType Window. The picture below shows MathType with all parts of its toolbar visible: Small bar. Tabs. Ruler. Selection. Handle MathType User Manual The MathType Window The picture below shows MathType with all parts of its toolbar visible: Symbol palettes Template palettes Tabs Small bar Large tabbed bar Small tabbed bar

More information

Chapter 2 Using Data. Instructor s Manual Table of Contents. At a Glance. Overview. Objectives. Teaching Tips. Quick Quizzes. Class Discussion Topics

Chapter 2 Using Data. Instructor s Manual Table of Contents. At a Glance. Overview. Objectives. Teaching Tips. Quick Quizzes. Class Discussion Topics Java Programming, Sixth Edition 2-1 Chapter 2 Using Data At a Glance Instructor s Manual Table of Contents Overview Objectives Teaching Tips Quick Quizzes Class Discussion Topics Additional Projects Additional

More information

SML Style Guide. Last Revised: 31st August 2011

SML Style Guide. Last Revised: 31st August 2011 SML Style Guide Last Revised: 31st August 2011 It is an old observation that the best writers sometimes disregard the rules of rhetoric. When they do so, however, the reader will usually find in the sentence

More information

Compilers. Prerequisites

Compilers. Prerequisites Compilers Prerequisites Data structures & algorithms Linked lists, dictionaries, trees, hash tables Formal languages & automata Regular expressions, finite automata, context-free grammars Machine organization

More information