Re: [swift-users] Guarding against an empty sequence

2016-05-08 Thread Shane S via swift-users
I imagine `#underestimateCount()` is going to be your best bet, though you may not always see the results you desire some notes: 1. most would argue that the results you are describing are correct: it is vacuously true that for an empty sequence _every_ element in the sequence will satisfy any

Re: [swift-users] Guarding against an empty sequence

2016-05-08 Thread Jacob Bandes-Storch via swift-users
I'd argue that this behavior is correct. By extension of De Morgan's laws , "seq.all { pred($0) }" should be equivalent to "!seq.contains { !pred($0) }". Jacob On Sun, May 8, 2016 at 7:16 PM, Adriano Ferreira via swift-users < swift-users@swift.or

[swift-users] Guarding against an empty sequence

2016-05-08 Thread Adriano Ferreira via swift-users
Hi everyone! I’m working on the following method: extension SequenceType { /// Check if `predicate` is true for all elements of `self` /// /// - Parameter predicate: The predicate called on each element of `self` /// /// - Returns: True iff every element in `self` satisfies `

Re: [swift-users] Robotics with Swift

2016-05-08 Thread Austin Zheng via swift-users
This is great news! I have a BBB and a RC truck I've been meaning to build a robot out of this summer, and this gives me an option to interface with the hardware besides the Python interface. Brad Larson (https://twitter.com/bradlarson) works at a company called SonoPlot that makes robots for rese

[swift-users] Robotics with Swift

2016-05-08 Thread Jon Hoffman via swift-users
Is there anyone interested in robotics with Swift? I created a Swift library named SwiftyBones (https://github.com/hoffmanjon/SwiftyBones ) for the BeagleBone Black to connect to the Digital GPIO, Analog IN and PWM pins and was interested in feedback

Re: [swift-users] Unicode problem

2016-05-08 Thread Jens Alfke via swift-users
> On May 8, 2016, at 5:27 AM, Nabeel Imtiaz via swift-users > wrote: > > I am having problem with emojis’ rendering. Emojis like \u{F3A4} and \u{F3B5} > print question mark instead. They begin with number “F”. Those are not the correct Unicode values. There should be a “1” in front — for exa

Re: [swift-users] Server side swift application ?

2016-05-08 Thread Gerard Iglesias via swift-users
Jens, I have to say that I am far from an expert in low level network coding, even if I started using Distributed object in 93 with NeXTStep, and I can build network connection with the basics, listen, bind, accept ... There is an interesting network code in swift with these basics on the IBM s

Re: [swift-users] swift redistributable without Xcode

2016-05-08 Thread Tim Prepscius via swift-users
Is there any way I can get "import Foundation" working on a machine other than the machine I compiled with? I notice that those "float.h" headers are within the llvm build, however when I try to do -I of that directory it fails. (I tried as an include as a framework as an include passed to the com

[swift-users] Unicode problem

2016-05-08 Thread Nabeel Imtiaz via swift-users
Hi, I am having problem with emojis’ rendering. Emojis like \u{F3A4} and \u{F3B5} print question mark instead. They begin with number “F”. Whereas the emojis beginning with non-F number render just fine. Is there any way to fix it? I also noticed that if it make \u{F3A4} to \u{1F3A4} instead,

Re: [swift-users] Server side swift application ?

2016-05-08 Thread Raphaël Wach via swift-users
Thank you all for your feedback. That’s really helpful. I understand that there is a lot of work in progress regarding server-side Swift and I’ll keep investigating this field though as nothing looks stable for now I’ll stick on Node.js in production for a while. An Apple application server des