Skip to content

The-Wand/Wand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

|wand created to support all platfroms
Prototype implemented on Swift

Location.one | MotionEvent.one | .all {

}

๐Ÿ’ก Idea

Wand started from the idea about receiving anything in most efficient way.
Add one sign to anything and retreive the result ๐Ÿ“ฆ

Imagine that you have the black box that can give you an Any object.
You don't know what's already in the box and what happens inside.

Ask for an object that you need with a microservice:

|{ (result: Object) in
            
}
ingredients | { (result: Object) in
            
}
ingredients | .one { (t: T) in
            
} | .every { (u: U) in

} | .while { (v: V) in
  true
}

๐Ÿ“ฆ |Packages

Packages

๐Ÿ›๏ธ |Foundation
๐Ÿ”– |Location
๐Ÿƒ |Motion
๐Ÿ“ก |NFC
๐Ÿ–ฅ๏ธ |URL
๐ŸŒค๏ธ |Weather

๐Ÿ‘“ |Vision Demo
๐Ÿ“ค |Integrations

Add one sign and wait for the result |
ex Pipe
ex API

โš™๏ธ Usage

//Request location updates
|{ (location: CLLocation) in 

}
//Request .authorizedAlways permissions and only one location object
CLAuthorizationStatus.authorizedAlways | { (status: CLAuthorizationStatus) in
            
} | .one { (location: CLLocation) in 

}

๐Ÿ“ฆ An ideal API acts as the black box
โšก๏ธ Itโ€™s possible to incapsulate whole data receiving process and memory managment duty to one symbol?
Astanahub.com Medium.com YouTube.com

In Unix-like computer operating systems, a pipeline is a mechanism for inter-process communication using message passing. A pipeline is a set of processes chained together by their standard streams, so that the output text of each process (stdout) is passed directly as input (stdin) to the next one. The second process is started as the first process is still executing, and they are executed concurrently.

command1 | command2 | command3

ls -l | grep key | less

๐Ÿ•น๏ธ How to

How to add REST API support to Swift project

//Request .authorizedWhenInUse permissions
CLAuthorizationStatus.authorizedWhenInUse | { (status: CLAuthorizationStatus) in
 
}
//Request location updates
//Uses .startUpdatingLocation()
|{ (location: CLLocation) in 

}
//Request .authorizedAlways permissions and only one location object
//Uses .requestLocation() for efficient power consumption
CLAuthorizationStatus.authorizedAlways | { (status: CLAuthorizationStatus) in
            
} | .one { (location: CLLocation) in 

}
//Request pedometer data updates
|{ (data: CMPedometerData) in 

}
//Scan for a bluetooth peripherals
|{ (peripheral: CBPeripheral) in 

}
//Wait for a Notification
UIWindow.keyboardWillShowNotification | { (n: Notification) in
            
}
//Enumerate contacts
CNContact.predicateForContacts(matchingName: "John") | .every { (contact: CNContact) in
                        
}
//Scan a tag
|.every { (tag: NFCNDEFTag) in

}
//Perform face observation
URL(string: "http://example.com/image.jpg") | { (faces: [VNFaceObservation]) in

}
//Perform pose observation
//Wait for two persons
data | .while { (bodies: [VNHumanBodyPoseObservation]) in
    bodies < 2
}
//Detect shakes
|{ (motion: UIEvent.EventSubtype) in
    if motion == .motionShake {
                
    }
}
//Customization
let wand = |{ (hands: [VNHumanHandPoseObservation]) in

}

let request: VNDetectHumanHandPoseRequest = wand.obtain()
request.maximumHandCount = 4

let preview: AVCaptureVideoPreviewLayer = wand.obtain()
view.layer.addSublayer(preview!)

โ— Error handling

//Attach Ask<Error> to the context
any | { (error: Error) in
    
}
//Or use the result handler
//Nil error means successed result
any | { (error: Error?) in
    
}

๐Ÿ“š Books

๐Ÿ–ผ๏ธ Design Patterns: Elements of Reusable Object-Oriented Software (1994)
$\hspace{17pt}$ GOF: Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides

๐Ÿงผ Clean Code: A Handbook of Agile Software Craftsmanship (2008)
$\hspace{17pt}$ Robert C. Martin

๐ŸŽผ Introduction to TRIZ. Basic Concepts and Approaches (2015)
$\hspace{17pt}$ G.S. Altshuller

๐Ÿ›๏ธ Clean Architecture: A Craftsman's Guide to Software Structure and Design (2017)
$\hspace{17pt}$ Robert C. Martin

๐Ÿ˜œ The Inmates Are Running the Asylum:
$\hspace{17pt}$ Why High Tech Products Drive Us Crazy and How to Restore the Sanity (2019)
$\hspace{17pt}$ Alan Cooper

โŠถ $\hspace{5pt}$ Origin (2017)
$\hspace{17pt}$ Dan Brown

โณ The Deadline: A Novel About Project Management (2007)
$\hspace{17pt}$ Tom DeMarco

๐Ÿ’ฟ CD Production
$\hspace{17pt}$ Sony Digital Audio Disk Corporation
$\hspace{17pt}$ ใ‚ฝใƒ‹ใƒผใƒปใ‚ฐใƒซใƒผใƒ—ๆ ชๅผไผš็คพ
$\hspace{17pt}$ https://sony.com

๐ŸชŸ Windows
$\hspace{17pt}$ Stan Barnes, William and Lynne Jolitz
$\hspace{17pt}$ https://support.microsoft.com/windows

๐Ÿ“ฑ iPod
$\hspace{17pt}$ Tony Fadell
$\hspace{17pt}$ [หˆaษชหŒpษ”d]
$\hspace{17pt}$ https://wikipedia.org/wiki/Tony_Fadell

๐Ÿ Apple
$\hspace{17pt}$ Steve Jobs, Steve Wozniak
$\hspace{17pt}$ A prominent part of macOS's original brand identity was
$\hspace{17pt}$ the use of Roman numeral X, pronounced "ten"
$\hspace{17pt}$ https://wikipedia.org/wiki/Steve_Jobs

โš™๏ธ BSD
$\hspace{17pt}$ Berkeley, 1974
$\hspace{17pt}$ https://wikipedia.org/wiki/BSD

๐Ÿ”” The concept of pipelines was championed by Douglas McIlroy
$\hspace{17pt}$ Bell Labs
$\hspace{17pt}$ https://wikipedia.org/wiki/Pipeline_(Unix)

$\hspace{4pt}$ | $\hspace{3pt}$ Wand icon
$\hspace{17pt}$ Freepik - Flaticon
$\hspace{17pt}$ https://flaticon.com/free-icons/wand

๐Ÿค– Enchanced by AI in 2025
$\hspace{17pt}$ Augmented Intelligence / Artificial Intelligence
$\hspace{17pt}$ Thanks for our conversations
$\hspace{17pt}$ https://www.google.com?q=ai

โšก๏ธ Macromediaยฎ Flash
$\hspace{17pt}$ 600 Townsend Street, San Francisco, CA 94103 1997
$\hspace{17pt}$ Now vector-based interactive web animations, buttons, and graphics
$\hspace{17pt}$ can be used on every Web page
$\hspace{17pt}$ https://wikipedia.org/wiki/Macromedia

๐Ÿข Logo
$\hspace{17pt}$ Bolt, Beranek and Newman 1967
$\hspace{17pt}$ The language was conceived to teach concepts of programming related to Lisp
$\hspace{17pt}$ and only later to enable what Papert called "body-syntonic reasoning", where
$\hspace{17pt}$ students could understand, predict, and reason about the turtle's motion by
$\hspace{17pt}$ imagining what they would do if they were the turtle.
$\hspace{17pt}$ https://wikipedia.org/wiki/Logo_(programming_language)

๐Ÿฌ Flipper
$\hspace{17pt}$ Anna Prosvetova, Pavel Zhovner
$\hspace{17pt}$ Flipper Zero is a portable multi-tool for pentesters and hardware geeks
$\hspace{17pt}$ in a toy-like body. It loves to explore the digital world around:
$\hspace{17pt}$ radio protocols, access control systems, hardware, and more.
$\hspace{17pt}$ https://flipperzero.one

Tasks

  • Contacts
  • CoreLocation
  • CoreMotion
  • CoreNFC
  • Data
  • NSNotification
  • Rest
  • Vision
  • MultipeerConnectivity

The Wand may collect usage data
You must attribute the author
Alex Kozin
El Machine ๐Ÿค–
Apps since 2008

About

Declarative Programming Language ๐Ÿ“ฆ For error-free coding

mailto:al.kozin@gmail.com

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Languages