Re: iOS communication with http proxy

2012-07-08 Thread Don Quixote de la Mancha
ry little to do with anyone's Venture Backed Startup, Killer App Idea or Insanely Great Product. > Read. -> Them. -> Or. ----> Weep. I'll send you my bill in the mail. -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Ele

Re: Nil and nil Macro Conflict

2012-05-01 Thread Don Quixote de la Mancha
. But if you do find that you've introduced bugs - or really, if you have ANY bugs at all - fix them by writing automated tests just for the very lowest level of your heirarchy, then after fixing any bugs you discover in just that lowest level, write tests for just the second level. Do no

Re: Concealing an app from DTrace

2012-05-01 Thread Don Quixote de la Mancha
e in the early nineties, most of our products were what the company founder describes as "Virus-Like Hacks", with the difference that our products' users wanted them on theirs Macs, paid good money for them, and they were packaged in full-color boxes with attractive, well-writ

Re: Tracking down SIGABRTs

2012-04-29 Thread Don Quixote de la Mancha
On Sun, Apr 29, 2012 at 8:00 PM, Don Quixote de la Mancha wrote: > Place some assertions as the very first executable lines in each of > your subroutines.  The chances are quite good that the cause of the > SIGABRTs are executable quite a long time before the crashes actually

Re: Tracking down SIGABRTs

2012-04-29 Thread Don Quixote de la Mancha
le ranges of parameters are revised. You can also assert the ranges of return results, but my experience is that I get more mileage out of asserting input parameters. -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Elegance and Beauty http://www.dulcineatech.c

Re: Accessing array in thread safe way

2012-03-08 Thread Don Quixote de la Mancha
rocessing going all the way back to the 1940s. The problems you and I face today may well have been solved and published decades ago. Even if the algorithms were patented those patents may well have expired by now. I'm sorry but I cannot recommend any reading. I expect others on this list can.

Re: Locks

2011-12-06 Thread Don Quixote de la Mancha
to use atomic operations as locking primitives. One is that they cannot result in process context switches; if you are certain that you will release the lock quite quickly, it is a whole lot faster, and uses less memory, to use atomic arithmetic. I'll send you my bill in the mail, Don Quixot

Re: NSTextView - scroll programmatically to place the current line (where the text cursor is) in the middle.

2011-11-16 Thread Don Quixote de la Mancha
erent people who are representative of your target market. -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Elegance and Beauty http://www.dulcineatech.com quix...@dulcineatech.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.a

Re: About iVars declaration and property

2011-11-16 Thread Don Quixote de la Mancha
using cached memory, preferring hand-rolled assembly code instead. The ARM Holdings website has oodles of technical articles about how to do that, as do Intel's and AMD's websites. -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Elegance and Beauty

Re: Memory usage from PID

2011-11-16 Thread Don Quixote de la Mancha
e as much memory as you want, but your program will perform well if only a little bit of your allocation is actually resident. The kernel maintains a bunch of statistics about each user process. I expect that your resident memory usage will be among those statistics, but I'm sorry I don't kn

Re: About iVars declaration and property

2011-11-16 Thread Don Quixote de la Mancha
On Wed, Nov 16, 2011 at 8:03 AM, Kyle Sluder wrote: > On Nov 16, 2011, at 1:00 AM, Don Quixote de la Mancha > wrote: >> Calling accessors is also quite slow compared to a direct iVar access, >> because it has to go through Objective-C's message dispatch mechanism. >

Re: About iVars declaration and property

2011-11-16 Thread Don Quixote de la Mancha
ccess, because it has to go through Objective-C's message dispatch mechanism. Focussing on interface is no excuse for weighty, bloated code! -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Elegance and Beauty http://www.dulcineatech.com quix...@dulcin

Re: About iVars declaration and property

2011-11-13 Thread Don Quixote de la Mancha
nation of ivars. -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Elegance and Beauty http://www.dulcineatech.com quix...@dulcineatech.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mod

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-11 Thread Don Quixote de la Mancha
or armv6 is broken, and figured that even though this was armv7, but I have not yet been able to figure out how to disable Thumb in Apple's LLVM 3.0 compiler for Xcode 4.2. The way one does it for GCC has no effect on LLVM. If you can enlighten me, I'll give it a try right after I get back

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-11 Thread Don Quixote de la Mancha
mal test case or a thorough regression, but when I do I'll post them here, and will post a follow-up as a new thread in the Xcode-Users list: http://www.dulcineatech.com/bug-reports/xcode/4.2/llvm/ Nighty-Night! Don't Let The Code Bugs Byte. Don Quixote -- Don Quixot

Re: NSDateFormatter not working on iOS 5.

2011-11-11 Thread Don Quixote de la Mancha
ult ) return result; [initBuf result]; // We are now certain result is not NULL return result; } - (void) initBuf: (unsigned char*) bufPtr { assert( NULL != bufPtr ); // Correct use of assert ... return; } Hope That Helps, Don Quixote -- Don Quixote de la Mancha Dulcinea Tec

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-10 Thread Don Quixote de la Mancha
g with a minimal test case, but Apple has not yet responded. It usually takes them a while. There are many other reasons to allocate memory other than to set up a game playing field. There are lots of other kinds of resources other than memory as well. If we cannot count on the iOS to let

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-10 Thread Don Quixote de la Mancha
documented to return NULL when there isn't enough memory to satisfy the user's request. Their implementation is simply broken if they don't do that. -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Elegance and Beauty http://

Re: How to switch GDB disassembly from Thumb to ARM?

2011-11-09 Thread Don Quixote de la Mancha
On Wed, Nov 9, 2011 at 9:39 AM, Don Quixote de la Mancha wrote: > .globl _IntNoArgs > .align 2 > .code 16 That should actually be ".align 1". The parameter to .align is the power to which two is raised to yield the alignment. ".code 16" generates Thumb code,

How to switch GDB disassembly from Thumb to ARM?

2011-11-09 Thread Don Quixote de la Mancha
EALLY REALLY REALLY like is a machine debugger that worked just like MacsBug did on the Classic Mac OS. While GDB is generally capable of doing assembler debugging, it totally sucks for that purpose. That's not anyone's fault, really, because it is designed for source debugging. A good asse

Tip: how to fix failure to compile ivars in class extensions

2011-11-09 Thread Don Quixote de la Mancha
et settings are meant to accomplish, but despite having used Xcode since it was called Project Builder, I still find these combined settings to be an endless source of confusion. Hope That Helps! -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Elegance and

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-09 Thread Don Quixote de la Mancha
On Wed, Nov 9, 2011 at 1:02 AM, Jean-Daniel Dupas wrote: > Le 9 nov. 2011 à 07:44, Don Quixote de la Mancha a écrit : >> While the Space Shuttle exploded twice, I hasten to point out that >> neither of those failures was due to software bugs. >> > > No, but Ariane

Re: NSFileHandle readInBackground vs threading?

2011-11-09 Thread Don Quixote de la Mancha
ndependent atomic arithmetic and thread synchronization primitives. It would be very easy to replace those with Cocoa's. I'm pretty sure that part of Ogg Frog's code is published under the MIT License. -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of El

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-09 Thread Don Quixote de la Mancha
On Tue, Nov 8, 2011 at 11:46 PM, Greg Parker wrote: > On Nov 8, 2011, at 10:56 PM, Don Quixote de la Mancha wrote: >> On Tue, Nov 8, 2011 at 10:49 PM, Kyle Sluder wrote: > No, the reason is that most end-users do not want to pay Space Shuttle prices > (high) for Space Shuttle

Re: How to compiler arm assembler .s source file with Xcode 4.2?

2011-11-08 Thread Don Quixote de la Mancha
On Tue, Nov 8, 2011 at 11:38 PM, Don Quixote de la Mancha wrote: > I can't figure out how to view the detailed build log.  Where is that > hidden?  Google yields no insight. Just so Google will yield insight to others in the future. To view the detailed build log in Xcode

How to compiler arm assembler .s source file with Xcode 4.2?

2011-11-08 Thread Don Quixote de la Mancha
some advanced data structures and algorithms that might - just might - make my overall algorithm the fastest Conway's Life algorithm in existence. That remains to be proven though. -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Elegance and

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-08 Thread Don Quixote de la Mancha
On Tue, Nov 8, 2011 at 10:49 PM, Kyle Sluder wrote: > On Tue, Nov 8, 2011 at 10:44 PM, Don Quixote de la Mancha > wrote: >> Kids These Days. >> >> While the Space Shuttle exploded twice, I hasten to point out that >> neither of those failures was due to software bu

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-08 Thread Don Quixote de la Mancha
en it uses too much memory. While a better algorithm would allow the effect of a much larger grid, Conway's Life patterns can grow without bound. I need to know ahead of time when further growth is not tolerable. -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-08 Thread Don Quixote de la Mancha
memory as the system required. As it is now, I have no way at all to warn my user that the game grid they configured might be too big. Either they get a new grid of the desired size, or the iOS terminates my App, thereby destroying all the user's state. -- Don Quixote de la Mancha Dulcinea

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-08 Thread Don Quixote de la Mancha
with G++ and Metrowerks CodeWarrior to spot portability problems. I also use assert() a great deal, mostly to check the input parameters to functions, but elsewhere as well. C'mon man, it's not that hard! -- Don Quixote de la Mancha D

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-08 Thread Don Quixote de la Mancha
are models will likely have more physical RAM. Also the amount that can be safely allocated would depend on how much is left over from other processes, and so could not be counted upon to be any particular fixed amount. -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Eleg

Re: Private Method?

2011-11-07 Thread Don Quixote de la Mancha
. -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Elegance and Beauty http://www.dulcineatech.com quix...@dulcineatech.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator c

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-07 Thread Don Quixote de la Mancha
On Mon, Nov 7, 2011 at 3:59 PM, Jens Alfke wrote: > On Nov 4, 2011, at 6:40 PM, Don Quixote de la Mancha wrote: > I store the grid as an array-of-arrays rather than a two dimensional > array.  That is, I have an array of pointers which has the same number > of elements as th

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-07 Thread Don Quixote de la Mancha
iOS memory allocator is multithreaded, and that Apple's code would be good about checking for runtime failures. If it does not, then that is a bug in the iOS. -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Elegance and Beauty http://www.dulcineatech.

Allocating too much memory kills my App rather than returning NULL

2011-11-04 Thread Don Quixote de la Mancha
is an as-yet-unreported bug in the iOS I will be happy to file a report, but I would be even happier if someone could suggest a workaround. I've been beating my head against this for a couple days now. Thanks! Don Quixote -- Don Quixote de la Mancha Dulcinea Technologies Cor

Re: preventing bad memory access

2011-10-20 Thread Don Quixote de la Mancha
because Objective-C exceptions don't work like C++ exceptions do. You can pass result codes back to calling functions, but you have to be quite diligent about always doing so, always checking for results from the functions you call, then doing something sensible no matter what results your fun

Re: preventing bad memory access

2011-10-20 Thread Don Quixote de la Mancha
ffel programming language, which unfortunately is not as popular as I think it should be. But Programming by Contract is not hard at all to implement as a macro package for most other programming languages. -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Elegance and B

Re: preventing bad memory access

2011-10-20 Thread Don Quixote de la Mancha
er for small accesses but slower for large ones. -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Elegance and Beauty http://www.dulcineatech.com quix...@dulcineatech.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please d

Re: Use storyboard in iOS app

2011-10-16 Thread Don Quixote de la Mancha
eature that uses them when running on iOS builds prior to 5.0 -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Elegance and Beauty http://www.dulcineatech.com quix...@dulcineatech.com ___ Cocoa-dev mailing list (Cocoa-dev@list

Re: CoreRecipes in Xcode4 ?

2011-10-11 Thread Don Quixote de la Mancha
alled Xcode 4.1, it blew away my old /Developer folder. Don Quixote -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Elegance and Beauty http://www.dulcineatech.com quix...@dulcineatech.com ___ Cocoa-dev mailing list (Cocoa-

Re: How to get info about an iOS device (UDID, etc)?

2011-10-10 Thread Don Quixote de la Mancha
t; > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/quixote%40dulcineatech.com > > This email se

Re: [SOLVED] Re: Mystery of the missing symbol

2011-10-02 Thread Don Quixote de la Mancha
The only way I can see to test on such early firmware is to buy a used device from eBay or some such, that has never had a firmware update. -- Don Quixote de la Mancha quix...@dulcineatech.com    Custom Software Development for the iPhone and Mac OS X    http://www.dulcineatech.com/custom-software-d

Re: iTunes problem related to free space on device (iPad, iPod ) when transferring data to device.

2011-09-29 Thread Don Quixote de la Mancha
This may be a bug in either iTunes or the iOS. If you think it might be, you should file a bug report at: http://bugreport.apple.com/ -- Don Quixote de la Mancha quix...@dulcineatech.com    Custom Software Development for the iPhone and Mac OS X    http://www.dulcineatech.com/custom

Re: debugging crashes in dyld?

2011-09-29 Thread Don Quixote de la Mancha
name that your shim knows how to load. This would be a little dangerous; if the dylib is important and you screw up, your user might have to reinstall OS X, so make sure you get it right. -- Don Quixote de la Mancha quix...@dulcineatech.com    Custom Software Development for the iPhone and Mac O

Re: Locked FIles in Lion

2011-09-24 Thread Don Quixote de la Mancha
The underlying open() system call can open documents read-only. See man 2 open. Does Cocoa have a way to specify read-only document open that passes the right flag to open()? -- Don Quixote de la Mancha quix...@dulcineatech.com    Custom Software Development for the iPhone and Mac OS X

Re: Garbage Collection: memory limits, crash when using "lots" of memory, why?

2011-09-22 Thread Don Quixote de la Mancha
Québec, Canada > > > ___ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > He

Re: NSURLConnection: "Greedy Memory Eater" and Error 303

2011-09-09 Thread Don Quixote de la Mancha
url/ That would probably be the easiest route. You should file a bug with Apple at http://bugreport.apple.com/ Buffering a lot of data isn't a big deal on Mac OS X, but it's bad news on an embedded device like the iPhone. Don Quixote -- Don Quixote de la Mancha quix...@dulcineatech.com   

Re: Recursive file remove

2010-08-14 Thread Don Quixote de la Mancha
ilesystem calls. Extra credit if you preflight the entire process without deleting anything at all, just to check whether any unlinks would fail because you don't have permission. The permission bits are available in the structure returned from the stat system call. I'll

Re: Which iPhone Program?

2010-03-23 Thread Don Quixote de la Mancha
- I'll get my Company application submitted today. I'm going to file a Radar bug asking that Apple make it more explicit about what each iPhone Program type includes. Don Quixote -- Don Quixote de la Mancha quix...@dulcineatech.com http://www.dulcineatech.com Dulcinea Technologies

Re: Test for debug vs release

2010-03-21 Thread Don Quixote de la Mancha
t macro in disables itself if NDEBUG is defined. I am under the impression that the presence or absence of NDEBUG is specified by the ANSI C definition, but I'm not completely certain. Don Quixote -- Don Quixote de la Mancha quix...@dulcineatech.com http://www.dulcineatech.com Dulcin

Re: FREED(id)

2010-03-19 Thread Don Quixote de la Mancha
figure out any other way. Don Quixote -- Don Quixote de la Mancha quix...@dulcineatech.com http://www.dulcineatech.com Dulcinea Technologies Corporation: Software of Elegance and Beauty. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Ple

Re: FREED(id)

2010-03-19 Thread Don Quixote de la Mancha
ime, and so is more likely to be closer to the original release. Don Quixote -- Don Quixote de la Mancha quix...@dulcineatech.com http://www.dulcineatech.com Dulcinea Technologies Corporation: Software of Elegance and Beauty. ___ Cocoa-dev mail

Re: Lock a file in cocoa

2010-03-19 Thread Don Quixote de la Mancha
st holding the file open should prevent it from being deleted. Don Quixote -- Don Quixote de la Mancha quix...@dulcineatech.com http://www.dulcineatech.com Dulcinea Technologies Corporation: Software of Elegance and Beauty. ___ Cocoa-dev mailing l

Re: Case sensitive fileName

2010-03-17 Thread Don Quixote de la Mancha
files all at once. Your realpath method while undoubtably better for a single file might actually be slower than readdir if one uses it for many files that are all in a single directory. Don Quixote -- Don Quixote de la Mancha quix...@dulcineatech.com http://www.dulcineatech.com Dulcinea Technologi

Re: Case sensitive fileName

2010-03-17 Thread Don Quixote de la Mancha
h the whole directory anyway. So it wouldn't be any slower to roll the code himself. A C function that used readdir to get the case-preserved filename shouldn't be more than ten lines of code or so. Don Quixote -- Don Quixote de la Mancha quix...@dulcineatech.com http://www.dulcineatec

Re: Case sensitive fileName

2010-03-17 Thread Don Quixote de la Mancha
ivate use of the library call, and isn't meant to make sense or be portable. If readdir does work on OS X, it will get you the filename as it is actually found in the filesystem - that is, with the case preserved. Look up "man 3 readdir" and friends. Don Quixote -- Don Quixo

Re: Blocked Reads

2010-03-16 Thread Don Quixote de la Mancha
rt of each read aligned at multiples of 2048. Mike -- Don Quixote de la Mancha quix...@dulcineatech.com http://www.dulcineatech.com Dulcinea Technologies Corporation: Software of Elegance and Beauty. ___ Cocoa-dev mailing list (Cocoa-dev@lists.appl

Re: Cut and paste out of/ into text fields in a separate window doesn't work

2010-03-15 Thread Don Quixote de la Mancha
st doesn't, or it tries to but it is buggy. Don Quixote -- Don Quixote de la Mancha quix...@dulcineatech.com http://www.dulcineatech.com Dulcinea Technologies Corporation: Software of Elegance and Beauty. ___ Cocoa-dev mailing list (Cocoa-dev@list

Re: mount dmg disk

2010-03-15 Thread Don Quixote de la Mancha
name of the program. That way you can name the executable anything you like, and error messages will always be correct. Don Quixote -- Don Quixote de la Mancha quix...@dulcineatech.com http://www.dulcineatech.com Dulcinea Technologies Corporation: Softw

Re: mount dmg disk

2010-03-15 Thread Don Quixote de la Mancha
ted, but it does work if you can figure it out. I might have some sample code I could dig up if you're not able to figure it out on your own. Don Quixote -- Don Quixote de la Mancha quix...@dulcineatech.com http://www.dulcineatech.com Dulcinea Technologies Corporation: Software o

Re: Deleted Ressource folder

2010-03-15 Thread Don Quixote de la Mancha
drive of my career. Don Quixote -- Don Quixote de la Mancha quix...@dulcineatech.com http://www.dulcineatech.com Dulcinea Technologies Corporation: Software of Elegance and Beauty. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Which iPhone Program?

2010-03-15 Thread Don Quixote de la Mancha
ander Spohr wrote: > PS. I’d think all this info is on Apple’s site somewhere... Actually it's not. I looked pretty carefully before I wrote to the list. Thanks, Don Quixote -- Don Quixote de la Mancha quix...@dulcineatech.com http://www.dulcineatech.com Dulcinea Technologie

Which iPhone Program?

2010-03-12 Thread Don Quixote de la Mancha
is made completely explicit. Thank you for any insight you can give me, Don Quixote -- Don Quixote de la Mancha quix...@dulcineatech.com http://www.dulcineatech.com Dulcinea Technologies Corporation: Software of Elegance and Beauty. ___ Cocoa-dev

Re: Key-Value Observing speed

2010-03-12 Thread Don Quixote de la Mancha
ld expect modern Intel processors to have such fast floating point, but probably not the iPhone's ARM processor. Don Quixote -- Don Quixote de la Mancha quix...@dulcineatech.com http://www.dulcineatech.com Dulcinea Technologies Corporation: Soft