{"id":427,"date":"2018-11-13T14:24:11","date_gmt":"2018-11-13T14:24:11","guid":{"rendered":"https:\/\/books.compclassnotes.com\/elementarycomputing\/?page_id=427"},"modified":"2018-11-13T15:15:33","modified_gmt":"2018-11-13T15:15:33","slug":"local-and-global-variables","status":"publish","type":"page","link":"https:\/\/books.compclassnotes.com\/elementarycomputing\/local-and-global-variables\/","title":{"rendered":"Local and Global Variables"},"content":{"rendered":"<p>So far our examples have all been relatively simple and straightforward. For example, we have only used single functions, there have been very few global variables (and rightly so!) and we&#8217;ve always assumed on processing core. When we looked at\u00a0<a href=\"https:\/\/books.compclassnotes.com\/elementarycomputing\/lifetime-diagrams\/\">Lifetime Diagrams<\/a>, we saw the importance of keeping everything straight and simple, so that we could have multiple copies of functions running at the same time.<\/p>\n<p>All supercomputers are highly parallel. Take a look at the current <a href=\"https:\/\/en.wikipedia.org\/wiki\/TOP500#Top_500_ranking\">Top 500 Supercomputers in the world<\/a>; as of June 2018, the world&#8217;s most powerful supercomputer, the Summit Supercomputer, at Oak Ridge National Laboratory in the USA has <strong>200,000 <\/strong>separate processing cores. How can we design programs that will efficiently use all these cores? We&#8217;re going need hundreds of functions, we&#8217;re going need millions of copies of the\u00a0<strong>same<\/strong> function running at the same time, and we&#8217;re going to need functions that can take other functions as parameters, to help us change the way programs work. And somehow, we&#8217;re going to have to keep track over everything.<\/p>\n<p>To help with this, we&#8217;re going to introduce some formal notation to do this, starting with what is referred to as\u00a0<a href=\"https:\/\/books.compclassnotes.com\/elementarycomputing\/free-and-bound-variables-in-%ce%bb-calculus\/\"><em>Free\u00a0<\/em>and\u00a0<em>Bound<\/em>\u00a0variables in\u00a0\u03bb calculus<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So far our examples have all been relatively simple and straightforward. For example, we have only used single functions, there have been very few global variables (and rightly so!) and we&#8217;ve always assumed on processing core. When we looked at\u00a0Lifetime <span class=\"readmore\"><a href=\"https:\/\/books.compclassnotes.com\/elementarycomputing\/local-and-global-variables\/\">Continue Reading<\/a><\/span><\/p>\n","protected":false},"author":4,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-427","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/books.compclassnotes.com\/elementarycomputing\/wp-json\/wp\/v2\/pages\/427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/books.compclassnotes.com\/elementarycomputing\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/books.compclassnotes.com\/elementarycomputing\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/books.compclassnotes.com\/elementarycomputing\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/books.compclassnotes.com\/elementarycomputing\/wp-json\/wp\/v2\/comments?post=427"}],"version-history":[{"count":3,"href":"https:\/\/books.compclassnotes.com\/elementarycomputing\/wp-json\/wp\/v2\/pages\/427\/revisions"}],"predecessor-version":[{"id":448,"href":"https:\/\/books.compclassnotes.com\/elementarycomputing\/wp-json\/wp\/v2\/pages\/427\/revisions\/448"}],"wp:attachment":[{"href":"https:\/\/books.compclassnotes.com\/elementarycomputing\/wp-json\/wp\/v2\/media?parent=427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}