SlideShare a Scribd company logo
とある断片の超動的言語
とある断片の超動的言語
とある断片の超動的言語
http://twitter.com/#!/cactusman/status/9123744081510400
gist.github
https://gist.github.com/
https://gist.github.com/gists
Groovy
とある断片の超動的言語
gist 310321


File.glob('**/[a-z]*.groovy')
gist 233429
import javax.sound.midi.*

def synth = MidiSystem.getSynthesizer()
synth.open()
def channel = synth.getChannels()[9]
channel.noteOn(56, 96)
Thread.sleep(100)
channel.noteOff(56)
synth.close()
gist 250489
score = [
  [A2, d4],       [A2,   d4],   [B2,   d2],
  [A2, d4],       [A2,   d4],   [B2,   d2],
  [A2, d4],       [B2,   d4],   [C2,   d4], [B2, d4],
  [A2, d4],       [B2,   d8],   [A2,   d8], [F1, d2],

    [E1,   d4],   [C1,   d4],   [E1,   d4],   [F1,   d4],
    [E1,   d4],   [E1,   d8],   [C1,   d8],   [B1,   d2],
    [A2,   d4],   [B2,   d4],   [C2,   d4],   [B2,   d4],
    [A2,   d4],   [B2,   d8],   [A2,   d8],   [F1,   d2],
    [E1,   d4],   [C1,   d4],   [E1,   d4],   [F1,   d4],
    [E1,   d4],   [E1,   d8],   [C1,   d8],   [B1,   d2],

    [A2,   d4],   [A2, d4], [B2, d2],
    [A2,   d4],   [A2, d4], [B2, d2],
    [E1,   d4],   [F1, d4], [B2, d8], [A2, d8], [F1, d4],
    [E1,   d2],   [null, d2],
]
gist 506855
import hudson.model.*
import hudson.slaves.*
node = new DumbSlave("testing", "Testing node",
   "/home/hudson", "2", Node.Mode.NORMAL,
   "test label", new JNLPLauncher(),
   new RetentionStrategy.Always(),
   new ArrayList())
hudson.model.Hudson.instance.addNode(node)
gist 702337
gist 524018
Newbie programmer


int factorial_newbie(int n) {
    if (n == 0) {
        return 1
    } else {
        return n * factorial_newbie(n - 1)
    }
}
println factorial_newbie(6)
First year programmer,
    studied Pascal

  int factorial_pascal(int n) {
      int result = 1;
      for (int i = 1; i <= n; i++) {
          result = result * i;
      }
      return result;
  }
  println factorial_pascal(6)
First year programmer,
       studied C

  int fact_c(int n) {
      int result = 1;
      for (int i = 1; i <= n; i++) {
          result *= i;
      }
      return result;
  }
  println fact_c(6)
First year programmer,
        Python

   int Factorial_python(int n) {
       int res = 1
       (2..n).each { i ->
           res *= i
       }
       return res
   }
   println Factorial_python(6)
Lazy Groovy programmer



int fact_lazy(int n) {
    return (n <= 1) ? 1 : n * fact_lazy(n - 1)
}
println fact_lazy(6)
Lazier Groovy programmer



def factLazier = { (it <= 1) ? 1 : it * call(it - 1) }
println factLazier(6)
Groovy expert programmer


def factExpert = { n ->
 n ? (1..n).inject(1, { a, b -> a * b }): 1 }
println factExpert(6)
Enterprise programmer
class InternalBase {
    private int base

    public InternalBase(Integer base) {
        this.base = base.intValue()
    }

    int getBase() {
        return new Integer(base)
    }
}

class StandardMathematicsSystem {
    private static StandardMathematicsSystem INSTANCE = null
    private Integer base

    private StandardMathematicsSystem(InternalBase base) throws RuntimeException {
        if (base.getBase().compareTo(new Integer(2)) != 0) {
            throw RuntimeException("Non base 2 bases are not supported.")
        }
        this.base = base.getBase()
    }

    int calculateFactorial(Integer target) {
        Integer result = new Integer(1)
        for (Integer i = new Integer(2); i.compareTo(target) <= 0; i = new Integer(i.intValue() + 1)) {
            result = result * i
        }
        return result
    }

    static private StandardMathematicsSystem createInstance(InternalBase base) {
        return new StandardMathematicsSystem(base)
    }

    static StandardMathematicsSystem getInstance(InternalBase base) {
        if (INSTANCE == null) {
            INSTANCE = createInstance(base)
        }
        return INSTANCE
    }
}
println StandardMathematicsSystem.getInstance(new InternalBase(new Integer(2))).calculateFactorial(new Integer(6))
とある断片の超動的言語
Gist
とある断片の超動的言語
とある断片の超動的言語
とある断片の超動的言語
とある断片の超動的言語
Gist G
Groovy G
とある断片の超動的言語
gist 326626

groovywebconsole.user.js
Gist                   Groovy
               Greasemonkey

for Firefox (not for Chrome)
Groovy   Gist
とある断片の超動的言語

More Related Content

What's hot

Nested micro
Nested microNested micro
Nested micro
Satyamevjayte Haxor
 
VTU Data Structures Lab Manual
VTU Data Structures Lab ManualVTU Data Structures Lab Manual
VTU Data Structures Lab Manual
Nithin Kumar,VVCE, Mysuru
 
Real world scala
Real world scalaReal world scala
Real world scala
lunfu zhong
 
C++ TUTORIAL 7
C++ TUTORIAL 7C++ TUTORIAL 7
C++ TUTORIAL 7
Farhan Ab Rahman
 
C++ assignment
C++ assignmentC++ assignment
C++ assignment
Zohaib Ahmed
 
Java JIT Optimization Research
Java JIT Optimization Research Java JIT Optimization Research
Java JIT Optimization Research
Adam Feldscher
 
Queue oop
Queue   oopQueue   oop
Queue oop
Gouda Mando
 
Data structures lab manual
Data structures lab manualData structures lab manual
Data structures lab manual
Syed Mustafa
 
Grover's Algorithm
Grover's AlgorithmGrover's Algorithm
Grover's Algorithm
Vijayananda Mohire
 
C programs
C programsC programs
C programs
Tahir Pasha
 
DSU C&C++ Practical File Diploma
DSU C&C++ Practical File DiplomaDSU C&C++ Practical File Diploma
DSU C&C++ Practical File Diploma
mustkeem khan
 
C++ file
C++ fileC++ file
C++ file
Mukund Trivedi
 
Heap sort &amp; bubble sort
Heap sort &amp; bubble sortHeap sort &amp; bubble sort
Heap sort &amp; bubble sort
Shanmuga Raju
 
Basic Programs of C++
Basic Programs of C++Basic Programs of C++
Basic Programs of C++
Bharat Kalia
 
COSCUP: Introduction to Julia
COSCUP: Introduction to JuliaCOSCUP: Introduction to Julia
COSCUP: Introduction to Julia
岳華 杜
 
computer notes - Data Structures - 3
computer notes - Data Structures - 3computer notes - Data Structures - 3
computer notes - Data Structures - 3
ecomputernotes
 
Presentation1 computer shaan
Presentation1 computer shaanPresentation1 computer shaan
Presentation1 computer shaan
walia Shaan
 
81818088 isc-class-xii-computer-science-project-java-programs
81818088 isc-class-xii-computer-science-project-java-programs81818088 isc-class-xii-computer-science-project-java-programs
81818088 isc-class-xii-computer-science-project-java-programs
Abhishek Jena
 
How to practice functional programming in react
How to practice functional programming in reactHow to practice functional programming in react
How to practice functional programming in react
Netta Bondy
 

What's hot (19)

Nested micro
Nested microNested micro
Nested micro
 
VTU Data Structures Lab Manual
VTU Data Structures Lab ManualVTU Data Structures Lab Manual
VTU Data Structures Lab Manual
 
Real world scala
Real world scalaReal world scala
Real world scala
 
C++ TUTORIAL 7
C++ TUTORIAL 7C++ TUTORIAL 7
C++ TUTORIAL 7
 
C++ assignment
C++ assignmentC++ assignment
C++ assignment
 
Java JIT Optimization Research
Java JIT Optimization Research Java JIT Optimization Research
Java JIT Optimization Research
 
Queue oop
Queue   oopQueue   oop
Queue oop
 
Data structures lab manual
Data structures lab manualData structures lab manual
Data structures lab manual
 
Grover's Algorithm
Grover's AlgorithmGrover's Algorithm
Grover's Algorithm
 
C programs
C programsC programs
C programs
 
DSU C&C++ Practical File Diploma
DSU C&C++ Practical File DiplomaDSU C&C++ Practical File Diploma
DSU C&C++ Practical File Diploma
 
C++ file
C++ fileC++ file
C++ file
 
Heap sort &amp; bubble sort
Heap sort &amp; bubble sortHeap sort &amp; bubble sort
Heap sort &amp; bubble sort
 
Basic Programs of C++
Basic Programs of C++Basic Programs of C++
Basic Programs of C++
 
COSCUP: Introduction to Julia
COSCUP: Introduction to JuliaCOSCUP: Introduction to Julia
COSCUP: Introduction to Julia
 
computer notes - Data Structures - 3
computer notes - Data Structures - 3computer notes - Data Structures - 3
computer notes - Data Structures - 3
 
Presentation1 computer shaan
Presentation1 computer shaanPresentation1 computer shaan
Presentation1 computer shaan
 
81818088 isc-class-xii-computer-science-project-java-programs
81818088 isc-class-xii-computer-science-project-java-programs81818088 isc-class-xii-computer-science-project-java-programs
81818088 isc-class-xii-computer-science-project-java-programs
 
How to practice functional programming in react
How to practice functional programming in reactHow to practice functional programming in react
How to practice functional programming in react
 

Viewers also liked

日本Grails/Groovyユーザーグループ
日本Grails/Groovyユーザーグループ日本Grails/Groovyユーザーグループ
日本Grails/Groovyユーザーグループ
Kiyotaka Oku
 
Jenkins plugin memo
Jenkins plugin memoJenkins plugin memo
Jenkins plugin memo
Kiyotaka Oku
 
Griffon不定期便〜G*ワークショップ編〜
Griffon不定期便〜G*ワークショップ編〜Griffon不定期便〜G*ワークショップ編〜
Griffon不定期便〜G*ワークショップ編〜
Kiyotaka Oku
 
GroovyConsole2
GroovyConsole2GroovyConsole2
GroovyConsole2
Kiyotaka Oku
 
JJUG CCC 2011 Spring
JJUG CCC 2011 SpringJJUG CCC 2011 Spring
JJUG CCC 2011 Spring
Kiyotaka Oku
 
Jenkins user conference 東京
Jenkins user conference 東京Jenkins user conference 東京
Jenkins user conference 東京
Kohsuke Kawaguchi
 

Viewers also liked (10)

日本Grails/Groovyユーザーグループ
日本Grails/Groovyユーザーグループ日本Grails/Groovyユーザーグループ
日本Grails/Groovyユーザーグループ
 
Jenkins plugin memo
Jenkins plugin memoJenkins plugin memo
Jenkins plugin memo
 
Gaelyk
GaelykGaelyk
Gaelyk
 
Devsumi Openjam
Devsumi OpenjamDevsumi Openjam
Devsumi Openjam
 
Griffon不定期便〜G*ワークショップ編〜
Griffon不定期便〜G*ワークショップ編〜Griffon不定期便〜G*ワークショップ編〜
Griffon不定期便〜G*ワークショップ編〜
 
GroovyConsole2
GroovyConsole2GroovyConsole2
GroovyConsole2
 
Mote Hudson
Mote HudsonMote Hudson
Mote Hudson
 
JJUG CCC 2011 Spring
JJUG CCC 2011 SpringJJUG CCC 2011 Spring
JJUG CCC 2011 Spring
 
JUC2012
JUC2012JUC2012
JUC2012
 
Jenkins user conference 東京
Jenkins user conference 東京Jenkins user conference 東京
Jenkins user conference 東京
 

Similar to とある断片の超動的言語

Python-GTK
Python-GTKPython-GTK
Python-GTK
Yuren Ju
 
Python GTK (Hacking Camp)
Python GTK (Hacking Camp)Python GTK (Hacking Camp)
Python GTK (Hacking Camp)
Yuren Ju
 
Kotlin Perfomance on Android / Александр Смирнов (Splyt)
Kotlin Perfomance on Android / Александр Смирнов (Splyt)Kotlin Perfomance on Android / Александр Смирнов (Splyt)
Kotlin Perfomance on Android / Александр Смирнов (Splyt)
Ontico
 
Java oops features
Java oops featuresJava oops features
Java oops features
VigneshManikandan11
 
PROGRAMING IN JAVA 4TH SEM DIGVIJAY COLLAGE
PROGRAMING IN JAVA 4TH SEM DIGVIJAY COLLAGEPROGRAMING IN JAVA 4TH SEM DIGVIJAY COLLAGE
PROGRAMING IN JAVA 4TH SEM DIGVIJAY COLLAGE
yash production
 
Let’s talk about microbenchmarking
Let’s talk about microbenchmarkingLet’s talk about microbenchmarking
Let’s talk about microbenchmarking
Andrey Akinshin
 
Guice2.0
Guice2.0Guice2.0
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Tsuyoshi Yamamoto
 
Java Simple Programs
Java Simple ProgramsJava Simple Programs
Java Simple Programs
Upender Upr
 
Java practical
Java practicalJava practical
Java practical
shweta-sharma99
 
Chapter 7 functions (c)
Chapter 7 functions (c)Chapter 7 functions (c)
Chapter 7 functions (c)
hhliu
 
Lies Told By The Kotlin Compiler
Lies Told By The Kotlin CompilerLies Told By The Kotlin Compiler
Lies Told By The Kotlin Compiler
Garth Gilmour
 
Awt
AwtAwt
I dont know what is wrong with this roulette program I cant seem.pdf
I dont know what is wrong with this roulette program I cant seem.pdfI dont know what is wrong with this roulette program I cant seem.pdf
I dont know what is wrong with this roulette program I cant seem.pdf
archanaemporium
 
06slide.ppt
06slide.ppt06slide.ppt
06slide.ppt
RohitNukte
 
Effective Java with Groovy
Effective Java with GroovyEffective Java with Groovy
Effective Java with Groovy
Naresha K
 
Programs of java
Programs of javaPrograms of java
Programs of java
shafiq sangi
 
Save Write a program to implement Binary search using recursive algo.pdf
Save Write a program to implement Binary search using recursive algo.pdfSave Write a program to implement Binary search using recursive algo.pdf
Save Write a program to implement Binary search using recursive algo.pdf
arihantmobileselepun
 
Golang dot-testing-lite
Golang dot-testing-liteGolang dot-testing-lite
Golang dot-testing-lite
Richárd Kovács
 
This code currently works... Run it and get a screen shot of its .docx
 This code currently works... Run it and get a screen shot of its .docx This code currently works... Run it and get a screen shot of its .docx
This code currently works... Run it and get a screen shot of its .docx
Komlin1
 

Similar to とある断片の超動的言語 (20)

Python-GTK
Python-GTKPython-GTK
Python-GTK
 
Python GTK (Hacking Camp)
Python GTK (Hacking Camp)Python GTK (Hacking Camp)
Python GTK (Hacking Camp)
 
Kotlin Perfomance on Android / Александр Смирнов (Splyt)
Kotlin Perfomance on Android / Александр Смирнов (Splyt)Kotlin Perfomance on Android / Александр Смирнов (Splyt)
Kotlin Perfomance on Android / Александр Смирнов (Splyt)
 
Java oops features
Java oops featuresJava oops features
Java oops features
 
PROGRAMING IN JAVA 4TH SEM DIGVIJAY COLLAGE
PROGRAMING IN JAVA 4TH SEM DIGVIJAY COLLAGEPROGRAMING IN JAVA 4TH SEM DIGVIJAY COLLAGE
PROGRAMING IN JAVA 4TH SEM DIGVIJAY COLLAGE
 
Let’s talk about microbenchmarking
Let’s talk about microbenchmarkingLet’s talk about microbenchmarking
Let’s talk about microbenchmarking
 
Guice2.0
Guice2.0Guice2.0
Guice2.0
 
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
 
Java Simple Programs
Java Simple ProgramsJava Simple Programs
Java Simple Programs
 
Java practical
Java practicalJava practical
Java practical
 
Chapter 7 functions (c)
Chapter 7 functions (c)Chapter 7 functions (c)
Chapter 7 functions (c)
 
Lies Told By The Kotlin Compiler
Lies Told By The Kotlin CompilerLies Told By The Kotlin Compiler
Lies Told By The Kotlin Compiler
 
Awt
AwtAwt
Awt
 
I dont know what is wrong with this roulette program I cant seem.pdf
I dont know what is wrong with this roulette program I cant seem.pdfI dont know what is wrong with this roulette program I cant seem.pdf
I dont know what is wrong with this roulette program I cant seem.pdf
 
06slide.ppt
06slide.ppt06slide.ppt
06slide.ppt
 
Effective Java with Groovy
Effective Java with GroovyEffective Java with Groovy
Effective Java with Groovy
 
Programs of java
Programs of javaPrograms of java
Programs of java
 
Save Write a program to implement Binary search using recursive algo.pdf
Save Write a program to implement Binary search using recursive algo.pdfSave Write a program to implement Binary search using recursive algo.pdf
Save Write a program to implement Binary search using recursive algo.pdf
 
Golang dot-testing-lite
Golang dot-testing-liteGolang dot-testing-lite
Golang dot-testing-lite
 
This code currently works... Run it and get a screen shot of its .docx
 This code currently works... Run it and get a screen shot of its .docx This code currently works... Run it and get a screen shot of its .docx
This code currently works... Run it and get a screen shot of its .docx
 

More from Kiyotaka Oku

Osaka Venture Meetup #3
Osaka Venture Meetup #3Osaka Venture Meetup #3
Osaka Venture Meetup #3
Kiyotaka Oku
 
巨大不明ビルドの継続的統合を目的とするビルドパイプラインを主軸とした作戦要綱
巨大不明ビルドの継続的統合を目的とするビルドパイプラインを主軸とした作戦要綱巨大不明ビルドの継続的統合を目的とするビルドパイプラインを主軸とした作戦要綱
巨大不明ビルドの継続的統合を目的とするビルドパイプラインを主軸とした作戦要綱
Kiyotaka Oku
 
BaseScriptについて
BaseScriptについてBaseScriptについて
BaseScriptについて
Kiyotaka Oku
 
ミニ四駆ジャパンカップで勝つ方法を考える
ミニ四駆ジャパンカップで勝つ方法を考えるミニ四駆ジャパンカップで勝つ方法を考える
ミニ四駆ジャパンカップで勝つ方法を考える
Kiyotaka Oku
 
GDK48総選挙の裏側
GDK48総選挙の裏側GDK48総選挙の裏側
GDK48総選挙の裏側
Kiyotaka Oku
 
Grails/Groovyによる開発事例紹介
Grails/Groovyによる開発事例紹介Grails/Groovyによる開発事例紹介
Grails/Groovyによる開発事例紹介
Kiyotaka Oku
 
GroovyConsole
GroovyConsoleGroovyConsole
GroovyConsole
Kiyotaka Oku
 
Jenkinsプラグインの作り方
Jenkinsプラグインの作り方Jenkinsプラグインの作り方
Jenkinsプラグインの作り方
Kiyotaka Oku
 
Jenkins and Groovy
Jenkins and GroovyJenkins and Groovy
Jenkins and Groovy
Kiyotaka Oku
 
Groovy and-hudson2
Groovy and-hudson2Groovy and-hudson2
Groovy and-hudson2
Kiyotaka Oku
 
JDO
JDOJDO
Grails on GAE/J
Grails on GAE/JGrails on GAE/J
Grails on GAE/J
Kiyotaka Oku
 

More from Kiyotaka Oku (15)

Osaka Venture Meetup #3
Osaka Venture Meetup #3Osaka Venture Meetup #3
Osaka Venture Meetup #3
 
巨大不明ビルドの継続的統合を目的とするビルドパイプラインを主軸とした作戦要綱
巨大不明ビルドの継続的統合を目的とするビルドパイプラインを主軸とした作戦要綱巨大不明ビルドの継続的統合を目的とするビルドパイプラインを主軸とした作戦要綱
巨大不明ビルドの継続的統合を目的とするビルドパイプラインを主軸とした作戦要綱
 
BaseScriptについて
BaseScriptについてBaseScriptについて
BaseScriptについて
 
javafx-mini4wd
javafx-mini4wdjavafx-mini4wd
javafx-mini4wd
 
ミニ四駆ジャパンカップで勝つ方法を考える
ミニ四駆ジャパンカップで勝つ方法を考えるミニ四駆ジャパンカップで勝つ方法を考える
ミニ四駆ジャパンカップで勝つ方法を考える
 
Spockの基礎
Spockの基礎Spockの基礎
Spockの基礎
 
GDK48総選挙の裏側
GDK48総選挙の裏側GDK48総選挙の裏側
GDK48総選挙の裏側
 
Jenkins入門
Jenkins入門Jenkins入門
Jenkins入門
 
Grails/Groovyによる開発事例紹介
Grails/Groovyによる開発事例紹介Grails/Groovyによる開発事例紹介
Grails/Groovyによる開発事例紹介
 
GroovyConsole
GroovyConsoleGroovyConsole
GroovyConsole
 
Jenkinsプラグインの作り方
Jenkinsプラグインの作り方Jenkinsプラグインの作り方
Jenkinsプラグインの作り方
 
Jenkins and Groovy
Jenkins and GroovyJenkins and Groovy
Jenkins and Groovy
 
Groovy and-hudson2
Groovy and-hudson2Groovy and-hudson2
Groovy and-hudson2
 
JDO
JDOJDO
JDO
 
Grails on GAE/J
Grails on GAE/JGrails on GAE/J
Grails on GAE/J
 

Recently uploaded

Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
Safe Software
 
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
aslasdfmkhan4750
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
SynapseIndia
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and OllamaTirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Zilliz
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
July Patch Tuesday
July Patch TuesdayJuly Patch Tuesday
July Patch Tuesday
Ivanti
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
Andrey Yasko
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
BrainSell Technologies
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
SynapseIndia
 
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Muhammad Ali
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
RaminGhanbari2
 
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
Priyanka Aash
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
KAMAL CHOUDHARY
 
The Evolution of Remote Server Management
The Evolution of Remote Server ManagementThe Evolution of Remote Server Management
The Evolution of Remote Server Management
Bert Blevins
 
Pigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending PlantPigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending Plant
LINUS PROJECTS (INDIA)
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
ishalveerrandhawa1
 
The Role of Technology in Payroll Statutory Compliance (1).pdf
The Role of Technology in Payroll Statutory Compliance (1).pdfThe Role of Technology in Payroll Statutory Compliance (1).pdf
The Role of Technology in Payroll Statutory Compliance (1).pdf
paysquare consultancy
 

Recently uploaded (20)

Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
 
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and OllamaTirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
July Patch Tuesday
July Patch TuesdayJuly Patch Tuesday
July Patch Tuesday
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
 
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
 
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
 
The Evolution of Remote Server Management
The Evolution of Remote Server ManagementThe Evolution of Remote Server Management
The Evolution of Remote Server Management
 
Pigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending PlantPigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending Plant
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
 
The Role of Technology in Payroll Statutory Compliance (1).pdf
The Role of Technology in Payroll Statutory Compliance (1).pdfThe Role of Technology in Payroll Statutory Compliance (1).pdf
The Role of Technology in Payroll Statutory Compliance (1).pdf
 

とある断片の超動的言語

  • 11. import javax.sound.midi.* def synth = MidiSystem.getSynthesizer() synth.open() def channel = synth.getChannels()[9] channel.noteOn(56, 96) Thread.sleep(100) channel.noteOff(56) synth.close()
  • 13. score = [ [A2, d4], [A2, d4], [B2, d2], [A2, d4], [A2, d4], [B2, d2], [A2, d4], [B2, d4], [C2, d4], [B2, d4], [A2, d4], [B2, d8], [A2, d8], [F1, d2], [E1, d4], [C1, d4], [E1, d4], [F1, d4], [E1, d4], [E1, d8], [C1, d8], [B1, d2], [A2, d4], [B2, d4], [C2, d4], [B2, d4], [A2, d4], [B2, d8], [A2, d8], [F1, d2], [E1, d4], [C1, d4], [E1, d4], [F1, d4], [E1, d4], [E1, d8], [C1, d8], [B1, d2], [A2, d4], [A2, d4], [B2, d2], [A2, d4], [A2, d4], [B2, d2], [E1, d4], [F1, d4], [B2, d8], [A2, d8], [F1, d4], [E1, d2], [null, d2], ]
  • 15. import hudson.model.* import hudson.slaves.* node = new DumbSlave("testing", "Testing node", "/home/hudson", "2", Node.Mode.NORMAL, "test label", new JNLPLauncher(), new RetentionStrategy.Always(), new ArrayList()) hudson.model.Hudson.instance.addNode(node)
  • 18. Newbie programmer int factorial_newbie(int n) { if (n == 0) { return 1 } else { return n * factorial_newbie(n - 1) } } println factorial_newbie(6)
  • 19. First year programmer, studied Pascal int factorial_pascal(int n) { int result = 1; for (int i = 1; i <= n; i++) { result = result * i; } return result; } println factorial_pascal(6)
  • 20. First year programmer, studied C int fact_c(int n) { int result = 1; for (int i = 1; i <= n; i++) { result *= i; } return result; } println fact_c(6)
  • 21. First year programmer, Python int Factorial_python(int n) { int res = 1 (2..n).each { i -> res *= i } return res } println Factorial_python(6)
  • 22. Lazy Groovy programmer int fact_lazy(int n) { return (n <= 1) ? 1 : n * fact_lazy(n - 1) } println fact_lazy(6)
  • 23. Lazier Groovy programmer def factLazier = { (it <= 1) ? 1 : it * call(it - 1) } println factLazier(6)
  • 24. Groovy expert programmer def factExpert = { n -> n ? (1..n).inject(1, { a, b -> a * b }): 1 } println factExpert(6)
  • 25. Enterprise programmer class InternalBase { private int base public InternalBase(Integer base) { this.base = base.intValue() } int getBase() { return new Integer(base) } } class StandardMathematicsSystem { private static StandardMathematicsSystem INSTANCE = null private Integer base private StandardMathematicsSystem(InternalBase base) throws RuntimeException { if (base.getBase().compareTo(new Integer(2)) != 0) { throw RuntimeException("Non base 2 bases are not supported.") } this.base = base.getBase() } int calculateFactorial(Integer target) { Integer result = new Integer(1) for (Integer i = new Integer(2); i.compareTo(target) <= 0; i = new Integer(i.intValue() + 1)) { result = result * i } return result } static private StandardMathematicsSystem createInstance(InternalBase base) { return new StandardMathematicsSystem(base) } static StandardMathematicsSystem getInstance(InternalBase base) { if (INSTANCE == null) { INSTANCE = createInstance(base) } return INSTANCE } } println StandardMathematicsSystem.getInstance(new InternalBase(new Integer(2))).calculateFactorial(new Integer(6))
  • 27. Gist
  • 34. gist 326626 groovywebconsole.user.js Gist Groovy Greasemonkey for Firefox (not for Chrome)
  • 35. Groovy Gist

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n