Re: [swift-corelibs-dev] [swift-evolution] Proposal: Swift Open Source Project and Foundation replacements

2015-12-03 Thread Maxthon Chan
Both GNUstep and Cocotron have already achieved this “OS independence and portability” better than you think, on a wider variety of platforms - Linux as well as Windows and FreeBSD. So if you open up the Objective-C compatibility layer and leave the Foundation to them you may have even better OS

Re: [swift-corelibs-dev] Proposal: Swift Open Source Project and Foundation replacements

2015-12-03 Thread Maxthon Chan
ner wrote: > > >> On Dec 3, 2015, at 12:01 PM, Maxthon Chan wrote: >> >> Dear Swift developers: >> >> Maybe you have never heard of it, but there have been several ongoing >> efforts, like GNUstep and Cocotron, at maintaining an open source Fo

Proposal: Swift Open Source Project and Foundation replacements

2015-12-03 Thread Maxthon Chan
Dear Swift developers: Maybe you have never heard of it, but there have been several ongoing efforts, like GNUstep and Cocotron, at maintaining an open source Foundation reimplementation for alternative operating systems like Linux. It seemed to me that the current release of Swift did not put

Re: Using XCTOOL

2015-04-07 Thread Maxthon Chan
I am thinking rewriting buildtool using CoreFoundation API to break dependency on gnustep-make and gnustep-base. I am thinking creating forks of base, libobjc2 and corebase projects and rearrange some code, to resolve some compatibility issues and modernise code to take as many advantage as pos

Failed to build on Ubuntu 13.04 Server with augmented clang/LLVM.

2013-07-18 Thread Maxthon Chan
clang is surprisingly fast if built with LLVM link-time optimisation - even faster than GCC, from my experience. So I am setting up a new server with this LTO’d clang. But then I get a SIGSEGV when testing libobjc2 built with this augment clang. Can anyone test and tell me the reason why? Build

Failed to build on Ubuntu 13.04 Server with augmented clang/LLVM.

2013-07-17 Thread Maxthon Chan
clang is surprisingly fast if built with LLVM link-time optimisation - even faster than GCC, from my experience. So I am setting up a new server with this LTO’d clang. But then I get a SIGSEGV when testing libobjc2 built with this augment clang. Can anyone test and tell me the reason why? Build

Re: Another simple reversing of OS X Foundation and CoreFoundation

2013-06-19 Thread Maxthon Chan
eversing Apple's Cocoa to make OS X apps run under Linux... Sent from my iPhone > On 2013年6月19日, at 21:28, Luboš Doležel wrote: > >> On Wed, 19 Jun 2013 21:18:18 +0800, Maxthon Chan wrote: >> Given that: >> >> 1) Apple did not patent Cocoa and/or their impleme

Re: Another simple reversing of OS X Foundation and CoreFoundation

2013-06-19 Thread Maxthon Chan
n took > effect on the mail server. > > Greg > > >> On Wed, Jun 19, 2013 at 10:54 AM, Maxthon Chan wrote: >> Forgot to mention, OS X 10.9 is based on iOS 6. >> >> Sent from my iPhone >> >>> On 2013年6月19日, at 22:33, Gregory Casamento wro

Re: Another simple reversing of OS X Foundation and CoreFoundation

2013-06-19 Thread Maxthon Chan
les, ignoring the values that many of the >> people on this list share with the organisation that "owns", in its way, the >> GNUstep project. It is not a surprise that these people are, as a result, >> asking you to avoid repeating your mistakes or even calling for you t

Re: Another simple reversing of OS X Foundation and CoreFoundation

2013-06-19 Thread Maxthon Chan
oring the values that many of the >> people on this list share with the organisation that "owns", in its way, the >> GNUstep project. It is not a surprise that these people are, as a result, >> asking you to avoid repeating your mistakes or even calling for you to b

Re: Another simple reversing of OS X Foundation and CoreFoundation

2013-06-19 Thread Maxthon Chan
Given that: 1) Apple did not patent Cocoa and/or their implementation of CoreFoundation, and 2) GNUstep contains no Apple code We will be good, as Apple have no reason to drag us into trouble. We are not infringing any IP at all if that two conditions is met. Just look at Mono which is a binary

Re: Another simple reversing of OS X Foundation and CoreFoundation

2013-06-19 Thread Maxthon Chan
ote: > >> On 19 Jun 2013, at 13:26, Maxthon Chan wrote: >> >> This analyse is based on OS X 10.8 SDK from Xcode 4.6, and OS X 10.9 DP1 >> binaries. > > You have been asked repeatedly before not to post information gleaned in this > manner to this list. >

Another simple reversing of OS X Foundation and CoreFoundation

2013-06-19 Thread Maxthon Chan
$for fmwk in Foundation CoreFoundation; do class-dump /System/Library/Framework/$fmwk.framework -H -o ~/Developer/$fmwk; done And I got a set of class dump of Foundation and CoreFoundation of OS X. And examining the files I think I found something: * A significant portion of what OS X called Fo

GNUstep headers for Xcode

2013-06-18 Thread Maxthon Chan
https://www.dropbox.com/s/gb370rbxti65gim/GNUstep.tar.gz Here it is. Tested on Xcode 4.6 and Xcode 5. Drop them to where Xcode carried their OS X SDK and toolchain and you are good to go. Compiling does not work now, as the target OS is Linux which Xcode does not support, and it does not show .

Re: Extending gnustep-tests for .c and .cc files

2013-06-17 Thread Maxthon Chan
If someone really does not need ObjC stuff here, they will go to CFLite instead. On Jun 17, 2013, at 20:57, Stefan Bidi wrote: > I was specifically trying not to link against the ObjC runtime and > gnustep-base. The reason for that is because I would like to support > building corebase withou

Re: Extending gnustep-tests for .c and .cc files

2013-06-16 Thread Maxthon Chan
One thing failed: I cannot cross-compile libc++. This can be problematic on the final toolchain as Xcode defaults to it. On Jun 17, 2013, at 11:32, Maxthon Chan wrote: > Partial success: now I can get editing work on Xcode with all code completion > things. So the tasks coming now is t

Re: Extending gnustep-tests for .c and .cc files

2013-06-16 Thread Maxthon Chan
Partial success: now I can get editing work on Xcode with all code completion things. So the tasks coming now is to make sure it edits with Objective-C. Cross-building will be a total different story as clearly OS X does not run ELF and Xcode have guards against it. (However it does make it easi

Re: Cross-develop GNUstep apps in OS X (Was: Base BFD support: limit GPL spreading?)

2013-06-16 Thread Maxthon Chan
th the Linux and OS X > portions of the toolchain. > > On Sun, Jun 16, 2013 at 2:20 PM, Maxthon Chan wrote: > I will build a toolchain based on my Ubuntu installation for Xcode 5: > > * Whatever version of basic system libraries copied from Ubuntu 13.04 as of > now > *

回复:Re: Base BFD support: limit GPL spreading?

2013-06-16 Thread Maxthon Chan
You mean sort of like using an environment variable GS_LOAD_DEBUG=BFD (or GS_LOAD_DEBUG=LLDB for LLDB, and GS_LOAD_DEBUG=NO to explicitly prohibit it) to control it? By default this BFD (or LLDB) bundle is not loaded (changeable at base ./configure) and can be loaded on need?2013年6月16日 下午11:31,Rich

Re: Cross-develop GNUstep apps in OS X (Was: Base BFD support: limit GPL spreading?)

2013-06-16 Thread Maxthon Chan
targeting 64-bit Linux with gold, * Templates based on OS X templates * SenTestingKit * and maybe network-backed LLDB remote debugging Sent from my iPhone > On 2013年6月16日, at 19:53, David Chisnall wrote: > >> On 16 Jun 2013, at 12:49, Maxthon Chan wrote: >> >> Also on t

Cross-develop GNUstep apps in OS X (Was: Base BFD support: limit GPL spreading?)

2013-06-16 Thread Maxthon Chan
> On 2013年6月16日, at 19:39, David Chisnall wrote: > >> On 16 Jun 2013, at 12:28, Maxthon Chan wrote: >> >> Then it is going to be something awkward: one cannot legally link 2-clause >> BSDL binary against GPL one, and CGIKit is 2-clause BSDL > > Please talk

Re: Base BFD support: limit GPL spreading?

2013-06-16 Thread Maxthon Chan
against in LGPL without promoting to GPL, which in turn can be linked against in BSDL like CGIKit) On Jun 16, 2013, at 19:19, David Chisnall wrote: > On 16 Jun 2013, at 12:14, Maxthon Chan wrote: > >> I know my CGIKit, a simple CGI-based Objective-C web service library, may >> r

Re: Base BFD support: limit GPL spreading?

2013-06-16 Thread Maxthon Chan
I know my CGIKit, a simple CGI-based Objective-C web service library, may rely on this - when an exception is caught it will create a HTTP 500 page with good error backtrace, if the programmer so desires. On Jun 16, 2013, at 19:04, David Chisnall wrote: > On 16 Jun 2013, at 11:52, Gregory Cas

Re: Base BFD support: limit GPL spreading?

2013-06-16 Thread Maxthon Chan
t is not really the place to ask for legal advice such as this as > none of us are lawyers. > > Gregory Casamento > greg.casame...@gmail.com > Open Logic Corporation, President/CEO > GNUstep Lead Developer > > > On Jun 16, 2013, at 6:40 AM, Maxthon Chan wrote: > &

Base BFD support: limit GPL spreading?

2013-06-16 Thread Maxthon Chan
Is there any way to prevent GPL from spreading into GNUstep Base (and everything that is built on top of it) when using BFD support? Is it possible to: 1) Use some alternative technologies, like LLVM and its subproject LLDB, or 2) Split the BFD support into a loadable bundle which is loaded inst

Re: WWDC 2013: Apple disclosed their pointer tagging implementation.

2013-06-16 Thread Maxthon Chan
I think the latest version of CFLite is in APSL v2 which is FSF approved. On Jun 16, 2013, at 18:30, Gregory Casamento wrote: > I stand corrected. My apologies. As I recall they are incompatible because > there is a clause in the apsl which allows apple to revoke your right to use > the code.

Re: WWDC 2013: Apple disclosed their pointer tagging implementation.

2013-06-15 Thread Maxthon Chan
NDA, anything >>> someone else created without improper access to the trade secret >>> information or anything that you can prove was commonly known to the >>> general public. >>> >>> ​That's why I was warning you. Typically it's dangerous to a

Re: WWDC 2013: Apple disclosed their pointer tagging implementation.

2013-06-15 Thread Maxthon Chan
the information covered in the NDA, anything someone >> else created without improper access to the trade secret information or >> anything that you can prove was commonly known to the general public. >> >> ​That's why I was warning you. Typically it's dangerous t

Re: WWDC 2013: Apple disclosed their pointer tagging implementation.

2013-06-15 Thread Maxthon Chan
> I don't want a posting here to become any grounds for Apple to cause any > issues for GNUstep. > > Gregory > > >> On Sat, Jun 15, 2013 at 5:57 AM, Maxthon Chan wrote: >> I am watching a video session from WWDC 2013 and Apple revealed their way of >> i

WWDC 2013: Apple disclosed their pointer tagging implementation.

2013-06-15 Thread Maxthon Chan
I am watching a video session from WWDC 2013 and Apple revealed their way of implementing tagged pointers: use the sole LSB, 1 for tagged pointer and 0 for normal ones. This is applied across all platforms, i386, amd64, armv7 and armv7s (compatible to armv7a in Coretx-A15 and partly compatible w

Re: FreeBSD 9.1 missing libcxxrt - is it needed for objc2?

2013-06-14 Thread Maxthon Chan
I will give you my settings once I got home (use libsupc++.a under 64-bit Ubuntu 13.04). However my settings is calling for LLVMgold.so and clang+binutils LTO support. Sent from my iPhone > On 2013年6月14日, at 17:48, David Chisnall wrote: > > >> On 14 Jun 2013, at 02:54, Frank Rehwinkel wrote

Re: Objective-C boilerplate header (sort of like boost)

2013-06-14 Thread Maxthon Chan
unctions is included by a C++ module. > > So no, I don't typically have things like what you wrote down there :-) > > Regards, > > Ivan Vučica > via phone > >> On 14. 6. 2013., at 08:58, Maxthon Chan wrote: >> >> I mean exposing a function or two fr

Re: Objective-C boilerplate header (sort of like boost)

2013-06-13 Thread Maxthon Chan
time (while > giving us the bonus of modular, reusable, easily maintainable code). Why > would you want/need to unhide details? > > >> On Fri, Jun 14, 2013 at 2:59 AM, Maxthon Chan wrote: >> Copied from Xcode and Mail saved all formatting from code highlighting as >>

Re: Objective-C boilerplate header (sort of like boost)

2013-06-13 Thread Maxthon Chan
t;> On Wed, Jun 12, 2013 at 12:25 PM, Maxthon Chan wrote: >> Do you guys have a boilerplate that you are very used to build code on top >> of? I have one like this (sans include guard which depend on header file >> name): >> >> #include >> #include >

Re: FreeBSD 9.1 missing libcxxrt - is it needed for objc2?

2013-06-12 Thread Maxthon Chan
> So I just don't know how to get this library built. Not as simple as getting > a port compiled I guess. > > > > On Wed, Jun 12, 2013 at 7:07 PM, Frank Rehwinkel > wrote: > libsupc++.a does have symbols in it. > nm -g reports no symbols on libsupc++.so.1. &

Re: FreeBSD 9.1 missing libcxxrt - is it needed for objc2?

2013-06-12 Thread Maxthon Chan
Oh it just hit me - maybe you want libsupc++.a instead of .so, which (may) ask for libc++ to build. I used to simply force linking libobjc2 against libc++ but that tend to make app load a little slower and consume some more memory (and then defeat this performance penalty by enforcing link-time

Re: FreeBSD 9.1 missing libcxxrt - is it needed for objc2?

2013-06-12 Thread Maxthon Chan
Yup. This is the library responsible of that. It is C++ ABI library, essentially a runtime library like libobjc2. (libsupc++ <-> libobjc2, libc++/libstdc++ <-> libgnustep-base, you can think of it that way.) 在 2013-6-13,上午6:39,David Chisnall 写道: > > On 12 Jun 2013, at 23:35, Frank Rehwinkel

Re: FreeBSD 9.1 missing libcxxrt - is it needed for objc2?

2013-06-12 Thread Maxthon Chan
_cxxabiv1::__class_type_inf > o const*, void**) const' > libobjc.so.4.6: undefined reference to `std::type_info::__is_pointer_p() > const' > clang-3.4: error: linker command failed with exit code 1 (use -v to see > invocation) > > > On Wed, Jun 12, 2013 at 4:43 PM

Re: Implementing NSString getBytes

2013-06-12 Thread Maxthon Chan
Apple have already fused (most of) Foundation and CF into CoreFoundation.framework. We can totally combine them too - provide a libgnustep-corebase that contains (almost) all Foundation and all CoreFoundation, and a libgnustep-base that contains the rest of Foundation, linking against CoreFound

Re: FreeBSD 9.1 missing libcxxrt - is it needed for objc2?

2013-06-12 Thread Maxthon Chan
time I used > cmake. So that explains why this problem didn't surface the first time. > > But I'm left with the first problem reported. That -base won't link with the > libobjc.so.4.6. Even when -lsup++ is added to the link options. > > >> On Wed, J

Re: FreeBSD 9.1 missing libcxxrt - is it needed for objc2?

2013-06-12 Thread Maxthon Chan
;t surface the first time. > > But I'm left with the first problem reported. That -base won't link with the > libobjc.so.4.6. Even when -lsup++ is added to the link options. > > >> On Wed, Jun 12, 2013 at 2:31 PM, Maxthon Chan wrote: >> Hmm? Maybe the -s

Re: FreeBSD 9.1 missing libcxxrt - is it needed for objc2?

2013-06-12 Thread Maxthon Chan
> > libobjc.so.4.6: undefined reference to `std::type_info::__is_pointer_p() > const' > clang-3.4: error: linker command failed with exit code 1 (use -v to see > invocation) > ninja: build stopped: sub

Re: FreeBSD 9.1 missing libcxxrt - is it needed for objc2?

2013-06-12 Thread Maxthon Chan
pc++. libsupc++ is in both the FreeBSD 9.1 host and the jail. > > Is using libsupc++ an option for building libobjc2 and gnustep-base? > > > On Wed, Jun 12, 2013 at 1:57 PM, Maxthon Chan wrote: > Download and build it separately using the same SVN head version. >

Re: FreeBSD 9.1 missing libcxxrt - is it needed for objc2?

2013-06-12 Thread Maxthon Chan
> with libsupc++. libsupc++ is in both the FreeBSD 9.1 host and the jail. > > Is using libsupc++ an option for building libobjc2 and gnustep-base? > > > On Wed, Jun 12, 2013 at 1:57 PM, Maxthon Chan wrote: > Download and build it separately using the same SVN head version.

Re: FreeBSD 9.1 missing libcxxrt - is it needed for objc2?

2013-06-12 Thread Maxthon Chan
Download and build it separately using the same SVN head version. If you built that, you should also build libc++ (LLVM's C++ runtime) and (maybe) link it against libc++rt. Also, when building gnustep-base, specify -I/usr/local/include and -L/usr/local/lib appropriately. 在 2013-6-13,上午1:54,Fra

Objective-C boilerplate header (sort of like boost)

2013-06-12 Thread Maxthon Chan
Do you guys have a boilerplate that you are very used to build code on top of? I have one like this (sans include guard which depend on header file name): #include #include #include #include #include // Feature testers #ifndef __has_feature #define __has_feature(x) 0 #endif #ifndef __has_

Re: How to correctly determine a small object?

2013-06-09 Thread Maxthon Chan
I am sort of looking at a microkernel design - inside the kernel there are only 2 drivers: tmpfs (implemented on top of NSDictionary and NSData) and tar (on top of NSArray and NSData) to make initramfs (which is a simple tar archive of all pre-filesystem kexts and services) work, and everything

Re: How to correctly determine a small object?

2013-06-08 Thread Maxthon Chan
So I can safely do this? (Macro rewritten as inline function) static inline __attribute__((always_inline)) BOOL objc_isSmallObject(id obj) { return (((intptr_t)obj) & 1) ? YES : NO; } 在 2013-6-8,上午4:10,David Chisnall 写道: > On 7 Jun 2013, at 16:29, Luboš Doležel wrote: > >> for toll-fr

Re: Question about memory management

2013-06-07 Thread Maxthon Chan
in an Objective-C header, as seen) #include // Prototype: int main(int argc, char **argv) { return CGIApplicationMain(argc, argv, NULL, "CGITestApplicationDelegate"); } 在 2013-6-7,下午4:47,David Chisnall 写道: > On 7 Jun 2013, at 09:42, Maxthon Chan wrote: > >>

Re: Question about memory management

2013-06-07 Thread Maxthon Chan
Well can I (just like NSApplication): 1) In supercalss, define the shared instance as id 2) In superclass, return the shared instance as id or instancetype 3) In superclass, DO NOT set up yet. 4) In superclass, set up in the method asking for the shared instance, which always use [[self alloc] in

Re: Question about memory management

2013-06-07 Thread Maxthon Chan
etype)sharedSingleton { @synchronized (__singleton) { if (!__singleton) __singleton = [[self alloc] init]; } return __singleton; } // … @end 在 2013-6-7,下午4:26,David Chisnall 写道: > On 7 Jun 2013, at 07:29, Maxthon Cha

Re: Question about memory management

2013-06-06 Thread Maxthon Chan
Just asking, with ARC, is this a good choice on implementing singleton? //Singleton.h #import @interface Singleton : NSObject + (instancetype)defaultSingleton; // … @end extern Singleton *DefaultSingleton // Of course this is optional // Singleton.m Singleton *DefaultSingleton @implementation Si

Re: CoreLocation clone

2013-06-04 Thread Maxthon Chan
ot sure, but it might also be enough to draw > maps. > > I'd also suggest looking into implementing CATiledLayer in QuartzCore :-) > > Regards,, > > Ivan Vučica > via phone > > On 4. 6. 2013., at 08:27, Maxthon Chan wrote: > >> Here is a list of ta

libobjc2 C++11 compatibility fix.

2013-06-04 Thread Maxthon Chan
Here is a small patch I made so that libobjc2 can be built on environments where -std=c++11 presents in CXXFLAGS. The last time when I built libobjc2 linking against libsupc++ with clang SVN (itself is built with C++11 enabled, together with lldb and linked against libc++) enabling C++11, I hit

Re: __NSCF** classes and libobjc2 dependency on C++ runtime

2013-06-04 Thread Maxthon Chan
. bridging). In this > particular case, things are done the way they are done because it is the only > sensible way without having tons special cases. > > Stef > > > On Tue, Jun 4, 2013 at 1:19 PM, Maxthon Chan wrote: > I never intend to do what Apple did in their exact

Re: __NSCF** classes and libobjc2 dependency on C++ runtime

2013-06-04 Thread Maxthon Chan
were made. The most important of > all being how CF types interact with ObjC classes (i.e. bridging). In this > particular case, things are done the way they are done because it is the only > sensible way without having tons special cases. > > Stef > > > On Tue, Jun 4,

Re: __NSCF** classes and libobjc2 dependency on C++ runtime

2013-06-04 Thread Maxthon Chan
time quite a few important design decisions were made. The most important of > all being how CF types interact with ObjC classes (i.e. bridging). In this > particular case, things are done the way they are done because it is the only > sensible way without having tons special cases.

Re: __NSCF** classes and libobjc2 dependency on C++ runtime

2013-06-04 Thread Maxthon Chan
unLoop. It will have an isa pointer of this class. @interface GSCFRunLoop : NSProxy // … @end 在 2013-6-5,上午1:52,Ivan Vučica 写道: > Maxton, > > On 4. 6. 2013., at 19:27, Maxthon Chan wrote: > >>> My reason on saying that you may not be clear what Apple is doing: >&g

Re: __NSCF** classes and libobjc2 dependency on C++ runtime

2013-06-04 Thread Maxthon Chan
If you are worried about legal issues, just see how happily ReactOS project is going. Their aim is a *complete Windows clone* that is *binary compatible* and Microsoft have no issue with them. If Apple have an issue about this, they should have already sued FSF and shut this project down. 在 201

Fwd: __NSCF** classes and libobjc2 dependency on C++ runtime

2013-06-04 Thread Maxthon Chan
下面是被转发的邮件: > 发件人: Maxthon Chan > 主题: 回复: __NSCF** classes and libobjc2 dependency on C++ runtime > 日期: 2013年6月5日 GMT+0800上午1时20分19秒 > 收件人: David Chisnall > > My reason on saying that you may not be clear what Apple is doing: > > It seemed to me that you have totally

Fwd: CoreLocation clone

2013-06-03 Thread Maxthon Chan
下面是被转发的邮件: > 发件人: Maxthon Chan > 主题: 回复: CoreLocation clone > 日期: 2013年6月4日 GMT+0800下午2时10分09秒 > 收件人: Sebastian Reitenbach > > Given that, I would like to back port. Also, I would like to eliminate the > need for a tile generating service too, as GNUstep have

Re: CoreLocation clone

2013-06-03 Thread Maxthon Chan
and 3. 在 2013-6-4,下午2:06,Sebastian Reitenbach 写道: > > On Tuesday, June 4, 2013 02:45 CEST, Ivan Vučica wrote: > >> >> On 4. 6. 2013., at 01:02, Maxthon Chan wrote: >> >>> From what I know, you can use Android location services without Google Maps >

Re: CoreLocation clone

2013-06-03 Thread Maxthon Chan
>> >>> The MapKit for OS X in question seemed used only public Google Maps API. It >>> is freely licensed as well, no key required and the author himself is not >>> in trouble as well. >> >> Did you read Google Maps API terms of service and, more impo

Re: Question about memory management

2013-06-03 Thread Maxthon Chan
code over to a Linux box and remotely debug. It should not be that difficult to build cross-compiling binutils and LLVM/clang targeting Linux under OS X, and consist them into a SDK/toolchain for Xcode. 在 2013-6-4,上午8:58,Ivan Vučica 写道: > On 4. 6. 2013., at 02:14, Maxthon Chan wr

Fwd: CoreLocation clone

2013-06-03 Thread Maxthon Chan
下面是被转发的邮件: > 发件人: Maxthon Chan > 主题: 回复: CoreLocation clone > 日期: 2013年6月4日 GMT+0800上午9时07分39秒 > 收件人: Ivan Vučica > > Agree on most of that, but one problem about tiles: can we do that ourselves, > distributed, use Display PostScript (probably backed up by Cairo or

Re: Question about memory management

2013-06-03 Thread Maxthon Chan
Can you compile it with -fobjc-arc and check again? Probably with ARC you can have some ideas. 在 2013-6-4,上午7:33,Germán Arias 写道: > For autocomplete I have a class GSAutocompleteWIndow. The > method -complete: (in NSTextVIew) do something like: > > GSAutocompleteWindow *window = [GSAutocomplet

Re: CoreLocation clone

2013-06-03 Thread Maxthon Chan
And by what I say as crowd-sourcing, I mean ask users that are willing to share for information. What we are asking for here is several numbers: AP BSSID, transmission power, and its geological location (latitude and longitude, as well as height). The request is done by the device uploading a li

Re: CoreLocation clone

2013-06-03 Thread Maxthon Chan
required and the author himself is not in trouble as well. 在 2013-6-4,上午6:19,Ivan Vučica 写道: > On 3. 6. 2013., at 23:56, Maxthon Chan wrote: > >> Well given Android is (at least partially) open-sourced, is it possible to >> search their source code for their Wi-Fi geolocation API?

__NSCF** classes and libobjc2 dependency on C++ runtime

2013-06-03 Thread Maxthon Chan
I did some research on how Apple implemented Objective-C exceptions and CoreFoundation on iOS (iOS 6.1.3 on iPhone 4S) and I found something that we can use. If you want me to test anything, please reply to this Email and I will test it for you. I have three devices to test: iOS 6.1.3 on iPhone

Re: MAC_OS_X_VERSION macros

2013-06-03 Thread Maxthon Chan
Don't panic, as Apple will switch back in no more than 2 years - when they reached OS X 10.10 (OS X 10.9 is pretty much confirmed in this year's WWDC - I am a paid iOS developer so I have access to these "Apple Prerelease" information. Or maybe at that time there will be no more OS X, and the ne

Re: CoreLocation clone

2013-06-03 Thread Maxthon Chan
Well given Android is (at least partially) open-sourced, is it possible to search their source code for their Wi-Fi geolocation API? Implement that as a loadable bundle to prevent licensing issue. (this CoreLocation clone can be LGPL so that this bundle, probably under Apache license as derived

Fwd: CoreLocation clone

2013-06-03 Thread Maxthon Chan
下面是被转发的邮件: > 发件人: Maxthon Chan > 主题: 回复: CoreLocation clone > 日期: 2013年6月4日 GMT+0800上午4时06分54秒 > 收件人: David Wetzel > > If so, how about hack into it and clone CoreLocation? As of now, we need to > hack out 1) using Google API (lots of NSURLConnection things, maybe

Fwd: OS X/objc2: is clang required to build GNUstep-base?

2013-06-02 Thread Maxthon Chan
下面是被转发的邮件: > 发件人: Maxthon Chan > 主题: 回复: OS X/objc2: is clang required to build GNUstep-base? > 日期: 2013年6月3日 GMT+0800上午3时29分01秒 > 收件人: Frank Rehwinkel > > 1) Do you have Xcode installed? I mean Xcode 4.6.2. > 2) If you have Xcode installed, do you have command line tool

Fwd: GNUStep on MacOS

2013-05-27 Thread Maxthon Chan
Sorry I messed up with the mail list. 下面是被转发的邮件: > 发件人: Maxthon Chan > 主题: 回复: GNUStep on MacOS > 日期: 2013年5月28日 GMT+0800上午4时22分25秒 > 收件人: Frank Rehwinkel > > I cannot even build the Additions on OS X. > > As I used to introduce, I am working on a Objective-C HTTP ser

Re: libobjc2 cmake C++ library issue

2013-05-21 Thread Maxthon Chan
Well somehow I managed to compiled it with CXXFLAGS="-std=c++11 -stdlib=libc++" and linked libobjc (with Objective-C++ support) against libc++ (LLVM's C++11 standard library), that is I made a huge hump of libraries, libobjc2, libdispatch and LLVM's libc++ all linked together. I always use libo

Re: I think I figured out how Apple did their toll-free bridging.

2013-05-18 Thread Maxthon Chan
That doesn't matter if we keep internal consistency. That is, the memory management of CoreFoundation objects are all done via bridging to Objective-C code, no matter if it is toll-free or not (For non-toll-free objects, the private Objective-C class corresponding to the CoreFoundation object i

Talks about HTTP server (Was: Re: Function move request.)

2013-05-16 Thread Maxthon Chan
cuments. 在 2013-5-17,上午3:30,Luboš Doležel 写道: > On 05/16/2013 08:26 PM, Maxthon Chan wrote: >> Well Apple documented CFRetain and CFRelease as replacements of >> retain/release methods on NSObject which is prohibited with ARC, and >> from an incident I discovered that: >&g

Function move request.

2013-05-16 Thread Maxthon Chan
I have some portability issues when I mix ARC with some occasional manual retains (especially when hand writing encoders and decoders). The offending function is CFRetain and CFRelease, which is, as documented by Apple, recommended as replacements of (forbidden by ARC) -[NSObject retain] and -[

Re: GModel support

2013-04-14 Thread Maxthon Chan
xcodeproj bundles? As well as provide those Xcode command line tools, including xcrun, xcodebuild and like? 在 2013-4-14,下午6:42,David Chisnall 写道: > How is that in any way even remotely relevant to a discussion of gmodel > support in -gui? > > David > > On 13 Apr 2013, a

Re: GModel support

2013-04-13 Thread Maxthon Chan
JSON-based protocol over HTTPS to the server, hence I wrote AutoProtocol. It is open sourced, but license is not yet decided. If you guys are interested, I will LGPL it (after removing my project-specific code); or else, i will BSDL it. 在 2013-4-13,下午3:57,Riccardo Mottola 写道: > Maxthon Ch

Re: GModel support

2013-04-13 Thread Maxthon Chan
Um, I think my project, a partly open-source social aggregation software, WebFusion, will have a Linux version that is a direct port (as in almost 100% code reused) from the Mac version. Hence it will not be the last known application. You can check out my GitHub for this project: https://gith

Re: NSURLConnection and SSL

2013-04-11 Thread Maxthon Chan
Case seemed to be dismissed. This issue seemed is more about reflective KVC. 在 2013-4-11,下午8:51,Maxthon Chan 写道: > #import > > int main(void) > { > @autoreleasepool > { > NSURL *URL = [NSURL URLWithString:@"https://www.google.com/";

Re: NSURLConnection and SSL

2013-04-11 Thread Maxthon Chan
against Apple's Foundation) By the way, my extension will export a load of extra API which is technically a wrapper around libcurl functions. 在 2013-4-11,下午5:14,Richard Frith-Macdonald 写道: > > On 11 Apr 2013, at 09:59, Maxthon Chan wrote: > >> About this issue, I am rewritin

Re: NSURLConnection and SSL

2013-04-11 Thread Maxthon Chan
iling list, as I wont be looking >> into this any further. >> >> On 10.04.2013 09:49, Maxthon Chan wrote: >>> Well you can just try grab data from https://www.google.com/ using >>> NSURLConnection. It should return an HTML page with status code 200 (the >>

Re: Bug: libobjc2 property name introspection.

2013-04-09 Thread Maxthon Chan
which prints some output that is > obviously right or wrong, or which asset()s the correct output. > > David > > On 9 Apr 2013, at 17:19, Maxthon Chan wrote: > >> I will just copy/paste some code from my actual project. Compile without >> -DGNUSTEP: >> &g

Fwd: Bug: libobjc2 property name introspection.

2013-04-09 Thread Maxthon Chan
Sorry, messed up again. 下面是被转发的邮件: > 发件人: Maxthon Chan > 主题: 回复: Bug: libobjc2 property name introspection. > 日期: 2013年4月10日 GMT+0800上午12时33分52秒 > 收件人: David Chisnall > > Here is one, exposes this bug well: > > #import > #import > > @interface TFoo

Re: Bug: libobjc2 property name introspection.

2013-04-09 Thread Maxthon Chan
Ignore the missing methods. They are handled by the base class using method "forwarding". (I abused it to send JSON-based data to a server, calling methods there.) 在 2013-4-10,上午12:13,David Chisnall 写道: > Please send me a (simple) test case. > > David > > On 9 Ap

Bug: libobjc2 property name introspection.

2013-04-09 Thread Maxthon Chan
When I enumerate a class for all its properties and querying its name, the name of last property is always cobbled. I have to use some "quick & dirty" way (i.e add a dummy property at the end) to prevent this from affecting. OS X does not have this issue, though. Can anyone figure out what is w

NSURLConnection and SSL

2013-04-09 Thread Maxthon Chan
Hi Everyone: I am writing a project for OS X, iOS and Linux, and a cross-platform lore library is called for. This following code works fine under both OS X and iOS, but are very problematic under Linux using GNUstep: - (NSData *)dataWithData:(NSData *)data fromMethod:(NSString *)method error:

Re: CoreBase toll-free bridging

2013-03-26 Thread Maxthon Chan
Based on your research, I am seriously doubting what is actually inside the CoreFoundation binary: is it possible that actually all Objective-C code that involves toll-free bridging or like, or maybe even more, that is documented as located in Foundation, is actually located right in CoreFoundat

Re: CoreBase toll-free bridging

2013-03-26 Thread Maxthon Chan
However this is the Apple approach. Can we just think out of the box and maintain just API interoperability? As I said, Apple used Core Foundation to serve both Cocoa and Carbon simultaneously, which is asking for a C API (Cocoa was in Objective-C and Carbon was C++, and there wasn't a good imp

Re: CoreBase toll-free bridging

2013-03-15 Thread Maxthon Chan
800, Maxthon Chan wrote: >> I think I scored one on suggesting implementing CF in ObjC here. :) > > Well, I have my doubts about this claim. Especially because of > >>> "If you look at the Darwin sources, you'll see that the iPhone's >>> CoreFoundation cla

Re: CoreBase toll-free bridging

2013-03-15 Thread Maxthon Chan
I think I scored one on suggesting implementing CF in ObjC here. :) There are very few iOS code available out there, so it is very difficult to hack into that. By the way, I do have an paid Apple iOS Developer account so maybe I can verify something for you? Maybe check iPhone's CF framework's

Re: CoreBase toll-free bridging

2013-03-15 Thread Maxthon Chan
You should remember as of now, OS X code is still "fat binaries" that runs on both 32-bit and 64-bit environments and Carbon libraries are still there, so OS X still needs that C-based CF to support Carbon and Cocoa in the same time. However on iOS there is no Carbon in the first place thus they

Re: CoreBase toll-free bridging

2013-03-11 Thread Maxthon Chan
Can we make a GSPointerWrapper class or like to wrap non-objects into objects so that they can be safely placed into the existing NSArray/NSDictionary objects in order to implement CF objects in Objective-C? And as I said, CoreFoundation is designed to support both Foundation and Carbon on OS X,

Re: Creating PDF reports

2013-02-27 Thread Maxthon Chan
An alternative idea: stick to original NeXTSTEP method? As what I know, NeXTSTEP use Display PostScript to manifest GUI, and is "essentially PDF". So is it possible to use that old method to output PDF, that is, get the portion out from the DPS frame? 在 2013-2-27,下午7:35,Robert Slover 写道: > If

Re: [GSoC Mentors Announce] Google Summer of Code 2013

2013-02-26 Thread Maxthon Chan
About reimplementing UIKit, you can actually map UIKit to AppKit. Those code are largely similar. p.s. Is there any tool that converts Xcode project into Makefile? 在 2013-2-26,下午4:21,Luboš Doležel 写道: > On 25.2.2013 11:17, Ivan Vučica wrote: >> I think it might also be a better year for me to

Re: person interested in GNUstep development

2013-02-22 Thread Maxthon Chan
Dear Johan: Hello. 1) Objective-C 2.0 is creation of Apple Inc. and is incorporated into OS X 10.5 (partially) / 10.7 (completely) and iOS 4.3 (partially) / 5.0 (completely). For GNUstep, the latest svn build of GNUstep can support most of the Objective-C 2.0 features if using clang as the com

Re: DO and "leaked" connection object

2013-02-05 Thread Maxthon Chan
Well if you want to use ARC, you need libobjc2 instead of original libobjc, and compile using clang with -fobjc-arc flag, assuming you are using a 64-bit machine. You can read Apple's documentation on ARC. 在 2013-2-5,下午5:42,Riccardo Mottola 写道: > Maxthon Chan wrote: >> Just an

Re: DO and "leaked" connection object

2013-02-05 Thread Maxthon Chan
Just an idea, will ARC work? 在 2013-2-5,下午5:20,Riccardo Mottola 写道: > Hi, > > when writing the server side with DO I do (since I copied it from the > examples I found around the net, including our tutorial): > >// we set up distributed objects >port1 = [NSPort port]; >port2 = [NSP

  1   2   >