Hecl The Mobile Scripting Language David N. Welton [email_address]
Three Things Squishy human factors Hecl programming Hecl internals
Part I – People & Languages Dirty word: MARKETING
What drives adoption? Do more with less (Ruby/Rails) Niche (Tcl/Tk, PHP) Lowers barriers to entry (PHP, VB)
What hinders adoption? Positive network externalities of existing languages Switching costs associated with existing languages
Introducing a new language Productivity gains must be huge Or – dominate a new niche Or – make something far easier to use
Mobile Development Java J2ME Flash Lite HTML/Javascript Other scripting languages
Part II – The Language Hecl  - The Mobile Scripting Language
Hecl Features Tiny – MIDP1.0 configuration fits in 64K Extremely flexible Simple Interpreted - Dynamic
Java Complement Hecl  Java
Extending Extensions written in Java
Embedding Hecl Scripts
Code set  mainform [ form  label "Hello World" code { stringitem  label "Hello" text "World" cmd  label "Exit" code exit type exit }] setcurrent  $mainform
Hello World
Commands set variablename value puts ”blah blah blah” list hash + - * / foreach while if
Words, Blocks if  {  >  $reactor_temperature 100 } { send  $warning $operators initiate_shutdown }
DSL's, oh my! every  1 minute run { if  {  updates?  } { read_queue  [ +  $last_update 1] } }
proc  test {name code result} { catch  $code res if  {  eq  $res $result } {   ok  $name } else {   fail  $name $res $result } }
test  mytest1 { set  foo 10 set  foo [ +  10 $foo] } 20
Syntax command word word word word set variable [command results] $variables ”quotes interpolate $variables and [commands]” {literal block of text with ”quotes”, and whatever else you might want to include}
Mobile Phone Code
What you have access to textfield choice text screen gauge datefield commands permanent storage sms http
 
Hecl Browser Dynamic updates of applications are possible!
Part III - The Interpreter Parser Types State/variables Evaluation Exceptions
Parser Simple Hand written Lazy – doesn't care what's inside {blah blah blah ”blocks of text”}
Types Weakly typed Strings Numbers Lists Hash tables
public IntThing(int i) { val = i; } public IntThing(String s) { val = Integer.parseInt(s); } public static int get(Thing thing) throws HeclException { setIntFromAny(thing); IntThing getint = (IntThing)thing.val; return getint.val; }
Strings as middleman string number hash list string number hash list STRING
Variables Simple hash tables Created for new stack levels Some tricks for visibility in other stack levels (global, upeval commands) [set varname] == $varname
The Stack proc one {} { set a 2 puts "one $a" two puts "one $a" } proc two {} { set a 4 puts "two $a" three puts "two $a" } proc three {} { set a 6 puts "three $a" } set a 1 set b 2 puts $a one puts $a 1 one 2 two 4 three 6 two 4 one 2 1
Interp Class Interp.java Holds information about Variables Comands Exceptions
Evaluation Code transformed into a series of commands with arguments (AST) Stanza.java
Exceptions Java exceptions are thrown and caught at the 'eval' level. catch and throw commands handle exceptions at the script level
Embedding Hecl import org.hecl.*; ... Interp interp = new Interp(); new HeclFile().loadModule(interp); new org.hecl.fp.HeclFloat().loadModule(interp); new org.hecl.load.HeclLoad().loadModule(interp); HeclFile.sourceFile(interp, “a_hecl_file.hcl”); ... public void someEventHandler(Event ev) { Eval.eval(eventscript); }
Extending Hecl class IncrCmd implements Command { public void cmdCode(Interp interp, Thing[] argv)   throws HeclException { int m = IntThing.get(argv[1]); int n = 1; if (argv.length > 2) {   n = IntThing.get(argv[2]); } ((IntThing) argv[1].val).set(m + n); return argv[1]; } }
The Future What does Hecl mean? Very open to ideas and suggestions – few users mean lots of room for innovation
Thanks! / Contact Ilenia Wolfgang Kechel Tcl O'Reilly http://www.hecl.org [email_address]

More Related Content

PDF
Using Jenkins for Continuous Integration of Perl components OSD2011
PPT
Introduction to php php++
PPT
Class 3 - PHP Functions
PPT
PHP and COM
PDF
Introduction to PHP - Basics of PHP
PDF
Effective PHP. Part 2
PPT
Perl Tidy Perl Critic
Using Jenkins for Continuous Integration of Perl components OSD2011
Introduction to php php++
Class 3 - PHP Functions
PHP and COM
Introduction to PHP - Basics of PHP
Effective PHP. Part 2
Perl Tidy Perl Critic

What's hot (20)

ODP
Getting groovy (ODP)
PPT
Class 2 - Introduction to PHP
PDF
Effective PHP. Part 5
PDF
New Features in PHP 5.3
PDF
Effective PHP. Part 3
PPTX
Php.ppt
PPTX
Php string function
PDF
Python master class part 1
PDF
Effective PHP. Part 4
PPTX
Perl courseparti
PPT
PDF
Effective PHP. Part 1
PPTX
PHP slides
PPT
Control Structures In Php 2
PDF
Effective PHP. Part 6
PDF
Patterns for JVM languages JokerConf
PPT
基于 Google protobuf 的 webgame 网络协议设计
PPTX
PHP Variables and scopes
PPTX
Php basics
Getting groovy (ODP)
Class 2 - Introduction to PHP
Effective PHP. Part 5
New Features in PHP 5.3
Effective PHP. Part 3
Php.ppt
Php string function
Python master class part 1
Effective PHP. Part 4
Perl courseparti
Effective PHP. Part 1
PHP slides
Control Structures In Php 2
Effective PHP. Part 6
Patterns for JVM languages JokerConf
基于 Google protobuf 的 webgame 网络协议设计
PHP Variables and scopes
Php basics
Ad

Viewers also liked (16)

PDF
Os Selbak
PDF
Os Goodger
PPT
Os Keller
PDF
Os Vilain
PPT
Os Krug
PDF
Os Harrison
PDF
01 java 2 micro edition
PPT
Wireless Application Protocol WAP by Alvinen
PPTX
J2ME mobile app development
PDF
Using Maven to build Java & Android program
PPT
Introduction to Java ME Mobile Development
PPTX
Wireless local loop
PPT
Wap ppt
PPTX
Gprs ppt
PPTX
Introduction to java
PDF
Developing android apps with java 8
Os Selbak
Os Goodger
Os Keller
Os Vilain
Os Krug
Os Harrison
01 java 2 micro edition
Wireless Application Protocol WAP by Alvinen
J2ME mobile app development
Using Maven to build Java & Android program
Introduction to Java ME Mobile Development
Wireless local loop
Wap ppt
Gprs ppt
Introduction to java
Developing android apps with java 8
Ad

Similar to Os Welton (20)

PPT
Groovy Introduction - JAX Germany - 2008
PPT
Introduction To Groovy 2005
PPSX
Php and MySQL
ODP
Presentation - Course about JavaFX
PPT
Groovy Update - JavaPolis 2007
PDF
Tml for Objective C
PDF
Introduction to clojure
ODP
Bash Programming
PDF
Software Language Design & Engineering: Mobl & Spoofax
PPT
Visual Studio .NET2010
PPTX
Iron Languages - NYC CodeCamp 2/19/2011
PDF
What did you miss in Java from 9-13?
PPTX
FYBSC IT Web Programming Unit IV PHP and MySQL
PPT
Os Worthington
PPTX
JavaScript.pptx
PDF
Software Language Design & Engineering
PPT
Smoothing Your Java with DSLs
PPT
PHP - Web Development
KEY
Building and Distributing PostgreSQL Extensions Without Learning C
PDF
Everybody Polyglot! - Cross-Language RPC with Erlang
Groovy Introduction - JAX Germany - 2008
Introduction To Groovy 2005
Php and MySQL
Presentation - Course about JavaFX
Groovy Update - JavaPolis 2007
Tml for Objective C
Introduction to clojure
Bash Programming
Software Language Design & Engineering: Mobl & Spoofax
Visual Studio .NET2010
Iron Languages - NYC CodeCamp 2/19/2011
What did you miss in Java from 9-13?
FYBSC IT Web Programming Unit IV PHP and MySQL
Os Worthington
JavaScript.pptx
Software Language Design & Engineering
Smoothing Your Java with DSLs
PHP - Web Development
Building and Distributing PostgreSQL Extensions Without Learning C
Everybody Polyglot! - Cross-Language RPC with Erlang

More from oscon2007 (20)

PDF
J Ruby Whirlwind Tour
ODP
Solr Presentation5
PDF
Os Borger
PDF
Os Harkins
PDF
Os Fitzpatrick Sussman Wiifm
PDF
Os Bunce
PDF
Yuicss R7
PDF
Performance Whack A Mole
ODP
Os Fogel
PDF
Os Lanphier Brashears
PPT
Os Tucker
PDF
Os Fitzpatrick Sussman Swp
PDF
Os Furlong
PDF
Os Berlin Dispelling Myths
PDF
Os Kimsal
PDF
Os Pruett
PDF
Os Alrubaie
PDF
Os Keysholistic
ODP
Os Jonphillips
PDF
Os Urnerupdated
J Ruby Whirlwind Tour
Solr Presentation5
Os Borger
Os Harkins
Os Fitzpatrick Sussman Wiifm
Os Bunce
Yuicss R7
Performance Whack A Mole
Os Fogel
Os Lanphier Brashears
Os Tucker
Os Fitzpatrick Sussman Swp
Os Furlong
Os Berlin Dispelling Myths
Os Kimsal
Os Pruett
Os Alrubaie
Os Keysholistic
Os Jonphillips
Os Urnerupdated

Recently uploaded (20)

PDF
Satish NS: Fostering Innovation and Sustainability: Haier India’s Customer-Ce...
PPTX
Market and Demand Analysis.pptx for Management students
PPTX
CTG - Business Update 2Q2025 & 6M2025.pptx
PDF
Tortilla Mexican Grill 发射点犯得上发射点发生发射点犯得上发生
PDF
Susan Semmelmann: Enriching the Lives of others through her Talents and Bless...
PDF
Middle East's Most Impactful Business Leaders to Follow in 2025
PPTX
BUSINESS CYCLE_INFLATION AND UNEMPLOYMENT.pptx
DOCX
Center Enamel A Strategic Partner for the Modernization of Georgia's Chemical...
PDF
Engaging Stakeholders in Policy Discussions: A Legal Framework (www.kiu.ac.ug)
PDF
Business Communication for MBA Students.
DOCX
Hand book of Entrepreneurship 4 Chapters.docx
PPTX
IMM.pptx marketing communication givguhfh thfyu
PDF
income tax laws notes important pakistan
PDF
Comments on Clouds that Assimilate Parts I&II.pdf
PDF
533158074-Saudi-Arabia-Companies-List-Contact.pdf
PDF
Kishore Vora - Best CFO in India to watch in 2025.pdf
DOCX
Handbook of Entrepreneurship- Chapter 5: Identifying business opportunity.docx
PDF
Communication Tactics in Legal Contexts: Historical Case Studies (www.kiu.ac...
DOCX
Handbook of entrepreneurship- Chapter 7- Types of business organisations
PDF
Cross-Cultural Leadership Practices in Education (www.kiu.ac.ug)
Satish NS: Fostering Innovation and Sustainability: Haier India’s Customer-Ce...
Market and Demand Analysis.pptx for Management students
CTG - Business Update 2Q2025 & 6M2025.pptx
Tortilla Mexican Grill 发射点犯得上发射点发生发射点犯得上发生
Susan Semmelmann: Enriching the Lives of others through her Talents and Bless...
Middle East's Most Impactful Business Leaders to Follow in 2025
BUSINESS CYCLE_INFLATION AND UNEMPLOYMENT.pptx
Center Enamel A Strategic Partner for the Modernization of Georgia's Chemical...
Engaging Stakeholders in Policy Discussions: A Legal Framework (www.kiu.ac.ug)
Business Communication for MBA Students.
Hand book of Entrepreneurship 4 Chapters.docx
IMM.pptx marketing communication givguhfh thfyu
income tax laws notes important pakistan
Comments on Clouds that Assimilate Parts I&II.pdf
533158074-Saudi-Arabia-Companies-List-Contact.pdf
Kishore Vora - Best CFO in India to watch in 2025.pdf
Handbook of Entrepreneurship- Chapter 5: Identifying business opportunity.docx
Communication Tactics in Legal Contexts: Historical Case Studies (www.kiu.ac...
Handbook of entrepreneurship- Chapter 7- Types of business organisations
Cross-Cultural Leadership Practices in Education (www.kiu.ac.ug)

Os Welton

  • 1. Hecl The Mobile Scripting Language David N. Welton [email_address]
  • 2. Three Things Squishy human factors Hecl programming Hecl internals
  • 3. Part I – People & Languages Dirty word: MARKETING
  • 4. What drives adoption? Do more with less (Ruby/Rails) Niche (Tcl/Tk, PHP) Lowers barriers to entry (PHP, VB)
  • 5. What hinders adoption? Positive network externalities of existing languages Switching costs associated with existing languages
  • 6. Introducing a new language Productivity gains must be huge Or – dominate a new niche Or – make something far easier to use
  • 7. Mobile Development Java J2ME Flash Lite HTML/Javascript Other scripting languages
  • 8. Part II – The Language Hecl - The Mobile Scripting Language
  • 9. Hecl Features Tiny – MIDP1.0 configuration fits in 64K Extremely flexible Simple Interpreted - Dynamic
  • 13. Code set mainform [ form label "Hello World" code { stringitem label "Hello" text "World" cmd label "Exit" code exit type exit }] setcurrent $mainform
  • 15. Commands set variablename value puts ”blah blah blah” list hash + - * / foreach while if
  • 16. Words, Blocks if { > $reactor_temperature 100 } { send $warning $operators initiate_shutdown }
  • 17. DSL's, oh my! every 1 minute run { if { updates? } { read_queue [ + $last_update 1] } }
  • 18. proc test {name code result} { catch $code res if { eq $res $result } { ok $name } else { fail $name $res $result } }
  • 19. test mytest1 { set foo 10 set foo [ + 10 $foo] } 20
  • 20. Syntax command word word word word set variable [command results] $variables ”quotes interpolate $variables and [commands]” {literal block of text with ”quotes”, and whatever else you might want to include}
  • 22. What you have access to textfield choice text screen gauge datefield commands permanent storage sms http
  • 23.  
  • 24. Hecl Browser Dynamic updates of applications are possible!
  • 25. Part III - The Interpreter Parser Types State/variables Evaluation Exceptions
  • 26. Parser Simple Hand written Lazy – doesn't care what's inside {blah blah blah ”blocks of text”}
  • 27. Types Weakly typed Strings Numbers Lists Hash tables
  • 28. public IntThing(int i) { val = i; } public IntThing(String s) { val = Integer.parseInt(s); } public static int get(Thing thing) throws HeclException { setIntFromAny(thing); IntThing getint = (IntThing)thing.val; return getint.val; }
  • 29. Strings as middleman string number hash list string number hash list STRING
  • 30. Variables Simple hash tables Created for new stack levels Some tricks for visibility in other stack levels (global, upeval commands) [set varname] == $varname
  • 31. The Stack proc one {} { set a 2 puts "one $a" two puts "one $a" } proc two {} { set a 4 puts "two $a" three puts "two $a" } proc three {} { set a 6 puts "three $a" } set a 1 set b 2 puts $a one puts $a 1 one 2 two 4 three 6 two 4 one 2 1
  • 32. Interp Class Interp.java Holds information about Variables Comands Exceptions
  • 33. Evaluation Code transformed into a series of commands with arguments (AST) Stanza.java
  • 34. Exceptions Java exceptions are thrown and caught at the 'eval' level. catch and throw commands handle exceptions at the script level
  • 35. Embedding Hecl import org.hecl.*; ... Interp interp = new Interp(); new HeclFile().loadModule(interp); new org.hecl.fp.HeclFloat().loadModule(interp); new org.hecl.load.HeclLoad().loadModule(interp); HeclFile.sourceFile(interp, “a_hecl_file.hcl”); ... public void someEventHandler(Event ev) { Eval.eval(eventscript); }
  • 36. Extending Hecl class IncrCmd implements Command { public void cmdCode(Interp interp, Thing[] argv) throws HeclException { int m = IntThing.get(argv[1]); int n = 1; if (argv.length > 2) { n = IntThing.get(argv[2]); } ((IntThing) argv[1].val).set(m + n); return argv[1]; } }
  • 37. The Future What does Hecl mean? Very open to ideas and suggestions – few users mean lots of room for innovation
  • 38. Thanks! / Contact Ilenia Wolfgang Kechel Tcl O'Reilly http://www.hecl.org [email_address]