Skip to content

Instantly share code, notes, and snippets.

View binayshaw7777's full-sized avatar
🎯
Chasing Goals

Binay Shaw binayshaw7777

🎯
Chasing Goals
View GitHub Profile
@binayshaw7777
binayshaw7777 / SpotlightEffect.kt
Created January 11, 2024 17:35 — forked from ardakazanci/SpotlightEffect.kt
Showcase For Compose
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContent {
ShowcaseForComposeTheme {
MyScreen()
}
}
}
@binayshaw7777
binayshaw7777 / ColoredShadow.kt
Created January 9, 2024 15:25 — forked from cedrickring/ColoredShadow.kt
Draw a colored shadow in Android Jetpack Compose
/*
Copyright 2020 Cedric Kring.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@binayshaw7777
binayshaw7777 / async_swift_proposal.md
Created October 1, 2023 02:04 — forked from lattner/async_swift_proposal.md
Concrete proposal for async semantics in Swift

Async/Await for Swift

Introduction

Modern Cocoa development involves a lot of asynchronous programming using closures and completion handlers, but these APIs are hard to use. This gets particularly problematic when many asynchronous operations are used, error handling is required, or control flow between asynchronous calls gets complicated. This proposal describes a language extension to make this a lot more natural and less error prone.

This paper introduces a first class Coroutine model to Swift. Functions can opt into to being async, allowing the programmer to compose complex logic involving asynchronous operations, leaving the compiler in charge of producing the necessary closures and state machines to implement that logic.