Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Adam Kuipers
@adamkuipers
Has there been any benchmarking done on the performance of immutable reference types vs immutable value types?
Seems like both have advantages, where reference types only pass a single register but have unwrapping overhead.
Adam Kuipers
@adamkuipers
Another advantage of reference types is that you can have benign effects. Otherwise you'd require the client to mark the value mutable.
Robert Widmann
@CodaFi
We have done exactly zero benchmarks. The code is just inefficient in general. If you want to be the one to take this on, it'd be huge.
going to try out the new monoidal syntax soon
has anyone looked into extending SwiftCheck to support Testable functions that raise XCTest failures? e.g. by using assertions like XCTAssert or matcher frameworks like Nimble?
Brian Gerstle
@bgerstle
i saw something like ==== which prints a verbose description when it fails, but would be nice to be able to use a fully-fledged matching framework to get even more descriptive messages
Robert Widmann
@CodaFi
XCTest methods are all marked Void. We'd have to hook in pretty deep to get that to work.
Adam Kuipers
@adamkuipers
It'd be great if there was something like Nimble without the complex DSL they dragged into it.
Robert Widmann
@CodaFi
I'd love something like that too, but it seems to be useful you'd have to have a QUOTE feature at he language level.
Adam Kuipers
@adamkuipers
Is there any way to use SwiftCheck (or any other library that's been migrated to Swift 3) with Xcode 8 using spm? It doesn't look like spm supports different git branches.
Jose Luis
@josete89
Hi, is possible build Swfitz using swift 3?
I’m getting this errors /Users/alcaljos/Pers/locate-ios/Carthage/Checkouts/Swiftz/Carthage/Checkouts/Swiftx/Sources/Combinators.swift:128:49: error: @escaping may only be applied to parameters of function type
/Users/alcaljos/Pers/locate-ios/Carthage/Checkouts/Swiftz/Carthage/Checkouts/Swiftx/Sources/Combinators.swift:128:49: error: @escaping may only be applied to parameters of function type
/Users/alcaljos/Pers/locate-ios/Carthage/Checkouts/Swiftz/Carthage/Checkouts/Swiftx/Sources/Combinators.swift:128:49: error: @escaping may only be applied to parameters of function type
/Users/alcaljos/Pers/locate-ios/Carthage/Checkouts/Swiftz/Swiftz/ArrowExt.swift:13:11: error: generic parameter 'Self' could not be inferred
/Users/alcaljos/Pers/locate-ios/Carthage/Checkouts/Swiftz/Swiftz/ArrowExt.swift:18:11: error: generic parameter 'Self' could not be inferred
/Users/alcaljos/Pers/locate-ios/Carthage/Checkouts/Swiftz/Swiftz/ArrowExt.swift:38:16: error: closure use of non-escaping parameter 'f' may allow it to escape
/Users/alcaljos/Pers/locate-ios/Carthage/Checkouts/Swiftz/Swiftz/ArrowExt.swift:38:21: error: closure use of non-escaping parameter 'g' may allow it to escape
/Users/alcaljos/Pers/locate-ios/Carthage/Checkouts/Swiftz/Swiftz/ArrowExt.swift:48:16: error: closure use of non-escaping parameter 'k' may allow it to escape
/Users/alcaljos/Pers/locate-ios/Carthage/Checkouts/Swiftz/Swiftz/ArrowExt.swift:48:18: error: closure use of non-escaping parameter 'f' may allow it to escape
Robert Widmann
@CodaFi
@adamkuipers I just pushed the Swift 3.0 branch along with SwiftPM support today. Let me know if it doesn't work.
@josete89 Swiftz will gain Swift 3 support when I finish updating its dependencies later today
Jose Luis
@josete89
thanks @CodaFi !
Adam Kuipers
@adamkuipers
@CodaFi Thanks! Saw the twitter announcement!
I'm sure this is user error but do you know what would cause this
error: these referenced modules could not be found: SwiftCheckTests
fix: reference only valid modules
André Miranda
@EuAndreh

@CodaFi I see that you’re planning to add state machine testing to SwiftCheck (typelift/SwiftCheck#149)

Have you written any code samples that I can read/tinker with? Maybe I can help implementing it :smile:

Adam Kuipers
@adamkuipers
@CodaFi, would you be interested in a PR of github-pages for SwiftCheck API documentation?
If yes, do you have a preferred doc generator? I'm finding https://github.com/realm/jazzy and https://github.com/SwiftDocOrg/swiftdoc-parser
Robert Widmann
@CodaFi
@EuAndreh Everything I have is in #149. I'm not sure what the API should look like, but I know the patterns I use in the test suites for Concurrent and Aquifer should shape whatever happens
@adamkuipers YES PLEASE
I think we should definitely look to the Erlang folks on state machine testing.
Adam Kuipers
@adamkuipers
Oh, I actually never knew cocoa pods automatically generates documentation for all pods.
André Miranda
@EuAndreh
@CodaFi Nice, I’ll see if I can implement something.
sparrisable
@sparrisable
I was surprised that Linux is not listed as a supported platform for Swiftz, I am curious if it is difficult to port Swiftz or use parts of it on Linux?
Robert Widmann
@CodaFi
@sparrisable We build on Linux, the README is a bit crusty and probably needs to be rewritten.
sparrisable
@sparrisable
@CodaFi Thank you, I hope to use it on Linux.
Elviro Rocca
@broomburgo
@CodaFi Hi, I've been using simple functional programming libraries (written by me) for my projects, but I'm thinking about switching to your libraries, which seem definitely mode fleshed out, and try and contribute to them. So I was wandering if those libraries are "production ready": I'm asking because in a recent SwiftCoders podcast you said that the Aquifer library should not be used in production due to inefficiency. I do heavy use of lenses/prisms, and some monads, so I'm particularly interested in Focus and Swiftz. Thanks.
Dylan Lukes
@DylanLukes
You’ve got… pull request!
Dylan Lukes
@DylanLukes
Strange.

private func pack<A, B, C>(_ f : @escaping (A, B) -> C) -> ((A, B)) -> C {
    return f
}

private func pack<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(_ f : @escaping (A, B, C, D, E, F, G, H, I, J, K, L, M, N) -> O) -> ((A, B, C, D, E, F, G, H, I, J, K, L, M, N)) -> O {
    return f
}
These produce an error, but only on Linux, it seems.
SimpleSpec.swift:13:9: error: cannot convert return expression of type '(A, B) -> C' to return type '((A, B)) -> C’
Interesting.
The most recent Linux snapshot only accepts the latter.
It looks like there’s a subtle change here.
Dylan Lukes
@DylanLukes
It seems like SE-066 has been rolled back somewhat then?...
Dylan Lukes
@DylanLukes
(This is with a trunk snapshot, I put the wrong link in the .travis.yml)
@bkase I resolved the CI issue, looks like the Trunk snapshot has a small syntax difference from the 4.0 one (which was the correct URL).
The Linux CI passed, and the Apple ones should shortly.
Ricardo Pallas
@RPallas92
Hello, is there a way to implement do-notation in Swiftz ?
maybe co-routines?
Robert Widmann
@CodaFi
We tried in the basis to little fanfare. If you want to do it and do it convincingly you must have every action submit its results to a frame of an implicit stack of delimited continuations. Doing that is... hard
Colin Barrett
@cbarrett
Anyone interested in hacking on a free monad implementation now that Swift supports recursive protocol constraints?
Robert Widmann
@CodaFi
@cbarrett Absolutely! Sounds like you already have a particular encoding in mind?
Brian Gerstle
@bgerstle
Been quiet in here for a while, but I had an idea to provide a default Arbitrary implementation for anything that's Decodable, which means basically any struct can "automagically" be made arbitrary simply by adding Codable conformance. The basic premise was to implement an ArbitraryCoder which returns generated values from all the decode methods. It almost works, except for the generic decode<T: Decodable> methods, which I can't get to call any type-specific arbitrary implementations. I have a WIP branch which I'm happy to post a PR of if anyone's interested