Perl 6 - the future is here, just unevenly distributed

IRC log for #openframeworks, 2014-08-06

| Channels | #openframeworks index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 vade joined #openframeworks
00:04 starPause joined #openframeworks
00:36 vade joined #openframeworks
00:37 neue_ joined #openframeworks
00:53 yu1ch1 joined #openframeworks
01:16 sebllll joined #openframeworks
01:23 yu1ch1 joined #openframeworks
01:28 admsyn joined #openframeworks
01:34 pizthewiz joined #openframeworks
01:47 ilbot3 joined #openframeworks
01:47 Topic for #openframeworks is now Welcome to http://openframeworks.cc/ | logs at http://irclog.perlgeek.de/openframeworks/
02:29 allartburns joined #openframeworks
02:55 allartburns joined #openframeworks
03:06 oneironaut joined #openframeworks
03:13 starPause joined #openframeworks
03:20 allartburns joined #openframeworks
03:21 oneironaut joined #openframeworks
03:46 booltox joined #openframeworks
03:47 oneironaut joined #openframeworks
03:57 DrCode joined #openframeworks
04:11 vade joined #openframeworks
04:17 tinyblak joined #openframeworks
04:21 jedahan joined #openframeworks
04:23 DrCode joined #openframeworks
04:57 Pando_ joined #openframeworks
04:59 starPause joined #openframeworks
05:11 yu1ch1 joined #openframeworks
05:20 GuidovanPossum joined #openframeworks
05:27 tinyblak_ joined #openframeworks
05:33 yu1ch1 joined #openframeworks
05:43 yu1ch1 joined #openframeworks
05:49 oneironaut joined #openframeworks
05:49 dfarm joined #openframeworks
06:05 yu1ch1 joined #openframeworks
06:20 tinyblak joined #openframeworks
07:08 mihi_tr joined #openframeworks
07:11 starPause joined #openframeworks
07:25 mhashmi joined #openframeworks
07:36 mhashmi joined #openframeworks
07:38 yu1ch1 joined #openframeworks
07:55 jvcleave_ joined #openframeworks
08:18 mihi_tr joined #openframeworks
08:19 mhashmi joined #openframeworks
08:41 fuerstP joined #openframeworks
08:43 tinyblak joined #openframeworks
08:53 tinyblak joined #openframeworks
08:53 SolitaryCipher joined #openframeworks
08:54 neue joined #openframeworks
08:54 loop_ joined #openframeworks
09:40 sTEaDy[NL] joined #openframeworks
09:48 neue joined #openframeworks
09:57 tinyblak_ joined #openframeworks
10:15 workergnome joined #openframeworks
10:17 GuidovanPossum joined #openframeworks
10:18 mihi_tr joined #openframeworks
10:38 DrCode joined #openframeworks
11:12 starPause joined #openframeworks
11:13 fuerstP joined #openframeworks
11:18 mhashmi joined #openframeworks
11:23 mhashmi joined #openframeworks
11:26 nylki joined #openframeworks
11:47 vade joined #openframeworks
11:50 workergnome joined #openframeworks
11:57 yu1ch1 joined #openframeworks
12:19 mhashmi joined #openframeworks
12:22 mhashmi_ joined #openframeworks
12:33 fuerstP joined #openframeworks
12:49 workergnome joined #openframeworks
13:02 workergnome joined #openframeworks
13:09 MyMind joined #openframeworks
13:39 fuerstP joined #openframeworks
13:40 mhashmi joined #openframeworks
13:50 mhashmi joined #openframeworks
13:58 nylki_ joined #openframeworks
14:11 underdoeg joined #openframeworks
14:11 underdoeg left #openframeworks
14:25 workergnome joined #openframeworks
14:38 admsyn joined #openframeworks
14:47 workergnome joined #openframeworks
14:49 workergnome joined #openframeworks
15:01 workergnome joined #openframeworks
15:09 vade joined #openframeworks
15:10 tinyblak joined #openframeworks
15:15 starPause joined #openframeworks
15:23 GuidovanPossum joined #openframeworks
15:46 mtrythall joined #openframeworks
16:05 workergnome joined #openframeworks
16:22 VbKing joined #openframeworks
16:28 starPause joined #openframeworks
17:02 admsyn joined #openframeworks
17:03 admsyn joined #openframeworks
17:38 fuerstP joined #openframeworks
17:58 tinyblak joined #openframeworks
18:09 nylki_ joined #openframeworks
18:14 workergnome joined #openframeworks
18:26 vade joined #openframeworks
18:55 MyMind joined #openframeworks
19:05 admsyn joined #openframeworks
19:14 sTEaDy[NL] joined #openframeworks
19:20 mihi_tr joined #openframeworks
20:16 admsyn joined #openframeworks
20:56 workergnome joined #openframeworks
21:02 joshuajnoble joined #openframeworks
21:02 joshuajnoble hey admsyn I have an iOS question for you
21:02 admsyn hey josh
21:03 joshuajnoble why would service_uuid = [CBUUID UUIDWithString:@"2220"]; always set service_uuid to nil?
21:03 admsyn that's a core bluetooth thing?
21:03 joshuajnoble yeppers
21:03 admsyn is that an invalid UUID? IIRC they're supposed to be a certain format and way longer..
21:03 admsyn but it's been like a year since I've touched core bluetooth vOv
21:04 joshuajnoble Yeah, its for the RFDuino and works fine out of all their examples, but in my OF app, UUIDWithString always returns nil.
21:04 admsyn oh
21:04 joshuajnoble I'm wondering if I've somehow misconfigured the project?
21:04 admsyn I think it's an ARC thing maybe
21:04 admsyn that constructor would returned an autoreleased UUID, maybe you need to retain it?
21:05 joshuajnoble oooooh. hmm.
21:05 admsyn because ARC's off in OF I think
21:05 admsyn so if you don't retain it and check later it'd (probably) be released
21:05 admsyn so == nil
21:05 joshuajnoble that would make sense. i'm stepping through it though, and it's == nil right away, not getting set and then returning laster
21:05 joshuajnoble later
21:06 admsyn huh
21:06 joshuajnoble yeah. still ARC is a good thought,
21:06 admsyn yeah that's really my only thought, maybe if you're using an oldish SDK there's something weird going on there
21:06 * admsyn grasps some straws
21:07 admsyn the ARC thing is the only thing that'd be notably different from a stock iOS project though I think
21:07 joshuajnoble heh. yeah, i'm using all pretty new stuff. it's weird b/c I can run their demos fine, but trying to get it working in OF is breaking on something to my uneducated mind seems quite simple
21:07 admsyn is service_uuid a property?
21:07 admsyn as in with strong / weak etc
21:08 admsyn because the semantics are different in OF I think due to the no-ARC
21:08 admsyn so that'd maybe be something too
21:08 joshuajnoble it's a static CBUUID *service_uuid;
21:08 joshuajnoble so seems like it should hang out forever
21:10 admsyn maybe it needs to be called on the main queue if you're not specifically doing that
21:10 admsyn but I mean really at this point I don't know
21:11 joshuajnoble np, just figured I'd give you a holler and see if you had any ideas
21:12 admsyn @vade might know?
21:15 vade hm. Havent done anything with CB
21:15 vade but
21:15 vade read the headers
21:15 vade The expected format for 128-bit UUIDs is a string punctuated by hyphens, for example 68753A44-4D6F-1226-9C60-0050E4C00067.
21:15 vade 2200 seems invalid no?
21:16 joshuajnoble if I understand this right (and I might not) then UUIDWithString is supposed to turn a string into a proper 128b UUID
21:16 vade you should use [[NSUUID UUID] UUIDString]
21:17 admsyn or uuidgen in a terminal if you need one to persist
21:17 vade well, into a CBUUID
21:17 vade you can just pass in the bytes
21:17 joshuajnoble and in the reference code I've been checking out, the same line happily creates a CBUUID that I can then use
21:17 vade if you want it to persist
21:17 vade are you compiling against different SDKs?
21:17 vade they might restrict / change the policy
21:18 vade so if you compile against say iOS 6
21:18 vade but project b is iOS8
21:18 vade you get different behaviours
21:18 vade (potentially)
21:19 joshuajnoble yeah, both are compiling against 7.0. originally I was targeting 7 for my OF but then switched it to 6 to have it match their demo (which compiles + works on my device/system).
21:19 joshuajnoble it's probably some compile flag somewhere that'll be super fun to track down
21:19 vade I dont see why that would be a compile flag.
21:20 vade but hrm
21:20 joshuajnoble i suppose I could just set the CBUUID manually but this makes me think that CB itself isn't being loaded properly?
21:21 vade are linking to the frameworks correctly?
21:21 vade any warnings in XCode you are ignoring ?
21:21 vade just for shits and giggles, gen a UUID and try it
21:21 vade if it doesnt work with a UUID string im barking up the wrong tree
21:21 vade if it does, then, you likely are hitting an edge case elsewhere
21:21 vade also, note
21:22 joshuajnoble there's warnings but they're pretty typical iOS + OF: https://gist.github.com/joshuajnoble/68db2b9ad03797ae7614
21:22 vade deplyment target SDK and base SDK are different
21:22 vade make sure both are sane
21:23 joshuajnoble yes. for some reason OF default targets iOS 3.0 for some weird reason
21:24 vade Also a quick Github search indicates people are using real UUIDs for that method
21:24 vade just try a legit UUID as per header
21:28 vade Any luck?
21:31 mtrythall joined #openframeworks
21:32 joshuajnoble trying to figure out how to make a UUID from a string. I am very not-Obj-C smart
21:34 admsyn it would just be the same syntax you had before with the UUID in place of the 2220
21:34 admsyn and uuidgen gives you a UUID you can just copy-paste in there
21:35 joshuajnoble k. service_uuid = [CBUUID UUIDWithString:(@"c97433f0-be8f-4dc8-b6f0-5343e6100eb4")]; still nil
21:38 joshuajnoble yeah, I can't seem to generate any valid CBUUIDs, which means that I can't call any CB methods. mysterious
21:38 admsyn what if you take the static out of the equation and do like CBUUID * myid = … and then throw a breakpoint right after?
21:38 admsyn oh there's unneccessary brackets in your code snippet, though I can't imagine that matters
21:40 admsyn also uuidgen and the headers imply the string should be all caps
21:42 joshuajnoble wtf. CBUUID * myid = [CBUUID UUIDWithString:(@"c97433f0-be8f-4dc8-b6f0-5343e6100eb4")]; myid = Unknown (<c97433f0 be8f4dc8 b6f05343 e6100eb4>)
21:42 admsyn well at least it's not nil :)
21:43 joshuajnoble oh yeah, definitely an improvement :) but about "static CBUUID *service_uuid;" means it can't be set?
21:43 admsyn so what if you do the same and breakpoint right after when setting the static, still nil?
21:43 joshuajnoble yes.
21:44 admsyn I mean I guess there's something weird going on with retain etc semantics
21:44 admsyn as far as I know the reference counter isn't actually aware of statics
21:45 joshuajnoble I can even do " CBUUID * myid = [CBUUID UUIDWithString:(@"2220")];" , which is what I want to do b/c that's the default address of the RFduino GATT services
21:45 joshuajnoble turning ARC on and off doesn't seem to do anything
21:45 admsyn fwiw it'd be more Obj-C-ey to do something like a singleton with dispatch_once
21:45 admsyn or I guess Cocoa-ey to be pedantic :p
21:46 admsyn like [JOSHStuff UUID]
21:46 joshuajnoble this manager class actually already is a singleton, but I'm not familiar with dispatch_once
21:46 admsyn if you just type out dispatch_once xcode should give you a macro
21:47 neue joined #openframeworks
21:47 admsyn that you would put in a function on a singleton, so the first time you call it sets the static member, and then every time after that it just returns it
21:48 admsyn so i.e. the first time you call [JOSHStuff sharedUUID] it does the CBUUID thing to a static var in the function, then every time after dispatch_once will make sure it doesn't re-genereate it
21:48 admsyn uh words *waggle hands*
21:49 joshuajnoble that doesn't seem to help. When I try to scan for devices, I'm still doing so with a bunk service ID: v
21:49 joshuajnoble http://imgur.com/1ccMc9g
21:50 admsyn (╯°□°)╯︵ ┻━┻)
21:51 admsyn also there's fancypants new syntatic sugar for NSArray arrayWithObject, just @[service_uuid]
21:52 admsyn it doesn't sound like there's really anything stopping you from just using a local in there though?
21:52 joshuajnoble even doing "CBUUID * myid = [CBUUID UUIDWithString:(@"2220")]; service_uuid = myid;" service_uuid is still bunk fuh. I mean, I can just hack this together to remake the CBUUID *every* time I have to call into anything
21:52 joshuajnoble but it just feels super kludgy
21:53 joshuajnoble no, sorry, it doesn't just feel that way, it is that way
21:53 admsyn haha
21:53 admsyn got to ask: why does it need to be static?
21:54 admsyn straight up static vars aren't used much in Objective-C, aside from like NSString constants
21:54 admsyn or maybe I'm in a bubble
21:55 joshuajnoble it doesn't need to be, i'm just trying to make nice OF wrapper for the RFduino GATT transfer library they released
21:55 joshuajnoble but having to start hacking their code apart to get it to run in OF
21:55 admsyn ah gotcha
21:56 joshuajnoble yeah, makes dealing with my fav new little bluetooth chip quite easy. good for a workshop i'm doing and for some stuff that I'm helping other people do here
21:57 admsyn nice, yeah I remember core bluetooth being ok-ish compared to like your everyday bluetooth lib :p
21:58 joshuajnoble it's very well designed for what it's supposed to do: let two and only two things talk quickly and painlessly
21:58 joshuajnoble ah, you mean the iOS libs. Yeah, they seem nice so far
21:58 joshuajnoble certainly less mess than the Android versions
21:59 joshuajnoble gave up my weekend to making those work with our stack, yikes
22:00 joshuajnoble Cool, ok, so for whatever reason: CBUUID * myid = [CBUUID UUIDWithString:(@"2220")]; [central scanForPeripheralsWithServices:[NSArray arrayWithObject:myid] options:options]; works fine
22:00 joshuajnoble going with it, moving on. Thanks gents!!
22:01 admsyn np, good luck!
22:15 workergnome joined #openframeworks
22:19 admsyn left #openframeworks
23:05 mtrythall joined #openframeworks
23:06 vade joined #openframeworks
23:10 eluria joined #openframeworks
23:15 eluria Hello. I'm trying to use the opencv split function (using ofxCv) but the call never returns. Can anyone help me with this? I really can't find any clue what's going on and without debug symbols it's quite hard to investigate..
23:27 vade joined #openframeworks
23:37 eluria or alternatively: are any directions available on how to compile the opencv.a lib for oF on osx?
23:40 joshuajnoble you should just be able to compile opencv as it comes from the download, without needing to do anythign special
23:42 eluria does that also go for osx? I had to disable video to compile it, and then in the lib/ directory I get a bunch of separate .a files (I've disabled shared libs in ccmake)
23:45 joshuajnoble just fired up cmake, i'll check
23:47 eluria cool
23:47 joshuajnoble actually, check this: http://stackoverflow.com/questions/3821916/how-to-merge-two-ar-static-libraries-into-one
23:48 joshuajnoble i think that's all you need to do if you want a monolithic opencv.a
23:48 joshuajnoble but i'm surprised ofxCv doens't just use all the libs as built in oCV
23:50 eluria well it does. you might have missed my initial Q. trouble is, cv::split() somehow gets stuck indefinitely and my only hope atm is trying to get debug symbols and see what's happening
23:52 joshuajnoble oh, yes, somehow that's not in my transcript here. hmm. ok, one sec

| Channels | #openframeworks index | Today | | Search | Google Search | Plain-Text | summary