The reason Ken Thompson wrote the Thompson Shell (/bin/sh) when he and the team at Bell Labs developed Unix was that they didn’t want to have to teach programming to people in the patent office, who funded the PDP they used to write Unix. Shell environments evolved over the years with tcsh, bash, and zsh to name a few. These added more concepts from programming environments, like the environment from C that the binaries they exposed were compiled in. Other languages emerged that were simpler than a language like C but added new techniques – and so perl, python, ruby, and others evolved. Some of those were either object-oriented from…
-
-
Hello Swift
Let’s do a typical Hello World example in Swift. I have Xcode installed, so I can invoke a swift environment using xcrun, a command to start an interactive Xcode environment and then defining swift as the language I want to use, as follows using a standard Mac terminal session: $xcrun swift Then I get a welcome screen, which is kind: Welcome to Apple Swift version 2.1.1 (swiftlang-700.1.101.15 clang-700.1.81). Type :help for assistance. Then, I can throw some string into a variable: 1> let mystring = "Hello Swift" And I get a response that the string was accepted, as a string: mastering: String = "Hello Swift" Then I can just echo…
-
Hello angularjs
When I was just getting started with AngularJS, I found jsfiddle.net, a site that allows you to enter some code and run it straight from a browser. So, what do you do first: Hello World of course. This one with a little input twist… <!DOCTYPE html> <html ng-app> <head> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> </head> <body> Enter Your Name: <input type="text" ng-model="name" /> <h1>Hello {{ name }}</h1> </body> </html>
-
Happy Holidays
Merry Christmas and to all a good night! <html> <head> <title>Merry Christmas</title> <script type="text/javascript"> function MerryChristmas() { alert ("Merry Christmas!"); } </script> </head> <body> <a href="javascript:MerryChristmas()">MerryChristmas</a> </body> </html>
-
Hello Cruel Perl
touch helloperl.pl Open helloperl.pl and paste the following in there: print "Hello Cruel Perln"; Make sure you have executable permissions for helloperl.pl. Then run: perl helloperl.pl
-
Good Morning, Ruby
Create a file called goodmorning.rb and paste the following into it: #!/usr/bin/env ruby puts 'Good Morning' Make the file executable for your user. Then run the file (let’s just say it’s on the desktop of a user named admin): /Users/admin/Desktop/goodmorning.rb That’s all for this morning…
-
Scripting in Google ChromeOS
I recently got my hands on one of those Google ChromeBooks (Cr-48). Interesting to have an operating system that is just a web browser. But, as anyone likely reading this article already knows, the graphical interface is the web browser and the operating system is still Linux. But what version? Well, let’s go on a journey together. First, you need ChromeOS. If you’ve got a ChromeBook this is a pretty easy thing to get. If not, check http://getchrome.eu/download.php for a USB or optical download that can be run live (or even in a virtual machine). Or, if you know that you’re going to be using a virtual machine, consider a pre-built…