Eagle: Tcl Integration with the CLR

Slides:



Advertisements
Similar presentations
Code Tuning Techniques CPSC 315 – Programming Studio Fall 2008 Most examples from Code Complete 2.
Advertisements

11-Jun-14 The assert statement. 2 About the assert statement The purpose of the assert statement is to give you a way to catch program errors early The.
OO Programming in Java Objectives for today: Overriding the toString() method Polymorphism & Dynamic Binding Interfaces Packages and Class Path.
COM vs. CORBA.
R4 Dynamically loading processes. Overview R4 is closely related to R3, much of what you have written for R3 applies to R4 In R3, we executed procedures.
Garuda: Mythical Link to the CLR
en-us/sharepoint/fp
Writing Tcl Scripts (cont.) Outline –Variable Scoping –Strings –Eval –File/Channel I/O –Processes –System Info –Errors –Reflection/Debugging –Libraries.
JavaScript, Fourth Edition
V Avon High School Tech Club Agenda Old Business –Delete Files New Business –Week 16 Topics: Intro to HTML/CSS –Questions? Tech Club Forums.
CLEO’s User Centric Data Access System Christopher D. Jones Cornell University.
JS Arrays, Functions, Events Week 5 INFM 603. Agenda Arrays Functions Event-Driven Programming.
CC0002NI – Computer Programming Computer Programming Er. Saroj Sharan Regmi Week 7.
Using a Debugger. SWC What is ”debugging”? An error in a computer program is often called a ”bug”… …so, to ”debug” is to find and get rid of errors in.
Eagle: Tcl Implementation in C# Alt.NET 2011 (Seattle) Joe Mistachkin.
Reusable Code For Your Appx Processes Presented By: Gary Rogers.
Developing Workflows with SharePoint Designer David Coe Application Development Consultant Microsoft Corporation.
PROGRAMMING IN VISUAL BASIC.NET VISUAL BASIC BUILDING BLOCKS Bilal Munir Mughal 1 Chapter-5.
Eagle: Tcl Implementation in C# 15th Annual Tcl Conference Joe Mistachkin.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
ASP.NET Programming with C# and SQL Server First Edition Chapter 3 Using Functions, Methods, and Control Structures.
Device Drivers CPU I/O Interface Device Driver DEVICECONTROL OPERATIONSDATA TRANSFER OPERATIONS Disk Seek to Sector, Track, Cyl. Seek Home Position.
30/10/ Iteration Loops Do While (condition is true) … Loop.
Eagle: Maturation and Evolution 17th Annual Tcl Conference Joe Mistachkin.
Chapter 3 Functions, Events, and Control Structures JavaScript, Third Edition.
QA and Testing. QA Activity Processes monitoring Standards compliance monitoring Software testing Infrastructure testing Documentation testing Usability.
Writing a Run Time DLL The application loads the DLL using LoadLibrary() or LoadLibraryEx(). The standard search sequence is used by the operating system.
Debugging parallel programs. Breakpoint debugging Probably the most widely familiar method of debugging programs is breakpoint debugging. In this method,
CSE 351 GDB Introduction. Lab 1 Status? How is Lab 1 going? I’ll be available at the end of class to answer questions There are office hours later today.
9-Nov-97Tri-Ada '971 TASH An Alternative to the Windows API TRI-Ada ‘97 Terry J. Westley
TCL TK. Tcl/Tk C functions can become Tcl commands that are invoked interactively Tk = scriptable, portable user interface –Windows, X (Unix), MacOS,
Porting a large scale enterprise application from Tcl/Tk 8.4 to 8.5 Prashant Thakre, Tushar Gupta {prashant_thakre, Gaurav Bansal.
Eagle: Tcl Integration with the CLR 16th Annual Tcl Conference Joe Mistachkin.
Dale Roberts Debugger Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer and Information Science, School.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
ITERATION. Iteration Computers are often used to automate repetitive tasks. Repeating identical or similar tasks without making errors is something that.
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
HP-SEE Debugging with GDB Vladimir Slavnic Research Assistant SCL, Institute of Physics Belgrade The HP-SEE initiative.
Dale Roberts Debugger Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer and Information Science, School.
IST 210: PHP Logic IST 210: Organization of Data IST2101.
Netbeanstcl (A netbeans plugin for Tcl) A GSoC (Google Summer of Code) Project by Michal Poczwardowski.
Chapter 4 – Thread Concepts
What are they? The Package Repository Client is a set of Tcl scripts that are capable of locating, downloading, and installing packages for both Tcl and.
“Under the hood”: Angry Birds Maze
Outline Introduction to the Phalanger System
Data Virtualization Tutorial: Introduction to SQL Script
JavaScript is a programming language designed for Web pages.
Chapter 4 – Thread Concepts
Smart Testing and Recycling Testing
Writing Highly Available .Net Framework Applications
A451 Theory – 7 Programming 7A, B - Algorithms.
SVTRAININGS. SVTRAININGS Python Overview  Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed.
File Handling Programming Guides.
Machine Independent Features
Do While (condition is true) … Loop
Coding Concepts (Basics)
Threads Chapter 5 2/17/2019 B.Ramamurthy.
Threads Chapter 5 2/23/2019 B.Ramamurthy.
and Program Development
Lecture 5: Functions and Parameters
Still Chapter 2 (Based on Silberchatz’s text and Nachos Roadmap.)
“Under the hood”: Angry Birds Maze
Eagle: Maturation and Evolution
ICT Gaming Lesson 2.
JavaScript Basics What is JavaScript?
JavaScript is a scripting language designed for Web pages by Netscape.
Comdb2: Bloomberg’s Highly Available Relational Database System
The Lua Chunk Vault, an enhancement to epics base
Makefiles, GDB, Valgrind
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

Eagle: Tcl Integration with the CLR 16th Annual Tcl Conference Joe Mistachkin

What is Eagle?

What is Eagle? Eagle is an open-source implementation of Tcl written in C# for the CLR. Designed to be highly extensible and easily embeddable into CLR-based applications. Supports approximately 90% of the Tcl 8.4 core command set.

Wait a minute… Why integrate with Tcl if Eagle is already an implementation of the Tcl language?

Why integrate with Tcl? The existing Tcl integration solutions for the CLR were less than ideal. The possibility of using the expressive power of a Tcl-compatible language to control the integration of the Tcl language with the CLR was very compelling. Allows unit-testing of embedding scenarios that need to dynamically load and unload the Tcl library.

Tcl Integration Features Supports any build of Tcl/Tk, version 8.4 or higher, including "basekits" and "stardlls". Supports 32-bit and 64-bit operating systems. Supports worker threads with their own event loop processing. Supports exit handler creation and deletion. Supports script cancellation via TIP 285. Supports a unified stack trace for errors via the Eagle errorInfo variable. Supports error line number management via TIP 336. Prevents a deleted interpreter from being used. Prevents an interpreter with activations from being deleted via TIP 335.

Loading Tcl Automatically if {![tcl ready]} then { # # This command loads the "best" Tcl # library available. The exact # algorithm used is documented in # the paper. tcl load }

Loading Tcl with Version Requirements if {![tcl ready]} then { # # This command loads the "best" Tcl # library available that meets the # specified version requirements. # tcl load –minimumversion 8.4 \ -maximumversion 8.5 }

Loading a Specific Tcl Library if {![tcl ready]} then { # # This command will skip the Tcl library # detection logic and simply load the # specified Tcl library. # tcl load {C:\full\path\to\tcl.dll} }

Script Evaluation set interp [tcl create]; # create a Tcl interp. tcl eval $interp { # # This is a Tcl script. The "eagle" command # here is actually a Tcl command that has # been implemented in managed code (in this # case, it simply maps to the "eval" command # in Eagle). # eagle debug break; # type "#go" to continue } tcl delete $interp; # delete the Tcl interp.

Using Tk in the Main Thread set interp [tcl create]; # create a Tcl interp. # # This will load Tk into the new Tcl interp. tcl eval $interp {package require Tk} # Service the Tcl event loop until we are canceled. after 10000 [list interp cancel] catch {while {1} { tcl update }} tcl delete $interp; # delete the Tcl interp.

Creating a Tcl Worker Thread # Initialize by-ref arguments. set result "" set thread null # Get the active Eagle interp. set interp [object invoke -alias Interpreter GetActive] # Create Tcl worker thread. $interp -alias CreateTclThread 100 true result # Extract the thread name from the result. set name [$result ToString] # Get the object for the thread we just created. $interp -alias -flags +NonPublic GetTclThread $name \ thread result

Using a Tcl Worker Thread # Initialize by-ref arguments. set result "" # Tell the worker thread to create a Tcl interp. $thread QueueEvent Create Immediate null true result # Queue a script to evaluate to the worker thread. $thread QueueEvent Evaluate Immediate \ {package require Tk} true result # Delete the worker thread (this will also cause the # Tcl interp to be deleted). $interp DeleteTclThread $name false result

Does it run on Mono? (by popular demand) Short Answer: Yes. Long Answer: Yes, it runs on version 2.0 or higher. However, version 2.4 or higher is recommended due to serious bugs in earlier versions. Mono does not perfectly emulate the .NET Framework and still has bugs that affect Eagle (e.g. #473899, #478489, #479061, #490932).

Demonstration

Where is it? http://eagle.to/

Questions and Answers