SlideShare une entreprise Scribd logo
1  sur  36
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
とある断片の超動的言語

Contenu connexe

Tendances

Real world scala
Real world scalaReal world scala
Real world scalalunfu zhong
 
Java JIT Optimization Research
Java JIT Optimization Research Java JIT Optimization Research
Java JIT Optimization Research Adam Feldscher
 
Data structures lab manual
Data structures lab manualData structures lab manual
Data structures lab manualSyed Mustafa
 
DSU C&C++ Practical File Diploma
DSU C&C++ Practical File DiplomaDSU C&C++ Practical File Diploma
DSU C&C++ Practical File Diplomamustkeem khan
 
Heap sort &amp; bubble sort
Heap sort &amp; bubble sortHeap sort &amp; bubble sort
Heap sort &amp; bubble sortShanmuga 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 - 3ecomputernotes
 
Presentation1 computer shaan
Presentation1 computer shaanPresentation1 computer shaan
Presentation1 computer shaanwalia 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-programsAbhishek 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 reactNetta Bondy
 

Tendances (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
 

En vedette

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

En vedette (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 東京
 

Similaire à とある断片の超動的言語

Python-GTK
Python-GTKPython-GTK
Python-GTKYuren 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
 
Let’s talk about microbenchmarking
Let’s talk about microbenchmarkingLet’s talk about microbenchmarking
Let’s talk about microbenchmarkingAndrey Akinshin
 
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Tsuyoshi Yamamoto
 
Java Simple Programs
Java Simple ProgramsJava Simple Programs
Java Simple ProgramsUpender Upr
 
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 CompilerGarth Gilmour
 
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.pdfarchanaemporium
 
Effective Java with Groovy
Effective Java with GroovyEffective Java with Groovy
Effective Java with GroovyNaresha K
 
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.pdfarihantmobileselepun
 
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 .docxKomlin1
 

Similaire à とある断片の超動的言語 (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
 
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
 
#JavaFX.forReal() - ElsassJUG
#JavaFX.forReal() - ElsassJUG#JavaFX.forReal() - ElsassJUG
#JavaFX.forReal() - ElsassJUG
 

Plus de Kiyotaka Oku

Osaka Venture Meetup #3
Osaka Venture Meetup #3Osaka Venture Meetup #3
Osaka Venture Meetup #3Kiyotaka 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
 
Jenkinsプラグインの作り方
Jenkinsプラグインの作り方Jenkinsプラグインの作り方
Jenkinsプラグインの作り方Kiyotaka Oku
 
Jenkins and Groovy
Jenkins and GroovyJenkins and Groovy
Jenkins and GroovyKiyotaka Oku
 
Groovy and-hudson2
Groovy and-hudson2Groovy and-hudson2
Groovy and-hudson2Kiyotaka Oku
 

Plus de 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
 

Dernier

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 

Dernier (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 

とある断片の超動的言語

  • 1.
  • 2.
  • 3.
  • 8.
  • 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))
  • 26.
  • 27. Gist
  • 28.
  • 29.
  • 30.
  • 31.
  • 33.
  • 34. gist 326626 groovywebconsole.user.js Gist Groovy Greasemonkey for Firefox (not for Chrome)
  • 35. Groovy Gist

Notes de l'éditeur

  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