The document introduces the Ceylon project, which is designing a new programming language and SDK that addresses frustrations with Java while retaining its successes. The Ceylon project aims to create a language that runs on the JVM, has static typing, automatic memory management, and is readable like Java, but also includes first-class functions, a declarative syntax for defining user interfaces and data, built-in modularity, and addresses issues in the Java SDK. The presentation provides a brief overview of the Ceylon language through a simple "Hello World" example to demonstrate features like annotations, string interpolation, default parameters, and handling nullable values without NullPointerExceptions.
Abstraction is a process by which concepts are derived from the usage and classification of literal ("real" or "concrete") concepts.
Abstraction is a concept that acts as a super-categorical noun for all subordinate concepts, and connects any related concepts as a group, field, or category.
Abstraction is a process by which concepts are derived from the usage and classification of literal ("real" or "concrete") concepts.
Abstraction is a concept that acts as a super-categorical noun for all subordinate concepts, and connects any related concepts as a group, field, or category.
Intro to Object Oriented Programming with Java Hitesh-Java
In this core java training session, you will learn Object Oriented Programming. Topics covered in this session are:
• Object Oriented Programming Concepts
• Introduction to OO Analysis and Design
For more information about this course visit on this link: https://www.mindsmapped.com/courses/software-development/learn-java-fundamentals-hands-on-training-on-core-java-concepts/
Synapse India Reviews About:
Functional/procedural programming:
program is a list of instructions to the computer
Object-oriented programming
program is composed of a collection objects that communicate with each other
Java Course 7: Text processing, Charsets & EncodingsAnton Keks
Lecture 7 from the IAG0040 Java course in TTÜ.
See the accompanying source code written during the lectures: https://github.com/angryziber/java-course
Do you know the difference between charset & encoding? Every programmer nowadays MUST understand these terms, how they work, and how to use them. Otherwise we constantly face broken software refusing to work with international characters properly.
Review Session and Attending Java Interviews Hitesh-Java
In this core java training session, you will learn Java Review. Topics covered in this session are:
• How to prepare for a typical Java interview?
• Typical interview questions…
For more information about this course visit on this link: https://www.mindsmapped.com/courses/software-development/learn-java-fundamentals-hands-on-training-on-core-java-concepts/
Model Manipulation Using Embedded DSLs in ScalaFilip Krikava
A short presentation (student talk category) given at the Scala Workshop 2013 in Montpellier, France (2.7.2013). This is slightly extended version to be more self-contained. It presents the basics of Sigma such as the common infrastructure support, model consistency checking and model transformation together with some perspectives of further deep embedding.
The big language features for Java SE 8 are lambda expressions (a.k.a. closures) and default methods (a.k.a. virtual extension methods). Adding closures to the Java language opens up a host of new expressive opportunities for applications and libraries, but how are they implemented? You might assume that lambda expressions are simply a compact syntax for inner classes, but, in fact, the implementation of lambda expressions is substantially different and builds on the invokedynamic feature added in Java SE 7.
Ceylon is a new modern, elegant programming language for the JVM and JavaScript VM, designed for team work. But it's more than that, it is a full platform with modularity, an SDK, tools and IDEs.
We will present Ceylon the language, the platform, and its ecosystem. You will see everything from starting a new project in the IDE to publishing it on Herd, our module repository, including using the SDK. We will also discuss the ongoing Ceylon projects such as the build system, Vert.x integration or Cayla, the new web framework.
Finally we will discuss the plans for Ceylon 1.2 and further.
Exploring Ceylon with Gavin King - JUG BB Talk - Belrin 2014hwilming
The slide to the Java User Group Talk Exploring Ceylon from Gavin King.
Abstrakt:
Ceylon is a new programming language designed for writing large programs in teams. The language emphasizes readability, modularity, typesafety, and tooling. Ceylon programs execute on Java and JavaScript virtual machines. In this session, Gavin King will talk about the ideas behind Ceylon and demonstrate the language, its type system, its module architecture, and its IDE.
Speaker:
Gavin King leads the Ceylon project at Red Hat. He is the creator of Hibernate, a popular object/relational persistence solution for Java, and the Seam Framework, an application framework for enterprise Java. He's contributed to the Java Community Process as JBoss and then Red Hat representative for the EJB and JPA specifications and as lead of the CDI specification.
Now he works full time on Ceylon, polishing the language specification, developing the compiler frontend, and thinking about the SDK and future of the platform. He's still a fan of Java, and of other languages, especially Smalltalk, Python, and ML.
Intro to Object Oriented Programming with Java Hitesh-Java
In this core java training session, you will learn Object Oriented Programming. Topics covered in this session are:
• Object Oriented Programming Concepts
• Introduction to OO Analysis and Design
For more information about this course visit on this link: https://www.mindsmapped.com/courses/software-development/learn-java-fundamentals-hands-on-training-on-core-java-concepts/
Synapse India Reviews About:
Functional/procedural programming:
program is a list of instructions to the computer
Object-oriented programming
program is composed of a collection objects that communicate with each other
Java Course 7: Text processing, Charsets & EncodingsAnton Keks
Lecture 7 from the IAG0040 Java course in TTÜ.
See the accompanying source code written during the lectures: https://github.com/angryziber/java-course
Do you know the difference between charset & encoding? Every programmer nowadays MUST understand these terms, how they work, and how to use them. Otherwise we constantly face broken software refusing to work with international characters properly.
Review Session and Attending Java Interviews Hitesh-Java
In this core java training session, you will learn Java Review. Topics covered in this session are:
• How to prepare for a typical Java interview?
• Typical interview questions…
For more information about this course visit on this link: https://www.mindsmapped.com/courses/software-development/learn-java-fundamentals-hands-on-training-on-core-java-concepts/
Model Manipulation Using Embedded DSLs in ScalaFilip Krikava
A short presentation (student talk category) given at the Scala Workshop 2013 in Montpellier, France (2.7.2013). This is slightly extended version to be more self-contained. It presents the basics of Sigma such as the common infrastructure support, model consistency checking and model transformation together with some perspectives of further deep embedding.
The big language features for Java SE 8 are lambda expressions (a.k.a. closures) and default methods (a.k.a. virtual extension methods). Adding closures to the Java language opens up a host of new expressive opportunities for applications and libraries, but how are they implemented? You might assume that lambda expressions are simply a compact syntax for inner classes, but, in fact, the implementation of lambda expressions is substantially different and builds on the invokedynamic feature added in Java SE 7.
Ceylon is a new modern, elegant programming language for the JVM and JavaScript VM, designed for team work. But it's more than that, it is a full platform with modularity, an SDK, tools and IDEs.
We will present Ceylon the language, the platform, and its ecosystem. You will see everything from starting a new project in the IDE to publishing it on Herd, our module repository, including using the SDK. We will also discuss the ongoing Ceylon projects such as the build system, Vert.x integration or Cayla, the new web framework.
Finally we will discuss the plans for Ceylon 1.2 and further.
Exploring Ceylon with Gavin King - JUG BB Talk - Belrin 2014hwilming
The slide to the Java User Group Talk Exploring Ceylon from Gavin King.
Abstrakt:
Ceylon is a new programming language designed for writing large programs in teams. The language emphasizes readability, modularity, typesafety, and tooling. Ceylon programs execute on Java and JavaScript virtual machines. In this session, Gavin King will talk about the ideas behind Ceylon and demonstrate the language, its type system, its module architecture, and its IDE.
Speaker:
Gavin King leads the Ceylon project at Red Hat. He is the creator of Hibernate, a popular object/relational persistence solution for Java, and the Seam Framework, an application framework for enterprise Java. He's contributed to the Java Community Process as JBoss and then Red Hat representative for the EJB and JPA specifications and as lead of the CDI specification.
Now he works full time on Ceylon, polishing the language specification, developing the compiler frontend, and thinking about the SDK and future of the platform. He's still a fan of Java, and of other languages, especially Smalltalk, Python, and ML.
Ceylon is a new programming language for the JVM which was recently released on http://ceylon-lang.org with Eclipse based tooling available from day one.
This talk will introduce you to the goals and some of the features of the language while showing the features of the Eclipse based IDE.
Ceylon is a programming language for writing large programs in a team environment. The language is elegant, highly readable, extremely typesafe, and makes it easy to get things done. And it's easy to learn for programmers who are familiar with mainstream languages used in business computing. Ceylon has a full-featured Eclipse-based development environment, allowing developers to take best advantage of the powerful static type system. Programs written in Ceylon execute on the JVM.
Slides as they were used at EclipseCon 2012
Slides originating from a talk I gave at ScalaMUC on 2013-12-17. The corresponding code can be found at https://github.com/afwlehmann/iteratee-tutorial .
An overview of the Infusion JavaScript application framework and its value for creating accessible open Web apps. Presented at a Fluid Community Workshop in Toronto, September 2010.
Java Swing.ppt THIA GIVE YHR BASIC KNOWLEDGER ABOUT JAVAnikitaparmar61
Java Swing tutorial is a part of Java Foundation Classes (JFC) that is used to create window-based applications. It is built on the top of AWT (Abstract Windowing Toolkit) API and entirely written in java.
Unlike AWT, Java Swing provides platform-independent and lightweight components.
The javax.swing package provides classes for java swing API such as JButton, JTextField, JTextArea, JRadioButton, JCheckbox, JMenu, JColorChooser etc.
Difference between AWT and Swing
There are many differences between java awt and swing that are given below.
ADVERTISEMENT
No. Java AWT Java Swing
1) AWT components are platform-dependent. Java swing components are platform-independent.
2) AWT components are heavyweight. Swing components are lightweight.
3) AWT doesn't support pluggable look and feel. Swing supports pluggable look and feel.
4) AWT provides less components than Swing. Swing provides more powerful components such as tables, lists, scrollpanes, colorchooser, tabbedpane etc.
5) AWT doesn't follows MVC(Model View Controller) where model represents data, view represents presentation and controller acts as an interface between model and view. Swing follows MVC.
What is JFC
The Java Foundation Classes (JFC) are a set of GUI components which simplify the development of desktop applications.
Do You Know
How to create runnable jar file in java?
How to display image on a button in swing?
How to change the component color by choosing a color from ColorChooser ?
How to display the digital watch in swing tutorial ?
How to create a notepad in swing?
How to create puzzle game and pic puzzle game in swing ?
How to create tic tac toe game in swing ?
Hierarchy of Java Swing classes
The hierarchy of java swing API is given below.
hierarchy of javax swing
Commonly used Methods of Component class
The methods of Component class are widely used in java swing that are given below.
Method Description
public void add(Component c) add a component on another component.
public void setSize(int width,int height) sets size of the component.
public void setLayout(LayoutManager m) sets the layout manager for the component.
public void setVisible(boolean b) sets the visibility of the component. It is by default false.
Java Swing Examples
There are two ways to create a frame:
ADVERTISEMENT
ADVERTISEMENT
By creating the object of Frame class (association)
By extending Frame class (inheritance)
We can write the code of swing inside the main(), constructor or any other method.
Simple Java Swing Example
Let's see a simple swing example where we are creating one button and adding it on the JFrame object inside the main() method.
File: FirstSwingExample.java
import javax.swing.*;
public class FirstSwingExample {
public static void main(String[] args) {
JFrame f=new JFrame();//creating instance of JFrame
JButton b=new JButton("click");//creating instance of JButton
b.setBounds(130,100,100, 40);//x axis, y axis, width, height
Af.add(b);//adding button in JFR
Java is high level programming language. It has a compiler named JAVA that use to convert java language to machine language or byte code.
for more free learning visit:https://quipoin.com/view/Java/Introduction
Searching for Core Java and SQL free Online Course? To be a strong developer, start learning free online Java Courses and SQL tutorials that is excellent for beginners.
JAVA was developed by Sun Microsystems Inc in 1991, later acquired by Oracle Corporation. It was developed by James Gosling and Patrick Naughton. It is a simple programming language. Writing, compiling and debugging a program is easy in java. It helps to create modular programs and reusable code.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
Introducing the Ceylon Project - Gavin King presentation at QCon Beijing 2011
1. Introducing the Ceylon Project
Gavin King
Red Hat
in.relation.to/Bloggers/Gavin
Saturday, April 9, 2011
2. About this session
• I’m going to talk about why we started work on this project
• I’m going to cover some basic examples at a very shallow level
• I’m not going to get into the details of the type system
• If you’re interested, come to my second presentation: “The Ceylon
Language”
• This project is not yet available to the public and has not even been officially
announced
• QCon China is getting a special sneak preview - the first time I’m talking
about the project in public!
Saturday, April 9, 2011
3. Why we’re (still) fans of Java
• Java was the first language to feature the following “perfect” combination of
features:
• virtual machine execution, giving platform independence
• automatic memory management and safe referencing
• static typing
• lexical scoping
• readable syntax
• Therefore, Java was the first language truly suitable for
• large team development, and
• large-scale deployments of multi-user applications.
• It turns out that large teams developing multi-user applications describes the
most interesting class of project in business computing
Saturday, April 9, 2011
4. Why we’re (still) fans of Java
• Java is easy
• Java’s syntax is rooted in standard, everyday mathematical notion taught
in high schools and used by mathematicians, engineers, and software
developers
• not the lambda calculus used only by theoretical computer scientists
• The language is mostly simple to learn and the resulting code is extremely
easy to read and understand
• Static typing enables sophisticated tooling including automatic refactoring,
code navigation, and code completion
• this kind of tooling is simply not possible without static typing
• Java is robust
• With static typing, automatic memory management, and no C-style
pointers, most bugs are found at development time
Saturday, April 9, 2011
5. Why we’re (still) fans of Java
• The Java community is made of ordinary people trying to solve practical
problems
• Java is unashamedly focussed on problems relevant to business
computing
• The culture is a culture of openness that rejects dominance by any single
company or interest
• Java has remained committed to platform independence and portability
• The community has a huge tradition of developing and sharing reusable
code (frameworks, libraries)
Saturday, April 9, 2011
6. Why we’re frustrated
• After ten often-frustrating years developing frameworks for Java, we simply
can’t go any further without a better solution for defining structured data and
user interfaces
• Java is joined at the hip with XML, and this hurts almost every Java
developer almost every day
• There is simply no good way to define a user interface in Java, and that is
a language problem
• Lack of a language-level modularity solution resulted in the creation of
monstrous, over-complex, harmful technologies like Maven and OSGi.
• Instead of modules, Java has multiple platforms, which has divided the
developer community
• Lack of support for first-class and higher-order functions results in much
unnecessary verbosity in everyday code
• Meta-programming in Java is clumsy and frustrating, reducing the quality of
framework and other generic code
Saturday, April 9, 2011
7. Why we’re frustrated
• A number of other “warts” and mistakes annoy us every day, for example
• getters/setters
• arrays and primitive types
• non-typesafety of null values
• the dangerous synchronized keyword
• clumsy annotation syntax
• verbose constructor syntax
• broken = operator
• checked exceptions
• complex parametric polymorphism system (generics) that few developers
completely understand
• ad-hoc (broken?) block structure
• clumsy, error-prone instanceof and typecast syntax
Saturday, April 9, 2011
8. Why we’re frustrated
• Most of all, we’re frustrated by the SE SDK
• designed in haste 15 years ago, and never properly modernized, it still has
an experimental, work-in-progress feel about it
• but is simultaneously bloated with obscure stuff
• features some truly bizarre things
• e.g. all Java objects are semaphores ?!
• many basic tasks are absurdly difficult to accomplish
• e.g. anything involving java.io or java.lang.reflect
• overuses stateful (mutable) objects
• especially the highly overrated collections framework
Saturday, April 9, 2011
9. The Ceylon Project
• What would a language and SDK for business computing look like if it were
designed today, with an eye to the successes and failures of the Java
language and Java SE SDK?
Saturday, April 9, 2011
10. The Ceylon Project
• This much is clear:
• It would run on the Java Virtual Machine
• It would feature static typing
• It would feature automatic memory management and safe referencing
• It would retain Java’s readability
• It would feature first-class and higher-order functions
• It would provide a declarative syntax for defining user interfaces and
structured data
• It would feature built-in modularity
• It would strive to be easy to learn and understand
Saturday, April 9, 2011
11. The Ceylon Project
• Unfortunately, there’s no existing language that truly fits these requirements
• My team has spent the past two years designing what we think the language
should look like, writing a language specification, an ANTLR grammar, and a
prototype compiler
• You can’t write code in the language just yet!
• We plan an initial release of the compiler later this year
• I can’t cover the whole language, or even explain the most interesting
principles and concepts in the short time I have here
• The most I can do is give a taste of what some code looks like
Saturday, April 9, 2011
12. Hello World
put this in a file called hello.ceylon
void hello() {
writeLine(“Hello World!”);
}
The language has a strict recursive, regular
block structure governing visibility and
lifecycle of declarations. Therefore, there’s no
equivalent of Java’s static. Instead, a
toplevel method declaration fills a similar role.
Saturday, April 9, 2011
13. Hello World
API documentation is specified using
annotations.
doc “The classic Hello World program”
by “Gavin”
void hello() {
writeLine(“Hello World!”);
}
Modifiers like abstract, variable,
shared, deprecated aren’t
keywords, they’re just annotations.
Saturday, April 9, 2011
14. Hello World
void is a keyword!
void hello(String name) {
writeLine(“Hello “ name ”!”);
}
String interpolation has a simple
syntax - very useful in user interface
definitions.
Saturday, April 9, 2011
15. Hello World
Defaulted parameters are optional.
void hello(String name = ”World”) {
writeLine(“Hello “ name ”!”);
}
Defaulted parameters are extremely
useful, since Ceylon does not
support method overloading (or any
other kind of overloading).
Saturday, April 9, 2011
16. Hello World
If a value of type T can be null, it must be declared as type
Optional<T>, which may be abbreviated to T?.
void hello() {
String? name = process.args.first;
if (exists name) {
writeLine(“Hello “ name ”!”);
}
else {
writeLine(“Hello World!”);
}
} Use of an optional value must be guarded by
the if (exists ... ) construct. Therefore,
NullPointerExceptions are impossible.
Saturday, April 9, 2011
17. Classes
All values are instances of a class.
class Counter() {
variable Natural count := 0;
Attributes and local variables are immutable by default.
Assignable values must be annotated variable.
shared void increment() {
count++;
}
The shared annotation makes a
declaration visible outside the block
} in which it is defined. By default, any
declaration is block local.
Saturday, April 9, 2011
18. Classes
class Counter() {
variable Natural count := 0;
shared void increment() {
count++;
}
shared Natural currentValue {
return count;
} A getter looks like a method
} without a parameter list.
An attribute may be a simple value, a getter,
or a getter/setter pair.
Saturday, April 9, 2011
19. Classes
There is no new keyword.
Counter c = Counter();
c.increment();
writeLine(c.currentValue);
Attribute getters are called just like
simple attributes. The client doesn’t
care what type of attribute it is.
Attributes are polymorphic. A subclass may override
a superclass attribute. It may even override a simple
attribute with a getter or vice versa!
Saturday, April 9, 2011
20. Classes
The local keyword may be used in place
of a type for block-local declarations.
local c = Counter();
c.increment();
writeLine(c.currentValue);
You can’t use local for shared
declarations. One consequence of this
is that the compiler can do type
inference in a single pass of the code!
Saturday, April 9, 2011
21. Classes
class Counter() {
variable Natural count := 0;
...
shared Natural currentValue {
return count;
}
shared assign currentValue {
count := currentValue;
}
} Assignment to a variable value or attribute
setter is done using the := operator. The =
specifier is used only for specifying immutable
values.
Saturday, April 9, 2011
22. Classes
There is no constructor syntax. Instead, the
class itself declares parameters, and the body
of the class may contain initialization logic.
class Counter(Natural initialValue) {
if (initialValue>1000) {
throw OutOfRangeException()
}
variable Integer count := initialValue;
...
}
How can a class have multiple constructors?
It can’t! There’s no overloading in Ceylon.
Saturday, April 9, 2011
23. Sequences
Sequences are immutable objects that are a bit like arrays.
Sequence<String> itin =
Sequence(“Guanajuato”, “Mexico”,
“Vancouver”, “Auckland”,
“Melbourne”);
String? mex = itin.value(1);
Sequence<String> layovers =
itin.range(1..3);
Sequence<String> longer = join(itin,
Sequence(“Hong Kong”, “Beijing”));
Saturday, April 9, 2011
24. Sequences
Syntactic abbreviations allow us to eliminate the verbosity.
String[] itin =
{ “Guanajuato”, “Mexico”,
“Vancouver”, “Auckland”,
“Melbourne” };
String? mex = itin[1];
String[] layovers =
itin[1..3];
String[] longer = itin +
{ “Hong Kong”, “Beijing” };
Saturday, April 9, 2011
25. Higher-order functions
A parameter may be a method signature,
meaning that it accepts references to methods.
void repeat(Natural times,
void perform()) {
for (Natural n in 1..times) {
perform();
}
The “functional” parameter may be
} invoked just like any other method.
Saturday, April 9, 2011
26. Higher-order functions
repeat(3, hello);
A reference to a method is just the name of
the method, without an argument list.
Saturday, April 9, 2011
27. Higher-order functions
repeat(3, person.sayHello);
We can even “curry” the method receiver.
Saturday, April 9, 2011
28. Higher-order functions
We may define a method “by reference”.
void hello(String name) = hello;
The name of the method, without
arguments, refers to the method itself.
void hello2(String name) = person.sayHello;
Unlike other languages with first-class functions,
Ceylon doesn’t have a syntax for anonymous
functions (“lambdas”) that appear in expressions.
Saturday, April 9, 2011
29. Higher-order functions
The method name
repeat(3)
perform() { A parameter name
writeLine(“Hola Mundo!”);
};
Alternatively, a method may be defined inline,
as part of the invocation. This syntax is stolen
from Smalltalk.
Saturday, April 9, 2011
30. Higher-order functions
repeat(3) We may omit the empty parameter list.
perform {
writeLine(“Hola Mundo!”);
};
This allows a library to define syntax for new control
structures, assertions, comprehensions, etc.
Saturday, April 9, 2011
31. Higher-order functions
A method may declare multiple lists of
parameters. The method body is executed
after arguments have been supplied to all
parameter lists.
Float add(Float x)(Float y) {
return x+y;
}
Saturday, April 9, 2011
32. Higher-order functions
We can “curry” a list of arguments.
Float addOne(Float y) = add(1.0);
Float three = addOne(2.0);
Providing arguments to just one parameter
list produces a method reference.
The point of all this is that we are able to
provide all the functionality of first-class
and higher-order functions without needing
to resort to unnatural syntactic constructs
inspired by the lambda calculus notation.
Saturday, April 9, 2011
33. Closure
An inner declaration always has access to parameters,
locals, and attributes of the containing declaration.
void aMethod(String name) {
void hello() {
writeLine(“Hello “ name “!”);
}
} Notice how regular the language syntax is!
class AClass(String name) {
void hello() {
writeLine(“Hello “ name “!”);
}
}
Saturday, April 9, 2011
34. Named argument syntax
String join(String separator,
String... strings) { ... }
join(“, ”, “C”, “Java”, Smalltalk”);
join { separator = ”, “;
“C”, “Java”, Smalltalk” };
A named argument invocation is enclosed in
braces, and non-vararg arguments are listed
using the name=value; syntax.
Saturday, April 9, 2011
35. Higher-order functions and named arguments
repeat { The method name
A parameter name times = 3;
void perform() { Another parameter name
writeLine(“Hola Mundo!”);
}
A named argument may even
}; be a method definition.
Saturday, April 9, 2011
36. Named argument syntax
Html hello {
Head head { title = “Squares”; }
Body body {
Div {
cssClass = “greeting”;
“Hello” name “!”
}
}
} This looks like a typesafe declarative
language (for example XML) with built-in
templating. But it’s actually written in a
general-purpose language!
Saturday, April 9, 2011
37. Named argument syntax
class Table(String title, Natural rows,
Column... columns) { ... }
class Column(String heading,
String content(Natural row)) { ... }
We can define the “schema” of a declarative
language as a set of classes.
Saturday, April 9, 2011
38. Named argument syntax
Table squares {
title = “Squares”;
rows = 10;
Column {
heading = “x”;
String content(Natural row) {
return $row;
}
} Notice the use of callback methods!
Column {
heading = “x**2”;
String content(Natural row) {
return $row**2;
}
}
}
Saturday, April 9, 2011
39. What next?
• If you’re interested to learn more, come to the next talk “The Ceylon
Language”
• We need help implementing the compiler and designing the SDK.
• This isn’t worth doing unless we do it as a community!
Questions?
Saturday, April 9, 2011