Code Monkey home page Code Monkey logo

ashen's Introduction


 ┌───┐ ┌───┐ ┌───┐ ┌───┐ ┌───┐ ┌───┐ ┌───┐ ┌───┐  Mobile Developer @ Shopify
││ @ │││ c │││ o │││ l │││ i │││ n │││ t │││ a ││
││___│││___│││___│││___│││___│││___│││___│││___││
│╱___╲│╱___╲│╱___╲│╱___╲│╱___╲│╱___╲│╱___╲│╱___╲│ Please no recruiters.

Ashen and Mechy are, imo, my funnest projects. A lot of the other code in here is more than a bit old. I maintain lots of Sublime Text plugins, and am usually available to support those (I'm not always eager to write features for you – if you want a feature, please consider opening a PR).

I have my github notifications silenced – I get far too many of them – so if I'm late to reply that's why. Ping me using email, "colinta @ take a lucky guess" (hint: http://colinta.com is mine)

ashen's People

Contributors

colinta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ashen's Issues

Include of non-modular header inside framework module 'ctermbox':

I tried to import the library with SPM, but I got an error of non-modular header inside the framework.
The strangest thing of all is: It compiles with swift run on the terminal, but it does not compile with Xcode, which leads me to some kind of issue with Xcode beta, but I couldn't figure it out yet. So, I'm reporting the issue here, in case you have faced it before.

Note: I'm using the Xcode beta 5

Can this project run on linux?

I tried running an example app on LInux(I'm using Pop OS)

and I got this error running swift run

`/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Core/Ashen.swift:65:25: error: cannot find 'mach_absolute_time' in scope
var prevTimestamp = mach_absolute_time()
^~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Core/Ashen.swift:66:16: error: cannot find 'mach_timebase_info' in scope
var info = mach_timebase_info(numer: 0, denom: 0)
^~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Core/Ashen.swift:67:5: error: cannot find 'mach_timebase_info' in scope
mach_timebase_info(&info)
^~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Core/Ashen.swift:164:23: error: cannot find 'mach_absolute_time' in scope
let currentTime = mach_absolute_time()
^~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Views/Input.swift:618:10: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
.replacingOccurrences(of: "\u{F0004}y", with: "ỳ")
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:574:28: error: cannot find type 'URLRequest' in scope
func toURLRequest() -> URLRequest?
^~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:264:29: error: cannot find type 'NSURLRequest' in scope
case networkService(NSURLRequest.NetworkServiceType) // default, voip, video, background, voice
^~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:288:20: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
case mock((URLSessionConfiguration) -> URLSessionProtocol)
^~~~~~~~~~~~~~~~~~~~~~~
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
public typealias URLSessionConfiguration = AnyObject
^
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:463:15: error: cannot find type 'URLRequest' in scope
with: URLRequest, completionHandler: ((Int, [Http.Header], Data?, Swift.Error?) -> Void)?
^~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:467:15: error: cannot find type 'URLRequest' in scope
with: URLRequest, completionHandler: ((Int, [Http.Header], Data?, Swift.Error?) -> Void)?
^~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:290:64: error: cannot find type 'URLSessionDelegate' in scope
func create(config: URLSessionConfiguration, delegate: URLSessionDelegate)
^~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:290:29: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
func create(config: URLSessionConfiguration, delegate: URLSessionDelegate)
^~~~~~~~~~~~~~~~~~~~~~~
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
public typealias URLSessionConfiguration = AnyObject
^
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:315:18: error: cannot find type 'URLRequest' in scope
let request: URLRequest
^~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:321:27: error: cannot find type 'URLRequest' in scope
request request: URLRequest,
^~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:392:43: error: cannot find type 'URLRequest' in scope
private func startDataTask(
request: URLRequest) {
^~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:400:47: error: cannot find type 'URLRequest' in scope
private func startDownloadTask(_ request: URLRequest) {
^~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:410:40: error: cannot find type 'URLSessionDelegate' in scope
extension HttpPrivateRequest.Delegate: URLSessionDelegate {}
^~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:412:40: error: cannot find type 'URLSessionTaskDelegate' in scope
extension HttpPrivateRequest.Delegate: URLSessionTaskDelegate {
^~~~~~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:419:40: error: cannot find type 'URLSessionDataDelegate' in scope
extension HttpPrivateRequest.Delegate: URLSessionDataDelegate {
^~~~~~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:424:40: error: cannot find type 'URLSessionDownloadDelegate' in scope
extension HttpPrivateRequest.Delegate: URLSessionDownloadDelegate {
^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:427:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
_ session: URLSession,
^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
^
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:428:23: error: 'URLSessionDownloadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
downloadTask: URLSessionDownloadTask,
^~~~~~~~~~~~~~~~~~~~~~
Foundation.URLSessionDownloadTask:2:18: note: 'URLSessionDownloadTask' has been explicitly marked unavailable here
public typealias URLSessionDownloadTask = AnyObject
^
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:441:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
_ session: URLSession,
^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
^
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:442:23: error: 'URLSessionDownloadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
downloadTask: URLSessionDownloadTask,
^~~~~~~~~~~~~~~~~~~~~~
Foundation.URLSessionDownloadTask:2:18: note: 'URLSessionDownloadTask' has been explicitly marked unavailable here
public typealias URLSessionDownloadTask = AnyObject
^
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:453:44: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private func responseToHeaders(_ response: URLResponse?) -> [Http.Header] {
^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
^
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:473:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
extension URLSession: URLSessionProtocol {
^ ~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:522:1: error: non-nominal type 'URLSessionTask' (aka 'AnyObject') cannot be extended
extension URLSessionTask: URLSessionTaskProtocol {
^ ~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:529:33: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
func apply(toConfig config: URLSessionConfiguration) {
^~~~~~~~~~~~~~~~~~~~~~~
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
public typealias URLSessionConfiguration = AnyObject
^
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:550:41: error: cannot find type 'URLRequest' in scope
func apply(toRequest request: inout URLRequest) {
^~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:578:35: error: cannot find type 'URLRequest' in scope
public func toURLRequest() -> URLRequest? {
^~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:584:35: error: cannot find type 'URLRequest' in scope
public func toURLRequest() -> URLRequest? {
^~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:589:11: error: cannot find type 'URLRequest' in scope
extension URLRequest: URLRequestConvertible {
^~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:295:24: error: type 'URLSession' (aka 'AnyObject') has no member 'init'
return URLSession(configuration: config, delegate: delegate, delegateQueue: nil)
^~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:295:93: error: 'nil' requires a contextual type
return URLSession(configuration: config, delegate: delegate, delegateQueue: nil)
^
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:325:24: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
var configOpt: URLSessionConfiguration?
^~~~~~~~~~~~~~~~~~~~~~~
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
public typealias URLSessionConfiguration = AnyObject
^
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:328:20: error: type of expression is ambiguous without more context
option.apply(toRequest: &request)
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:330:30: error: type 'URLSessionConfiguration?' (aka 'Optional') has no member 'background'
configOpt = .background(withIdentifier: identifier)
~^~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:332:30: error: type 'URLSessionConfiguration?' (aka 'Optional') has no member 'ephemeral'
configOpt = .ephemeral
~^~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:344:36: error: type 'URLSessionConfiguration?' (aka 'Optional') has no member 'default'
let config = configOpt ?? .default
~^~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:454:35: warning: conditional downcast from 'URLResponse?' (aka 'Optional') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
guard let response = response as? HTTPURLResponse else { return [] }
~~~~~~~~~^~~~~~~~~~~~~~~~~~~

/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:454:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
guard let response = response as? HTTPURLResponse else { return [] }
^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
^
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:455:21: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
return response.allHeaderFields.compactMap { name, value -> Http.Header? in
~~~~~~~~ ^~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:532:20: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'timeoutIntervalForRequest'
config.timeoutIntervalForRequest = value
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:533:20: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'timeoutIntervalForResource'
config.timeoutIntervalForResource = value
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:535:20: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'timeoutIntervalForRequest'
config.timeoutIntervalForRequest = value
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:537:20: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'timeoutIntervalForResource'
config.timeoutIntervalForResource = value
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:539:20: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'networkServiceType'
config.networkServiceType = value
~~~~~~ ^~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:541:20: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'allowsCellularAccess'
config.allowsCellularAccess = value
~~~~~~ ^~~~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:543:20: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'sharedContainerIdentifier'
config.sharedContainerIdentifier = value
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:559:30: error: 'nil' requires a contextual type
request.setValue(nil, forHTTPHeaderField: key)
^
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:475:23: error: cannot find type 'URLRequest' in scope
with request: URLRequest,
^~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:489:23: error: cannot find type 'URLRequest' in scope
with request: URLRequest,
^~~~~~~~~~
/home/alex/Documents/app-test/.build/checkouts/Ashen/Sources/Ashen/Commands/Http.swift:590:35: error: cannot find type 'URLRequest' in scope
public func toURLRequest() -> URLRequest? {
^~~~~~~~~~
[3/6] Compiling Ashen Http.swift
error: fatalError`

What could be the cause of this issue?

Cursor or "selectable" elements

Hello!

I have been using Ashen to recreate a Magit-like experience in my terminal. If you do not know Magit, it’s a git porcelain inside Emacs. You navigate in a Magit "view" with a cursor that can move up and down (see an example here https://youtu.be/NDP91RNgT4A?t=129), and perform actions on the currently "highlighted" item.

Creating the interface with sections and headers was easy, but I am now trying to implement this cursor, or a way to "highlight" items. I haven’t really found a way to do this yet, so I thought I’d just ask. Is this something that can be done right now, or something you have thought about implementing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.