[swift-users] SwiftPM, pkg-config and Xcode 8

2016-07-21 Thread Jason Dusek via swift-users
Hi All, I recently discovered the pkgConfig feature for Package.swift and it definitely makes binding to system libraries easier. After changing CLibPQ to use it, I noticed I was able to build a dependent project with swift build but Xcode could not build the

Re: [swift-users] C/FFI interop

2015-12-23 Thread Jason Dusek via swift-users
I think the OP was asking not about importing C symbols into Swift but rather exporting Swift to C. On Wed, 23 Dec 2015 at 15:18 Brent Royal-Gordon via swift-users < swift-users@swift.org> wrote: > > What are the current facilities planned or in development for FFI? Just > as Swift functions can

Re: [swift-users] SwiftShims error thrown while trying to use Swift's REPL

2015-12-23 Thread Jason Dusek via swift-users
The relevant bit is in there: open("/home/dorsatum/swift/usr/lib/swift/linux/x86_64/SwiftShims.swiftmodule", O_RDONLY) = -1 ENOENT (No such file or directory) I am not sure what it should be loading but this file does not exist in the distribution so I wonder why it is searching for it. I had the

Re: [swift-users] SwiftShims error thrown while trying to use Swift's REPL

2015-12-23 Thread Jason Dusek via swift-users
It would be helpful if you provided strace output. On Wed, 23 Dec 2015 at 01:09 Projjol Banerji via swift-users swift-users@swift.org wrote: Hey, > I recently upgraded to Ubuntu 14.04 in order to try Swift out. I've > followed all the instructions given in th

Re: [swift-users] Improving a simple C binding

2015-12-09 Thread Jason Dusek via swift-users
On Wed, 9 Dec 2015 at 12:38 Max Howell max.how...@apple.com wrote: > Another option would seem to be modelling the daylights out of build > environments but I think this runs afoul of enumerations. Right now we have > `os(Linux)` but we'd really need `os(Ubuntu

Re: [swift-users] Improving a simple C binding

2015-12-09 Thread Jason Dusek via swift-users
In the case of `libpq`, even something obvious like `/usr -> /usr/local` wouldn't work because on Ubuntu it ends up in `/usr/include/postgres`. Since we can't have macros in the module map, I think option (2) -- platform module maps -- would be a great combination of hygiene and flexibility (if te

[swift-users] Improving a simple C binding

2015-12-09 Thread Jason Dusek via swift-users
Behold, a binding for libpq: https://github.com/solidsnack/CLibPQ And a little app that uses it: https://github.com/solidsnack/PGVersion CLibPQ is put together in the simplest way: there's a module.modulemap at the root and that's it. I would like to make some changes to the module hierarch

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

2015-12-08 Thread Jason Dusek via swift-users
Gage, For what it's worth, after running `git init` and `git tag -f 1.0.0` in `CCairo` to get something 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

Re: [swift-users] Failure to import SwiftShims at the REPL

2015-12-07 Thread Jason Dusek via swift-users
Thank you Dmitri -- following your instructions, I was finally able to complete the example at the REPL. On Sat, 5 Dec 2015 at 18:17 Dmitri Gribenko wrote: > On Sat, Dec 5, 2015 at 5:36 PM, Jason Dusek via swift-users > wrote: > > Hi List, > > > > On Ubuntu 14.04, t

Re: [swift-users] Parameter Validation

2015-12-06 Thread Jason Dusek via swift-users
Say for a moment we wanted to capture every such constraint at type level -- with types NonEmptyString and PositiveNonZeroInteger. Would these be declared as structs in Swift? ___ swift-users mailing list swift-users@swift.org https://lists.swift.org/mail

[swift-users] Failure to import SwiftShims at the REPL

2015-12-05 Thread Jason Dusek via swift-users
Hi List, On Ubuntu 14.04, trying out Swift from the REPL fails for me when Swift is unable to find the SwiftShims module. All other aspects of installation -- Clang 3.6, libicu-dev -- are correct as far as I can tell. Putting `swift` in `strace` reveals that it tries to find and open /usr/loca