SlideShare a Scribd company logo
1 of 34
Download to read offline
The Universal Developer
Deploying Modern Solutions on the Mac
Kevin Walzer
Overview
● About myself
● Why the Mac?
● Brief history of Tcl/Tk
on the Mac
● Carbon port
● Cocoa port
● Tk-Cocoa 2.0
● State of Tk/Mac at present
● Tk/Mac applications
● Best practices for
developing Tk on the Mac
● Optimizing a Tk app on OS
X: A case study
● Looking to the future
About me
● Kevin Walzer
● www.codebykevin.com
● Developing Tcl/Tk apps
on Mac since 2004
● Developing Tcl/Tk
extensions since 2006
● Took over as Tk-Mac
maintainer in 2011
Why the Mac?
● Apple now largest company in world by stock valuation
● Massive success of iPhone/iPad and increasing penetration of
enterprise market is causing large companies to take another
look
● IBM deploying 1,900 Macs per week, has rolled out 130,000 units
company-wide, up to 200,000 when project done
● Requires only 24 help-desk techs
● 5% of Mac users need help; 40% of Win users do
Brief history of Tcl/Tk
● Created by John Osterhout at UC-Berkeley in
late 1980s on Unix
● Osterhout left academe for Sun Microsystems
in mid-1990s; Tk ported to Mac and Windows
● Unix (X11) and Windows ports highly stable;
Mac has gone through several major transitions
Mac port: Classic
●
Tk ported to Mac by
Roy Johnson using
Toolbox API
●
Mid-1990s
● Tk GUI on Classic Mac OS
Carbon port
● Called “Tk Aqua”
● Ported by Jim Ingham
and Ian Reid, sponsored
by Apple
● October 2001
● Relatively-quick
“Carbonizing” of Tk with
updated Toolbox API for
OS X
Carbon port
● Daniel Steffen takes over as lead
maintainer
● April 2007: Completes major
modernization of Carbon port,
removing deprecated “Classic”
API’s
● June 2007: Apple announces
deprecation of Carbon API’s in
favor of Cocoa API’s: Carbon will
be supported as 32-bit API only,
Cocoa will be supported as 64-bit
● Many developers unhappy
Cocoa port
● Apple hires Daniel Steffen to port Tk from
Carbon to Cocoa
● Begins work September 2008, announces
release April 2009
● Ensures Tk’s viability on OS X with 64-bit
support
Benefits of Cocoa port
● Can do things Carbon port
cannot
● Better UI integration
● Native icons/bitmaps
● Native window behavior
● Easier to integrate with
other Cocoa API’s
● 64-bit support/long term
viability
2010-2013: Cocoa issues
● More complex design than
Carbon
● High-level widgets and event
loop do not map neatly to Tk’s
low-level, draw-everything
model
● Tk often freezes at random
intervals, especially when
event loop overloaded
● Drawing sometimes displays
artifacts
2010-2013 Cocoa issues
● Use of private API’s
prevents deploying Tk-
Cocoa apps in Mac App
Store
● Author of port, Daniel
Steffen, hired by Apple
full time and can no
longer works on Tk
● Other developers lack
expertise to address
issues
Tk-Cocoa 2.0
● Decided to remove private API’s
● Removal revealed numerous flaws; Tk was
seriously broken
● Re-implementing several Tk widgets with
alternative API solved many of these issues
● Converted button, menubuttons and scrolling
to HITheme
Tk-Cocoa 2.0
● Cocoa design: NSWindow (toplevel) wraps NSView (window
content/client area)
● Tk uses single NSView for drawing child windows in a toplevel
● Buttons and scrolling were additional NSViews with their own
hierarchy of subviews
● Tk could not handle this complexity
● HITheme is a drawing-only API; ttk themed widgets already use it
● Much simpler to render widgets only and delegate widget behavior
to Tk
● HITheme is a relic of Carbon that was not removed because it is
useful for custom drawing
Tk-Cocoa 2.0
● Marc Culler, Python and Tkinter developer,
began contributing numerous patches to fix
and improve various aspects of Cocoa port:
image rendering, event processing, scrolling,
memory management
● Did not keep every one of his changes but
there was so much iteration that he earned a
co-author credit on Tk-Cocoa
Tk-Cocoa at present
● Finally stable: 8.6.5 will mark point release of
stable Tk/Mac
● Rapid, heavy development phase complete
Tcl/Tk apps on OS X -
Commercial
● Bitrock uses Tcl/Tk
for its Installbuilder
product and Bitnami
open-source
distributions
● www.bitrock.com
Tcl/Tk apps on OS X -
Commercial
● ActiveState uses
Tcl/Tk for the GUI on
its developer tools
● www.activestate.com
Tcl/Tk apps on OS X -
Commercial
● Farmer’s Wife, a
facilities management
application
● www.farmerswife.com
Tcl/Tk apps on OS X -
Commercial
● All of my own
applications at
www.codebykevin.com
use Tk GUI’s
Tcl/Tk apps on OS X – Open
Source
●
Password Gorilla
● https://github.com/zdia/g
● Password manager
Tcl/Tk apps on OS X – Open
Source
● SnapPy, a
scientific/molecular
visualizer
http://www.math.uic.
edu/t3m/SnapPy/
Tcl/Tk apps on OS X – Open
Source
● IDLE, Python’s IDE
bundled with the
programming language
● Probably the most
widely-used Tk
application on OS X:
source of many bug
reports against Tk
Best practices for developing
Tcl/Tk apps on OS X
● Mac users place a premium on the user
experience and user interface
● Mac platform has interface guidelines that
most apps conform to
● While Tk is cross-platform, a little extra work
will make your app work much better in the
Mac environment and will make Mac users
more comfortable using it.
Best practices for developing
Tcl/Tk apps on OS X
● Use a Mac application structure - starpack
|-- StarkitApp.app
| `-- Contents
| |-- Info.plist <-----XML file with app configuration data
| |-- MacOS
| | `-- starpack <-----executable
| `-- Resources
| `-- StarkitApp.icns
Best practices for developing
Tcl/Tk apps on OS X
● Use a Mac application structure – standalone
build of Wish
|-- WishApp.app
| `-- Contents
| |-- Info.plist <-----XML file with app configuration data
| |-- Frameworks
| `--Tcl.framework
| `--Tk.framework
| |--libs
| `--auto_path libs
| |-- MacOS
| | `-- WishApp <-----executable
| `-- Resources
| `-- WishApp.icns
Best practices for developing
Tcl/Tk apps on OS X
● More information on app bundles and
deployment:
http://www.codebykevin.com/tutorial.html
Best practices for developing
Tcl/Tk apps on OS X
● Keyboard accelerators: use Command instead
of Control
● Menu items:
if { [tk windowingsystem] == "aqua"} {
proc ::tk::mac::ShowPreferences {} {
prefs_dialog_command
}
proc ::tk::mac::Quit {} {
exit
}
proc tk::mac::ShowHelp {} {
user_help_cmd
}
}
Optimizing a Tk app on OS X: A case study
● Manpower, a man page
viewer
● Similar functionality to TkMan:
provides tools for searching,
browsing, and viewing man
pages, using the rman tool
wrapped by a Tk GUI
● No source code in common;
design similarities end with
use of rman
Optimizing a Tk app on OS X: A case study
● Manpower makes use of many Mac-specific
API’s: scriptable via AppleScript and Services
interfaces, supports native printing, supports
native fullscreen API via window manager
● Tk extension packages for these API’s at
http://fossil.codebykevin.com -- look for tk-
components repo
Looking to the future
● Main priorities for Tk: Keep up to date with
Mac API churn
● Now that it is reasonably stable, I do not
anticipate making radical changes
● Tk will likely continue to require more
maintenance on Mac than Windows or X11
Change in programming
languages
● Apple has added a new language,
Swift, that they are positioning as the
development language of the future
● They likely will continue to support
Objective-C and C indefinitely as
millions and millions of lines of code
are written in these languages
● Objective-C will likely not undergo
further enhancement
Implications of Swift for Tcl/Tk
● The move to Swift does not present as many
issues for Tk as the switch from Carbon to
Cocoa, which was an existential threat
● Cocoa vs. Carbon was an API shift; Swift is still
Cocoa
● Swift seems more analogous to C-Sharp on
Windows
Questions and thanks
● I am happy to answer any questions.
● Thanks for your interest.

More Related Content

What's hot

.NET Applications & Cloud Meetup at 7 Peaks
.NET Applications & Cloud Meetup at 7 Peaks.NET Applications & Cloud Meetup at 7 Peaks
.NET Applications & Cloud Meetup at 7 PeaksSeven Peaks Speaks
 
Using latest LibreOffice on openSUSE Leap 15 - by modern packaging systems
Using latest LibreOffice on openSUSE Leap 15 - by modern packaging systemsUsing latest LibreOffice on openSUSE Leap 15 - by modern packaging systems
Using latest LibreOffice on openSUSE Leap 15 - by modern packaging systemsNaruhiko Ogasawara
 
Symfony2 3rd-Party Bundles
Symfony2 3rd-Party BundlesSymfony2 3rd-Party Bundles
Symfony2 3rd-Party BundlesHidenori Goto
 
Introduction to TensorFlow Lite
Introduction to TensorFlow Lite Introduction to TensorFlow Lite
Introduction to TensorFlow Lite Koan-Sin Tan
 
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZEJeff Squyres
 
"Using TensorFlow Lite to Deploy Deep Learning on Cortex-M Microcontrollers,"...
"Using TensorFlow Lite to Deploy Deep Learning on Cortex-M Microcontrollers,"..."Using TensorFlow Lite to Deploy Deep Learning on Cortex-M Microcontrollers,"...
"Using TensorFlow Lite to Deploy Deep Learning on Cortex-M Microcontrollers,"...Edge AI and Vision Alliance
 
Open MPI State of the Union X SC'16 BOF
Open MPI State of the Union X SC'16 BOFOpen MPI State of the Union X SC'16 BOF
Open MPI State of the Union X SC'16 BOFJeff Squyres
 
走向开源:提交CPAN模块Step by Step
走向开源:提交CPAN模块Step by Step走向开源:提交CPAN模块Step by Step
走向开源:提交CPAN模块Step by Steppluschen
 
The State of libfabric in Open MPI
The State of libfabric in Open MPIThe State of libfabric in Open MPI
The State of libfabric in Open MPIJeff Squyres
 
LCA14: LCA14-403: Importance of migrating external projects used in Android t...
LCA14: LCA14-403: Importance of migrating external projects used in Android t...LCA14: LCA14-403: Importance of migrating external projects used in Android t...
LCA14: LCA14-403: Importance of migrating external projects used in Android t...Linaro
 
Docker and .NET Core - Best Friends Forever - Michael Newton - Codemotion Rom...
Docker and .NET Core - Best Friends Forever - Michael Newton - Codemotion Rom...Docker and .NET Core - Best Friends Forever - Michael Newton - Codemotion Rom...
Docker and .NET Core - Best Friends Forever - Michael Newton - Codemotion Rom...Codemotion
 
Understanding Android Benchmarks
Understanding Android BenchmarksUnderstanding Android Benchmarks
Understanding Android BenchmarksKoan-Sin Tan
 
Types - slice, map, new, make, struct - Gopherlabs
Types - slice, map, new, make, struct - Gopherlabs Types - slice, map, new, make, struct - Gopherlabs
Types - slice, map, new, make, struct - Gopherlabs sangam biradar
 
.NET Core Blimey! (Shropshire Devs Mar 2016)
.NET Core Blimey! (Shropshire Devs Mar 2016).NET Core Blimey! (Shropshire Devs Mar 2016)
.NET Core Blimey! (Shropshire Devs Mar 2016)citizenmatt
 

What's hot (20)

.NET Applications & Cloud Meetup at 7 Peaks
.NET Applications & Cloud Meetup at 7 Peaks.NET Applications & Cloud Meetup at 7 Peaks
.NET Applications & Cloud Meetup at 7 Peaks
 
Using latest LibreOffice on openSUSE Leap 15 - by modern packaging systems
Using latest LibreOffice on openSUSE Leap 15 - by modern packaging systemsUsing latest LibreOffice on openSUSE Leap 15 - by modern packaging systems
Using latest LibreOffice on openSUSE Leap 15 - by modern packaging systems
 
Symfony2 3rd-Party Bundles
Symfony2 3rd-Party BundlesSymfony2 3rd-Party Bundles
Symfony2 3rd-Party Bundles
 
Introduction to TensorFlow Lite
Introduction to TensorFlow Lite Introduction to TensorFlow Lite
Introduction to TensorFlow Lite
 
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
 
"Using TensorFlow Lite to Deploy Deep Learning on Cortex-M Microcontrollers,"...
"Using TensorFlow Lite to Deploy Deep Learning on Cortex-M Microcontrollers,"..."Using TensorFlow Lite to Deploy Deep Learning on Cortex-M Microcontrollers,"...
"Using TensorFlow Lite to Deploy Deep Learning on Cortex-M Microcontrollers,"...
 
Why and what is go
Why and what is goWhy and what is go
Why and what is go
 
Electron
ElectronElectron
Electron
 
Open MPI State of the Union X SC'16 BOF
Open MPI State of the Union X SC'16 BOFOpen MPI State of the Union X SC'16 BOF
Open MPI State of the Union X SC'16 BOF
 
A Peek into TFRT
A Peek into TFRTA Peek into TFRT
A Peek into TFRT
 
走向开源:提交CPAN模块Step by Step
走向开源:提交CPAN模块Step by Step走向开源:提交CPAN模块Step by Step
走向开源:提交CPAN模块Step by Step
 
Where is LLVM Being Used Today?
Where is LLVM Being Used Today? Where is LLVM Being Used Today?
Where is LLVM Being Used Today?
 
The State of libfabric in Open MPI
The State of libfabric in Open MPIThe State of libfabric in Open MPI
The State of libfabric in Open MPI
 
LuaJIT
LuaJITLuaJIT
LuaJIT
 
LCA14: LCA14-403: Importance of migrating external projects used in Android t...
LCA14: LCA14-403: Importance of migrating external projects used in Android t...LCA14: LCA14-403: Importance of migrating external projects used in Android t...
LCA14: LCA14-403: Importance of migrating external projects used in Android t...
 
Docker and .NET Core - Best Friends Forever - Michael Newton - Codemotion Rom...
Docker and .NET Core - Best Friends Forever - Michael Newton - Codemotion Rom...Docker and .NET Core - Best Friends Forever - Michael Newton - Codemotion Rom...
Docker and .NET Core - Best Friends Forever - Michael Newton - Codemotion Rom...
 
Understanding Android Benchmarks
Understanding Android BenchmarksUnderstanding Android Benchmarks
Understanding Android Benchmarks
 
Types - slice, map, new, make, struct - Gopherlabs
Types - slice, map, new, make, struct - Gopherlabs Types - slice, map, new, make, struct - Gopherlabs
Types - slice, map, new, make, struct - Gopherlabs
 
.NET Core Blimey! (Shropshire Devs Mar 2016)
.NET Core Blimey! (Shropshire Devs Mar 2016).NET Core Blimey! (Shropshire Devs Mar 2016)
.NET Core Blimey! (Shropshire Devs Mar 2016)
 
Lua vs python
Lua vs pythonLua vs python
Lua vs python
 

Similar to The Universal Developer: Deploying Modern Tcl/Tk Solutions on the Mac

Kubernetes in docker for mac
Kubernetes in docker for macKubernetes in docker for mac
Kubernetes in docker for macCatalin Jora
 
KrankGeek November 2021 - Best practices in Electron-based desktop developmen...
KrankGeek November 2021 - Best practices in Electron-based desktop developmen...KrankGeek November 2021 - Best practices in Electron-based desktop developmen...
KrankGeek November 2021 - Best practices in Electron-based desktop developmen...Arnaud BUDKIEWICZ
 
Andreas Jakl, Qt Symbian Maemo Quickstart
Andreas Jakl, Qt Symbian Maemo QuickstartAndreas Jakl, Qt Symbian Maemo Quickstart
Andreas Jakl, Qt Symbian Maemo QuickstartNokiaAppForum
 
Installable web applications
Installable web applicationsInstallable web applications
Installable web applicationsLiveChat
 
BP218 IBM Lotus Notes 8 and IBM Lotus Expeditor Customization for LotusScript...
BP218 IBM Lotus Notes 8 and IBM Lotus Expeditor Customization for LotusScript...BP218 IBM Lotus Notes 8 and IBM Lotus Expeditor Customization for LotusScript...
BP218 IBM Lotus Notes 8 and IBM Lotus Expeditor Customization for LotusScript...John Head
 
Tekton showcase - CDF Summit Kubecon Barcelona 2019
Tekton showcase - CDF Summit Kubecon Barcelona 2019Tekton showcase - CDF Summit Kubecon Barcelona 2019
Tekton showcase - CDF Summit Kubecon Barcelona 2019Christie Wilson
 
Migrating from Photon to Qt
Migrating from Photon to QtMigrating from Photon to Qt
Migrating from Photon to QtICS
 
Migrating from Photon to Qt
Migrating from Photon to QtMigrating from Photon to Qt
Migrating from Photon to QtJanel Heilbrunn
 
Lessons from Contributing to WebKit and Blink
Lessons from Contributing to WebKit and BlinkLessons from Contributing to WebKit and Blink
Lessons from Contributing to WebKit and BlinkBruno Abinader
 
Reconcile Terraform Resources the GitOps Way with Priyanka Ravi
Reconcile Terraform Resources the GitOps Way with Priyanka RaviReconcile Terraform Resources the GitOps Way with Priyanka Ravi
Reconcile Terraform Resources the GitOps Way with Priyanka RaviWeaveworks
 
Meetup 2020 - Back to the Basics part 101 : IaC
Meetup 2020 - Back to the Basics part 101 : IaCMeetup 2020 - Back to the Basics part 101 : IaC
Meetup 2020 - Back to the Basics part 101 : IaCDamienCarpy
 
WAM: An embedded web runtime history for LG webOS and Automotive Grade Linux
WAM: An embedded web runtime history for LG webOS and Automotive Grade LinuxWAM: An embedded web runtime history for LG webOS and Automotive Grade Linux
WAM: An embedded web runtime history for LG webOS and Automotive Grade LinuxIgalia
 
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...Igalia
 
EclipseCon Europe 2012 Tabris Workshop
EclipseCon Europe 2012 Tabris WorkshopEclipseCon Europe 2012 Tabris Workshop
EclipseCon Europe 2012 Tabris WorkshopHolger Staudacher
 
Android Services Skill Sprint
Android Services Skill SprintAndroid Services Skill Sprint
Android Services Skill SprintJim McKeeth
 
Gestión de infraestructura tomcat tom ee con tfactory
Gestión de infraestructura tomcat tom ee con tfactoryGestión de infraestructura tomcat tom ee con tfactory
Gestión de infraestructura tomcat tom ee con tfactoryCésar Hernández
 
Top 5 benefits of docker
Top 5 benefits of dockerTop 5 benefits of docker
Top 5 benefits of dockerJohn Zaccone
 
The Javascript Ecosystem
The Javascript EcosystemThe Javascript Ecosystem
The Javascript EcosystemEmmanuel Akinde
 

Similar to The Universal Developer: Deploying Modern Tcl/Tk Solutions on the Mac (20)

Kubernetes in docker for mac
Kubernetes in docker for macKubernetes in docker for mac
Kubernetes in docker for mac
 
KrankGeek November 2021 - Best practices in Electron-based desktop developmen...
KrankGeek November 2021 - Best practices in Electron-based desktop developmen...KrankGeek November 2021 - Best practices in Electron-based desktop developmen...
KrankGeek November 2021 - Best practices in Electron-based desktop developmen...
 
Andreas Jakl, Qt Symbian Maemo Quickstart
Andreas Jakl, Qt Symbian Maemo QuickstartAndreas Jakl, Qt Symbian Maemo Quickstart
Andreas Jakl, Qt Symbian Maemo Quickstart
 
Installable web applications
Installable web applicationsInstallable web applications
Installable web applications
 
BP218 IBM Lotus Notes 8 and IBM Lotus Expeditor Customization for LotusScript...
BP218 IBM Lotus Notes 8 and IBM Lotus Expeditor Customization for LotusScript...BP218 IBM Lotus Notes 8 and IBM Lotus Expeditor Customization for LotusScript...
BP218 IBM Lotus Notes 8 and IBM Lotus Expeditor Customization for LotusScript...
 
Tekton showcase - CDF Summit Kubecon Barcelona 2019
Tekton showcase - CDF Summit Kubecon Barcelona 2019Tekton showcase - CDF Summit Kubecon Barcelona 2019
Tekton showcase - CDF Summit Kubecon Barcelona 2019
 
Migrating from Photon to Qt
Migrating from Photon to QtMigrating from Photon to Qt
Migrating from Photon to Qt
 
Migrating from Photon to Qt
Migrating from Photon to QtMigrating from Photon to Qt
Migrating from Photon to Qt
 
Lessons from Contributing to WebKit and Blink
Lessons from Contributing to WebKit and BlinkLessons from Contributing to WebKit and Blink
Lessons from Contributing to WebKit and Blink
 
Reconcile Terraform Resources the GitOps Way with Priyanka Ravi
Reconcile Terraform Resources the GitOps Way with Priyanka RaviReconcile Terraform Resources the GitOps Way with Priyanka Ravi
Reconcile Terraform Resources the GitOps Way with Priyanka Ravi
 
Meetup 2020 - Back to the Basics part 101 : IaC
Meetup 2020 - Back to the Basics part 101 : IaCMeetup 2020 - Back to the Basics part 101 : IaC
Meetup 2020 - Back to the Basics part 101 : IaC
 
WAM: An embedded web runtime history for LG webOS and Automotive Grade Linux
WAM: An embedded web runtime history for LG webOS and Automotive Grade LinuxWAM: An embedded web runtime history for LG webOS and Automotive Grade Linux
WAM: An embedded web runtime history for LG webOS and Automotive Grade Linux
 
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
 
EclipseCon Europe 2012 Tabris Workshop
EclipseCon Europe 2012 Tabris WorkshopEclipseCon Europe 2012 Tabris Workshop
EclipseCon Europe 2012 Tabris Workshop
 
Monkey Server
Monkey ServerMonkey Server
Monkey Server
 
Android Services Skill Sprint
Android Services Skill SprintAndroid Services Skill Sprint
Android Services Skill Sprint
 
Treinamento Qt básico - aula I
Treinamento Qt básico - aula ITreinamento Qt básico - aula I
Treinamento Qt básico - aula I
 
Gestión de infraestructura tomcat tom ee con tfactory
Gestión de infraestructura tomcat tom ee con tfactoryGestión de infraestructura tomcat tom ee con tfactory
Gestión de infraestructura tomcat tom ee con tfactory
 
Top 5 benefits of docker
Top 5 benefits of dockerTop 5 benefits of docker
Top 5 benefits of docker
 
The Javascript Ecosystem
The Javascript EcosystemThe Javascript Ecosystem
The Javascript Ecosystem
 

Recently uploaded

UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdfAndrey Devyatkin
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Copilot para Microsoft 365 y Power Platform Copilot
Copilot para Microsoft 365 y Power Platform CopilotCopilot para Microsoft 365 y Power Platform Copilot
Copilot para Microsoft 365 y Power Platform CopilotEdgard Alejos
 

Recently uploaded (20)

UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Copilot para Microsoft 365 y Power Platform Copilot
Copilot para Microsoft 365 y Power Platform CopilotCopilot para Microsoft 365 y Power Platform Copilot
Copilot para Microsoft 365 y Power Platform Copilot
 

The Universal Developer: Deploying Modern Tcl/Tk Solutions on the Mac

  • 1. The Universal Developer Deploying Modern Solutions on the Mac Kevin Walzer
  • 2. Overview ● About myself ● Why the Mac? ● Brief history of Tcl/Tk on the Mac ● Carbon port ● Cocoa port ● Tk-Cocoa 2.0 ● State of Tk/Mac at present ● Tk/Mac applications ● Best practices for developing Tk on the Mac ● Optimizing a Tk app on OS X: A case study ● Looking to the future
  • 3. About me ● Kevin Walzer ● www.codebykevin.com ● Developing Tcl/Tk apps on Mac since 2004 ● Developing Tcl/Tk extensions since 2006 ● Took over as Tk-Mac maintainer in 2011
  • 4. Why the Mac? ● Apple now largest company in world by stock valuation ● Massive success of iPhone/iPad and increasing penetration of enterprise market is causing large companies to take another look ● IBM deploying 1,900 Macs per week, has rolled out 130,000 units company-wide, up to 200,000 when project done ● Requires only 24 help-desk techs ● 5% of Mac users need help; 40% of Win users do
  • 5. Brief history of Tcl/Tk ● Created by John Osterhout at UC-Berkeley in late 1980s on Unix ● Osterhout left academe for Sun Microsystems in mid-1990s; Tk ported to Mac and Windows ● Unix (X11) and Windows ports highly stable; Mac has gone through several major transitions
  • 6. Mac port: Classic ● Tk ported to Mac by Roy Johnson using Toolbox API ● Mid-1990s ● Tk GUI on Classic Mac OS
  • 7. Carbon port ● Called “Tk Aqua” ● Ported by Jim Ingham and Ian Reid, sponsored by Apple ● October 2001 ● Relatively-quick “Carbonizing” of Tk with updated Toolbox API for OS X
  • 8. Carbon port ● Daniel Steffen takes over as lead maintainer ● April 2007: Completes major modernization of Carbon port, removing deprecated “Classic” API’s ● June 2007: Apple announces deprecation of Carbon API’s in favor of Cocoa API’s: Carbon will be supported as 32-bit API only, Cocoa will be supported as 64-bit ● Many developers unhappy
  • 9. Cocoa port ● Apple hires Daniel Steffen to port Tk from Carbon to Cocoa ● Begins work September 2008, announces release April 2009 ● Ensures Tk’s viability on OS X with 64-bit support
  • 10. Benefits of Cocoa port ● Can do things Carbon port cannot ● Better UI integration ● Native icons/bitmaps ● Native window behavior ● Easier to integrate with other Cocoa API’s ● 64-bit support/long term viability
  • 11. 2010-2013: Cocoa issues ● More complex design than Carbon ● High-level widgets and event loop do not map neatly to Tk’s low-level, draw-everything model ● Tk often freezes at random intervals, especially when event loop overloaded ● Drawing sometimes displays artifacts
  • 12. 2010-2013 Cocoa issues ● Use of private API’s prevents deploying Tk- Cocoa apps in Mac App Store ● Author of port, Daniel Steffen, hired by Apple full time and can no longer works on Tk ● Other developers lack expertise to address issues
  • 13. Tk-Cocoa 2.0 ● Decided to remove private API’s ● Removal revealed numerous flaws; Tk was seriously broken ● Re-implementing several Tk widgets with alternative API solved many of these issues ● Converted button, menubuttons and scrolling to HITheme
  • 14. Tk-Cocoa 2.0 ● Cocoa design: NSWindow (toplevel) wraps NSView (window content/client area) ● Tk uses single NSView for drawing child windows in a toplevel ● Buttons and scrolling were additional NSViews with their own hierarchy of subviews ● Tk could not handle this complexity ● HITheme is a drawing-only API; ttk themed widgets already use it ● Much simpler to render widgets only and delegate widget behavior to Tk ● HITheme is a relic of Carbon that was not removed because it is useful for custom drawing
  • 15. Tk-Cocoa 2.0 ● Marc Culler, Python and Tkinter developer, began contributing numerous patches to fix and improve various aspects of Cocoa port: image rendering, event processing, scrolling, memory management ● Did not keep every one of his changes but there was so much iteration that he earned a co-author credit on Tk-Cocoa
  • 16. Tk-Cocoa at present ● Finally stable: 8.6.5 will mark point release of stable Tk/Mac ● Rapid, heavy development phase complete
  • 17. Tcl/Tk apps on OS X - Commercial ● Bitrock uses Tcl/Tk for its Installbuilder product and Bitnami open-source distributions ● www.bitrock.com
  • 18. Tcl/Tk apps on OS X - Commercial ● ActiveState uses Tcl/Tk for the GUI on its developer tools ● www.activestate.com
  • 19. Tcl/Tk apps on OS X - Commercial ● Farmer’s Wife, a facilities management application ● www.farmerswife.com
  • 20. Tcl/Tk apps on OS X - Commercial ● All of my own applications at www.codebykevin.com use Tk GUI’s
  • 21. Tcl/Tk apps on OS X – Open Source ● Password Gorilla ● https://github.com/zdia/g ● Password manager
  • 22. Tcl/Tk apps on OS X – Open Source ● SnapPy, a scientific/molecular visualizer http://www.math.uic. edu/t3m/SnapPy/
  • 23. Tcl/Tk apps on OS X – Open Source ● IDLE, Python’s IDE bundled with the programming language ● Probably the most widely-used Tk application on OS X: source of many bug reports against Tk
  • 24. Best practices for developing Tcl/Tk apps on OS X ● Mac users place a premium on the user experience and user interface ● Mac platform has interface guidelines that most apps conform to ● While Tk is cross-platform, a little extra work will make your app work much better in the Mac environment and will make Mac users more comfortable using it.
  • 25. Best practices for developing Tcl/Tk apps on OS X ● Use a Mac application structure - starpack |-- StarkitApp.app | `-- Contents | |-- Info.plist <-----XML file with app configuration data | |-- MacOS | | `-- starpack <-----executable | `-- Resources | `-- StarkitApp.icns
  • 26. Best practices for developing Tcl/Tk apps on OS X ● Use a Mac application structure – standalone build of Wish |-- WishApp.app | `-- Contents | |-- Info.plist <-----XML file with app configuration data | |-- Frameworks | `--Tcl.framework | `--Tk.framework | |--libs | `--auto_path libs | |-- MacOS | | `-- WishApp <-----executable | `-- Resources | `-- WishApp.icns
  • 27. Best practices for developing Tcl/Tk apps on OS X ● More information on app bundles and deployment: http://www.codebykevin.com/tutorial.html
  • 28. Best practices for developing Tcl/Tk apps on OS X ● Keyboard accelerators: use Command instead of Control ● Menu items: if { [tk windowingsystem] == "aqua"} { proc ::tk::mac::ShowPreferences {} { prefs_dialog_command } proc ::tk::mac::Quit {} { exit } proc tk::mac::ShowHelp {} { user_help_cmd } }
  • 29. Optimizing a Tk app on OS X: A case study ● Manpower, a man page viewer ● Similar functionality to TkMan: provides tools for searching, browsing, and viewing man pages, using the rman tool wrapped by a Tk GUI ● No source code in common; design similarities end with use of rman
  • 30. Optimizing a Tk app on OS X: A case study ● Manpower makes use of many Mac-specific API’s: scriptable via AppleScript and Services interfaces, supports native printing, supports native fullscreen API via window manager ● Tk extension packages for these API’s at http://fossil.codebykevin.com -- look for tk- components repo
  • 31. Looking to the future ● Main priorities for Tk: Keep up to date with Mac API churn ● Now that it is reasonably stable, I do not anticipate making radical changes ● Tk will likely continue to require more maintenance on Mac than Windows or X11
  • 32. Change in programming languages ● Apple has added a new language, Swift, that they are positioning as the development language of the future ● They likely will continue to support Objective-C and C indefinitely as millions and millions of lines of code are written in these languages ● Objective-C will likely not undergo further enhancement
  • 33. Implications of Swift for Tcl/Tk ● The move to Swift does not present as many issues for Tk as the switch from Carbon to Cocoa, which was an existential threat ● Cocoa vs. Carbon was an API shift; Swift is still Cocoa ● Swift seems more analogous to C-Sharp on Windows
  • 34. Questions and thanks ● I am happy to answer any questions. ● Thanks for your interest.