{"id":65390,"date":"2024-11-08T03:01:00","date_gmt":"2024-11-07T17:01:00","guid":{"rendered":"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=65390"},"modified":"2024-11-07T11:11:09","modified_gmt":"2024-11-07T01:11:09","slug":"tcl-and-javascript-and-php-calculator-almalinux-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/tcl-and-javascript-and-php-calculator-almalinux-tutorial\/","title":{"rendered":"Tcl and Javascript and PHP Calculator AlmaLinux Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/calculator.php\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Tcl and Javascript and PHP Calculator AlmaLinux Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/calculator_more.gif\" title=\"Tcl and Javascript and PHP Calculator AlmaLinux Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Tcl and Javascript and PHP Calculator AlmaLinux Tutorial<\/p><\/div>\n<p>We want to research the wonderful &#8230;<\/p>\n<ul>\n<li><a target=\"_blank\" title='Tcl information from Wikiepedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Tcl' rel=\"noopener\">tcl<\/a> &#8230; programming language often accessed via the &#8220;tclsh&#8221; shell &#8230; and accompanying &#8230;<\/li>\n<li>tk &#8230; via &#8220;wish&#8221; and\/or tkinter GUI side<\/li>\n<\/ul>\n<p> &#8230; on the AlmaLinux environment of the Apache\/PHP\/MySql web server we&#8217;re using here to host the RJM Programming domain.<\/p>\n<p>We&#8217;re just touching on <i>tcl<\/i> ideas today, revisiting <a title='Tcl and Javascript and PHP Calculator Tutorial' href='#tjphpct'>Tcl and Javascript and PHP Calculator Tutorial<\/a>&#8216;s calculator web application.  We had in there some code scouring any local web server systems you may have, and getting the localhost<i>:8888<\/i> port arrangements wrong for our local <a target=\"_blank\" title='MAMP for Apache\/PHP\/MySql on Mac OS X local web server' href='http:\/\/www.mamp.info' rel=\"noopener\">MAMP<\/a> Apache\/PHP\/MySql web server, and this was causing unnecessary issues, especially because &#8220;tclsh&#8221; works, for us, up at AlmaLinux.  How can we tell?  We took on the excellent advice of <a target=\"_blank\" href='https:\/\/docs.redhat.com\/en\/documentation\/red_hat_enterprise_linux\/9\/html\/installing_and_using_dynamic_programming_languages\/assembly_installing-tcl-tk_installing-and-using-dynamic-programming-languages#proc_installing-tk_assembly_installing-tcl-tk' title='Installing Tcl\/Tk' rel=\"noopener\">Installing Tcl\/Tk<\/a>, and tried &#8230;<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/calculator_check.gif\"><\/img><\/p>\n<p><code><br \/>\ntclsh<br \/>\n<\/code><\/p>\n<p> &#8230; on the command line (and &#8220;exit&#8221; gets you out of it) with success.  Yayyyyy!!!  That&#8217;s tcl installed already, else we&#8217;d have gone <i>dnf install tcl<\/i><\/p>\n<p>That&#8217;s enough installing for today&#8217;s purposes, as we do not call on the <i>tk<\/i> GUI side of things for our calculator.  But, to check on the install part to this, try &#8230;<\/p>\n<p><code><br \/>\nwish<br \/>\n<\/code><\/p>\n<p> &#8230; on the command line, and check that there is a wish<sub>ful<\/sub> response whether that be erroneous <font size=1>(as we were, so far, with AlmaLinux command line)<\/font> or not, else we&#8217;d have gone <i>dnf install tk<\/i><\/p>\n<p>All that sorted, and we&#8217;re &#8220;good to go&#8221; with <a target=\"_blank\" title='calculator.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/calculator.php---GETME\" rel=\"noopener\">the changed<\/a> <a target=\"_blank\" title='calculator.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/calculator.php---GETME\" rel=\"noopener\">calculator.php<\/a> <a target=\"_blank\" title='calculator.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/calculator.php\" rel=\"noopener\">Calculator<\/a> web application calling on our unchanged <a target=\"_blank\" title='calculator.tcl' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/calculator.tcl_GETME\" rel=\"noopener\">calculator.tcl<\/a> TCL source code, as below &#8230;<\/p>\n<p><iframe style=width:95%;height:300px; src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/calculator.php\" rel=\"noopener\"><\/iframe><\/p>\n<p>Another woooorrrrlllldddd, perhaps?!<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=\"_blank\" href='\/\/www.rjmprogramming.com.au\/ITblog\/tcl-and-javascript-and-php-calculator-almalinux-tutorial\/' rel=\"noopener\">Tcl and Javascript and PHP Calculator AlmaLinux Tutorial<\/a>.<\/p-->\n<hr>\n<p id='tjphpct'>Previous relevant <a target=\"_blank\" title='Tcl and Javascript and PHP Calculator Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/tcl-and-javascript-and-php-calculator-tutorial\/' rel=\"noopener\">Tcl and Javascript and PHP Calculator Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/calculator.php\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Tcl and Javascript and PHP Calculator Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/calculator_more.jpg\" title=\"Tcl and Javascript and PHP Calculator Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Tcl and Javascript and PHP Calculator Tutorial<\/p><\/div>\n<p>It&#8217;s a &#8220;blown mind&#8221; that has led me to involve Javascript to make the incarnation of our calculator of <a title='Tcl and PHP Calculator Tutorial' href='#tphpct'>Tcl and PHP Calculator Tutorial<\/a> allow for some round bracket functionality around the TCL (expr) &#8220;kernel&#8221; <font size=1>(sorry, Unix &#8230; my apologies <a target=\"_blank\" title='?' href='https:\/\/www.youtube.com\/watch?v=Wd-p8RUEo-Y' rel=\"noopener\"><strike>Linus<\/strike><\/a>Linux)<\/font>.  The nexus between what a user may enter, versus the hierarchy needs of TCL&#8217;s expr command just blew my mind, <strike>man<\/strike>person!<\/p>\n<p>So what did we turn to?  <a target=\"_blank\" title='?' href='https:\/\/www.google.com.au\/search?client=firefox-b-ab&#038;dcr=0&#038;biw=1280&#038;bih=674&#038;ei=QGnRWqafMIiq8QWY5qGgCA&#038;q=ending+English+sentence+with+preposition&#038;oq=ending+English+sentence+with+preposition&#038;gs_l=psy-ab.3...12240.23916.0.24046.40.29.0.0.0.0.548.4556.0j2j9j3j0j2.16.0....0...1c.1.64.psy-ab..24.16.4546...0j35i39k1j0i67k1j0i131k1j0i131i46k1j46i131k1j0i131i67k1j0i20i263k1j0i22i30k1j0i8i13i30k1j33i22i29i30k1.0.eMs3Y1UdjfU' rel=\"noopener\">Modernizing<\/a> one&#8217;s thinking?  We&#8217;re onto it?  But we digress.  <a target=\"_blank\" title='?' href='https:\/\/www.google.com.au\/search?client=firefox-b-ab&#038;dcr=0&#038;biw=1280&#038;bih=674&#038;ei=XWnRWtCoI4a98QWBwJiIDg&#038;q=starting+English+sentence+with+but&#038;oq=starting+English+sentence+with+but&#038;gs_l=psy-ab.3..33i22i29i30k1l6.118128.124600.0.124744.11.10.0.0.0.0.350.978.0j1j2j1.4.0....0...1c.1.64.psy-ab..7.1.216....0.fU1yqbht2TI' rel=\"noopener\">Well<\/a>, well.<\/p>\n<p>We turned to Javascript&#8217;s <a target=\"_blank\" href='http:\/\/www.w3schools.com\/jsref\/jsref_eval.asp' title='Javascript eval' rel=\"noopener\">eval<\/a> function, not PHP&#8217;s <a target=\"_blank\" title='PHP eval method information' href='http:\/\/php.net\/manual\/en\/function.eval.php' rel=\"noopener\">eval<\/a>, nor TCL&#8217;s <a target=\"_blank\" title='TCL eval' href='http:\/\/wiki.tcl.tk\/eval' rel=\"noopener\">eval<\/a> version, thanks, but no thanks.  Nevertheless <font size=1>&#8230; and didn&#8217;t you just know that &#8220;but&#8221; would be insulted by the paragraph above?! &#8230;<\/font> use of Javascript eval (for round bracketing scenarios or operator hierarchy scenarios) is not the &#8220;cakewalk&#8221; that you may imagine.  That is because &#8230;<\/p>\n<p><code><br \/>\n6 ** 2 \/\/ in TCL \"to the power of\" operator syntax (which remains our web application display choice for the user) has ...<br \/>\nMath.<a target=\"_blank\" title='Math.pow() information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/jsref_pow.asp' rel=\"noopener\">pow<\/a>(6, 2)  \/\/ Javascript equivalent (behind the scenes)<br \/>\n<\/code><\/p>\n<p> &#8230; so we need to cater for that possibility.  The Javascript logic is called at the document.body <a target=\"_blank\" title='Javascript event onload information from w3schools' href='http:\/\/www.w3schools.com\/tags\/ev_onload.asp' rel=\"noopener\"><i>onload<\/i><\/a> event.<\/p>\n<p>As <a target=\"_blank\" title='An Interpretive Style of Web Programming Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/an-interpretive-style-of-web-programming-tutorial\/' rel=\"noopener\">we often do here<\/a>, the &#8220;progression&#8221; of logic was to convert some &#8220;hardcoded&#8221; HTML text (specifically &#8220;First Number:&#8221; and &#8220;:Second Number&#8221;) into HTML select (dropdown) elements to the left and to the right (respectively) of the &#8220;TCL kernel&#8221;, with additional options for the round bracketing the user may want.  These dropdowns move out to the edges of the webpage as they make room for user entered additions to the calculation complexity of what they want to calculate.  The &#8220;Math.pow()&#8221; logic needed benefits from the event timing thoughts on the dropdown&#8217;s <i>onchange<\/i> event logic, otherwise you&#8217;d be doing that dreaded of all dreadeds, in many programmers&#8217; worlds methinks, tracking back through entered &#8220;calculator equation&#8221; texts to discover when a numerical value becomes an operator, a horrible job when a minus sign can be either, for example.  These same &#8220;horrible&#8221; programming tasks would have been at the fore to making a &#8220;TCL only backend solution&#8221; come to pass, we are sure, too.<\/p>\n<p>Can you see from all this how well (clientside) Javascript works with (serverside) PHP?  They are a very potent duo, because it is like two bites at the cherry, every time, with their different timings of the application of their logics.<\/p>\n<p>The downloadable PHP source code <a target=\"_blank\" title='calculator.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/calculator.php-GETME\" rel=\"noopener\">calculator.php<\/a> changed <a target=\"_blank\" title='calculator.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/calculator.php-GETME\" rel=\"noopener\">this way<\/a> to achieve this extension of functionality still supervising an unchanged <a target=\"_blank\" title='calculator.tcl' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/calculator.tcl_GETME\" rel=\"noopener\">calculator.tcl<\/a> TCL source code script, and here is a <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/calculator.php\" title=\"Click picture\" rel=\"noopener\">live run<\/a> link for you to try this calculator for yourself.<\/p>\n<hr>\n<p id='tphpct'>Previous relevant <a target=\"_blank\" title='Tcl and PHP Calculator Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/tcl-and-php-calculator-tutorial\/' rel=\"noopener\">Tcl and PHP Calculator Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/calculator.php\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Tcl and PHP Calculator Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/TCL\/calculator.jpg\" title=\"Tcl and PHP Calculator Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Tcl and PHP Calculator Tutorial<\/p><\/div>\n<p>The <a title='Tcl and PHP Primer Tutorial' href='#tphppt'>Tcl and PHP Primer Tutorial<\/a> was a foretaste to today&#8217;s calculator web application that &#8230;<\/p>\n<ul>\n<li>uses PHP as a frontend and (HTML) form navigation destination &#8230;<\/li>\n<li>connects to backend via PHP <a target=\"_blank\" title='PHP exec() method information' href='http:\/\/php.net\/manual\/en\/function.exec.php' rel=\"noopener\">exec<\/a> &#8230;<\/li>\n<li>uses TCL as backend &#8230; via &#8230;<br \/>\n<code><br \/>\nexec(\"tclsh <a target=\"_blank\" href='http:\/\/www.rjmprogramming.com.au\/PHP\/calculator.tcl_GETME' title='calculator.tcl' rel=\"noopener\">calculator.tcl<\/a> &lt; calculator.txt | tail -1 &gt; calculator.out\");<br \/>\n<\/code>\n<\/li>\n<\/ul>\n<p>Crucial to the TCL&#8217;s backend role is TCL&#8217;s <a target=\"_blank\" title='Tcl expr command information' href='https:\/\/www.tcl.tk\/man\/tcl\/TclCmd\/expr.htm' rel=\"noopener\">expr<\/a> command, as a determinant regarding what today&#8217;s calculator is capable of.<\/p>\n<p>Here is a link to some downloadable PHP source code <a target=\"_blank\" title='calculator.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/calculator.php_GETME\" rel=\"noopener\">calculator.php<\/a> supervising <a target=\"_blank\" title='calculator.tcl' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/calculator.tcl_GETME\" rel=\"noopener\">calculator.tcl<\/a> TCL source code, and here is a <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/calculator.php\" title=\"Click picture\" rel=\"noopener\">live run<\/a> link.<\/p>\n<hr>\n<p id='tphppt'>Previous relevant <a target=\"_blank\" title='Tcl and PHP Primer Tutorial ... http:\/\/www.tcl.tk\/software\/tcltk\/' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/tcl-and-php-primer-tutorial-...-http:\/\/www.tcl.tk\/software\/tcltk\/\/' rel=\"noopener\">Tcl and PHP Primer Tutorial &#8230; http:\/\/www.tcl.tk\/software\/tcltk\/<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/TCL\/domain.php\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Tcl and PHP Primer Tutorial ... http:\/\/www.tcl.tk\/software\/tcltk\/\" src=\"http:\/\/www.rjmprogramming.com.au\/TCL\/domain.jpg\" title=\"Tcl and PHP Primer Tutorial ... http:\/\/www.tcl.tk\/software\/tcltk\/\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Tcl and PHP Primer Tutorial ... http:\/\/www.tcl.tk\/software\/tcltk\/<\/p><\/div>\n<p>Have you heard of <a target=\"_blank\" title='Tcl\/Tk landing page' href='http:\/\/www.tcl.tk\/software\/tcltk\/' rel=\"noopener\">Tcl\/Tk?<\/a>   Think maybe you could introduce yourself to it with <a target=\"_blank\" href='#tsbpt' title='Tcl\/Tk So Brilliant (but where do you start?) Primer Tutorial' rel=\"noopener\">Tcl\/Tk So Brilliant (but where do you start?) Primer Tutorial<\/a> as shown below.<\/p>\n<p>The Tcl in Tcl\/Tk refers to the scripting side of things, while the Tk is a GUI framework.   On some (maybe lots) of Linux or unix web servers, such as the one for this domain here at www.rjmprogramming.com.au Tcl scripting is available and that means Tcl could be used by PHP, as a server side language to use the <a target=\"_blank\" title='PHP exec information' href='http:\/\/php.net\/manual\/en\/function.exec.php' rel=\"noopener\"><i>exec<\/i><\/a> method to ask something of Tcl and get something back, half of which is the arrangement we&#8217;d like to have when feeding our babies.<\/p>\n<p>Today we write a webpage for finding the Country of Origin of a designated URL where PHP supervises Tcl:<\/p>\n<ol>\n<li>ask for a URL in PHP,<\/li>\n<li>send that to the same PHP with a different call &#8230;<\/li>\n<li>and use PHP exec method to send a Tcl commend line command to Tclsh and output this to a file known by the PHP,<\/li>\n<li>get the PHP to read the file of step 3. and send that information in a modified call of this same PHP,<\/li>\n<li>write out the Tcl based findings to the webpage in PHP,<\/li>\n<li>ask for a URL in PHP<\/li>\n<\/ol>\n<p>Here is a link to some downloadable PHP source code <a target=\"_blank\" title='domain.php' href=\"http:\/\/www.rjmprogramming.com.au\/TCL\/domain.php_GETME\" rel=\"noopener\">domain.php<\/a> supervising <a target=\"_blank\" title='domain.tcl' href=\"http:\/\/www.rjmprogramming.com.au\/TCL\/domain.tcl_GETME\" rel=\"noopener\">domain.tcl<\/a> TCL source code, and here is a <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/TCL\/domain.php\" title=\"Click picture\" rel=\"noopener\">live run<\/a> link.<\/p>\n<p>Thanks to:<\/p>\n<ul>\n<li><a target=\"_blank\" title='link' href='http:\/\/zetcode.com\/lang\/tcl\/flowcontrol\/' rel=\"noopener\">Flow control in Tcl<\/a><\/li>\n<li><a target=\"_blank\" title='link' href='http:\/\/dbaspot.com\/shell\/362549-tcsh-argv-loses-quotes-messes-argument-grouping-up.html' rel=\"noopener\">[tcsh] $argv loses quotes, messes argument grouping up<\/a><\/li>\n<li><a target=\"_blank\" title='link' href='http:\/\/bin-co.com\/tcl\/articles\/variables_in_arrays.php' rel=\"noopener\">Using Variables in Associative Arrays<\/a><\/li>\n<li><a target=\"_blank\" title='link' href='http:\/\/docstore.mik.ua\/orelly\/unix3\/upt\/ch37_05.htm' rel=\"noopener\">Quoting and Command-Line Parameters<\/a><\/li>\n<li><a target=\"_blank\" title='link' href='http:\/\/books.google.com.au\/books?id=BJpkh3RdG_UC&#038;pg=PA45&#038;lpg=PA45&#038;dq=%22tclsh+split%22&#038;source=bl&#038;ots=PpQlwTydXv&#038;sig=NIqU0g5LTutl9QEmakxbRCxVhpw&#038;hl=en&#038;sa=X&#038;ei=OSk_VJXRLMLCmQWms4DACA&#038;ved=0CB8Q6AEwAA' rel=\"noopener\">Exploring Expect: A Tcl-based Toolkit for Automating Interactive Programs<\/a><\/li>\n<li><a target=\"_blank\" title='link' href='http:\/\/tmml.sourceforge.net\/doc\/tcl\/split.html' rel=\"noopener\">Split a string into a proper Tcl list<\/a><\/li>\n<li><a target=\"_blank\" title='link' href='http:\/\/en.wikipedia.org\/wiki\/Country_code_top-level_domain' rel=\"noopener\">Country code top-level domain<\/a><\/li>\n<li><a target=\"_blank\" title='link' href='http:\/\/www.thrall.org\/domains.htm' rel=\"noopener\">Top Level Domain Names and Country Codes<\/a><\/li>\n<li><a target=\"_blank\" title='link' href='http:\/\/www.tutorialspoint.com\/tcl-tk\/pdf\/tcl_strings.pdf' rel=\"noopener\">Tcl &#8211; Strings<\/a><\/li>\n<\/ul>\n<hr \/>\n<p id='tsbpt'>Previous relevant <a target=\"_blank\" href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=664' title='Tcl\/Tk So Brilliant (but where do you start?) Primer Tutorial' rel=\"noopener\">Tcl\/Tk So Brilliant (but where do you start?) Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/TCL\/MacExample\/\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Tcl\/Tk So Brilliant (but where do you start?) Primer Tutorial ... http:\/\/www.tcl.tk\/software\/tcltk\/\" src=\"http:\/\/www.rjmprogramming.com.au\/TCL\/MacExample\/TCL_Example_1of.png\" title=\"Tcl\/Tk So Brilliant (but where do you start?) Primer Tutorial ... http:\/\/www.tcl.tk\/software\/tcltk\/\"  style=\"float:left;\" \/><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Tcl\/Tk So Brilliant (but where do you start?) Primer Tutorial ... http:\/\/www.tcl.tk\/software\/tcltk\/\" src=\"http:\/\/www.rjmprogramming.com.au\/TCL\/MacExample\/TCL_Example_4of.png\" title=\"Tcl\/Tk So Brilliant (but where do you start?) Primer Tutorial ... http:\/\/www.tcl.tk\/software\/tcltk\/\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Tcl\/Tk So Brilliant (but where do you start?) Primer Tutorial ... http:\/\/www.tcl.tk\/software\/tcltk\/<\/p><\/div>\n<p>Have you heard of Tcl\/Tk?<\/p>\n<blockquote><p>Tcl\/Tk is open source (based on a BSD-style license), so you can use it and modify it virtually any way you want, including for commercial uses.<\/p><\/blockquote>\n<p>With Tcl\/Tk have used in conjunction with C++ and Python (look out for Tkinter).<\/p>\n<p>Use it for Games Programming (it makes pretty cute GUIs &#8230; you may disagree?!) and it used to work back at Mac OS X 10.5.8\/XCode 3.0 (am going to try Mac OS X 10.7.5 &#8230; any advice anywhere?) and had it going on Windows XP with Visual Studio Express as well.   It has a lot of cross-platform strengths.<\/p>\n<p>Think Tcl\/Tk is really really good.<\/p>\n<p>In this primer  <a target=\"_blank\" title='click picture' href='http:\/\/www.rjmprogramming.com.au\/TCL\/MacExample\/' rel=\"noopener\">tutorial<\/a> you can see a Draw Poker game as an XCode project, see it Build and in action, then see how to arrange for *.dmg Package Distribution via Package Manager.<\/p>\n<p>Link to Tcl\/Tk website &#8230; <a target=\"_blank\" href='http:\/\/www.tcl.tk\/software\/tcltk\/' title='Home of Tcl\/Tk' rel=\"noopener\">Home of Tcl\/Tk &#8230; where quote up the top resides<\/a><br \/>\nLink to Tcl\/Tk jobs done &#8230; <a target=\"_blank\" href='http:\/\/www.rjmprogramming.com.au\/TCL\/' title='Examples of use of Tcl\/Tk' rel=\"noopener\">Tcl\/Tk jobs done<\/a> &#8230; personal experience\n<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d664' onclick='var dv=document.getElementById(\"d664\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?cat=51\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d664' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d10261' onclick='var dv=document.getElementById(\"d10261\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=Tcl\/Tk\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10261 style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d37343' onclick='var dv=document.getElementById(\"d37343\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/exec\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d37343' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d37406' onclick='var dv=document.getElementById(\"d37406\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/javascript\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d37406' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d65390' onclick='var dv=document.getElementById(\"d65390\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/tcl\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d65390' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We want to research the wonderful &#8230; tcl &#8230; programming language often accessed via the &#8220;tclsh&#8221; shell &#8230; and accompanying &#8230; tk &#8230; via &#8220;wish&#8221; and\/or tkinter GUI side &#8230; on the AlmaLinux environment of the Apache\/PHP\/MySql web server we&#8217;re &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/tcl-and-javascript-and-php-calculator-almalinux-tutorial\/\">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":[12,29,37],"tags":[4855,85,2251,234,4843,611,652,752,2394,2269,2181,932,997,1245,1319],"class_list":["post-65390","post","type-post","status-publish","format-standard","hentry","category-elearning","category-operating-system","category-tutorials","tag-almalinux","tag-apache","tag-calculator","tag-command-line","tag-dnf","tag-install","tag-javascript","tag-mathematics","tag-number","tag-operator","tag-package-manager","tag-php","tag-programming","tag-tcl","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/65390"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=65390"}],"version-history":[{"count":9,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/65390\/revisions"}],"predecessor-version":[{"id":65400,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/65390\/revisions\/65400"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=65390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=65390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=65390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}