One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| #!/usr/bin/env xcrun swift -i | |
| import Foundation | |
| import Darwin.ncurses | |
| initscr() // Init window. Must be first | |
| cbreak() | |
| noecho() // Don't echo user input | |
| nonl() // Disable newline mode | |
| intrflush(stdscr, true) // Prevent flush |
| +(double)distanceBetweenPoint:(CGPoint)pointA andAnotherPoint:(CGPoint)pointB | |
| { | |
| return sqrt((pointA.x - pointB.x)*(pointA.x - pointB.x) + (pointA.y - pointB.y)*(pointA.y - pointB.y)); | |
| } | |
| +(NSArray *)findPointOnTangentOnCircleWithCenter:(CGPoint)center Radius:(double)radius pointOnTangent:(CGPoint)point | |
| { | |
| double dx = center.x - point.x; | |
| double dy = center.y - point.y; | |
| double distance = [EXMathBrain distanceBetweenPoint:center andAnotherPoint:point]; |
| // | |
| // Demonstration of using a channel to receive and dispatch IOHIDManager events using the ChannelZ framework. | |
| // | |
| // Created by Marc Prud'hommeaux on 3/8/15. | |
| // | |
| import Cocoa | |
| import IOKit | |
| import ChannelZ | |
| @NSApplicationMain |
Availability and quality of developer tools are an important factor in the success of a programming language. C/C++ has remained dominant in the systems space in part because of the huge number of tools tailored to these lanaguages. Succesful modern languages have had excellent tool support (Java in particular, Scala, Javascript, etc.). Finally, LLVM has been successful in part because it is much easier to extend than GCC. So far, Rust has done pretty well with developer tools, we have a compiler which produces good quality code in reasonable time, good support for debug symbols which lets us leverage C++/lanaguge agnostic tools such as debuggers, profilers, etc., there are also syntax highlighting, cross-reference, code completion, and documentation tools.
In this document I want to layout what Rust tools exist and where to find them, highlight opportunities for tool developement in the short and long term, and start a discussion about where to focus our time an
| class Event <T:Any> { | |
| var handlers = Array<(T) -> Void>() | |
| func listen(handler: (T) -> Void) { | |
| handlers.append(handler) | |
| } | |
| func emit(object: T) { | |
| for handler in handlers { | |
| handler(object) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| /* | |
| `arc4random_uniform` is very useful but limited to `UInt32`. | |
| This defines a generic version of `arc4random` for any type | |
| expressible by an integer literal, and extends some numeric | |
| types with a `random` method that mitigates for modulo bias | |
| in the same manner as `arc4random`. | |
| `lower` is inclusive and `upper` is exclusive, thus: | |
| // F#'s "pipe-forward" |> operator | |
| // | |
| // Also "Optional-chaining" operators |>! and |>& | |
| // | |
| // And adapters for standard library map/filter/sorted | |
| infix operator |> { precedence 50 associativity left } | |
| infix operator |>! { precedence 50 associativity left } | |
| infix operator |>& { precedence 50 associativity left } | |
| infix operator |>* { precedence 50 associativity left } |
| Вы ранее привлекались за хранение данных в глобальных переменных? | |
| Вы когда-нибудь делали .Net за деньги? | |
| Сформулируйте зависимость времени исправления критического бага от seniority присутствующего менеджера | |
| В своём резюме вы указали знание php. вам не стыдно? | |
| Перед вами кисть, холст и мольберт. напишите компилятор |