{"id":400,"date":"2018-08-20T19:00:45","date_gmt":"2018-08-21T00:00:45","guid":{"rendered":"http:\/\/kwnpsa.ca\/?p=400"},"modified":"2018-09-05T05:05:59","modified_gmt":"2018-09-05T10:05:59","slug":"2019-08-scripting-languages","status":"publish","type":"post","link":"https:\/\/kwnpsa.ca\/index.php\/2018\/08\/20\/2019-08-scripting-languages\/","title":{"rendered":"2019 08 Scripting Languages"},"content":{"rendered":"<h3><strong>Location: <\/strong><a href=\"https:\/\/www.openstreetmap.org\/way\/43250610#map=19\/43.46646\/-80.54515\">Room 1301 \u2014 Conrad Grebel University College, 140 Westmount Rd. N. \u00b7 Waterloo, ON N2L 3G6<\/a> (bottom floor, in the hallway that connects the main building to the Chapel-Residence building)<br \/>\n<strong>Date:<\/strong> Monday, 20 August 2018<br \/>\n<strong>Time:<\/strong> 7:00-9:00PM<\/h3>\n<p>Do you need to do the same thing again and again? Have you automated those repetitive tasks? What software tools do you use? Keyboard macros? <i>Programmable<\/i> keyboard macros? A scripting language? Which scripting language? What makes a scripting language different from a programming language? Is a scripting language Turing-complete? Can&#8217;t you just do <b>everything<\/b> in PowerShell or Bash?<\/p>\n<p>Let&#8217;s talk about what can be solved with scripting languages, and what can&#8217;t. Bring your laptop to give a demonstration of your favourite scripting languages, and maybe we can help solve some of your most annoying repetitive problems.<br \/>\n&#8211;Bob Jonkman &amp; Marc Par\u00e9<\/p>\n<ul>\n<li><a class=\"mw-selflink selflink\">Scripting Languages\/Meeting Notes 2018-08-20<\/a><\/li>\n<\/ul>\n<h4><span id=\"Resources\" class=\"mw-headline\">Resources<\/span><\/h4>\n<ul>\n<li><a class=\"external text\" href=\"https:\/\/www.techsoupcanada.ca\/en\/directory\/vocabulary\/13\" rel=\"nofollow\">TechSoup Canada Catalogue<\/a><\/li>\n<li><a class=\"external text\" href=\"https:\/\/www.gnu.org\/software\/bash\/\" rel=\"nofollow\">GNU Bash<\/a><\/li>\n<li><a class=\"external text\" href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/\" rel=\"nofollow\">PowerShell Documentation<\/a><\/li>\n<\/ul>\n<h4><span id=\"Introductions\" class=\"mw-headline\">Introductions<\/span><\/h4>\n<ul>\n<li>Testers, programmers, SysAdmins, and some non-scripting users<\/li>\n<\/ul>\n<h4><span id=\"Meeting_Notes\" class=\"mw-headline\">Meeting Notes<\/span><\/h4>\n<ul>\n<li>Programming vs. Scripting\n<ul>\n<li>&#8220;Programs&#8221; are compiled, &#8220;Scripts&#8221; are interpreted<\/li>\n<li>But mostly there&#8217;s no differences in syntax<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>Use a scripting language to prototype a concept<\/li>\n<\/ul>\n<ul>\n<li>Non-programmers using scripts to do application installation\n<ul>\n<li>Useful for installing applications without a GUI to get that app installed to the GUI level<\/li>\n<li>eg. <a class=\"external text\" href=\"https:\/\/mailinabox.email\/\" rel=\"nofollow\">Mail-In-A-Box<\/a>, installed with a script<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li><a class=\"external text\" href=\"https:\/\/www.vagrantup.com\/\" rel=\"nofollow\">Vagrant<\/a> written in <a class=\"external text\" href=\"https:\/\/www.ruby-lang.org\/en\/\" rel=\"nofollow\">RUBY<\/a>, but has its own scripting language<\/li>\n<\/ul>\n<ul>\n<li>Lots of variation in scripting language syntax, even within the same language\n<ul>\n<li>&#8220;semicolons forever!&#8221;<\/li>\n<li>Brackets, or no brackets<\/li>\n<li>Is whitespace significant?<\/li>\n<li>Indenting<\/li>\n<\/ul>\n<\/li>\n<li>many of these are tradeoffs\n<ul>\n<li>Optimizing for speed, time to program, robustness<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li><a class=\"external text\" href=\"https:\/\/llvm.org\/\" rel=\"nofollow\">LLVM<\/a> (originally <i>Low Level Virtual Machine<\/i>) is used to create programming language\n<ul>\n<li>take input intermediate language, p-code, generates machine language<\/li>\n<li>Needs research. Bob can&#8217;t figure out what this does (<a class=\"extiw\" title=\"wikipedia:LLVM\" href=\"http:\/\/en.wikipedia.org\/wiki\/LLVM\">Wikipedia:LLVM<\/a> may be helpful}<\/li>\n<li>LLVM is embedded in <a class=\"external text\" href=\"https:\/\/clang.llvm.org\/\" rel=\"nofollow\">CLANG<\/a>, <a class=\"external text\" href=\"https:\/\/www.rust-lang.org\/en-US\/\" rel=\"nofollow\">RUST<\/a>, other scripting languages<\/li>\n<li>way to create code generation for your software<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>&#8220;If all scripting languages were combined, could we create a universal scripting language?&#8221;\n<ul>\n<li>Probably not &#8212; semantic ambiguity, eg. use of semicolons is different in different languages, other syntax doesn&#8217;t match<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>Using one language is comfortable, so you tend to do everything in that language, appropriate or not\n<ul>\n<li>What is the lifespan of a language? Depends on the domain &#8212; AWK has been around for 25 years, RUST has not<\/li>\n<\/ul>\n<\/li>\n<li>How do you keep up with all the new languages?\n<ul>\n<li>Need to decide what to give up<\/li>\n<li>How much spare time do you have<\/li>\n<li>How do you know what new tech to embrace<\/li>\n<li>Depends on the lifespan of the project, don&#8217;t spend 3 months to learn a language for a 2 month project<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li><a class=\"external text\" href=\"http:\/\/lambda-the-ultimate.org\/\" rel=\"nofollow\">Lambda the ultimate<\/a> on programming language design\n<ul>\n<li>There is a formal science to language design<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>Still worth learning <a class=\"external text\" href=\"http:\/\/www.open-std.org\/JTC1\/SC22\/WG14\/www\/standards\" rel=\"nofollow\">C<\/a>?\n<ul>\n<li>Yes, it&#8217;s still efficient, has installed base, still close to the hardware<\/li>\n<li>C makes it tolerable to understand what is happening in your computer<\/li>\n<li>High level languages have many layers of abstraction<\/li>\n<li>Knowing C leads to understanding<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>&#8220;Scripting is a gateway drug to programming&#8221;<\/li>\n<\/ul>\n<ul>\n<li>How do we learn scripting?\n<ul>\n<li>Get a raspberry pi<\/li>\n<li>JavaScript<\/li>\n<li>You need a project to solve!<\/li>\n<li>Find something on GitHub<\/li>\n<li><a class=\"external text\" href=\"https:\/\/www.python.org\/\" rel=\"nofollow\">Python<\/a> is considered the preferred entry-level language\n<ul>\n<li><a class=\"external text\" href=\"https:\/\/www.linuxjournal.com\/article\/3882\" rel=\"nofollow\">Why Python?<\/a> in Linux Journal by Eric S. Raymond<\/li>\n<\/ul>\n<\/li>\n<li><a class=\"external text\" href=\"http:\/\/www.appinventor.org\/\" rel=\"nofollow\">App Inventor<\/a> allows people with no programming experience to create apps on Android<\/li>\n<li><a class=\"external text\" href=\"https:\/\/scratch.mit.edu\/\" rel=\"nofollow\">Scratch<\/a> is another drag&#8217;n&#8217;drop learning app<\/li>\n<li>Marc taught <a class=\"external text\" href=\"https:\/\/people.eecs.berkeley.edu\/%7Ebh\/logo.html\" rel=\"nofollow\">Logo<\/a> to a kindergarten class<\/li>\n<li><a class=\"external text\" href=\"https:\/\/ccl.northwestern.edu\/netlogo\/\" rel=\"nofollow\">NetLogo<\/a> used for serious science application, complexity science at Santa Fe Institute<\/li>\n<li>Other applications like <a class=\"external text\" href=\"https:\/\/www.docker.com\/\" rel=\"nofollow\">Docker<\/a> are written in <a class=\"external text\" href=\"https:\/\/golang.org\/\" rel=\"nofollow\">GO<\/a>, so worth learning<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>Is scripting a desirable skill in job applications?\n<ul>\n<li>Python is one of the most requested skills<\/li>\n<li>But shell scripting is difficult<\/li>\n<li>For security eg. Wireshark, SNORT, &amp;c need scripting to identify network traffic<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h5><span id=\"LUA\" class=\"mw-headline\"><a class=\"external text\" href=\"https:\/\/www.lua.org\/\" rel=\"nofollow\">LUA<\/a><\/span><\/h5>\n<ul>\n<li>Kirk wrote in LUA to access the Linux encryption keyring subsystem\n<ul>\n<li>was using <a class=\"external text\" href=\"https:\/\/www.gnu.org\/software\/guile\/\" rel=\"nofollow\">GUILE<\/a> (FSF&#8217;s <a class=\"external text\" href=\"http:\/\/www.scheme-reports.org\/\" rel=\"nofollow\">SCHEME<\/a>), not so good for encryption<\/li>\n<li>LUA is &#8220;Python for millennials&#8221;<\/li>\n<\/ul>\n<\/li>\n<li>Written in ANSI C<\/li>\n<li>Very embeddable, no linking,<\/li>\n<li>Comiles to a Virtual Machine<\/li>\n<li>Two flavours, LUA and LUAJIT (Just-In-Time compiler)<\/li>\n<li>Seen in XMPP server, used for real-time application<\/li>\n<li>Came from Brazil, university project, released &#8220;into the wild&#8221;<\/li>\n<li>Has facility for OOP, but needs your own OOP tools<\/li>\n<li>Has co-routines, program in loops that are interruptible; daisychain them together<\/li>\n<li>Functions are first-class entities, so can do functional programming<\/li>\n<li>There&#8217;s a modLUA for Apache server; handle data in blocks without touching the Apache system\n<ul>\n<li>Rather than create a web backend, it lets you create the entire web server<\/li>\n<\/ul>\n<\/li>\n<li>&#8220;Embeddable extension language&#8221;<\/li>\n<li>There&#8217;s a bootloader LUA for use before the OS loads in SysLinux<\/li>\n<li>Kirk has used LUA as a conversion layer for allowing Apache to work with encryption sysstyem<\/li>\n<li>Definitely a good language for testing<\/li>\n<li>Built into <a class=\"external text\" href=\"https:\/\/www.wireshark.org\/\" rel=\"nofollow\">Wireshark<\/a> for decoding packets<\/li>\n<li>How popular is LUA? People make stuff available on GitHub<\/li>\n<li>LUA is used in games for event handling<\/li>\n<li>Many apps have LUA built-in (on the LUA site)<\/li>\n<\/ul>\n<h5><span id=\"AWK\" class=\"mw-headline\">AWK<\/span><\/h5>\n<ul>\n<li>Brian Kernighan still uses AWK,\n<ul>\n<li>Touts the advantages of one-liners, which can&#8217;t be compiled<\/li>\n<li>Lecture he gave in the UK, &#8220;Successful programming language, why are some more successful than others&#8221;\n<ul>\n<li>Keeps coming back to AWK as a successful language<\/li>\n<li><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/Sg4U4r_AgJU?rel=0\" width=\"300\" height=\"150\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/li>\n<li><a class=\"external text\" href=\"https:\/\/www.youtube.com\/watch?v=Sg4U4r_AgJU\" rel=\"nofollow\">How to succeed in language design without really trying.<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>&#8220;If you want to compile AWK, just re-write it in C&#8221;<\/li>\n<\/ul>\n<ul>\n<li>Associative arrays in AWK,\n<ul>\n<li>Mainstay of Python<\/li>\n<li>C only has enumerative arrays, difficult to simulate associative arrays<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>Conrad Grebel prof Dave Huron used AWK to create a catalogue of music for Hewlett-Packard\n<ul>\n<li><a class=\"external text\" href=\"http:\/\/www.humdrum.org\/\" rel=\"nofollow\">HumDrum Toolkit<\/a>&#8221; is the app name<\/li>\n<li>Trying to analyze music, determine patterns among composer<\/li>\n<li>Find out if people would be happy if music was two tones up or down<\/li>\n<li>Two minutes of this analysis is equal to a human analysis of years<\/li>\n<li>Dave Huron one of the first<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>Raymond cleans the data before processing it with AWK\n<ul>\n<li>Uses BASH to insert parameters begore printing.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>Bob used AWK to parse log files\n<ul>\n<li>Poor programming practices &#8211; AWK lends itself to quick&amp;dirty hacks, but the scripts grew; good programming practices at the outset would have been beneficial later<\/li>\n<li>Much better if data is available though an API, but these scripts were created <i>because<\/i> there were no APIs<\/li>\n<li>Bob implemented a standardized CSV file, but not according to the <a class=\"external text\" href=\"https:\/\/tools.ietf.org\/html\/rfc4180\" rel=\"nofollow\">RFC 4180<\/a> specification<\/li>\n<li>Human readable: <a class=\"external free\" href=\"https:\/\/sobac.com\/sobac\/groupwise\/code2html\/\" rel=\"nofollow\">https:\/\/sobac.com\/sobac\/groupwise\/code2html\/<\/a><\/li>\n<li>Downloadable: <a class=\"external free\" href=\"https:\/\/sobac.com\/bin\/awk\/\" rel=\"nofollow\">https:\/\/sobac.com\/bin\/awk\/<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h5><span id=\"List_of_scripting_languages\" class=\"mw-headline\">List of scripting languages<\/span><\/h5>\n<ul>\n<li>AWK &#8211; <a class=\"external free\" href=\"http:\/\/pubs.opengroup.org\/onlinepubs\/9699919799\/utilities\/awk.html\" rel=\"nofollow\">http:\/\/pubs.opengroup.org\/onlinepubs\/9699919799\/utilities\/awk.html<\/a><\/li>\n<li>BASH &#8211; <a class=\"external free\" href=\"https:\/\/www.gnu.org\/software\/bash\/\" rel=\"nofollow\">https:\/\/www.gnu.org\/software\/bash\/<\/a><\/li>\n<li>CLANG &#8211; <a class=\"external free\" href=\"https:\/\/clang.llvm.org\/\" rel=\"nofollow\">https:\/\/clang.llvm.org\/<\/a><\/li>\n<li>JavaScript &#8211; <a class=\"external free\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\" rel=\"nofollow\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript<\/a>\n<ul>\n<li>ECMAScript &#8211; <a class=\"external free\" href=\"http:\/\/www.ecma-international.org\/memento\/tc39.htm\" rel=\"nofollow\">http:\/\/www.ecma-international.org\/memento\/tc39.htm<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Logo &#8211; <a class=\"external free\" href=\"https:\/\/people.eecs.berkeley.edu\/%7Ebh\/logo.html\" rel=\"nofollow\">https:\/\/people.eecs.berkeley.edu\/~bh\/logo.html<\/a><\/li>\n<li>LUA <a class=\"external free\" href=\"https:\/\/www.lua.org\/\" rel=\"nofollow\">https:\/\/www.lua.org\/<\/a> wiki, user groups<\/li>\n<li>Perl &#8211; <a class=\"external free\" href=\"https:\/\/www.perl.org\/\" rel=\"nofollow\">https:\/\/www.perl.org\/<\/a><\/li>\n<li>PHP &#8211; <a class=\"external free\" href=\"https:\/\/secure.php.net\/\" rel=\"nofollow\">https:\/\/secure.php.net\/<\/a><\/li>\n<li>Python &#8211; <a class=\"external free\" href=\"https:\/\/www.python.org\/\" rel=\"nofollow\">https:\/\/www.python.org\/<\/a><\/li>\n<li>RUBY &#8211; <a class=\"external free\" href=\"https:\/\/www.ruby-lang.org\/en\/\" rel=\"nofollow\">https:\/\/www.ruby-lang.org\/en\/<\/a><\/li>\n<li>RUST &#8211; <a class=\"external free\" href=\"https:\/\/www.rust-lang.org\/en-US\/\" rel=\"nofollow\">https:\/\/www.rust-lang.org\/en-US\/<\/a><\/li>\n<li>TROFF &#8211; <a class=\"external free\" href=\"https:\/\/troff.org\/\" rel=\"nofollow\">https:\/\/troff.org\/<\/a><\/li>\n<\/ul>\n<h5><span id=\"Other_tools\" class=\"mw-headline\">Other tools<\/span><\/h5>\n<ul>\n<li>Keystroke macros\n<ul>\n<li>Record and playback keystrokes<\/li>\n<li>Bob wants this to be programmable, depending on input processed<\/li>\n<li><a class=\"external text\" href=\"https:\/\/www.autoitscript.com\/site\/\" rel=\"nofollow\">AutoIT<\/a> does this on Windows<\/li>\n<li>Not many keystroke macro tools in Linux<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>Applications with embedded scripting\n<ul>\n<li><a class=\"external text\" href=\"https:\/\/musescore.org\/en\" rel=\"nofollow\">MuseScore<\/a> has scripting built into it<\/li>\n<li><a class=\"external text\" href=\"http:\/\/lilypond.org\/\" rel=\"nofollow\">Lilypond<\/a> has SCHEME or GUILE built in\n<ul>\n<li>Jon Kulp of Arkansas University uses Lilypond and other software with lots of scripting to create course material: <a class=\"external text\" href=\"http:\/\/hackerpublicradio.org\/eps.php?id=1909\" rel=\"nofollow\">Re-Invigorating the Wheel: Creating an Open, Embedded-Media Music Textbook for the Digital Age<\/a><\/li>\n<li><audio src=\"http:\/\/hackerpublicradio.org\/local\/hpr1909.ogg\" preload=\"\" controls=\"controls\" data-mce-fragment=\"1\"><\/audio><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4><span id=\"Future_Topics\" class=\"mw-headline\">Future Topics<\/span><\/h4>\n<ul>\n<li>November: <a title=\"Tech Wobblies\" href=\"https:\/\/sobac.com\/wiki\/Tech_Wobblies\">Tech Wobblies<\/a><\/li>\n<li>December: <a title=\"Social Night 2018\" href=\"https:\/\/sobac.com\/wiki\/Social_Night_2018\">Social Night 2018<\/a><\/li>\n<li>January: <a title=\"GDPR\" href=\"https:\/\/sobac.com\/wiki\/GDPR\">GDPR<\/a><\/li>\n<li>February: <a title=\"Network Security\" href=\"https:\/\/sobac.com\/wiki\/Network_Security\">Network Security<\/a>\n<ul>\n<li>Firewall software: pfSense, IPFire, Cisco, Fortinet, Juniper<\/li>\n<\/ul>\n<\/li>\n<li>March: <a title=\"Gaming\" href=\"https:\/\/sobac.com\/wiki\/Gaming\">Gaming<\/a>\n<ul>\n<li>What value do games have in the Non-Profit sector?<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Location: Room 1301 \u2014 Conrad Grebel University College, 140 Westmount Rd. N. \u00b7 Waterloo, ON N2L 3G6 (bottom floor, in the hallway that connects the main building to the Chapel-Residence building) Date: Monday, 20 August 2018 Time: 7:00-9:00PM Do you &hellip; <a href=\"https:\/\/kwnpsa.ca\/index.php\/2018\/08\/20\/2019-08-scripting-languages\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,62],"tags":[],"class_list":["post-400","post","type-post","status-publish","format-standard","hentry","category-pastmeetings","category-scripting-languages"],"_links":{"self":[{"href":"https:\/\/kwnpsa.ca\/index.php\/wp-json\/wp\/v2\/posts\/400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kwnpsa.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kwnpsa.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kwnpsa.ca\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kwnpsa.ca\/index.php\/wp-json\/wp\/v2\/comments?post=400"}],"version-history":[{"count":4,"href":"https:\/\/kwnpsa.ca\/index.php\/wp-json\/wp\/v2\/posts\/400\/revisions"}],"predecessor-version":[{"id":425,"href":"https:\/\/kwnpsa.ca\/index.php\/wp-json\/wp\/v2\/posts\/400\/revisions\/425"}],"wp:attachment":[{"href":"https:\/\/kwnpsa.ca\/index.php\/wp-json\/wp\/v2\/media?parent=400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kwnpsa.ca\/index.php\/wp-json\/wp\/v2\/categories?post=400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kwnpsa.ca\/index.php\/wp-json\/wp\/v2\/tags?post=400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}