Re: [swift-users] Swift BMI

2015-12-15 Thread Gage Morgan via swift-users
perience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality. Thanks, ~ Kelly Kelly Keenan kkeenan@.com <mailto:kkee...@apple.com> cond...@swift.org > On Dec 15, 2015, at 12:37, Ga

Re: [swift-users] Swift BMI

2015-12-15 Thread Gage Morgan via swift-users
-0800, "Gage Morgan via swift-users" wrote: I understand that mine is a bit more complicated than it needs to be. It works, that's good enough for me. It gives proper values. I knew SOMEONE would have an issue with the "breaking machine," and I realized it could no

Re: [swift-users] Swift BMI

2015-12-15 Thread Gage Morgan via swift-users
have written it out step-by-step. Look at the calculations given by the second revision. They are unrounded versions of the CDC website's results, are they not? Sent from Outlook Mobile On Mon, Dec 14, 2015 at 9:50 PM -0800, "Gage Morgan via swift-users" wrote: And a mor

Re: [swift-users] Swift BMI

2015-12-14 Thread Gage Morgan via swift-users
And a more polished version:https://gist.github.com/MGageMorgan/c2166174be878e9cea78 Sent from Outlook Mobile On Mon, Dec 14, 2015 at 7:20 PM -0800, "Gage Morgan via swift-users" wrote: For most languages I try out, my own version of "Hello World!" is a BMI c

[swift-users] Swift BMI

2015-12-14 Thread Gage Morgan via swift-users
For most languages I try out, my own version of "Hello World!" is a BMI calculator. Swift has passed, I encourage you to try it out.  There are two methods called towards the end of file:1) bmi.pounds(weight, height) - Replace numbers inside with your own if you want to test out in US Customary

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
ion) > :0: error: build had 1 command failures > swift-build: exit(1): > ["/home/mgage/Downloads/swift/usr/bin/swift-build-tool", "-v", "-f", > "/home/mgage/swift-cairo-bindings/test/.build/debug/test.o/llbuild.yaml"] > > I'm going to atte

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
create a repo, but GitHub and I don't always get along ;) Subject: Re: [swift-users] Need Help with C-to-Swift (finally) From: max.how...@apple.com Date: Fri, 11 Dec 2015 18:51:09 -0800 CC: ja...@apple.com; swift-users@swift.org; har...@harlanhaskins.com To: gagemor...@outlook.com The link f

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
t (finally) From: max.how...@apple.com Date: Fri, 11 Dec 2015 18:51:09 -0800 CC: ja...@apple.com; swift-users@swift.org; har...@harlanhaskins.com To: gagemor...@outlook.com The link failure is for the constructor for your Cairo class. I'll have to test this out myself. Can't for a few h

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
wift (finally) From: max.how...@apple.com Date: Fri, 11 Dec 2015 18:51:09 -0800 CC: ja...@apple.com; swift-users@swift.org; har...@harlanhaskins.com To: gagemor...@outlook.com The link failure is for the constructor for your Cairo class. I'll have to test this out myself. Can't for a

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
The link failure is for the constructor for your Cairo class. I'll have to test this out myself. Can't for a few hours at least. In the mean time try `swift build -v` for some more information. On Dec 11, 2015, at 6:42 PM, Gage Morgan via swift-users wrote: I have no idea what hap

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
ft (finally) From: har...@harlanhaskins.com Date: Fri, 11 Dec 2015 19:35:46 -0500 CC: gagemor...@outlook.com; swift-users@swift.org To: ja...@apple.com I considered that but couldn't find a cairo_get_font_scale function quickly to complement the setter 😅 But yes, a full wrapper would trans

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
#x27;t for a few hours at least. In the mean time try `swift build -v` for some more information. On Dec 11, 2015, at 6:42 PM, Gage Morgan via swift-users wrote: I have no idea what happened here, but: Cloning Packages/CCairoCloning Packages/CairoCompiling Swift Module 'Cairo' (

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
utlook.com; swift-users@swift.org To: ja...@apple.com I considered that but couldn't find a cairo_get_font_scale function quickly to complement the setter 😅 But yes, a full wrapper would transparently handle getting and setting. - Harlan On Dec 11, 2015, at 7:28 PM, Jack Lawrence wrote:

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
_scale function quickly to complement the setter 😅 But yes, a full wrapper would transparently handle getting and setting. - Harlan On Dec 11, 2015, at 7:28 PM, Jack Lawrence wrote: For getter-setter pairs like `setLineWidth`, you might consider turning them into properties: cairo.setLineWidth(0

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
probably be more help. On Dec 11, 2015, at 6:21 PM, Gage Morgan via swift-users wrote: I'm going to. Now, does this mean anything labelled func inside the struct needs tacked on as well? Subject: Re: [swift-users] Need Help with C-to-Swift (finally) From: ja...@apple.com Date: Fri, 11 Dec

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
thout "surface" but instead "cairo”? Absolutely! That’s just a variable name — it could be called ‘puppies’, though that’s not very readable. Sent from Outlook Mobile On Fri, Dec 11, 2015 at 2:00 PM -0800, "Gage Morgan via swift-users" wrote: I went and looked at i

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
mplement the setter 😅 But yes, a full wrapper would transparently handle getting and setting. - Harlan On Dec 11, 2015, at 7:28 PM, Jack Lawrence wrote: For getter-setter pairs like `setLineWidth`, you might consider turning them into properties: cairo.setLineWidth(0.1) // oldcairo.lineWidth =

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
uldn't find a cairo_get_font_scale function quickly > to complement the setter > > But yes, a full wrapper would transparently handle getting and setting. > > - Harlan > > On Dec 11, 2015, at 7:28 PM, Jack Lawrence wrote: > > For getter-setter pairs like `setLineWidt

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
full wrapper would transparently handle getting and setting. - Harlan On Dec 11, 2015, at 7:28 PM, Jack Lawrence wrote: For getter-setter pairs like `setLineWidth`, you might consider turning them into properties: cairo.setLineWidth(0.1) // oldcairo.lineWidth = 0.1 // new On Dec 11, 2015, at 4

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
from Outlook Mobile On Fri, Dec 11, 2015 at 2:00 PM -0800, "Gage Morgan via swift-users" wrote: I went and looked at it, and even now it looks like I want to take every function I've used in Cairo and translate it to Swift. Swift is such a...simple language compared to e

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
I meant the code posted in the Gist link above. I don't know jack squat about qsort. I'm hoping that if I can reverse-engineer code already produced, I can apply it to other parts of Cairo. Sent from Outlook Mobile On Fri, Dec 11, 2015 at 1:34 PM -0800, "Kwame Bryan" wrote: Tutorial o

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
g report for that? Sent from Outlook Mobile On Fri, Dec 11, 2015 at 12:08 PM -0800, "Harlan Haskins" wrote: Mind sending your CCairo modulemap? I’d love to help you get this translated to Swift. On Dec 11, 2015, at 2:44 PM, Gage Morgan via swift-users wrote:I want to call

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
Haskins" wrote: Mind sending your CCairo modulemap? I’d love to help you get this translated to Swift. On Dec 11, 2015, at 2:44 PM, Gage Morgan via swift-users wrote: I want to call PNG surfaces from Swift, as well as use cairo_line_to() and cairo_move_to() in Swift. Thing is,

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
Do so here in a few. Want a bug report for that? Sent from Outlook Mobile On Fri, Dec 11, 2015 at 12:08 PM -0800, "Harlan Haskins" wrote: Mind sending your CCairo modulemap? I’d love to help you get this translated to Swift. > On Dec 11, 2015, at 2:44 PM, Gage Morgan vi

Re: [swift-users] Need Help with C-to-Swift (finally)

2015-12-11 Thread Gage Morgan via swift-users
,--MGage-- Sent from Outlook Mobile On Thu, Dec 10, 2015 at 10:40 PM -0800, "Jason Dusek" wrote: When you say, output to Swift, do you mean, call it from Swift? Return the PNG or surface to Swift? On Thu, 10 Dec 2015 at 22:39 Gage Morgan via swift-users < swift-users@swift.org&

[swift-users] Need Help with C-to-Swift (finally)

2015-12-10 Thread Gage Morgan via swift-users
So, if I had this code written in C: int main (int argc, char *argv[]) { cairo_surface_t *surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 240, 80); cairo_t *cr = cairo_create (surface); cairo_select_font_face (cr, "serif", CAIRO_FONT_SLANT

[swift-users] Cairo Compiles, Need to Translate to test

2015-12-10 Thread Gage Morgan via swift-users
Okay, so I have no idea what I did, but I got an executable. Now I need to translate to get a basic image.___ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users

Re: [swift-users] How to print formated "%.9f" Double? Swift 2.2 ?

2015-12-10 Thread Gage Morgan via swift-users
You mean .so files? Yeah, Cairo does not work with it either. Sent from Outlook Mobile On Thu, Dec 10, 2015 at 12:41 PM -0800, "Isaac Gouy via swift-users" wrote: I've tried various things from SO but none of them seem to work with Swift 2.2 on Ubuntu. _

Re: [swift-users] CleanroomLogger, a pure Swift logging engine

2015-12-09 Thread Gage Morgan via swift-users
Please port it. The PM is a bit buggy right now. It's difficult enough when the thing spits errors, but even worse when you don't really have a way to trace what you did. I'd attempt to use it. Sent from Outlook Mobile On Wed, Dec 9, 2015 at 12:56 PM -0800, "Max Howell via swift-users" wro

Re: [swift-users] Binding Regular C Functions (Gtk, Cairo, etc.)

2015-12-09 Thread Gage Morgan via swift-users
olidsnack/Downloads/Sources/example/Packages/CCairo/Package.swift' On Tue, 8 Dec 2015 at 18:22 Gage Morgan via swift-users wrote: > > Okay, I've filed a report. To make it easier, the thing's code is SR-152. > > https://bugs.swift.org/browse/SR-152 > > __

Re: [swift-users] Binding Regular C Functions (Gtk, Cairo, etc.)

2015-12-09 Thread Gage Morgan via swift-users
ng importable, I run into this error: > > :; swift build > Cloning Packages/CCairo > :0: error: no such file or directory: > '/Users/solidsnack/Downloads/Sources/example/Packages/CCairo/Package.swift' > > > On Tue, 8 Dec 2015 at 18:22 Gage Morgan via swift-users > wrote: &

Re: [swift-users] Binding Regular C Functions (Gtk, Cairo, etc.)

2015-12-08 Thread Gage Morgan via swift-users
apple/swift-package-manager/blob/master/Documentation/SystemModules.md - mish On Dec 7, 2015, at 6:33 PM, Gage Morgan via swift-users wrote: For any project: How is a C to Swift function binding created? I'd like to know how to import C functions to Swift

Re: [swift-users] Binding Regular C Functions (Gtk, Cairo, etc.)

2015-12-08 Thread Gage Morgan via swift-users
d, if you will. Sent from Outlook On Mon, Dec 7, 2015 at 6:39 PM -0800, "Mish Awadah" wrote: Please see the reference at https://github.com/apple/swift-package-manager/blob/master/Documentation/SystemModules.md - mish On Dec 7, 2015, at 6:33 PM, Gage Morgan vi

Re: [swift-users] Fwd: Re: Binding Regular C Functions (Gtk, Cairo, etc.)

2015-12-07 Thread Gage Morgan via swift-users
t got imported, if you will. Sent from Outlook On Mon, Dec 7, 2015 at 6:39 PM -0800, "Mish Awadah" wrote: Please see the reference at https://github.com/apple/swift-package-manager/blob/master/Documentation/SystemModules.md - mish

Re: [swift-users] Fwd: Re: Binding Regular C Functions (Gtk, Cairo, etc.)

2015-12-07 Thread Gage Morgan via swift-users
reference at https://github.com/apple/swift-package-manager/blob/master/Documentation/SystemModules.md - mish On Dec 7, 2015, at 6:33 PM, Gage Morgan via swift-users < swift-users@swift.org> wrote: For any project: How is a

[swift-users] Fwd: Re: Binding Regular C Functions (Gtk, Cairo, etc.)

2015-12-07 Thread Gage Morgan via swift-users
ge-manager/blob/master/Documentation/SystemModules.md - mish On Dec 7, 2015, at 6:33 PM, Gage Morgan via swift-users < swift-users@swift.org> wrote: For any project: How is a C to Swift function

[swift-users] Binding Regular C Functions (Gtk, Cairo, etc.)

2015-12-07 Thread Gage Morgan via swift-users
For any project: How is a C to Swift function binding created? I'd like to know how to import C functions to Swift. Once I can do this successfully, I'll be all set.  Sent from Outlook ___ swift-users mailing list swift-users@swift.org https://lists.sw