InvokeDynamic allows Java 7 to support dynamically typed languages like Groovy and JavaScript by enabling dynamic method dispatch via invokedynamic bytecode instruction. This improves upon reflection for calling dynamic language methods by making calls faster, JIT-compiled, and inlined. It establishes a bootstrap mechanism and MethodHandle API to link dynamic languages to the Java runtime. While several dynamic languages have proposed or partial support, InvokeDynamic benefits are still being explored.
Groovy's AST Transformation is a compile time meta-programming technique and allows developer to hook into compilation process and add new fields or methods, or modify existing methods.
This document summarizes Hamlet D'Arcy's presentation on AST transformations using tools like Lombok, Groovy, CodeNarc, and Mirah. It discusses how these tools allow manipulating abstract syntax trees to add functionality like automatic property generation, static analysis, and embedded domain-specific languages. Local AST transformations are performed without changing bytecode or requiring new semantics. Type checking can also be added through transformations. Mirah compiles to pure Java classes without additional syntax.
Introduction to Groovy runtime metaprogramming and AST transforms - by Marcin Grzejszczak author of the http://toomuchcoding.blogspot.com blog. The sources can be found here Mercurial Bitbucket - https://bitbucket.org/gregorin1987/too-much-coding/src/e5ab7c69ab7b2796075fd6f087fbf31346aa2d2b/Groovy/ast/?at=default Git Github - https://github.com/marcingrzejszczak/too-much-coding/tree/master/Groovy/ast
This document provides an introduction to Groovy and Grails, including: 1) Groovy is a dynamic language for the Java Virtual Machine that offers additional features like Python and Ruby while maintaining compatibility with Java. 2) Grails is a web application framework built on Groovy that aims to reduce complexity through conventions and integration of technologies like Spring and Hibernate. 3) The document discusses installing and getting started with Groovy and Grails, their core features and architectures, domain modeling with GORM, controllers, views, and the service layer.
This document discusses improving static code review using abstract syntax tree (AST)-based code analysis. It describes using the Clang compiler's AST parsing capabilities via its Python API to build a tool called CodeBro that allows navigating and analyzing C/C++ code structure and calling relationships to potentially find vulnerabilities. Key features of CodeBro highlighted include being open source, built with Django and Python, using Clang for parsing, and having an extensible plugin system for adding custom analysis modules. Future enhancements discussed include improving various language support and analyses.
The document discusses AST (Abstract Syntax Tree) transformations in Groovy, which allow modifying code structure at compile time. It covers the standard AST transformations included in Groovy, how to build local and global AST transformations, and additional tools for working with ASTs. The speaker is an experienced Java and Groovy developer who is a Groovy committer and project lead for the Griffon framework.
Go 1.10 Release Party, featuring what's new in Go 1.10 and a few deep dives into how Go works. Presented at the PDX Go Meetup on April 24th, 2018. https://www.meetup.com/PDX-Go/events/248938586/
1. The document discusses several tools and techniques for improving Java objects, including making them immutable, improving testing of POJO methods, generating equals, hashCode and toString methods, and improving testing with AssertJ assertions. 2. It recommends using PojoTester to test POJO methods, Pojomatic to generate equals, hashCode and toString, AutoValue for immutable objects, and AssertJ assertions for readable tests. 3. The goals are focusing on objects with less boilerplate, moving toward domain-driven design and hexagonal architecture.
Nikolay Mozgovoy is a developer, mentor, and teacher who has worked with Sigma Software since 2013. He is also a prizewinner and organizer for Global Game Jam Ukraine. This document discusses the history and innovations of the Lisp programming language, which was created in 1960. It highlights Lisp's features like recursion, functions as first-class citizens, homoiconic syntax, and metaprogramming abilities. The primary Lisp dialects today are Scheme, Common Lisp, and Clojure.
The document discusses using C++ for cross-platform mobile app development. It covers using C++11 features and libraries like Boost and Qt to build the core app logic. JNI is used to integrate C++ code with Android's Java framework, allowing native UI and performance while reusing business logic across platforms. While learning C++ is required, this approach can offer better performance, user experience and code maintenance than alternatives like PhoneGap that use non-native UI wrappers.
The document discusses code generation and abstract syntax tree (AST) transformations. It provides an overview of Project Lombok, a Java library that generates boilerplate code through annotation processing and AST transformations. It also discusses how to analyze and transform code by visiting and rewriting AST nodes, giving examples of checking for null checks and instanceof expressions.
The document discusses meta-programming concepts in Groovy, including how Groovy allows for dynamic behavior through introspection and intercession. It provides examples of intercepting method calls and dynamically modifying class behavior using metaclasses. Groovy's meta-programming capabilities make it highly customizable and allow developers to expose "magic" that isn't readily available in Java.
This document provides an overview of the origins and development of the ooc programming language. It discusses how ooc was initially created as part of a school project, its evolution through several rewrites and a self-hosting effort, and how it aims to provide the best of both the C and Java worlds through its design. The document also covers ooc's syntactic features, the development of its self-compiling rock compiler, its legacy through various projects, and commonly asked questions about its performance, interoperability and future.
New language from Google, static safe compiler, with GC and as fast as C++ or Java, syntax simpler then Python - 2 hour-long tutorial and you can start code. In this talk Serhii will talk about Go, also known as Golang – an open source language developed at Google and used in production by companies such as Docker, Dropbox, Facebook and Google itself. Go is now heavily used as a general-purpose programming language that’s a pleasure to use and maintain. This introductory talk contains many live demos of basic language concepts, concurrency model, simple HTTP-based endpoint implementation and, of course, tests using build-in framework. This presentation will be interesting for backend engineers and DevOps to understand why Go had become so popular and how it might help to build robust and maintanable services. Agenda of the presentation: 1. Go is not C, not Java, not anything 2. Rob Pike argument 3. Main ideas and basics 4. Concurrency model 5. Tools 6. Issues
The document discusses metaprogramming techniques in Groovy and Grails. It defines key concepts like dynamic typing, late binding, and metaprogramming. It then explains various dynamic features in Groovy like intercepting methods/properties, creating classes/methods at runtime, and evaluating code strings. It covers Groovy's meta object protocol and how it exposes runtime structures. Examples are provided for method dispatching, AST transformations, and using builders to generate hierarchical structures.