Conférence des Geeks Anonymes sur " le langage Go ", par Thomas Hayen le 23 septembre 2020.
Cette conférence est disponible en vidéo sur Youtube : https://youtu.be/AlGGneVGTJk
Kotlin Bytecode Generation and Runtime Performanceintelliyole
In this talk, we'll dive into the details of how various language features supported by Kotlin are translated to Java bytecode. We'll use the JMH microbenchmarking tool to study the relative performance of various constructs and to understand how we can ensure top performance of the Kotlin code that we write.
Kotlin provides a lot of features out of the box even though those are not supported by JVM. Have you ever wondered how Kotlin does it? If yes, then this presentation is for you.
Kotlin compiler tweaks our code in such a way that, JVM can execute it. this deck goes through lots of Kotlin features and explains how it looks at runtime for JVM compatibility. Of course we are not going to look into bytecode, instead we will look into the decompiled version of the bytecode generated by Kotlin compiler.
NOTE: This was presented at DevFest Kolkata 2019.
GoLightly: Building VM-Based Language Runtimes with Google GoEleanor McHugh
Expanded and updated version of my Strange Loop 2010 presentation on how to program in Google's Go language with an emphasis on the kind of tricks you might want to perform when implementing a language runtime.
We have this new language, Swift, which takes some familiar Apple patterns, and introduces some new ones. With tools like closures and method chaining, there are definitely some new ways to solve the age-old Obj-c architecture challenges. This talk will walk through some of the most common Obj-c design patterns rewritten in Swift, and showcase the strengths and weaknesses of this new language.
Will talk about kotlin the language and new concepts introduced in the language including functional programming.
And how to use your springframework knowlege to write more concise and elegant backend systems.
We will demo a backend written in spring boot and kotlin and will see how it is so easy to interoperate between java and kotlin code.
Conférence des Geeks Anonymes sur " le langage Go ", par Thomas Hayen le 23 septembre 2020.
Cette conférence est disponible en vidéo sur Youtube : https://youtu.be/AlGGneVGTJk
Kotlin Bytecode Generation and Runtime Performanceintelliyole
In this talk, we'll dive into the details of how various language features supported by Kotlin are translated to Java bytecode. We'll use the JMH microbenchmarking tool to study the relative performance of various constructs and to understand how we can ensure top performance of the Kotlin code that we write.
Kotlin provides a lot of features out of the box even though those are not supported by JVM. Have you ever wondered how Kotlin does it? If yes, then this presentation is for you.
Kotlin compiler tweaks our code in such a way that, JVM can execute it. this deck goes through lots of Kotlin features and explains how it looks at runtime for JVM compatibility. Of course we are not going to look into bytecode, instead we will look into the decompiled version of the bytecode generated by Kotlin compiler.
NOTE: This was presented at DevFest Kolkata 2019.
GoLightly: Building VM-Based Language Runtimes with Google GoEleanor McHugh
Expanded and updated version of my Strange Loop 2010 presentation on how to program in Google's Go language with an emphasis on the kind of tricks you might want to perform when implementing a language runtime.
We have this new language, Swift, which takes some familiar Apple patterns, and introduces some new ones. With tools like closures and method chaining, there are definitely some new ways to solve the age-old Obj-c architecture challenges. This talk will walk through some of the most common Obj-c design patterns rewritten in Swift, and showcase the strengths and weaknesses of this new language.
Will talk about kotlin the language and new concepts introduced in the language including functional programming.
And how to use your springframework knowlege to write more concise and elegant backend systems.
We will demo a backend written in spring boot and kotlin and will see how it is so easy to interoperate between java and kotlin code.
Kotlin is something more than just tool that help you remove boilerplate from you code. It brings much more than just lamdas and handy syntax to your Java or Android project
Kotlin is a cross-platform, statically typed, general-purpose programming language with type inference. Kotlin is designed to interoperate fully with Java, and the JVM version of Kotlin's standard library depends on the Java Class Library, but type inference allows its syntax to be more concise.
The event will be led by Zoltan Domahidi (Senior Kotlin Software Engineer at Magyar Telekom).
As a part of kotlinx.coroutines 1.2 Flow was introduced as a cold asynchronous data stream. How does it work? What we can do with it? Is it that we waiting so long for replacing Rx? The talk has answers to them.
Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...Tudor Dragan
Kotlin is a powerful language, but it also comes with its traps and pitfalls. This presentation is about uncovering the very nice features and strange particularities that the language has to offer.
In this presentation, John A. De Goes looks at several concurrency and scalability problems similar to the ones all programmers have to face, and shows how purely functional solutions written using Scalaz 8 are shorter, faster, easier to test, and easier to understand than competing solutions written using Akka actors. Discover how functional programming can be your secret superpower when it comes to quickly building bullet-proof business applications!
Kotlin is something more than just tool that help you remove boilerplate from you code. It brings much more than just lamdas and handy syntax to your Java or Android project
Kotlin is a cross-platform, statically typed, general-purpose programming language with type inference. Kotlin is designed to interoperate fully with Java, and the JVM version of Kotlin's standard library depends on the Java Class Library, but type inference allows its syntax to be more concise.
The event will be led by Zoltan Domahidi (Senior Kotlin Software Engineer at Magyar Telekom).
As a part of kotlinx.coroutines 1.2 Flow was introduced as a cold asynchronous data stream. How does it work? What we can do with it? Is it that we waiting so long for replacing Rx? The talk has answers to them.
Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...Tudor Dragan
Kotlin is a powerful language, but it also comes with its traps and pitfalls. This presentation is about uncovering the very nice features and strange particularities that the language has to offer.
In this presentation, John A. De Goes looks at several concurrency and scalability problems similar to the ones all programmers have to face, and shows how purely functional solutions written using Scalaz 8 are shorter, faster, easier to test, and easier to understand than competing solutions written using Akka actors. Discover how functional programming can be your secret superpower when it comes to quickly building bullet-proof business applications!
Kotlin coroutine - the next step for RxJava developer?Artur Latoszewski
Kotlin is a language that is rapidly gaining popularity, among others thanks to cooperation with Java. On the other hand, RxJava has brought us many solutions to problems related to asynchronous code. If everything is so cool, do we need anything else in the Kotlin world? Is Kotlin Coroutine a competition for RxJava?
With my simple implementation I wanted to demonstrate the basic ideas of th IO Monad.
My impl of the IO Monad is just a feasibility study, not production code!
When coding my impl of IO I was very much inspired by cats.effect.IO and monix.eval.Task which I studied at that time. Both are implementions of the IO Monad.
The API of my IO is very similar to the basics of Monix Task. This IO implementation also helped me to understand the IO Monad (of cats-effect) and Monix Task.
Interop with Future is also supported. You can convert IO to a Future. Vice versa you can convert a Future to an IO.
The development of my impl can be followed step by step in the code files in package iomonad.
Kotlin For Android - Functions (part 3 of 7)Gesh Markov
This presentation is part of a workshop series.
In this section you will learn about operators, inlining, a little bit about generics, named parameters, lambdas and closures, obtaining references to functions and passing them to other functions, and higher-order functions.
License:
This presentation is licensed under the Creative Commons, No Derivatives, Version 3.0 US: https://creativecommons.org/licenses/by-nd/3.0/us/legalcode
From object oriented to functional domain modelingCodemotion
"From object oriented to functional domain modeling" by Mario Fusco
Malgrado l'introduzione delle lambda, la gran parte degli sviluppatori Java non è ancora abituata agli idiomi della programmazione funzionale e quindi non è pronta a sfruttare a pieno le potenzialità di Java 8. In particolare non è ancora comune vedere dati e funzioni usate insieme quando si modella un dominio di business. Lo scopo del talk è mostrare come alcuni principi di programmazione funzionale quali l'impiego di oggetti e strutture dati immutabili, l'uso di funzioni senza side-effect e il loro reuso mediante composizione, possono anche essere validi strumenti di domain modelling.
scala.concurrent.Future is familiar to nearly all Scala devs.
This presentation first talks about referential transparency and the IO Monad in general. (Monix Task is an impl of the IO Monad.)
Then it compares Future Monix 3.x Task with their Pros and Cons.
Interop with Future: As Scala's Future is used in many environments and libraries, we look at the conversion from Task to Future and - vice versa - from Future to Task.
I will also take a look at Task evaluation, cancelation and memoization as well as tail recursive loops and asynchronous boundaries.
The presentation will include a comparative discussion on ExecutionContext (required for Future) and Scheduler (required for Task, but only to run it).
Often recurring on the valuable Monix Task doumentation at https://monix.io/docs/3x/eval/task.html the presentation can also be seen as an introduction to Monix Task.
JDD 2016 - Philippe Charrière - Golo, The Tiny Language That Gives Super PowersPROIDEA
Golo is a little dynamic language for the JVM
Golo is built from the first day with invokedynamic
Golo is light (~700 kb) and fast
I'm not a Java Ninja, nor an invokedynamic Ninja, however I can do a lot of (greats) things easily with Golo.
I'm not a Java Ninja, nor an invokedynamic Ninja, however I can do a lot of (great) things easily with Golo.
Golo is easy to learn, to use and to hack
I will present:
- The basics of Golo
- Some specific features of Golo (DynamicObjects, Structures, Functional Types)
- How Golo loves Java and how you can easily develop tools (like small DSL: I use Golo scripts to prepare my GitHub Demonstrations for customers, or even to simulate a CI server)
- And I think I'm not a good developer (but not the worst either), but I can hack Golo and I will explain to you how simple it is
Immunizing Image Classifiers Against Localized Adversary Attacksgerogepatton
This paper addresses the vulnerability of deep learning models, particularly convolutional neural networks
(CNN)s, to adversarial attacks and presents a proactive training technique designed to counter them. We
introduce a novel volumization algorithm, which transforms 2D images into 3D volumetric representations.
When combined with 3D convolution and deep curriculum learning optimization (CLO), itsignificantly improves
the immunity of models against localized universal attacks by up to 40%. We evaluate our proposed approach
using contemporary CNN architectures and the modified Canadian Institute for Advanced Research (CIFAR-10
and CIFAR-100) and ImageNet Large Scale Visual Recognition Challenge (ILSVRC12) datasets, showcasing
accuracy improvements over previous techniques. The results indicate that the combination of the volumetric
input and curriculum learning holds significant promise for mitigating adversarial attacks without necessitating
adversary training.
Overview of the fundamental roles in Hydropower generation and the components involved in wider Electrical Engineering.
This paper presents the design and construction of hydroelectric dams from the hydrologist’s survey of the valley before construction, all aspects and involved disciplines, fluid dynamics, structural engineering, generation and mains frequency regulation to the very transmission of power through the network in the United Kingdom.
Author: Robbie Edward Sayers
Collaborators and co editors: Charlie Sims and Connor Healey.
(C) 2024 Robbie E. Sayers
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfKamal Acharya
The College Bus Management system is completely developed by Visual Basic .NET Version. The application is connect with most secured database language MS SQL Server. The application is develop by using best combination of front-end and back-end languages. The application is totally design like flat user interface. This flat user interface is more attractive user interface in 2017. The application is gives more important to the system functionality. The application is to manage the student’s details, driver’s details, bus details, bus route details, bus fees details and more. The application has only one unit for admin. The admin can manage the entire application. The admin can login into the application by using username and password of the admin. The application is develop for big and small colleges. It is more user friendly for non-computer person. Even they can easily learn how to manage the application within hours. The application is more secure by the admin. The system will give an effective output for the VB.Net and SQL Server given as input to the system. The compiled java program given as input to the system, after scanning the program will generate different reports. The application generates the report for users. The admin can view and download the report of the data. The application deliver the excel format reports. Because, excel formatted reports is very easy to understand the income and expense of the college bus. This application is mainly develop for windows operating system users. In 2017, 73% of people enterprises are using windows operating system. So the application will easily install for all the windows operating system users. The application-developed size is very low. The application consumes very low space in disk. Therefore, the user can allocate very minimum local disk space for this application.
Forklift Classes Overview by Intella PartsIntella Parts
Discover the different forklift classes and their specific applications. Learn how to choose the right forklift for your needs to ensure safety, efficiency, and compliance in your operations.
For more technical information, visit our website https://intellaparts.com
Democratizing Fuzzing at Scale by Abhishek Aryaabh.arya
Presented at NUS: Fuzzing and Software Security Summer School 2024
This keynote talks about the democratization of fuzzing at scale, highlighting the collaboration between open source communities, academia, and industry to advance the field of fuzzing. It delves into the history of fuzzing, the development of scalable fuzzing platforms, and the empowerment of community-driven research. The talk will further discuss recent advancements leveraging AI/ML and offer insights into the future evolution of the fuzzing landscape.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Dr.Costas Sachpazis
Terzaghi's soil bearing capacity theory, developed by Karl Terzaghi, is a fundamental principle in geotechnical engineering used to determine the bearing capacity of shallow foundations. This theory provides a method to calculate the ultimate bearing capacity of soil, which is the maximum load per unit area that the soil can support without undergoing shear failure. The Calculation HTML Code included.
3. What changes?
; и new - bye bye!
function is object. - it can be linked and set as argument
val function:()->Unit = {}
fun function1(func:()->Unit){
func.invoke() // or function()
}
val referenceFun = function1(function)
No more void - fun SomeFunction() Unit object if we need to return nothing from
generics
fun SomeFunction():Result<Unit>
No primitives, only Int,Long,Double,Boolean - no value wrapping/unwrapping
operators +,-,/,* - are functions, and they can be overriden for classes
class SomeClass(){
public operator fun plus(other: SomeClass): SomeClass {
return SomeClass()
}
}
val sum = SomeClass()+SomeClass()
4. What changes?
class SomeClass(val id: String = "") {
val isBlank: Boolean get() = id.isEmpty()
}
if(SomeClass().isBlank){
//do something
}
Default class constructor
Default arguments
class Person(val firstName: String)
class Customer(val customerName: String = "")
Property with defaults and override
class User(
val id: String,
val name: String = "user name",
val email: String = "user@email.com"
)
val person = Person()
val customer = Customer()
val user1 = User("uniqueId")
val user2 = User("uniqueId1",
email = "user2@email.com")
5. What changes?
Singletone pattern
val x: String? = y as String?
if (obj is SomeObjectType) {
//do something
}
object SomeSingletoneClass()
Type casting and type checking
window.addMouseListener(object : MouseAdapter() {
override fun mouseClicked(e: MouseEvent) {
// ...
}
override fun mouseEntered(e: MouseEvent) {
// ...
}
})
6. What changes?
when (obj) {
1 -> print("One")
"Hello" -> print("Greeting")
is Long -> print("Long")
!is String -> print("Not a string")
else -> print("Unknown")
}
All expressions are functions and they can return result
fun max(a: Int, b: Int): Int {
return if (a > b)
a
else
b
}
Non nullable properties by default
- WTF? Java fault? What can we do?
- forget this s**t except you really need it
- compile errorval string : String = null
val string : String? = null - OK
item?.property?.property?.property?
item!!.property.property
val string : String = item?.property ?: "Default string"
7. Data classes
Auto implement equals() hashCode() toString()
copy() - with ability to change property declared in constructor
Ability to auto implement Parcelable by @Parcelable
constructor data class User(val name: String, val age: Int)
Cons: not a very good support from
ORM , realm, room
val person1 = Person("Chike", "Mgbemena")
println(person1) // Person(firstName=Chike, lastName=Mgbemena)
val person2 = person1.copy(lastName = "Onu")
println(person2) //Person3(firstName=Chike, lastName=Onu)
8. Companion objects
All statics methods are only for internal use
class SomeActivity : AppCompatActivity() {
companion object {
fun start(activity: Context) {
val intent = Intent(activity, SomeActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or
Intent.FLAG_ACTIVITY_NEW_TASK)
activity.startActivity(intent)
}
}
}
Companions a creates as separated object in memory and quickly clears.
Extension functions will replace them as good alternative
Kotlin call-DebugViewActivity.start(this)
Java call-DebugViewActivity.Companion.start(this)
9. Collections
by List<Any> immutable
use MutableList<Any>
list.flat{predicate*}
list.map{predicate*}
list.forEach{predicate*}
list.filter{predicate*}
list.first{predicate*}
list.lastOrNull{predicate*}
Big amount of collection methods not available for java
collection
.first { it.id == someId }
.innerPropertyList
.firstOrNull { it.id == innerItemId }
?.let {
doSomething(it)
}
All collection initialization by collection builders
listOf(), arrayOf(), mapOf(), mutableListOf(), emptyListOf() etc
10. Property delegates
Makes properties smarter
val someView: by lazy {findViewById(R.id.someView)}
var name: String by Delegates.observable("<no name>") {
prop, old, new ->
println("$old -> $new")
}
fun <T : View?> AppCompatActivity.bind(@IdRes idRes: Int): Lazy<T> {
@Suppress(«UNCHECKED_CAST")
return unsafeLazy { findViewById<T>(idRes) }
}
class Activity:AppCompatActivity(){
private val toolbar by bind<Toolbar>(R.id.mainToolbar)
********
}
11. Class delegates
Remove your multiple chain inheritance
interface ISomeLogic {
fun doSomeThing()
}
class SomeClass(object: ISomeLogic) : ISomeLogic by object
SomeClass().doSomeThing()
12. Extension functions & properties
fun Activity.intentString(name: String): String {
return this.intent.getStringExtra(name)
}
private val itemId by lazy { intentString(ITEM_ID) }
val EditText.isEmailPattern: Boolean
get() {
return Patterns.EMAIL_ADDRESS.matcher(text.toString()).matches()
}
if(emailEditView.isEmailPattern){
}
13. Extension functions & properties
fun Context.isOnline(): Boolean {
val cm = this.getSystemService(Context.CONNECTIVITY_SERVICE) as
ConnectivityManager
val netInfo = cm.activeNetworkInfo
return netInfo != null && netInfo.isConnectedOrConnecting
}
15. Coroutines
suspend keyword - exist in language level and inform that this function can pause it
execution
Coroutines differs from Runables in java.concurency
Coroutines don’t block thread
Coroutines are critically lightweight
Kotlin, as a language, help to use coroutines
suspend fun doSomething(foo: Foo): Bar {
...
}
16. Coroutines
suspend keyword - exist in language level and inform that this function can pause it
execution
fun <T> BG(block: suspend () -> T): Deferred<T> { // non blocking operation on
BackgroundThread with returning result
return async<T>(CommonPool) {
block.invoke()
}
}
fun UI(block: suspend () -> Unit): Job { // non blocking operation on UI thread
return async(kotlinx.coroutines.experimental.android.UI) {
block.invoke()
}
}
private fun someAsynkFlow() = UI {
val someHeavyWorkResult = BG { doSomeHeavyWork() }
val someHeavyWork1Result = BG { doSomeHeavyWork1() }
useBothResultsForUpdateUi(someHeavyWorkResult.await(),someHeavyWork1Result.await())
}
17. Coroutines
Ability to call function with callback inside a «linear» coroutine call
private suspend fun doSomeHeavyWork(): Result =
suspendCancellableCoroutine<Result> {
doSomeWorkWithCallback(object : Callback() {
override fun onSuccess(result: Result) {
it.resume(result)
}
override fun onError(error: Exception) {
it.resumeWithException(error)
}
})
}
18. Conclusions +
Kotlin is not a panacea, but it really helps to develop your app
Kotlin make your code less to 10-20%
Kotlin brings to your code new abilities and can help you to remove heavy
dependencies like ButterKnife Dagger Guava etc.
80% Google Play apps uses Kotlin in some ways
Kotlin make code more readable
Kotlin brings functional programming elements to your code
Kotlin-extentions make life of android developer less tragic
19. Conclusions -
Kotlin is not a panacea and without good practices I have a bad news for you
Kotlin performance is less from java by 1-2% in execution and 5-15% in compile
https://medium.com/keepsafe-engineering/kotlin-vs-java-compilation-speed-
e6c174b39b5d
Kotlin-extentions - less performance
Waiting for better Android Studio support of kotlin
https://hackernoon.com/kotlin-is-still-not-top-citizen-of-android-studio-3-0-
af11560516c6
Not all old libraries have good kotlin support. Sometimes developers doesn’t want
to update them
20. Future
Kotlin native - for ndk replacement, maybe :)
data class support for libraries
Kotlin DSL - for gradle script replacement (currently in early alpha now)
Performance improving