This is brief presentation on the Scala programming language. It is aimed at Java developers who are curious about Scala. It was given at a San Francisco Java User Group in January 2009.
Functional Programming in Java 8 - Exploiting LambdasGanesh Samarthyam
The programming world is moving towards functional programming. All the major and popular programming languages (including Java, C++, C#, Swift, and Python) support functional programming. Functional programming languages such as Clojure, Scala, and F# are on the rise. This talk introduces functional programming to those who are new to this paradigm using lambda functions in Java 8. The talk will cover syntax and semantics of lambda functions, moving from external iteration to internal iteration, and how lambda functions can result in shorter and more readable code. If you are new to functional programming and want productivity gains from using Java’s lambda functions, this talk is certainly for you.
This is brief presentation on the Scala programming language. It is aimed at Java developers who are curious about Scala. It was given at a San Francisco Java User Group in January 2009.
Functional Programming in Java 8 - Exploiting LambdasGanesh Samarthyam
The programming world is moving towards functional programming. All the major and popular programming languages (including Java, C++, C#, Swift, and Python) support functional programming. Functional programming languages such as Clojure, Scala, and F# are on the rise. This talk introduces functional programming to those who are new to this paradigm using lambda functions in Java 8. The talk will cover syntax and semantics of lambda functions, moving from external iteration to internal iteration, and how lambda functions can result in shorter and more readable code. If you are new to functional programming and want productivity gains from using Java’s lambda functions, this talk is certainly for you.
Short (45 min) version of my 'Pragmatic Real-World Scala' talk. Discussing patterns and idioms discovered during 1.5 years of building a production system for finance; portfolio management and simulation.
The Scala programming language has been gaining momentum recently as an alternative (and some might say successor) to Java on the JVM. This talk will start with an introduction to basic Scala syntax and concepts, then delve into some of Scala's more interesting and unique features. At the end we'll show a brief example of how Scala is used by the Lift web framework to simplify dynamic web apps.
Java 8: more readable and flexible codeWeAreEsynergy
In this presentation we introduce Java 8’s main new features and show how you can benefit from them to write code that is more readable and more flexible to requirement changes.
We will show how:
1) Lambda expressions and behaviour parameterisation let you write concise code that can cope for requirement changes
2) The new Streams API lets you express complex data process queries in a succinct way while automatically leveraging your multi-core architecture
3) Using the new Optional class can let you reduce unexpected NullPointer exceptions
4) Default methods bring a form of multi-inheritance to Java
Akka and the Zen of Reactive System DesignLightbend
In order to be successful with asynchronous programming, when coming from synchronous execution models you need to change your mindset and look at things from a slightly different perspective. In order to use Akka at it's best, you will have to change the way you think about application design (loosen coupling in space and time between components), and re-think what you've maybe learned in the past.
In this talk we uncover a number of rules that serve as a guide in designing concurrent distributed applications, how those apply to Akka, and how they can help you in daily app development.
Aimed at developers through architects, Akka team happy hAkker, Konrad Malawski, bends your parameters with regards to application design and asynchronous execution models.
Spring Data Requery is alternatives of Spring Data JPA
Requery is lightweight ORM for DBMS (MySQL, PostgreSQL, H2, SQLite, Oracle, SQL Server)
Spring Data Requery provide Query By Native Query, Query By Example and Query By Property like Spring Data JPA
Spring Data Requery is better performance than JPA
Appium + selenide comaqa.by. Антон СеменченкоAlina Dolgikh
Appium набирает все большую популярность среди инструментов для функционального тестирования мобильных приложений. Selenide - популярная Java обертка над Selenium Webdriver, позволяющая легко и непринужденно писать автоматизированные тесты для веб приложений. Можно ли интегрировать два инструмента, учитывая то, что appium использует свой клиент и свой протокол, несколько отличные от Selenium Webdriver? Что мы сможем выиграть в случае успеха? Давайте поговорим об этом!
Java has a solid Memory Model, and there are a couple of excellent libraries for concurrency. When you start working with threads however, pitfalls start appearing - especially if the program is supposed to be fast and correct. This session shows proven solutions for some typical problems, showing how to view program code from a concurrency perspective: Which threads share which data, and how? How to reduce the impact of locks? How to avoid them altogether - and when is that worth it?
Short (45 min) version of my 'Pragmatic Real-World Scala' talk. Discussing patterns and idioms discovered during 1.5 years of building a production system for finance; portfolio management and simulation.
The Scala programming language has been gaining momentum recently as an alternative (and some might say successor) to Java on the JVM. This talk will start with an introduction to basic Scala syntax and concepts, then delve into some of Scala's more interesting and unique features. At the end we'll show a brief example of how Scala is used by the Lift web framework to simplify dynamic web apps.
Java 8: more readable and flexible codeWeAreEsynergy
In this presentation we introduce Java 8’s main new features and show how you can benefit from them to write code that is more readable and more flexible to requirement changes.
We will show how:
1) Lambda expressions and behaviour parameterisation let you write concise code that can cope for requirement changes
2) The new Streams API lets you express complex data process queries in a succinct way while automatically leveraging your multi-core architecture
3) Using the new Optional class can let you reduce unexpected NullPointer exceptions
4) Default methods bring a form of multi-inheritance to Java
Akka and the Zen of Reactive System DesignLightbend
In order to be successful with asynchronous programming, when coming from synchronous execution models you need to change your mindset and look at things from a slightly different perspective. In order to use Akka at it's best, you will have to change the way you think about application design (loosen coupling in space and time between components), and re-think what you've maybe learned in the past.
In this talk we uncover a number of rules that serve as a guide in designing concurrent distributed applications, how those apply to Akka, and how they can help you in daily app development.
Aimed at developers through architects, Akka team happy hAkker, Konrad Malawski, bends your parameters with regards to application design and asynchronous execution models.
Spring Data Requery is alternatives of Spring Data JPA
Requery is lightweight ORM for DBMS (MySQL, PostgreSQL, H2, SQLite, Oracle, SQL Server)
Spring Data Requery provide Query By Native Query, Query By Example and Query By Property like Spring Data JPA
Spring Data Requery is better performance than JPA
Appium + selenide comaqa.by. Антон СеменченкоAlina Dolgikh
Appium набирает все большую популярность среди инструментов для функционального тестирования мобильных приложений. Selenide - популярная Java обертка над Selenium Webdriver, позволяющая легко и непринужденно писать автоматизированные тесты для веб приложений. Можно ли интегрировать два инструмента, учитывая то, что appium использует свой клиент и свой протокол, несколько отличные от Selenium Webdriver? Что мы сможем выиграть в случае успеха? Давайте поговорим об этом!
Java has a solid Memory Model, and there are a couple of excellent libraries for concurrency. When you start working with threads however, pitfalls start appearing - especially if the program is supposed to be fast and correct. This session shows proven solutions for some typical problems, showing how to view program code from a concurrency perspective: Which threads share which data, and how? How to reduce the impact of locks? How to avoid them altogether - and when is that worth it?
Поговорим о тестирование Android приложений при помощи Calabash, Robolectrick, Spock и Junit. Как правильно применять BDD на вашем проекте. Обсудим настройку настройку билд сервера и процесса Continious Delivery в андроид экосистеме.
Software developers spend most of their time working with code on literal level. Unfortunately, vast amount of design flaws hides behind hundreds of interrelated packages, classes and methods, destroying your system deliberately. In this talk will supply you with knowledge necessary to manage complexity of your logical design from theoretical, practical and tooling perspectives. Time to keep architecture in predictable and manageable state!
No sql unsuccessful_story. Владимир ЗеленкевичAlina Dolgikh
Рано или поздно каждый разработчик сталкивается с проблемой выбора конкретного технического решения для определенной задачи. В современном мире каждый день появляются новые тенденции и технологии. Одной из самых быстро растущих областей является NoSQL. Наряду с широко известными и успешно используемыми решениями существует ряд малознакомых, но очень амбициозных проектов. В такой ситуации процесс выбора и интеграции играет ключевую роль в успешности выполнения поставленных задач.
В своем выступлении я хочу поделиться опытом, который будет полезен всем, кто осуществляет техническую экспертизу и управление командой.
Я расскажу об опыте выбора и внедрения NoSQL в Java Enterprise проект, о плюсах и минусах. Но, несмотря на интригующее название, в первую очередь цель доклада - поделиться опытом, а не провести глубокий анализ одного из множества NoSQL решений.
Зачем переводить работающий проект с RDBMS на noSql? Как это сделать, и как это нельзя делать? Что важнее для успешного пректа - технологическое преимущество или доверительные отношения в команде? Какова роль процесса в успехе проекта и что бывает, когда каждый член команды действует в соответствии со своими локальными интересами.
Scala er et Java-relateret, statisk typet programmeringssprog i hastig fremmarch. Sproget kombinerer aspekter fra objekt- og funktionsorienterede sprog og fokuserer på skalerbarhed og effektivitet, både på det kodemæssige og afviklingsmæssige niveau. Syntaksen er elegant og koncis. Samtidig indeholder sproget stærke konstruktioner til understøttelse af parallelle applikationer, der udnytter fremtidens hardwarearkitekturer.
Java som sprog har ikke bevæget sig meget de seneste år. Vi har stadig ikke closures eller funktionelle aspekter som f.eks. C# har haft siden version 3. Er Scala svaret på enhver Javaudviklers bønner eller er sproget kun interessant for tågehoveder som mig, som begynder at synes bedre og bedre om funktionsorientering? Er den store portion syntaktisk sukker, Scala bringer på bordet, bare tomme kalorier?
Scala er et Java-relateret, statisk typet programmeringssprog i hastig fremmarch. Sproget kombinerer aspekter fra objekt- og funktionsorienterede sprog og fokuserer på skalerbarhed og effektivitet, både på det kodemæssige og afviklingsmæssige niveau. Syntaksen er elegant og koncis. Samtidig indeholder sproget stærke konstruktioner til understøttelse af parallelle applikationer, der udnytter fremtidens hardwarearkitekturer.
I used these slides for a Scala workshop that I gave. They are based on these: http://www.scala-lang.org/node/4454. Thanks to Alf Kristian Støyle and Fredrik Vraalsen for sharing!
Scala.js is a compiler that compiles Scala source code to equivalent Javascript code.
Just like regular Scala, Scala.js offers all those fantastic language features that we know and love: generic classes, type inference, traits and objects, case classes and pattern matching, etc. Scala.js is fully interoperable with JavaScript and allows seamless integration with existing JavaScript libraries.
This webinar by Oleksandr Navka (Lead Software Engineer, Consultant, GlobalLogic) was delivered at Java Community Webinar #1 on August 12, 2020.
Webinar agenda:
- The new structural unit of the program is Java Records
- Updated instanceof statement
- Updated switch operator
More details and presentation: https://www.globallogic.com/ua/about/events/java-community-webinar-1/
Выступление в рамках спецкурса "Немейнстримовые технологии разработки", читаемого в НГУ. http://bit.ly/mainstreamless
Аудио дорожка работает, но нужно иметь некоторое терпение, так как грузится она не моментально.
Об эволюции потоков Java c JDK 6 до наших дней, движущих силах этой эволюции и венце творения - Reactive Streams. Reactive Streams – это многообещающий стандарт асинхронных неблокируемых потоков, поддерживаемый такими гигантами как Oracle, Netflix, Pivotal, Typesafe, RedHat и Twitter.
В список обещаний входит:
- Упрощение реактивного программирования
- Повышение уровня абстракции программ
- В перспективе становление новым стандартом обмена данными для JVM"
David Mertz. Type Annotations. PyCon Belarus 2015Alina Dolgikh
Python is a dynamically (but strongly, for some value of "strongly") typed programming language. Notwithstanding its dynamism, checking types--or other behaviors--of variables has always been possible in Python code, and a steady stream of users have had a desire to do so.
At a conceptual level, enforcing a type is a subset of enforcing an invariant on a variable, and the broader demand for design by contract has been a recurrent theme in Python discussions. PEP 316 addressed this desire (but was not accepted) a decade ago, as did the long defunct library PyDBC. Currently maintained, however, is the PyContracts library, which allows documenting and enforcing both types narrowly, and predicates of variables more broadly. I myself wrote a simple recipe for basic type checking using PEP 3107 annotations at the Python Cookbook: Type checking using Python 3.x annotations (http://code.activestate.com/recipes/578528-type-checking-using-python-3x-annotations/).
Владимир Еремин. Extending Openstack. PyCon Belarus 2015Alina Dolgikh
OpenStack назван одним из лучших open source проектов (по версии http://opensource.com/business/14/12/top-10-open-source-projects-2014) и написан полностью на Python. OpenStack уже включает в себя целую кучу готовых к использованию батареек, но если есть необходимость добавить что-то свое -- вы можете это сделать без изменения базового кода, просто написав собственное расширение. Я расскажу, что такое OpenStack и что он умеет из коробки, какие возможности расширения своей функциональности предоставляет эта платформа и как мы это используем у себя в уютненьком Яндексе.
Стремление каждого разработчика ПО — писать код. Всё, что от этого кода требуется — работать без ошибок и соответствовать задумке. Не секрет, что для более-менее сложного продукта требуется объединить несколько программистов в одну команду и заставить их работать вместе... И вот тут начинаются проблемы: каждый пишет по-своему и затрудняется понять код коллеги. Что в итоге? Падает эффективность, снижается качество продукта, увеличивается время вхождения для новых разработчиков.
Решить эти проблемы помогает контроль за стилем кода. В этом докладе я расскажу про то, какие практики вам могут пригодиться на выбранном пути и какие средства для этого есть в экосистеме Python.
Володимир Гоцик. Getting maximum of python, django with postgres 9.4. PyCon B...Alina Dolgikh
Postgres предоставляет много встроенных возможностей для создания эфективных приложений, использующих базы данных. А в версии 9.4 появляется еще и полноценное JSON поле, при правильном использовании которого, отпадает необходимость использвания NoSQL баз данных. В докладе мы рассмотрим, как использовать этот потенциал по максимуму в своих Python/Django приложениях.
Austin Bingham. Transducers in Python. PyCon BelarusAlina Dolgikh
Understanding Transducers Through Python – Transducers are a new and interesting functional programming concept that comes from the world of Clojure. In this talk we’ll learn about transducers by seeing how to implement them in Python. By using transducers to build familiar functional programming elements like map and filter, we’ll see that transducers are actually simple, elegant, and quite powerful.
Python Refactoring with Rope and Traad – The rope library is a powerful tool for refactoring Python code, but to be truly useful it needs to be available to development environments. Traad is a tool which makes it simpler to integrate rope into nearly any tool by exposing a simple HTTP API. In this session we’ll look at how traad and rope work together, and we’ll see how traad integrates with at least one popular editor.
4 года разрабатывает видеостриминговый сервер эрливидео и в этом докладе расскажет о некоторых отличительных возможностях Erlang, которые позволяют быстро развиваться и поддерживать высочайшее качество ПО минимальными усилиями.
Пиар в стартапе: извлекаем максимум пользы. Алексей ЛартейAlina Dolgikh
1. Зачем стартапу пиар? Чтобы покупали продукт, чтобы инвестировали в компанию, чтобы знали команду и приходили работать (HR-пиар).
2. Целевые аудитории и каналы: бизнес-СМИ (для инвесторов), IT-коммьюнити (для продаж продукта), тематические сообщества (HR).
3. Как формировать вашу базу СМИ? По каким метрикам?
4. Главный секрет успешного пиара: делайте нормальный продукт. Ненормальный не купят, на ненормальный не придут инвесторы, на ненормальный вы не наймете лучших людей.
5. Как заинтересовать журналиста? Рассказывайте истории: о продукте, о разработке, об инвестициях.
6. Используйте попутные инфоповоды: пишите колонки.
7. Сколько денег экономит пиар? Примеры с цифрами.
8. Заключение/выводы.
Подготовка проекта к первому раунду инвестиций. Дмитрий ПоляковAlina Dolgikh
1. Зачем вы получаете инвестиции?
2. Инвестор VS стартапер. Как договариваться?
3. Due diligence: что это и как проходит.
4. Подготовка к due diligence: какие документы готовить?
5. Подготовка к due diligence: чего ни в коем случае не нужно делать и почему?
6. Итог.
Как составлять правильный тизер для инвесторов? Никита РогозинAlina Dolgikh
1. Что такое тизер и для чего он нужен?
2. Какова его структура? Что входит в этот документ?
3. Какие слова надо использовать при составлении тизера и каких лучше избегать?
4. Как тизер «бьется» с презентацией для инвесторов? Много ли там общего контента?
5. Пример отличного тизера.
6. Практические рекомендации и выводы.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
Games are powerful teaching tools, fostering hands-on engagement and fun. But they require careful consideration to succeed. Join me to explore factors in running and selecting games, ensuring they serve as effective teaching tools. Learn to maintain focus on learning objectives while playing, and how to measure the ROI of gaming in education. Discover strategies for pitching gaming to leadership. This session offers insights, tips, and examples for coaches, team leads, and enterprise leaders seeking to teach from simple to complex concepts.
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaYara Milbes
Discover the transformative power of the WhatsApp API in our latest SlideShare presentation, "Top 7 Unique WhatsApp API Benefits." In today's fast-paced digital era, effective communication is crucial for both personal and professional success. Whether you're a small business looking to enhance customer interactions or an individual seeking seamless communication with loved ones, the WhatsApp API offers robust capabilities that can significantly elevate your experience.
In this presentation, we delve into the top 7 distinctive benefits of the WhatsApp API, provided by the leading WhatsApp API service provider in Saudi Arabia. Learn how to streamline customer support, automate notifications, leverage rich media messaging, run scalable marketing campaigns, integrate secure payments, synchronize with CRM systems, and ensure enhanced security and privacy.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
Recreation management software streamlines operations by automating key tasks such as scheduling, registration, and payment processing, reducing manual workload and errors. It provides centralized management of facilities, classes, and events, ensuring efficient resource allocation and facility usage. The software offers user-friendly online portals for easy access to bookings and program information, enhancing customer experience. Real-time reporting and data analytics deliver insights into attendance and preferences, aiding in strategic decision-making. Additionally, effective communication tools keep participants and staff informed with timely updates. Overall, recreation management software enhances efficiency, improves service delivery, and boosts customer satisfaction.
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
93. Pattern matching
abstract class ChatProtocol
case class Message(userId:Int, text:String)
case class Join(userId:Int, name:String)
case class Leave(userId:Int)
command match {
case Message(id, text) = println(s${users(id)}: ${text})
case Join(id, name) = {
users += (id, name)
println(s${name} joined)
}
case Leave(id) = {
println(s${users(id)} left)
users -= id
}
}