Top Banner
GT.M interface to Ruby September 18 2013 The Performance of M combined with the Flexibility of Ruby
64

GT.M interface to Ruby

Feb 23, 2016

Download

Documents

happy

GT.M interface to Ruby. The Performance of M combined with the Flexibility of Ruby. September 18 2013. Contents. Who did it What is Ruby Why a new Language Teaching the Next Generation GT.M from Ruby Globals from Ruby. Who did it ?. Who did it ?. Rob Tweed. Luis Ibanez. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: GT.M interface to Ruby

GT.M interface to Ruby

September 18 2013

The Performance of M combined with the Flexibility of Ruby

Page 2: GT.M interface to Ruby

1. Who did it2. What is Ruby3. Why a new Language4. Teaching the Next Generation5. GT.M from Ruby6. Globals from Ruby

Contents

Page 3: GT.M interface to Ruby

Who did it ?

Page 4: GT.M interface to Ruby

Luis Ibanez

Who did it ?

Rob Tweed

Page 5: GT.M interface to Ruby

M Database

What is it ?

M Language

Page 6: GT.M interface to Ruby

M Database

What is it ?

Ruby

Page 7: GT.M interface to Ruby

What is Ruby ?

Page 8: GT.M interface to Ruby

Ruby

Interpreter Compiler

Page 9: GT.M interface to Ruby

Ruby

Very LargeCommunity

Large Number of Packages

Page 10: GT.M interface to Ruby

Ruby

Page 11: GT.M interface to Ruby

Ruby

There is a Ruby Gem for that…

Page 12: GT.M interface to Ruby

Why a new language ?

Page 13: GT.M interface to Ruby

What is Spoken ?

http://www.ohloh.net/languages/compare 41,642 Open Source Ruby Projects

Page 14: GT.M interface to Ruby

Significant Project: Cypress

Page 15: GT.M interface to Ruby

Teaching theNext Generation

Page 16: GT.M interface to Ruby

Teaching M Language

http://www.opensourcesoftwarepractice.org/M-Tutorial/https://github.com/OSEHR/M-Tutorial

Page 17: GT.M interface to Ruby

Teaching M Language

http://opensource.com/health/12/2/join-m-revolution

Page 18: GT.M interface to Ruby

Teaching M Language

http://rpi.edu/about/index.html

Page 19: GT.M interface to Ruby

Teaching M Language

http://www.albany.edu/cci

Page 21: GT.M interface to Ruby

Teaching M Language

MUMPS Exposure Rate

Fall2011

Spring2012

Fall2012

Spring2013

30 28 97 110 81

Fall2013

Page 22: GT.M interface to Ruby

Teaching M Language

ClassesInternships

Jobs

MUMPS Retention Rate

Page 23: GT.M interface to Ruby

Plan B

M Database

Ruby 54,922Developers

NoSQLhttps://www.ohloh.net/languages/ruby

Page 24: GT.M interface to Ruby

Plan B

https://www.ohloh.net/languages/ruby

Page 25: GT.M interface to Ruby

Plan B

41 ThousandProjects

327 MillionLines of Code

54,922Developers

Traininghttps://www.ohloh.net/languages/ruby

Page 26: GT.M interface to Ruby

Plan B

Google:

“Ruby Tutorial”

http://www.ohloh.net/languages/ruby

Page 27: GT.M interface to Ruby

Plan B

Page 28: GT.M interface to Ruby

GT.M from Ruby

Page 29: GT.M interface to Ruby

GT.M from Ruby

GT.MC - API

C++ Wrapper

Ruby Binary PackageSWIG Wrapping

Page 30: GT.M interface to Ruby

GT.M – C API

http://tinco.pair.com/bhaskar/gtm/doc/books/pg/UNIX_manual/ch11s05.html

Page 31: GT.M interface to Ruby

Code, Code, Code !

Talk is Cheap,Show me the Code !

Linus Torvalds

Page 32: GT.M interface to Ruby

Technical Journal Article

http://code.osehra.org/journal/browse/publication/28

Page 33: GT.M interface to Ruby

gtm-bindings

https://github.com/OSEHRA-Sandbox/gtm-bindings

Page 34: GT.M interface to Ruby

Tests / Examples

https://github.com/OSEHRA-Sandbox/gtm-bindings/tree/master/Testing

Page 35: GT.M interface to Ruby

Example 01

Page 36: GT.M interface to Ruby

How to Install

apt-get install gtm

First install GT.M

Coming

soon !

Page 37: GT.M interface to Ruby

How to Install

sudo gem install gtm

Install gtm ruby package:

Page 38: GT.M interface to Ruby

gtm: Ruby Gem

Page 39: GT.M interface to Ruby

Post-Installation

http://www.osehra.org/blog/gtm-binding-ruby

Page 40: GT.M interface to Ruby

Post-Install

export GTMCI= /home/ibanez/src/m.js/Source/gtm_access.ci

The full path to gtm_access.ci

Page 41: GT.M interface to Ruby

Post-Install

cp _gtmaccess.m fileto Routines dir

It might be at

/home/ibanez/src/gtm-bindings/Source

Page 42: GT.M interface to Ruby

Post-Install

Add libgtmshr.so DIRto LD_LIBRARY_PATH

Otherwise it must be installed in

/usr/lib/fis-gtm/V6.0-000/libgt

mshr.so

Page 43: GT.M interface to Ruby

Example 02 – Set Global

Page 44: GT.M interface to Ruby

Example 03 – Get Global

Page 45: GT.M interface to Ruby

Example 04 – Kill global

Page 46: GT.M interface to Ruby

Example 05 – Order

Page 47: GT.M interface to Ruby

Example 06 – Query

Page 48: GT.M interface to Ruby

Example 07 – Execute

Page 49: GT.M interface to Ruby

Example 08 – Lock

Bug ?

Page 50: GT.M interface to Ruby

Example 09 – Execute more

Page 51: GT.M interface to Ruby

Example 10 – Fibonacci

Page 52: GT.M interface to Ruby

Example 11 – Fibonacci

Page 53: GT.M interface to Ruby

Example 11 – Fibonacci

Page 54: GT.M interface to Ruby

Globals from Ruby

Page 55: GT.M interface to Ruby

The Future:

Catching up with Node.js

Globals Ruby HashDictionary

Page 56: GT.M interface to Ruby

Language Integration

Blah, blah, blah;Blah;

Blah, blah;Blah, blah;

Blah;Blah, blah…

What we say to Databases…

Read

Write

Read

Read

Page 57: GT.M interface to Ruby

Language Integration

SET foo1=“value”

SET ^foo2=“value”

foo1=“value”

foo2 = ewd.GlobalNode(…)

Page 58: GT.M interface to Ruby

Language Integration: Hash

http://www.ruby-doc.org/core-2.0.0/Hash.html

Page 59: GT.M interface to Ruby

Language Integration

foo = {“asia” => 1,“africa” => 2}foo = {:asia => 1, :africa => 2}

foo = {asia: 1, africa: 2}

foo[:asia] 1

Page 60: GT.M interface to Ruby

Language Integration

bar.asia.japan = “sushi”

How it could look like…

Page 61: GT.M interface to Ruby

Language Integration

A Native JSONDatabasein Ruby !

Page 62: GT.M interface to Ruby

Language Integration

knights = {'gallahad': 'pure', 'robin': 'brave'}

knightsBar.gallahad = ‘pure’

How it could look like…

http://www.ruby-doc.org/core-2.0.0/Hash.html

Page 63: GT.M interface to Ruby

Language Integration

knightsBar.each do | key, value |puts keyputs value

end

How it could look like…

http://docs.python.org/2/tutorial/datastructures.html

Page 64: GT.M interface to Ruby

Questions?

Luis [email protected]