|
Kallikrates posted:I got a spot but I still kinda hope to find out if I get a google i/o ticket. Better just take the WWDC ticket. This morning Google announced they moved I/O's sweepstakes registration to next week, ending Friday. Now if you wait for an answer from Google on I/O, you'll miss out on your chance to close the deal on your WWDC ticket.
|
# ? Apr 8, 2014 13:51 |
|
|
# ? May 16, 2024 01:56 |
|
Yeah, I just saw that weird timing. Problem is no one else I know is going. Never been to a conference by myself
|
# ? Apr 8, 2014 14:35 |
|
Kallikrates posted:Yeah, I just saw that weird timing. Problem is no one else I know is going. Never been to a conference by myself Last year's WWDC had zero reported cases of cannibalism, so you'll probably be fine.
|
# ? Apr 8, 2014 14:39 |
|
Subjunctive posted:Last year's WWDC had zero reported cases of cannibalism, so you'll probably be fine. "reported" ultramiraculous posted:I got it and none of my coworkers did. Maybe submitting all the radars they didn't feel like dealing with is working in my favor? I think lotteries tend to bring out the superstitious side in everyone. If submitting ignored radars gets you in I'd be giving the keynote.
|
# ? Apr 8, 2014 15:49 |
|
lord funk posted:"reported" Next year's lottery will be done Shirley Jackson style
|
# ? Apr 8, 2014 16:09 |
|
haveblue posted:Next year's lottery will be done Shirley Jackson style They oversell and in the holding room before the keynote they have a staffer start distributing bespoke lottery cards from a bucket made from a single piece of aluminum. The losers are drawn and stoned to death with iPod Classics until the attendee count hits 5000.
|
# ? Apr 9, 2014 00:55 |
|
Is there an official pluralization mentioned anywhere? I've always hoped it's meant to be "iPods Touch". (I say as I knowingly break the branding guideline that says it's "iPod touch".)
|
# ? Apr 9, 2014 01:13 |
|
pokeyman posted:Is there an official pluralization mentioned anywhere? I've always hoped it's meant to be "iPods Touch". The Apple Style Guide might cover this: https://help.apple.com/asg/mac/2013/ASG_2013.pdf Page 121: quote:Trademarked product names: Form the plural of trademarked product names by adding the plural generic noun to the singular product name. "iPod touch devices" sounds acceptable, but I am not an authority. Edit: I think the best answer is to avoid sentence construction that forces you to use plurality. Mikey-San fucked around with this message at 01:36 on Apr 9, 2014 |
# ? Apr 9, 2014 01:33 |
|
Doc Block posted:The guy who makes Tweetbot didn't get in, so either he's not on the "favored" list (which seems unlikely), or it really is random. Given the high interest level, it seems odd that doctor would have three coworkers get tickets but who knows. True randomness has clusters.
|
# ? Apr 9, 2014 03:56 |
|
Mikey-San posted:The Apple Style Guide might cover this: How disappointing. Thanks for the link though! "MacBooks Pro and Air lined the tables..." it just writes itself. Big missed opportunity here.
|
# ? Apr 9, 2014 05:38 |
|
Ender.uNF posted:Given the high interest level, it seems odd that doctor would have three coworkers get tickets but who knows. True randomness has clusters. Dave Mark didn't get in either.
|
# ? Apr 9, 2014 06:34 |
|
I'm updating code in Cocos2D to make a sprite mask. I'm not a pro with OpenGL ES so I can't say this is 100% correct other than the 3 errors I'm getting, but the compiler is telling me Use of undeclared identifier ‘quad’; did you mean ‘_quad’? on the 3 lines that use kQuadSize on step 3, but putting the red underline under kQuadSize, which is strange to me. code:
|
# ? Apr 9, 2014 17:31 |
|
LP0 ON FIRE posted:I'm updating code in Cocos2D to make a sprite mask. I'm not a pro with OpenGL ES so I can't say this is 100% correct other than the 3 errors I'm getting, but the compiler is telling me Use of undeclared identifier quad; did you mean _quad? on the 3 lines that use kQuadSize on step 3, but putting the red underline under kQuadSize, which is strange to me. kQuadSize refers to quad, but the variable looks to be called _quad instead?
|
# ? Apr 9, 2014 17:41 |
|
Subjunctive posted:kQuadSize refers to quad, but the variable looks to be called _quad instead? Woah! I just put an underscore before quad.bl and the errors went away. I had entered just quad.bl because when I searched for quad.bl, there were no underscores. Before 2.1, it used to be quad_.bl. Now I need to test this out and see how things go. Thanks! LP0 ON FIRE fucked around with this message at 18:44 on Apr 9, 2014 |
# ? Apr 9, 2014 18:33 |
|
I'm thinking _quad is a struct with member bl, which is why you have to use the underscore. Is that not true? Never used Cocos.
|
# ? Apr 9, 2014 18:38 |
|
See my edit. Yeah I guess that was the case and they switched a bunch around because it wasn't the proper syntax.
|
# ? Apr 9, 2014 18:46 |
|
Here's a quick question, aimed towards people with experience with BlackBerry's level 1 paging system. I know nothing iOS development but, I was just wondering if it would be at all possible to write something similar to BB's level 1 paging system for iOS? My dad works for Delta Airlines as a chief pilot and often has to sleep next to his phone if poo poo hits the fan. Delta recently made the transition from blackberry's to iOS devices and lost the ability to set up personalized notification systems. One of which was the ability to suppress ALL notification noises outside a user specified list of phone numbers and emails that came through matching a specific email title / sender address. Apparently this is what Blackberry called their "level 1 messaging system"? I don't personally know, I've never used a BB. My dad complains constantly that the Iphone has nothing comparable to this feature, and seeing as how I'm going to have some free time this summer I figured I would delve into possibly solving this problem for him. Can it feasibly be done though? I figure if it could someone would have already attempted to put something similar out on the app store.
|
# ? Apr 9, 2014 19:01 |
|
You might be able to do that with the Do Not Disturb feature, which lets you whitelist contacts and allow them to pierce the muting. In general asynchronous notifications are under Apple's control, not third party, so it's not possible to write an app that sits around in the background waiting for a rare network event. You would have significantly more freedom to do this if you jailbroke his device, but this thread is mostly for stock dev.
|
# ? Apr 9, 2014 19:10 |
|
haveblue posted:You would have significantly more freedom to do this if you jailbroke his device, but this thread is mostly for stock dev. There's no rule against talking about jailbroken whatever here, as far as I know, so long as it's on topic. "How do I hook in to the Bluetooth stack on a jailbroken device" would be cool, "help me jailbreak my phone" would be off topic, "why can't I steal this app" would probably get you run out of town.
|
# ? Apr 9, 2014 21:41 |
|
code:
Simulated fucked around with this message at 02:52 on Apr 10, 2014 |
# ? Apr 10, 2014 02:49 |
|
For anyone working with the Objective-C API in JavaScriptCore, that "instanceof" issue I posted about several months ago appears to have been fixed: https://bugs.webkit.org/show_bug.cgi?id=126670
|
# ? Apr 10, 2014 06:02 |
|
Ender.uNF posted:I just don't have the words anymore. I personally feel the debugger has gotten worse as of late. Things sometimes work and other times they don't behave properly. Definitely a step back it seems :\
|
# ? Apr 10, 2014 15:59 |
|
I have an object that fires out a number of values separated by a short delay. I do this using -performSelector:withObject:afterDelay to recursively call its 'fire' method until it's done. The catch is that it is running on the main thread, which means UI interaction blocks it from continuing. I would like this to run on another thread, but -performSelector:withObject:afterDelay has to be in a running NSRunLoop, which means GCD is out. Is there a simple way to do this that I'm just not seeing (after too much digging around GCD / NSRunLoop / NSThread docs)?
|
# ? Apr 11, 2014 00:14 |
|
BTW I would love to use dispatch_after but you cannot cancel the block you schedule. edit: Maybe I should just switch to a timer. lord funk fucked around with this message at 00:56 on Apr 11, 2014 |
# ? Apr 11, 2014 00:17 |
|
NSTimer attached to the runloop in common modes is probably what you want. CommonModes will allow the timer to fire even during user interaction, like if you want a timer doing a thing while the user is scrolling. On my phone, but it's roughly: NSTimer *timer = [NSTimer timerWith...]; [[NSRunLoop mainRunLoop] addTimer:timer inModes:NSCommonModes]:
|
# ? Apr 11, 2014 01:06 |
|
lord funk posted:I have an object that fires out a number of values separated by a short delay. I do this using -performSelector:withObject:afterDelay to recursively call its 'fire' method until it's done. What's stopping you from creating an NSThread with an NSRunLoop? Not that that's the best solution. Running an NSTimer on the main thread will still block the main thread, so I personally wouldn't do it. Make a custom timer class that wraps GCD and mimics some of NSTimer's API. Have a cancel flag that prevents whatever was going to be executed from being executed. Done.
|
# ? Apr 11, 2014 02:02 |
|
lord funk posted:BTW I would love to use dispatch_after but you cannot cancel the block you schedule. sure you can, https://gist.github.com/zwaldowski/955123 NSTimers may or may not be accurate for your needs. Edit: basically what doctor is saying to do.
|
# ? Apr 11, 2014 02:37 |
|
Kallikrates posted:sure you can, https://gist.github.com/zwaldowski/955123 Why is this a category on NSObject? Why are there identical instance and static versions of it? Why is the code clearly just copy pasted four times with minor tweaks to the "with an object" versions? He didn't even make the instance versions pass in the object it's being called on. And why is there a comment calling this a "nice clean implementation"??? God forbid you just define your own object. Oh wait he did but it isn't actually declared anywhere, instead he's abusing a closure as an object (see: closures are a poor man's objects, I guess) I bet he's so proud of how clever this implementation is. Dessert Rose fucked around with this message at 02:57 on Apr 11, 2014 |
# ? Apr 11, 2014 02:54 |
|
didnt say it was good, just that it was possible, and it was the first google result for "dispatch_after cancel"
|
# ? Apr 11, 2014 04:27 |
|
ultramiraculous posted:I mean for pthreads there's nothing that "holds" a lock. It's just a counter. Log statements on mutex lock/unlocks can be pretty helpful here. You can store the owner (as a pthread_t or some pointer to an internal thread object) in the lock object to aid debugging. Some implementations do it. Hell, some implementations have deadlock detection outright ultramiraculous posted:Also: Whyyyyyyyy Huge, irreplaceable C framework our application is based on. Some day (for example, once it's included in the Xcode project instead of being built with a shell script) I'll try to migrate its internals from UNIX API to Core/Foundation
|
# ? Apr 11, 2014 11:17 |
|
lord funk posted:I have an object that fires out a number of values separated by a short delay. I do this using -performSelector:withObject:afterDelay to recursively call its 'fire' method until it's done. Why can't you just create a "CancellationToken" object that you pass in with the block to dispatch_after() that uses one of the OSAtomic* instructions inside to ensure the cancel is set safely? Then the UI thread can trigger the cancel and the block can check the cancellation. Unless you are issuing a bazillion of these, it won't matter that you have walking dead tasks still in the queue because they'll exit almost immediately. I haven't tested this but: code:
code:
|
# ? Apr 11, 2014 17:27 |
|
Doctor w-rw-rw- posted:Make a custom timer class that wraps GCD and mimics some of NSTimer's API. Have a cancel flag that prevents whatever was going to be executed from being executed. Done. Yep, this. Works great. Ender.uNF posted:Why can't you just create a "CancellationToken" object that you pass in with the block to dispatch_after() that uses one of the OSAtomic* instructions inside to ensure the cancel is set safely? Didn't know about the OSAtomic stuff, thanks.
|
# ? Apr 11, 2014 17:46 |
|
I have a class that has a property that I want to be readonly publicly, but writable inside my class. So the .h looks like this: code:
My coworkers write this in the .m: code:
But somewhere along the line, I got the impression that you can just do this, and cut out the "readwrite" keyword altogether: code:
In my own personal code, this is what I do, and it works, making the property writeable privately, but readonly publicly. My coworkers were amazed when I showed them this. When did this show up? Is it a bug with clang or LLVM? What's going on here?
|
# ? Apr 11, 2014 21:41 |
|
The readwrite attribute is redundant, it's the default for a property that doesn't specify one. So I guess it's always been like that.
|
# ? Apr 11, 2014 21:50 |
|
Axiem posted:I have a class that has a property that I want to be readonly publicly, but writable inside my class. Not a bug, I think that showed up pretty soon after class extensions became a thing. Might even have been contemporaneous. Left unspecified, properties default to readwrite, atomic (grr), and strong for object types or assign for value types. Also that string property should be copy, and it's usually worth specifying setter behavior even for readonly properties so that subclasses can redeclare the property if needed. (Unless you're certain you'll never be subclassed.)
|
# ? Apr 11, 2014 21:50 |
|
Here's a random tip. If you want an immutable public property backed by a mutable private property, declare the public immutable property in a category in the header and the private mutable property of the same name in a class extension in the implementation.
|
# ? Apr 12, 2014 03:17 |
|
Toady posted:Here's a random tip. If you want an immutable public property backed by a mutable private property, declare the public immutable property in a category in the header and the private mutable property of the same name in a class extension in the implementation. Less of a tip and more basic Objective-C language technique, though. Also, no need to have the public property in a category, it can just be inline with the class declaration.
|
# ? Apr 12, 2014 05:49 |
|
For some reason, I thought I had in the past tried including the immutable property in the interface declaration and been given a compiler warning. Don't I feel embarrassed!
|
# ? Apr 12, 2014 09:18 |
|
pokeyman posted:Also that string property should be copy Point taken, though it's kind of immaterial to my question. It just seemed odd to me that it used to be that you had to declare explicitly that a variable was readwrite privately, but now you don't have to, and no one seems to have been notified of the change, and I can't find any reference to it online (though it's hard to google for). Why do keywords like readwrite, atomic, and strong exist if they're the default and therefore never should be used?
|
# ? Apr 12, 2014 19:07 |
|
|
# ? May 16, 2024 01:56 |
|
Explicitness, probably.
|
# ? Apr 12, 2014 19:42 |